summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-05-10 02:24:28 +0100
committerSam James <sam@gentoo.org>2024-05-10 02:24:28 +0100
commit359a269725785328df0c0cf856d1e8374d98735e (patch)
tree720016e44d85a98ce0482111d8f26042c0b4f7a9 /sci-libs
parentdev-perl/Business-ISBN-Data: add 20240509.1.0 (diff)
downloadgentoo-359a269725785328df0c0cf856d1e8374d98735e.tar.gz
gentoo-359a269725785328df0c0cf856d1e8374d98735e.tar.bz2
gentoo-359a269725785328df0c0cf856d1e8374d98735e.zip
sci-libs/plplot: fix modern C issue in (CMake) configure
Closes: https://bugs.gentoo.org/879761 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/plplot/files/plplot-5.15.0_p6-configure-c99.patch18
-rw-r--r--sci-libs/plplot/plplot-5.15.0_p6-r1.ebuild (renamed from sci-libs/plplot/plplot-5.15.0_p6.ebuild)1
2 files changed, 19 insertions, 0 deletions
diff --git a/sci-libs/plplot/files/plplot-5.15.0_p6-configure-c99.patch b/sci-libs/plplot/files/plplot-5.15.0_p6-configure-c99.patch
new file mode 100644
index 000000000000..60bb7aaf4501
--- /dev/null
+++ b/sci-libs/plplot/files/plplot-5.15.0_p6-configure-c99.patch
@@ -0,0 +1,18 @@
+https://bugs.gentoo.org/879761
+https://sourceforge.net/p/plplot/patches/37/
+
+Avoid implicitly declaring exit. Future compilers will not support
+implicit function declarations, so this cmake probe will always fail.
+
+--- a/cmake/modules/TestForHighBitCharacters.c
++++ b/cmake/modules/TestForHighBitCharacters.c
+@@ -17,6 +17,6 @@ int
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i))
+- exit(1);
+- exit (0);
++ return 1;
++ return 0;
+ }
+
diff --git a/sci-libs/plplot/plplot-5.15.0_p6.ebuild b/sci-libs/plplot/plplot-5.15.0_p6-r1.ebuild
index 57b6884acdff..9ea598c98339 100644
--- a/sci-libs/plplot/plplot-5.15.0_p6.ebuild
+++ b/sci-libs/plplot/plplot-5.15.0_p6-r1.ebuild
@@ -120,6 +120,7 @@ src_prepare() {
for p in $(<"${WORKDIR}"/debian/patches/series) ; do
eapply -p1 "${WORKDIR}/debian/patches/${p}"
done
+ eapply "${FILESDIR}"/${PN}-5.15.0_p6-configure-c99.patch
# avoid installing license
sed -i -e '/COPYING.LIB/d' CMakeLists.txt || die