You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sci-mathematics/bertini/bertini-1.6.ebuild

66 lines
1.4 KiB

# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MYP=BertiniSource_v${PV}
inherit toolchain-funcs flag-o-matic
DESCRIPTION="Software for Numerical Algebraic Geometry"
HOMEPAGE="http://bertini.nd.edu"
SRC_URI="https://bertini.nd.edu/${MYP}.tar.gz
doc? ( https://bertini.nd.edu/BertiniUsersManual.pdf )"
S="${WORKDIR}"/${MYP/./}
LICENSE="bertini"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples +optimization"
RDEPEND="
dev-libs/gmp
dev-libs/mpfr
"
DEPEND="${RDEPEND}"
BDEPEND="
app-alternatives/yacc
app-alternatives/lex
"
DOCS=( AUTHORS ChangeLog NEWS README )
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)/" src/Makefile || die
if ! use optimization ; then
sed -i -e "s/\$(OPT)/ ${CFLAGS} ${CXXFLAGS} ${LDFLAGS}/" src/Makefile || die
else
# 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}/" src/Makefile || die
fi
}
src_configure() {
econf --prefix=/usr --includedir=/usr/include/${PN}
use doc && DOCS+=( "${DISTDIR}"/BertiniUsersManual.pdf )
}
src_install() {
emake DESTDIR="${D}" install
find "${ED}" -name "*.la" -delete || die
einstalldocs
}