1 |
commit: 1480b29b69d6d7a8981f94fbca337ae5a2db4cb7 |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue May 31 15:19:46 2022 +0000 |
4 |
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
5 |
CommitDate: Tue May 31 15:36:42 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1480b29b |
7 |
|
8 |
sys-devel/gsl: respect CC and flags |
9 |
|
10 |
Closes: https://bugs.gentoo.org/847328 |
11 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
12 |
|
13 |
sys-devel/gsl/files/gsl-4.1.5-respect-flags.patch | 13 +++++++++++++ |
14 |
sys-devel/gsl/gsl-4.1.5-r1.ebuild | 11 +++++++++++ |
15 |
2 files changed, 24 insertions(+) |
16 |
|
17 |
diff --git a/sys-devel/gsl/files/gsl-4.1.5-respect-flags.patch b/sys-devel/gsl/files/gsl-4.1.5-respect-flags.patch |
18 |
new file mode 100644 |
19 |
index 000000000..9d8ebb5f0 |
20 |
--- /dev/null |
21 |
+++ b/sys-devel/gsl/files/gsl-4.1.5-respect-flags.patch |
22 |
@@ -0,0 +1,13 @@ |
23 |
+--- a/src/c |
24 |
++++ b/src/c |
25 |
+@@ -156,8 +156,8 @@ |
26 |
+ # |
27 |
+ case "$($CCNAME --version)" in |
28 |
+ *gcc*|*GCC*) |
29 |
+- [ -z "$BOOM_MODEL_NOOPT" ] && CCDEBUG="-O2" |
30 |
+- [ -z "$BOOM_MODEL_NOOPT" ] && CCNODEBUG="$CCNODEBUG -O2" |
31 |
++ [ -z "$BOOM_MODEL_NOOPT" ] && CCDEBUG="${CFLAGS}" |
32 |
++ [ -z "$BOOM_MODEL_NOOPT" ] && CCNODEBUG="$CCNODEBUG ${CFLAGS}" |
33 |
+ CCOPTS="-D_REENTRANT -D_GNU_SOURCE -Wall -Wno-unused -fno-strict-aliasing" |
34 |
+ # We assume the following standard libraries are all present. |
35 |
+ # If your build is failing because of missing libraries then |
36 |
|
37 |
diff --git a/sys-devel/gsl/gsl-4.1.5-r1.ebuild b/sys-devel/gsl/gsl-4.1.5-r1.ebuild |
38 |
index 89ffc2238..c42875214 100644 |
39 |
--- a/sys-devel/gsl/gsl-4.1.5-r1.ebuild |
40 |
+++ b/sys-devel/gsl/gsl-4.1.5-r1.ebuild |
41 |
@@ -3,6 +3,8 @@ |
42 |
|
43 |
EAPI=8 |
44 |
|
45 |
+inherit toolchain-funcs |
46 |
+ |
47 |
DESCRIPTION='iMatix GSL code generator' |
48 |
HOMEPAGE="https://github.com/zeromq/gsl" |
49 |
SRC_URI="https://github.com/zeromq/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
50 |
@@ -15,6 +17,15 @@ IUSE="examples" |
51 |
DEPEND="dev-libs/libpcre:3" |
52 |
RDEPEND="${DEPEND}" |
53 |
|
54 |
+PATCHES=( "${FILESDIR}/${P}-respect-flags.patch" ) |
55 |
+ |
56 |
+src_prepare() { |
57 |
+ tc-export RANLIB |
58 |
+ export CCNAME="$(tc-getCC)" |
59 |
+ export CCPLUS="$(tc-getCXX)" |
60 |
+ default |
61 |
+} |
62 |
+ |
63 |
src_install() { |
64 |
DESTDIR="${D}/usr" emake install |
65 |
if use examples; then |