diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2020-02-28 11:31:58 -0500 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2020-02-28 12:20:43 -0500 |
commit | 39b65a3d5ad4c68459f3d7ce63556937099ac93a (patch) | |
tree | bb593860fb723e8ecbdae2d5aaa3c89e41db9ad0 /sci-mathematics/flint/flint-2.5.2-r1.ebuild | |
parent | sci-mathematics/wxmaxima: bump to 20.02.4 (diff) | |
download | gentoo-39b65a3d5ad4c68459f3d7ce63556937099ac93a.tar.gz gentoo-39b65a3d5ad4c68459f3d7ce63556937099ac93a.tar.bz2 gentoo-39b65a3d5ad4c68459f3d7ce63556937099ac93a.zip |
sci-mathematics/flint: new EAPI=7 revision.
This new revision is based off François Bissey's ebuild in the
sage-on-gentoo overlay, which has accrued some fixes not present in
the ::gentoo version. Of note, it fixes an open build bug, and an
unreported issue where 32-bit libraries are detected on a 64-bit
system.
The update to EAPI=7 required only moving the LaTeX dependencies to
BDEPEND. In the process, I updated the LICENSE to LGPL-2.1+ because
upstream has done the same. I also looked long and hard for a reason
why we have RESTRICT=mirror in the ebuild. Finding none, I have
removed the restriction.
Closes: https://bugs.gentoo.org/470732
Closes: https://bugs.gentoo.org/688674
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-mathematics/flint/flint-2.5.2-r1.ebuild')
-rw-r--r-- | sci-mathematics/flint/flint-2.5.2-r1.ebuild | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/sci-mathematics/flint/flint-2.5.2-r1.ebuild b/sci-mathematics/flint/flint-2.5.2-r1.ebuild new file mode 100644 index 000000000000..795bf6e90c61 --- /dev/null +++ b/sci-mathematics/flint/flint-2.5.2-r1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="Fast Library for Number Theory" +HOMEPAGE="http://www.flintlib.org/" +SRC_URI="http://www.flintlib.org/${P}.tar.gz" + +LICENSE="LGPL-2.1+" +SLOT="0/13" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="doc gc ntl static-libs" + +BDEPEND="doc? ( + app-text/texlive-core + dev-texlive/texlive-latex + dev-texlive/texlive-latexextra +)" +DEPEND="dev-libs/gmp:= + dev-libs/mpfr:= + gc? ( dev-libs/boehm-gc ) + ntl? ( dev-libs/ntl:= )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/flintxx-include.patch" + "${FILESDIR}/${PN}-2.5.2-pie.patch" + "${FILESDIR}/${PN}-2.5.2-utf8.patch" + "${FILESDIR}/${PN}-2.5.2-memory_message.patch" +) + +src_prepare(){ + default + + # The autodetection finds "lib" first, which may e.g. contain 32-bit + # libs during a 64-bit build. + sed -e "s:{GMP_DIR}/lib\":{GMP_DIR}/$(get_libdir)\":g" \ + -e "s:{MPFR_DIR}/lib\":{MPFR_DIR}/$(get_libdir)\":g" \ + -e "s:{NTL_DIR}/lib\":{NTL_DIR}/$(get_libdir)\":g" \ + -e "s:{GC_DIR}/lib\":{GC_DIR}/$(get_libdir)\":g" \ + -i configure || die +} + +src_configure() { + ./configure \ + --prefix="${EPREFIX}/usr" \ + --with-gmp="${EPREFIX}/usr" \ + --with-mpfr="${EPREFIX}/usr" \ + $(usex ntl "--with-ntl=${EPREFIX}/usr" "") \ + $(use_enable static-libs static) \ + $(usex gc "--with-gc=${EPREFIX}/usr" "") \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + AR="$(tc-getAR)" \ + || die +} + +src_compile() { + emake verbose + use doc && emake -C doc/latex +} + +src_test() { + emake AT= QUIET_CC= QUIET_CXX= QUIET_AR= check +} + +src_install() { + emake DESTDIR="${D}" LIBDIR="$(get_libdir)" install + einstalldocs + use doc && dodoc doc/latex/flint-manual.pdf +} |