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 | |
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>
-rw-r--r-- | sci-mathematics/flint/files/flint-2.5.2-memory_message.patch | 16 | ||||
-rw-r--r-- | sci-mathematics/flint/files/flint-2.5.2-pie.patch | 78 | ||||
-rw-r--r-- | sci-mathematics/flint/files/flint-2.5.2-utf8.patch | 13 | ||||
-rw-r--r-- | sci-mathematics/flint/files/flintxx-include.patch | 19 | ||||
-rw-r--r-- | sci-mathematics/flint/flint-2.5.2-r1.ebuild | 74 |
5 files changed, 200 insertions, 0 deletions
diff --git a/sci-mathematics/flint/files/flint-2.5.2-memory_message.patch b/sci-mathematics/flint/files/flint-2.5.2-memory_message.patch new file mode 100644 index 000000000000..65638aa7790b --- /dev/null +++ b/sci-mathematics/flint/files/flint-2.5.2-memory_message.patch @@ -0,0 +1,16 @@ +This fixes a Python 3 doctest failure in +rings/polynomial/polynomial_integer_dense_flint.pyx: see #28334. +See https://github.com/wbhart/flint2/pull/585 for upstream PR + +diff --git a/memory_manager.c b/memory_manager.c +index 04abf8a..bece9f5 100644 +--- a/memory_manager.c ++++ b/memory_manager.c +@@ -41,6 +41,7 @@ pthread_mutex_t register_lock; + static void flint_memory_error() + { + flint_printf("Exception (FLINT memory_manager). Unable to allocate memory.\n"); ++ fflush(stdout); + abort(); + } + diff --git a/sci-mathematics/flint/files/flint-2.5.2-pie.patch b/sci-mathematics/flint/files/flint-2.5.2-pie.patch new file mode 100644 index 000000000000..442d0254e82d --- /dev/null +++ b/sci-mathematics/flint/files/flint-2.5.2-pie.patch @@ -0,0 +1,78 @@ +In newer binutils, ld options -r and -pie conflict. +Patch due to Jörg-Volker Peetz +(source : https://groups.google.com/d/msg/sage-devel/TduebNoZuBE/sEULolL0BQAJ), +packaged by Emmanuel Charpentier + +diff -ru flint-2.5.2-orig/fq/Makefile flint-2.5.2-new/fq/Makefile +--- flint-2.5.2-orig/fq/Makefile 2015-08-13 18:16:22.000000000 +0200 ++++ flint-2.5.2-new/fq/Makefile 2016-11-07 18:41:09.148996528 +0100 +@@ -35,7 +35,7 @@ + $(CC) $(CFLAGS) -c $(INCS) $< -o $@ + + $(MOD_LOBJ): $(LOBJS) +- $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib ++ $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib + + $(BUILD_DIR)/%.lo: %.c + $(CC) $(PICFLAG) $(CFLAGS) $(INCS) -c $< -o $@ +diff -ru flint-2.5.2-orig/fq_poly/Makefile flint-2.5.2-new/fq_poly/Makefile +--- flint-2.5.2-orig/fq_poly/Makefile 2015-08-13 18:16:22.000000000 +0200 ++++ flint-2.5.2-new/fq_poly/Makefile 2016-11-07 18:41:09.148996528 +0100 +@@ -35,7 +35,7 @@ + $(CC) $(CFLAGS) -c $(INCS) $< -o $@ + + $(MOD_LOBJ): $(LOBJS) +- $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib ++ $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib + + $(BUILD_DIR)/%.lo: %.c + $(CC) $(PICFLAG) $(CFLAGS) $(INCS) -c $< -o $@ +diff -ru flint-2.5.2-orig/Makefile.subdirs flint-2.5.2-new/Makefile.subdirs +--- flint-2.5.2-orig/Makefile.subdirs 2015-08-13 18:16:22.000000000 +0200 ++++ flint-2.5.2-new/Makefile.subdirs 2016-11-07 18:41:09.144996522 +0100 +@@ -59,7 +59,7 @@ + $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) -c $< -o $@ -MMD -MP -MF "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$@" + + $(MOD_LOBJ): $(LOBJS) +- $(QUIET_CC) $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib ++ $(QUIET_CC) $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib + + -include $(LOBJS:.lo=.d) + +Seulement dans flint-2.5.2-new/: Makefile.subdirs.orig +diff -ru flint-2.5.2-orig/padic_mat/Makefile flint-2.5.2-new/padic_mat/Makefile +--- flint-2.5.2-orig/padic_mat/Makefile 2015-08-13 18:16:22.000000000 +0200 ++++ flint-2.5.2-new/padic_mat/Makefile 2016-11-07 18:41:09.148996528 +0100 +@@ -35,7 +35,7 @@ + $(CC) $(CFLAGS) -c $(INCS) $< -o $@ + + $(MOD_LOBJ): $(LOBJS) +- $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib ++ $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib + + $(BUILD_DIR)/%.lo: %.c + $(CC) $(PICFLAG) $(CFLAGS) $(INCS) -c $< -o $@ +diff -ru flint-2.5.2-orig/padic_poly/Makefile flint-2.5.2-new/padic_poly/Makefile +--- flint-2.5.2-orig/padic_poly/Makefile 2015-08-13 18:16:22.000000000 +0200 ++++ flint-2.5.2-new/padic_poly/Makefile 2016-11-07 18:41:09.148996528 +0100 +@@ -35,7 +35,7 @@ + $(CC) $(CFLAGS) -c $(INCS) $< -o $@ + + $(MOD_LOBJ): $(LOBJS) +- $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib ++ $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib + + $(BUILD_DIR)/%.lo: %.c + $(CC) $(PICFLAG) $(CFLAGS) $(INCS) -c $< -o $@ +diff -ru flint-2.5.2-orig/qadic/Makefile flint-2.5.2-new/qadic/Makefile +--- flint-2.5.2-orig/qadic/Makefile 2015-08-13 18:16:22.000000000 +0200 ++++ flint-2.5.2-new/qadic/Makefile 2016-11-07 18:41:09.148996528 +0100 +@@ -35,7 +35,7 @@ + $(CC) $(CFLAGS) -c $(INCS) $< -o $@ + + $(MOD_LOBJ): $(LOBJS) +- $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib ++ $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib + + $(BUILD_DIR)/%.lo: %.c + $(CC) $(PICFLAG) $(CFLAGS) $(INCS) -c $< -o $@ diff --git a/sci-mathematics/flint/files/flint-2.5.2-utf8.patch b/sci-mathematics/flint/files/flint-2.5.2-utf8.patch new file mode 100644 index 000000000000..de82fc49dd38 --- /dev/null +++ b/sci-mathematics/flint/files/flint-2.5.2-utf8.patch @@ -0,0 +1,13 @@ +diff --git a/fmpz_mat/doc/fmpz_mat.txt b/fmpz_mat/doc/fmpz_mat.txt +index 2f07624..d741899 100644 +--- a/fmpz_mat/doc/fmpz_mat.txt ++++ b/fmpz_mat/doc/fmpz_mat.txt +@@ -1114,7 +1114,7 @@ void fmpz_mat_gram(fmpz_mat_t B, const fmpz_mat_t A) + + Sets \code{B} to the Gram matrix of the $m$-dimensional lattice \code{L} in + $n$-dimensional Euclidean space $R^n$ spanned by the rows of +- the $m$ × $n$ matrix \code{A}. Dimensions must be compatible. ++ the $m \times n$ matrix \code{A}. Dimensions must be compatible. + \code{A} and \code{B} are allowed to be the same object if \code{A} is a + square matrix. + diff --git a/sci-mathematics/flint/files/flintxx-include.patch b/sci-mathematics/flint/files/flintxx-include.patch new file mode 100644 index 000000000000..cb6744e23645 --- /dev/null +++ b/sci-mathematics/flint/files/flintxx-include.patch @@ -0,0 +1,19 @@ +Fix include errors with flintxx + +https://github.com/wbhart/flint2/commit/c0768dc54b5ece38252857f8e7423d5ce81a43f7 + + + +diff --git a/flintxx/flint_classes.h b/flintxx/flint_classes.h +index eac2d1a..6baa392 100644 +--- a/flintxx/flint_classes.h ++++ b/flintxx/flint_classes.h +@@ -27,7 +27,7 @@ + // Contrary to other parts of this library, they are tailored very + // specifically towards FLINT. + +-#include "flint.h" ++#include "../flint.h" + #include "mp.h" + #include "expression.h" + #include "expression_traits.h" 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 +} |