1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit flag-o-matic toolchain-funcs
8 DESCRIPTION="Compute Groebner fans and tropical varieties"
9 HOMEPAGE="https://users-math.au.dk/~jensen/software/gfan/gfan.html"
10 SRC_URI="https://users-math.au.dk/~jensen/software/${PN}/${PN}${PV}.tar.gz"
14 KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
17 BDEPEND="doc? ( virtual/latex-base )"
18 DEPEND="dev-libs/gmp:0=[cxx]
22 S="${WORKDIR}/${PN}${PV}"
25 "${FILESDIR}/${PN}-0.6.2-xcode9.3_compat.patch"
26 "${FILESDIR}/${PN}-0.6.2-testsuite.patch"
27 "${FILESDIR}/${PN}-0.6.2-Makefile.patch"
33 # This should really go in cppflags, but that doesn't work with
34 # gfan's hand-written Makefile.
35 append-cxxflags -DNOCDDPREFIX
41 # This test hangs on x86, bug 717112.
42 rm -r testsuite/0602ResultantFanProjection || \
43 die "unable to disable test 0602ResultantFanProjection"
47 # The upstream Makefile says that GCC produces bad code with -O3.
48 replace-flags "-O3" "-O2"
55 pushd doc > /dev/null || die
56 # The LaTeX build commands need to be repeated until the
57 # document "stops changing," which is not as easy as it
58 # sounds to detect. Running it twice seems to work here.
59 pdflatex manual.tex && bibtex manual && pdflatex manual.tex || die
60 popd > /dev/null || die
65 emake PREFIX="${ED}/usr" install
66 use doc && dodoc doc/manual.pdf