sci-mathematics/bertini - 1.6 (gentoo)

Search

Package Information

Description:
Software for Numerical Algebraic Geometry
Homepage:
http://bertini.nd.edu
License:
bertini

Ebuild Details

Version EAPI Keywords Slot
1.6 8 ~amd64 ~x86 0
View Raw Ebuild
# 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
}

USE Flags

doc
optimization
Default: Enabled (+)

Dependencies

DEPEND

	dev-libs/gmp
	dev-libs/mpfr

RDEPEND

	dev-libs/gmp
	dev-libs/mpfr

BDEPEND

	app-alternatives/yacc
	app-alternatives/lex

Manifest for 1.6

Type File Size Source URLs
DIST BertiniSource_v1.6.tar.gz 4957384 bytes https://bertini.nd.edu/BertiniSource_v1.6.tar.gz
DIST BertiniUsersManual.pdf 1188567 bytes https://bertini.nd.edu/BertiniUsersManual.pdf