diff options
author | Sam James <sam@gentoo.org> | 2021-02-27 04:32:06 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-02-27 04:32:06 +0000 |
commit | 5820c86bb7c0db9e037eceebe14a52eef01adc37 (patch) | |
tree | b01e5e9cb3372f1deb03ef0914e4ba70505b9828 /sci-mathematics | |
parent | sci-astronomy/montage: fix gcc 10 (-fno-common) build (diff) | |
download | gentoo-5820c86bb7c0db9e037eceebe14a52eef01adc37.tar.gz gentoo-5820c86bb7c0db9e037eceebe14a52eef01adc37.tar.bz2 gentoo-5820c86bb7c0db9e037eceebe14a52eef01adc37.zip |
sci-mathematics/bertini: EAPI 7, gcc 10, CFLAGS
Closes: https://bugs.gentoo.org/723328
Closes: https://bugs.gentoo.org/731944
Package-Manager: Portage-3.0.15, Repoman-3.0.2
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-mathematics')
-rw-r--r-- | sci-mathematics/bertini/bertini-1.4.ebuild | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/sci-mathematics/bertini/bertini-1.4.ebuild b/sci-mathematics/bertini/bertini-1.4.ebuild index 8eb1c6cae69d..2ad14ca941e0 100644 --- a/sci-mathematics/bertini/bertini-1.4.ebuild +++ b/sci-mathematics/bertini/bertini-1.4.ebuild @@ -1,22 +1,22 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 -inherit toolchain-funcs +inherit toolchain-funcs flag-o-matic MYP="BertiniSource_v${PV}" - DESCRIPTION="Software for Numerical Algebraic Geometry" HOMEPAGE="http://bertini.nd.edu" - SRC_URI="http://www3.nd.edu/~sommese/bertini/${MYP}.tar.gz" +S="${WORKDIR}/${MYP}/src" LICENSE="bertini" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="doc examples +optimization" -DEPEND=" + +BDEPEND=" sys-devel/bison sys-devel/flex " @@ -24,34 +24,38 @@ RDEPEND=" dev-libs/gmp dev-libs/mpfr " - -S="${WORKDIR}/${MYP}/src" +DEPEND="${RDEPEND}" src_prepare() { + default + + # bug #723328 + append-cflags -fcommon + + # Ensure this is before the CFLAGS sed + # or breakage occurs if 'gcc' is in your CFLAGS + sed -i -e "s/gcc/$(tc-getCC)/" Makefile || die + if ! use optimization; then - sed -i -e "s/\$(OPT)/ ${CXXFLAGS} ${LDFLAGS}/" Makefile + sed -i -e "s/\$(OPT)/ ${CFLAGS} ${CXXFLAGS} ${LDFLAGS}/" Makefile || die else - sed -i -e "s/\$(OPT)/ \$(OPT) ${LDFLAGS}/" Makefile + # If people want the optimisation offered by upstream, + # let's ensure they don't accidentally override it. + filter-flags -O? + sed -i -e "s/\$(OPT)/ \$(OPT) ${CFLAGS} ${LDFLAGS}/" Makefile || die fi - sed -i -e "s/gcc/$(tc-getCC)/" Makefile -} - -src_configure() { - : -} - -src_compile() { - emake } src_install() { dobin bertini + if use doc; then dodoc "${WORKDIR}/${MYP}/BertiniUsersManual.pdf" fi + if use examples; then - insinto "/usr/share/${PN}" - doins -r "${WORKDIR}/${MYP}/examples" + docinto examples + dodoc -r "${WORKDIR}/${MYP}/examples" elog "Examples have been installed into /usr/share/${MYP}" fi } |