1 |
commit: e1ab113ab5191355b1c4738ddef01a79126710ae |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 28 23:31:30 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 1 02:30:15 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1ab113a |
7 |
|
8 |
sci-libs/gsl: fix configure w/ clang 16 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/898410 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../gsl/files/gsl-2.7.1-configure-clang16.patch | 26 ++++++++++++++++++++++ |
14 |
.../{gsl-2.7.1-r1.ebuild => gsl-2.7.1-r2.ebuild} | 10 +++++---- |
15 |
2 files changed, 32 insertions(+), 4 deletions(-) |
16 |
|
17 |
diff --git a/sci-libs/gsl/files/gsl-2.7.1-configure-clang16.patch b/sci-libs/gsl/files/gsl-2.7.1-configure-clang16.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..ba239563a38e |
20 |
--- /dev/null |
21 |
+++ b/sci-libs/gsl/files/gsl-2.7.1-configure-clang16.patch |
22 |
@@ -0,0 +1,26 @@ |
23 |
+https://bugs.gentoo.org/898410 |
24 |
+https://savannah.gnu.org/bugs/?63679 |
25 |
+ |
26 |
+Avoid calling the undeclared exit function and future failures |
27 |
+with compilers which do not support implicit function declarations. |
28 |
+ |
29 |
+--- a/configure.ac |
30 |
++++ b/configure.ac |
31 |
+@@ -449,7 +449,7 @@ int main (void) |
32 |
+ inf = exp(1.0e10); |
33 |
+ nan = inf / inf ; |
34 |
+ status = (nan == nan); |
35 |
+- exit (status); |
36 |
++ return status; |
37 |
+ }]])],[ac_cv_c_ieee_comparisons="yes"],[ac_cv_c_ieee_comparisons="no"],[ac_cv_c_ieee_comparisons="yes"]) |
38 |
+ ]) |
39 |
+ |
40 |
+@@ -469,7 +469,7 @@ int main (void) |
41 |
+ for (i = 0; i < 5; i++) { z = z / 10.0 ; }; |
42 |
+ for (i = 0; i < 5; i++) { z = z * 10.0 ; }; |
43 |
+ status = (z == 0.0); |
44 |
+- exit (status); |
45 |
++ return status; |
46 |
+ }]])],[ac_cv_c_ieee_denormals="yes"],[ac_cv_c_ieee_denormals="no"],[ac_cv_c_ieee_denormals="yes"]) |
47 |
+ ]) |
48 |
+ |
49 |
|
50 |
diff --git a/sci-libs/gsl/gsl-2.7.1-r1.ebuild b/sci-libs/gsl/gsl-2.7.1-r2.ebuild |
51 |
similarity index 93% |
52 |
rename from sci-libs/gsl/gsl-2.7.1-r1.ebuild |
53 |
rename to sci-libs/gsl/gsl-2.7.1-r2.ebuild |
54 |
index 64e427099641..e65ec799e0d2 100644 |
55 |
--- a/sci-libs/gsl/gsl-2.7.1-r1.ebuild |
56 |
+++ b/sci-libs/gsl/gsl-2.7.1-r2.ebuild |
57 |
@@ -1,7 +1,7 @@ |
58 |
-# Copyright 1999-2022 Gentoo Authors |
59 |
+# Copyright 1999-2023 Gentoo Authors |
60 |
# Distributed under the terms of the GNU General Public License v2 |
61 |
|
62 |
-EAPI=7 |
63 |
+EAPI=8 |
64 |
|
65 |
inherit autotools flag-o-matic toolchain-funcs |
66 |
|
67 |
@@ -22,20 +22,22 @@ BDEPEND="virtual/pkgconfig" |
68 |
|
69 |
PATCHES=( |
70 |
"${WORKDIR}"/${PN}-2.7-cblas.patch |
71 |
+ "${FILESDIR}"/${PN}-2.7.1-configure-clang16.patch |
72 |
) |
73 |
|
74 |
src_prepare() { |
75 |
- filter-flags -ffast-math |
76 |
- |
77 |
default |
78 |
|
79 |
if use deprecated; then |
80 |
sed -i -e "/GSL_DISABLE_DEPRECATED/,+2d" configure.ac || die |
81 |
fi |
82 |
+ |
83 |
eautoreconf |
84 |
} |
85 |
|
86 |
src_configure() { |
87 |
+ filter-flags -ffast-math |
88 |
+ |
89 |
if use cblas-external; then |
90 |
export CBLAS_LIBS="$($(tc-getPKG_CONFIG) --libs cblas)" |
91 |
export CBLAS_CFLAGS="$($(tc-getPKG_CONFIG) --cflags cblas)" |