diff options
author | Sam James <sam@gentoo.org> | 2023-04-14 04:13:07 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-04-14 04:23:03 +0100 |
commit | 8763b1b03668dc7b0a681225b55552013f216f4c (patch) | |
tree | bbe09d40a7a571c7dbfd2bc9a32ab377af8d6979 /sci-libs | |
parent | app-metrics/collectd: fix configure w/ clang 16 (diff) | |
download | gentoo-8763b1b03668dc7b0a681225b55552013f216f4c.tar.gz gentoo-8763b1b03668dc7b0a681225b55552013f216f4c.tar.bz2 gentoo-8763b1b03668dc7b0a681225b55552013f216f4c.zip |
sci-libs/hdf5: fix configure w/ clang 16
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/hdf5/files/hdf5-1.12.2-configure-clang16.patch | 30 | ||||
-rw-r--r-- | sci-libs/hdf5/hdf5-1.12.2-r6.ebuild (renamed from sci-libs/hdf5/hdf5-1.12.2-r5.ebuild) | 1 |
2 files changed, 31 insertions, 0 deletions
diff --git a/sci-libs/hdf5/files/hdf5-1.12.2-configure-clang16.patch b/sci-libs/hdf5/files/hdf5-1.12.2-configure-clang16.patch new file mode 100644 index 000000000000..f341fa99ddac --- /dev/null +++ b/sci-libs/hdf5/files/hdf5-1.12.2-configure-clang16.patch @@ -0,0 +1,30 @@ +https://github.com/HDFGroup/hdf5/commit/9dd36f016a4316b94f5df15856d228de01d304c6 + +From 9dd36f016a4316b94f5df15856d228de01d304c6 Mon Sep 17 00:00:00 2001 +From: Ryan Schmidt <ryandesign@macports.org> +Date: Thu, 17 Nov 2022 16:28:44 -0600 +Subject: [PATCH] Simplify & fix check for szlib encoder (#2263) + +Return the result rather than setting the exit code. "return" is a +language keyword whereas "exit" is a function for which the <stdlib.h> +header has to be included which it wasn't in this test, therefore the +test would previously fail to identify that the encoder was enabled if +"-Werror=implicit-function-declaration" was used, which it is by default +with clang from Xcode 12 and later. + +Fixes #2262 +--- a/configure.ac ++++ b/configure.ac +@@ -1737,10 +1737,7 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then + #include "szlib.h" + ],[[ + /* SZ_encoder_enabled returns 1 if encoder is present */ +- if(SZ_encoder_enabled() == 1) +- exit(0); +- else +- exit(1); ++ return SZ_encoder_enabled() != 1; + ]])] + , [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)] + ) + diff --git a/sci-libs/hdf5/hdf5-1.12.2-r5.ebuild b/sci-libs/hdf5/hdf5-1.12.2-r6.ebuild index c27c86b3a6eb..c723c3ad3dde 100644 --- a/sci-libs/hdf5/hdf5-1.12.2-r5.ebuild +++ b/sci-libs/hdf5/hdf5-1.12.2-r6.ebuild @@ -38,6 +38,7 @@ PATCHES=( "${FILESDIR}"/${PN}-1.8.9-static_libgfortran.patch "${FILESDIR}"/${PN}-1.12.2-no-messing-ldpath.patch "${FILESDIR}"/${PN}-1.12.2-no-strip-symbols.patch + "${FILESDIR}"/${PN}-1.12.2-configure-clang16.patch ) pkg_setup() { |