From 5820c86bb7c0db9e037eceebe14a52eef01adc37 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 27 Feb 2021 04:32:06 +0000 Subject: 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 --- sci-mathematics/bertini/bertini-1.4.ebuild | 46 ++++++++++++++++-------------- 1 file 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 } -- cgit v1.2.3-65-gdbad