summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Bissey <frp.bissey@gmail.com>2021-02-26 14:13:26 +1300
committerMichael Orlitzky <mjo@gentoo.org>2021-03-02 21:46:15 -0500
commit9a29bad46e9208e1ad584d66e27ae2bfafe2f7f2 (patch)
tree95b8b5d319513ceb6b2bc5ab76f2f338596f4b80 /sci-mathematics
parentmedia-video/makemkv: Bump to 1.16.0, drop old 1.15.4 (diff)
downloadgentoo-9a29bad46e9208e1ad584d66e27ae2bfafe2f7f2.tar.gz
gentoo-9a29bad46e9208e1ad584d66e27ae2bfafe2f7f2.tar.bz2
gentoo-9a29bad46e9208e1ad584d66e27ae2bfafe2f7f2.zip
sci-mathematics/gfan: adapt to newer cddlib
Package-Manager: Portage-3.0.13, Repoman-3.0.2 Closes: https://github.com/gentoo/gentoo/pull/19661 Bug: https://bugs.gentoo.org/show_bug.cgi?id=762817 Signed-off-by: François René Pierre Bissey <frp.bissey@gmail.com> Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/gfan/gfan-0.6.2-r1.ebuild67
1 files changed, 67 insertions, 0 deletions
diff --git a/sci-mathematics/gfan/gfan-0.6.2-r1.ebuild b/sci-mathematics/gfan/gfan-0.6.2-r1.ebuild
new file mode 100644
index 000000000000..01434747eede
--- /dev/null
+++ b/sci-mathematics/gfan/gfan-0.6.2-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Compute Groebner fans and tropical varieties"
+HOMEPAGE="https://users-math.au.dk/~jensen/software/gfan/gfan.html"
+SRC_URI="https://users-math.au.dk/~jensen/software/${PN}/${PN}${PV}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+BDEPEND="doc? ( virtual/latex-base )"
+DEPEND="dev-libs/gmp:0=[cxx]
+ sci-libs/cddlib:0="
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.6.2-xcode9.3_compat.patch"
+ "${FILESDIR}/${PN}-0.6.2-testsuite.patch"
+ "${FILESDIR}/${PN}-0.6.2-Makefile.patch"
+ )
+
+pkg_setup() {
+ tc-export CC CXX
+
+ # This should really go in cppflags, but that doesn't work with
+ # gfan's hand-written Makefile.
+ append-cxxflags -DNOCDDPREFIX -I"${EPREFIX}"/usr/include/cddlib
+}
+
+src_prepare() {
+ default
+
+ # This test hangs on x86, bug 717112.
+ rm -r testsuite/0602ResultantFanProjection || \
+ die "unable to disable test 0602ResultantFanProjection"
+}
+
+src_configure() {
+ # The upstream Makefile says that GCC produces bad code with -O3.
+ replace-flags "-O3" "-O2"
+ default
+}
+
+src_compile() {
+ default
+ if use doc; then
+ pushd doc > /dev/null || die
+ # The LaTeX build commands need to be repeated until the
+ # document "stops changing," which is not as easy as it
+ # sounds to detect. Running it twice seems to work here.
+ pdflatex manual.tex && bibtex manual && pdflatex manual.tex || die
+ popd > /dev/null || die
+ fi
+}
+
+src_install() {
+ emake PREFIX="${ED}/usr" install
+ use doc && dodoc doc/manual.pdf
+}