1 |
commit: 5820c86bb7c0db9e037eceebe14a52eef01adc37 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 27 04:32:06 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 27 04:32:06 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5820c86b |
7 |
|
8 |
sci-mathematics/bertini: EAPI 7, gcc 10, CFLAGS |
9 |
|
10 |
Closes: https://bugs.gentoo.org/723328 |
11 |
Closes: https://bugs.gentoo.org/731944 |
12 |
Package-Manager: Portage-3.0.15, Repoman-3.0.2 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
sci-mathematics/bertini/bertini-1.4.ebuild | 46 ++++++++++++++++-------------- |
16 |
1 file changed, 25 insertions(+), 21 deletions(-) |
17 |
|
18 |
diff --git a/sci-mathematics/bertini/bertini-1.4.ebuild b/sci-mathematics/bertini/bertini-1.4.ebuild |
19 |
index 8eb1c6cae69..2ad14ca941e 100644 |
20 |
--- a/sci-mathematics/bertini/bertini-1.4.ebuild |
21 |
+++ b/sci-mathematics/bertini/bertini-1.4.ebuild |
22 |
@@ -1,22 +1,22 @@ |
23 |
-# Copyright 1999-2013 Gentoo Foundation |
24 |
+# Copyright 1999-2021 Gentoo Authors |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
-EAPI=5 |
28 |
+EAPI=7 |
29 |
|
30 |
-inherit toolchain-funcs |
31 |
+inherit toolchain-funcs flag-o-matic |
32 |
|
33 |
MYP="BertiniSource_v${PV}" |
34 |
- |
35 |
DESCRIPTION="Software for Numerical Algebraic Geometry" |
36 |
HOMEPAGE="http://bertini.nd.edu" |
37 |
- |
38 |
SRC_URI="http://www3.nd.edu/~sommese/bertini/${MYP}.tar.gz" |
39 |
+S="${WORKDIR}/${MYP}/src" |
40 |
|
41 |
LICENSE="bertini" |
42 |
SLOT="0" |
43 |
KEYWORDS="~amd64 ~x86" |
44 |
IUSE="doc examples +optimization" |
45 |
-DEPEND=" |
46 |
+ |
47 |
+BDEPEND=" |
48 |
sys-devel/bison |
49 |
sys-devel/flex |
50 |
" |
51 |
@@ -24,34 +24,38 @@ RDEPEND=" |
52 |
dev-libs/gmp |
53 |
dev-libs/mpfr |
54 |
" |
55 |
- |
56 |
-S="${WORKDIR}/${MYP}/src" |
57 |
+DEPEND="${RDEPEND}" |
58 |
|
59 |
src_prepare() { |
60 |
+ default |
61 |
+ |
62 |
+ # bug #723328 |
63 |
+ append-cflags -fcommon |
64 |
+ |
65 |
+ # Ensure this is before the CFLAGS sed |
66 |
+ # or breakage occurs if 'gcc' is in your CFLAGS |
67 |
+ sed -i -e "s/gcc/$(tc-getCC)/" Makefile || die |
68 |
+ |
69 |
if ! use optimization; then |
70 |
- sed -i -e "s/\$(OPT)/ ${CXXFLAGS} ${LDFLAGS}/" Makefile |
71 |
+ sed -i -e "s/\$(OPT)/ ${CFLAGS} ${CXXFLAGS} ${LDFLAGS}/" Makefile || die |
72 |
else |
73 |
- sed -i -e "s/\$(OPT)/ \$(OPT) ${LDFLAGS}/" Makefile |
74 |
+ # If people want the optimisation offered by upstream, |
75 |
+ # let's ensure they don't accidentally override it. |
76 |
+ filter-flags -O? |
77 |
+ sed -i -e "s/\$(OPT)/ \$(OPT) ${CFLAGS} ${LDFLAGS}/" Makefile || die |
78 |
fi |
79 |
- sed -i -e "s/gcc/$(tc-getCC)/" Makefile |
80 |
-} |
81 |
- |
82 |
-src_configure() { |
83 |
- : |
84 |
-} |
85 |
- |
86 |
-src_compile() { |
87 |
- emake |
88 |
} |
89 |
|
90 |
src_install() { |
91 |
dobin bertini |
92 |
+ |
93 |
if use doc; then |
94 |
dodoc "${WORKDIR}/${MYP}/BertiniUsersManual.pdf" |
95 |
fi |
96 |
+ |
97 |
if use examples; then |
98 |
- insinto "/usr/share/${PN}" |
99 |
- doins -r "${WORKDIR}/${MYP}/examples" |
100 |
+ docinto examples |
101 |
+ dodoc -r "${WORKDIR}/${MYP}/examples" |
102 |
elog "Examples have been installed into /usr/share/${MYP}" |
103 |
fi |
104 |
} |