summaryrefslogtreecommitdiff
path: root/sci-mathematics/bertini/bertini-1.4.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-03 10:28:17 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-03 10:28:17 +0000
commitd99093fb4bb5652015c06274d64083daa2439e4f (patch)
treecf61513204d97974179580065e85df5c8009087c /sci-mathematics/bertini/bertini-1.4.ebuild
parent463397cf1e064185110fe57c568d73f99a06f5d1 (diff)
gentoo resync : 03.03.2021
Diffstat (limited to 'sci-mathematics/bertini/bertini-1.4.ebuild')
-rw-r--r--sci-mathematics/bertini/bertini-1.4.ebuild46
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
}