public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/flint/files/, sci-mathematics/flint/
@ 2020-02-28 17:23 Michael Orlitzky
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Orlitzky @ 2020-02-28 17:23 UTC (permalink / raw
  To: gentoo-commits

commit:     39b65a3d5ad4c68459f3d7ce63556937099ac93a
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 28 16:31:58 2020 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Feb 28 17:20:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39b65a3d

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 <AT> gentoo.org>

 .../flint/files/flint-2.5.2-memory_message.patch   | 16 +++++
 sci-mathematics/flint/files/flint-2.5.2-pie.patch  | 78 ++++++++++++++++++++++
 sci-mathematics/flint/files/flint-2.5.2-utf8.patch | 13 ++++
 sci-mathematics/flint/files/flintxx-include.patch  | 19 ++++++
 sci-mathematics/flint/flint-2.5.2-r1.ebuild        | 74 ++++++++++++++++++++
 5 files changed, 200 insertions(+)

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 00000000000..65638aa7790
--- /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 00000000000..442d0254e82
--- /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 00000000000..de82fc49dd3
--- /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 00000000000..cb6744e2364
--- /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 00000000000..795bf6e90c6
--- /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
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/flint/files/, sci-mathematics/flint/
@ 2020-04-06 15:08 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2020-04-06 15:08 UTC (permalink / raw
  To: gentoo-commits

commit:     ebae2975a18df74c749864ad5e50343a3f3b49d4
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  6 15:08:17 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Apr  6 15:08:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebae2975

sci-mathematics/flint: Drop 2.4.4-r1

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sci-mathematics/flint/Manifest                     |   1 -
 .../flint/files/flint-2.4.3-cflags-ldflags.patch   |  33 ------
 .../flint/files/flint-2.4.3-libdir.patch           |  44 --------
 .../flint/files/flint-2.4.3-whitespaces.patch      |  54 ----------
 .../flint/files/flint-2.4.4-PIE-FTBFS.patch        |  17 ---
 sci-mathematics/flint/files/flint-2.4.4-test.patch |  19 ----
 .../flint/files/flint-2.4.5-gmp6-compat.patch      | 115 ---------------------
 .../flint/files/flint-2.4.5-ntl62.patch            |  13 ---
 sci-mathematics/flint/flint-2.4.4-r1.ebuild        |  71 -------------
 9 files changed, 367 deletions(-)

diff --git a/sci-mathematics/flint/Manifest b/sci-mathematics/flint/Manifest
index e35cd2be74e..60823eff1c3 100644
--- a/sci-mathematics/flint/Manifest
+++ b/sci-mathematics/flint/Manifest
@@ -1,2 +1 @@
-DIST flint-2.4.4.tar.gz 1639262 BLAKE2B 54162a4d2f02c3e8e441b6a96c1e7ba4e5e8d8ad7b2d36bb7ead49bb112cd94403cb503d1e56621a0a6fedad6387e63dc39888ff3757e298aea55bf55acc4e20 SHA512 236997cf64bdc96741740889f450fdbaf7d7e9b58252645f864d28005c9e7bdf87f7187cd17526606c605f0489f026398a1361b8f209f71158ca3b31c42d86d2
 DIST flint-2.5.2.tar.gz 2212242 BLAKE2B 36b9b1f2acb1d79534d85884d755fddba3b8b40efbe92aeeecd7d1526cd21f0849054c30d23c565c6a13c609992cf22f56f5b640da15e1c7e6ba6840fc710d47 SHA512 cce36947b558aabecaf780171b4bbc0e1330c3b1a7e3580717584be5cab4991d33b190531c7995b224a3a440e28c4a610d6f781901e29f48ced12a9c5ba960a2

diff --git a/sci-mathematics/flint/files/flint-2.4.3-cflags-ldflags.patch b/sci-mathematics/flint/files/flint-2.4.3-cflags-ldflags.patch
deleted file mode 100644
index f0a2ec8531b..00000000000
--- a/sci-mathematics/flint/files/flint-2.4.3-cflags-ldflags.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-commit afadc8d05674a0e3e2fcf6dfbcf5f3c8f9133119
-Author: hasufell <hasufell@hasufell.de>
-Date:   Sun May 18 19:32:59 2014 +0200
-
-    Respect CFLAGS/CXXFLAGS/LDFLAGS, fixes #66
-    
-    Even in linking command CFLAGS should be respected, no matter
-    if all objects have already been compiled or not. Some flags
-    affect both linking and object compilation and users shouldn't
-    be required to figure them out. This is standard in most build
-    systems anyway.
-    
-    Reorderd the linker line a bit, so it matches common practice,
-    although this doesn't matter technically (except that LDFLAGS
-    must go before libraries we link against).
-
-diff --git a/Makefile.in b/Makefile.in
-index a522ac1..6dda689 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -104,10 +104,10 @@ $(FLINT_LIB): $(LOBJS) $(LIB_SOURCES) $(EXT_SOURCES) $(HEADERS) $(EXT_HEADERS) |
- 	$(AT)$(foreach dir, $(BUILD_DIRS), mkdir -p build/$(dir); BUILD_DIR=../build/$(dir); export BUILD_DIR; MOD_DIR=$(dir); export MOD_DIR; $(MAKE) -f ../Makefile.subdirs -C $(dir) shared || exit $$?;)
- 	$(AT)if [ "$(WANT_NTL)" -eq "1" ]; then \
- 	  $(MAKE) build/interfaces/NTL-interface.lo; \
--	  $(CXX) $(ABI_FLAG) -shared $(EXTRA_SHARED_FLAGS) build/interfaces/NTL-interface.lo $(LOBJS) $(MOD_LOBJS) $(EXT_OBJS) $(LIBS2) -o $(FLINT_LIB); \
-+	  $(CXX) $(CXXFLAGS) $(ABI_FLAG) -shared $(EXTRA_SHARED_FLAGS) build/interfaces/NTL-interface.lo $(LOBJS) $(MOD_LOBJS) $(EXT_OBJS) -o $(FLINT_LIB) $(LDFLAGS) $(LIBS2); \
- 	fi
- 	$(AT)if [ "$(WANT_NTL)" -ne "1" ]; then \
--	  $(CC) $(ABI_FLAG) -shared $(EXTRA_SHARED_FLAGS) $(LOBJS) $(MOD_LOBJS) $(EXT_OBJS) $(LIBS2) -o $(FLINT_LIB); \
-+	  $(CC) $(CFLAGS) $(ABI_FLAG) -shared $(EXTRA_SHARED_FLAGS) $(LOBJS) $(MOD_LOBJS) $(EXT_OBJS) -o $(FLINT_LIB) $(LDFLAGS) $(LIBS2); \
- 	fi
- 
- libflint.a: $(OBJS) $(LIB_SOURCES) $(EXT_SOURCES) $(HEADERS) $(EXT_HEADERS) | build build/interfaces

diff --git a/sci-mathematics/flint/files/flint-2.4.3-libdir.patch b/sci-mathematics/flint/files/flint-2.4.3-libdir.patch
deleted file mode 100644
index a569be40b8b..00000000000
--- a/sci-mathematics/flint/files/flint-2.4.3-libdir.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 27eb23c1844029ee64907500bd8aa87097ffcd32 Mon Sep 17 00:00:00 2001
-From: hasufell <hasufell@hasufell.de>
-Date: Sun, 18 May 2014 18:46:24 +0200
-Subject: [PATCH] Allow to control LIBDIR
-
-Some distributions have lib32/lib64 and need to control
-the destination properly.
----
- Makefile.in | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index c16f838..b6ea4c9 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -4,6 +4,8 @@ else
-   $(DLPATH):=$(DLPATH_ADD)
- endif
- 
-+LIBDIR=lib
-+
- QUIET_CC  = @echo '   ' CC  ' ' $@;
- QUIET_CXX = @echo '   ' CXX ' ' $@;
- QUIET_AR  = @echo '   ' AR  ' ' $@;
-@@ -169,13 +171,13 @@ else
- endif
- 
- install: library
--	mkdir -p $(DESTDIR)$(PREFIX)/lib
-+	mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR)
- 	mkdir -p $(DESTDIR)$(PREFIX)/include/flint
- 	$(AT)if [ "$(FLINT_SHARED)" -eq "1" ]; then \
--		cp $(FLINT_LIB) $(DESTDIR)$(PREFIX)/lib; \
-+		cp $(FLINT_LIB) $(DESTDIR)$(PREFIX)/$(LIBDIR); \
- 	fi
- 	$(AT)if [ "$(FLINT_STATIC)" -eq "1" ]; then \
--		cp libflint.a $(DESTDIR)$(PREFIX)/lib; \
-+		cp libflint.a $(DESTDIR)$(PREFIX)/$(LIBDIR); \
- 	fi
- 	cp $(HEADERS) $(DESTDIR)$(PREFIX)/include/flint
- 	$(AT)if [ ! -z $(EXT_HEADERS) ]; then \
--- 
-1.9.3
-

diff --git a/sci-mathematics/flint/files/flint-2.4.3-whitespaces.patch b/sci-mathematics/flint/files/flint-2.4.3-whitespaces.patch
deleted file mode 100644
index 3d63aedeab3..00000000000
--- a/sci-mathematics/flint/files/flint-2.4.3-whitespaces.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 3506d617ef9dfc5184aa99be05a25e4f73d6c3f6 Mon Sep 17 00:00:00 2001
-From: hasufell <hasufell@hasufell.de>
-Date: Sun, 18 May 2014 18:47:27 +0200
-Subject: [PATCH] Quote variables that could contain whitespaces
-
-Make does NOT take care of this in this context. It's
-not a variable assignment and installation would fail
-if DESTDIR contains any whitespace.
----
- Makefile.in | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index b6ea4c9..a522ac1 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -171,23 +171,23 @@ else
- endif
- 
- install: library
--	mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR)
--	mkdir -p $(DESTDIR)$(PREFIX)/include/flint
-+	mkdir -p "$(DESTDIR)$(PREFIX)/$(LIBDIR)"
-+	mkdir -p "$(DESTDIR)$(PREFIX)/include/flint"
- 	$(AT)if [ "$(FLINT_SHARED)" -eq "1" ]; then \
--		cp $(FLINT_LIB) $(DESTDIR)$(PREFIX)/$(LIBDIR); \
-+		cp $(FLINT_LIB) "$(DESTDIR)$(PREFIX)/$(LIBDIR)"; \
- 	fi
- 	$(AT)if [ "$(FLINT_STATIC)" -eq "1" ]; then \
--		cp libflint.a $(DESTDIR)$(PREFIX)/$(LIBDIR); \
-+		cp libflint.a "$(DESTDIR)$(PREFIX)/$(LIBDIR)"; \
- 	fi
--	cp $(HEADERS) $(DESTDIR)$(PREFIX)/include/flint
-+	cp $(HEADERS) "$(DESTDIR)$(PREFIX)/include/flint"
- 	$(AT)if [ ! -z $(EXT_HEADERS) ]; then \
--		cp $(EXT_HEADERS) $(DESTDIR)$(PREFIX)/include/flint; \
-+		cp $(EXT_HEADERS) "$(DESTDIR)$(PREFIX)/include/flint"; \
- 	fi
--	mkdir -p $(DESTDIR)$(FLINT_CPIMPORT_DIR)
--	cp qadic/CPimport.txt $(DESTDIR)$(FLINT_CPIMPORT_DIR)
--	mkdir -p $(DESTDIR)$(PREFIX)/include/flint/flintxx
--	cp flintxx/*.h $(DESTDIR)$(PREFIX)/include/flint/flintxx
--	cp *xx.h $(DESTDIR)$(PREFIX)/include/flint
-+	mkdir -p "$(DESTDIR)$(FLINT_CPIMPORT_DIR)"
-+	cp qadic/CPimport.txt "$(DESTDIR)$(FLINT_CPIMPORT_DIR)"
-+	mkdir -p "$(DESTDIR)$(PREFIX)/include/flint/flintxx"
-+	cp flintxx/*.h "$(DESTDIR)$(PREFIX)/include/flint/flintxx"
-+	cp *xx.h "$(DESTDIR)$(PREFIX)/include/flint"
- 
- build:
- 	mkdir -p build
--- 
-1.9.3
-

diff --git a/sci-mathematics/flint/files/flint-2.4.4-PIE-FTBFS.patch b/sci-mathematics/flint/files/flint-2.4.4-PIE-FTBFS.patch
deleted file mode 100644
index 5689e3633ee..00000000000
--- a/sci-mathematics/flint/files/flint-2.4.4-PIE-FTBFS.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: invoke $(CC) with -r and not -Wl,-r to fix FTBFS with PIE enabled
-Author: Logan Rosen <logan@ubuntu.com>
-Forwarded: yes
-
-diff --git a/Makefile.subdirs b/Makefile.subdirs
-index ec05fb0..f2d8b37 100644
---- a/Makefile.subdirs
-+++ b/Makefile.subdirs
-@@ -59,7 +59,7 @@ $(BUILD_DIR)/$(MOD_DIR)_%.o: %.c
- 	$(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)
- 

diff --git a/sci-mathematics/flint/files/flint-2.4.4-test.patch b/sci-mathematics/flint/files/flint-2.4.4-test.patch
deleted file mode 100644
index 11b7cfe2111..00000000000
--- a/sci-mathematics/flint/files/flint-2.4.4-test.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 5e3d4a0504158f70d227e7cfc03985fe9a646797
-Author: hasufell <hasufell@hasufell.de>
-Date:   Wed Jul 2 12:58:50 2014 +0200
-
-    Fix NTL test build
-
-diff --git a/Makefile.in b/Makefile.in
-index 6dda689..e9de7da 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -214,7 +214,7 @@ build/interfaces/NTL-interface.o: interfaces/NTL-interface.cpp NTL-interface.h
- 	$(QUIET_CXX) $(CXX) $(CFLAGS) $(INCS) -c $< -o $@;
- 
- build/interfaces/test/t-NTL-interface$(EXEEXT): interfaces/test/t-NTL-interface.cpp
--	$(QUIET_CXX) $(CXX) $(CFLAGS) $(INCS) $< build/interfaces/NTL-interface.o -o $@ $(LIBS);
-+	$(QUIET_CXX) $(CXX) $(CFLAGS) $(INCS) $< build/interfaces/NTL-interface.lo -o $@ $(LIBS);
- 
- print-%:
- 	@echo '$*=$($*)'

diff --git a/sci-mathematics/flint/files/flint-2.4.5-gmp6-compat.patch b/sci-mathematics/flint/files/flint-2.4.5-gmp6-compat.patch
deleted file mode 100644
index 559cbe51fb2..00000000000
--- a/sci-mathematics/flint/files/flint-2.4.5-gmp6-compat.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From a7f911140e7d0a0125653a40aa2c5fe257bd78f5 Mon Sep 17 00:00:00 2001
-From: Fredrik Johansson <fredrik.johansson@gmail.com>
-Date: Thu, 18 Sep 2014 14:49:05 +0200
-Subject: [PATCH] redefine fmpz_invmod to consider any integer invertible mod 1
- (for gmp 6.0 compatibility)
-
----
- fmpz/doc/fmpz.txt    |  3 ++-
- fmpz/invmod.c        | 11 +++++++++--
- fmpz/test/t-invmod.c | 21 +++++++++++++++++----
- 3 files changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/fmpz/doc/fmpz.txt b/fmpz/doc/fmpz.txt
-index fb422d8..2ada719 100644
---- a/fmpz/doc/fmpz.txt
-+++ b/fmpz/doc/fmpz.txt
-@@ -899,7 +899,8 @@ int fmpz_invmod(fmpz_t f, const fmpz_t g, const fmpz_t h)
-     Sets $f$ to the inverse of $g$ modulo $h$.  The value of $h$ may 
-     not be $0$ otherwise an exception results.  If the inverse exists 
-     the return value will be non-zero, otherwise the return value will
--    be $0$ and the value of $f$ undefined. 
-+    be $0$ and the value of $f$ undefined. As a special case, we
-+    consider any number invertible modulo $h = \pm 1$, with inverse 0.
- 
- void fmpz_negmod(fmpz_t f, const fmpz_t g, const fmpz_t h)
- 
-diff --git a/fmpz/invmod.c b/fmpz/invmod.c
-index a0cf601..0e20f39 100644
---- a/fmpz/invmod.c
-+++ b/fmpz/invmod.c
-@@ -67,7 +67,11 @@ fmpz_invmod(fmpz_t f, const fmpz_t g, const fmpz_t h)
-             if (c2 < WORD(0))
-                 c2 = -c2;
-             if (c2 == WORD(1))
--                return 0;       /* special case not handled by n_invmod */
-+            {
-+                fmpz_zero(f);
-+                return 1;       /* special case not handled by n_invmod */
-+            }
-+
-             gcd = z_gcdinv(&inv, c1, c2);
- 
-             return (gcd == UWORD(1) ? fmpz_set_si(f, inv), 1 : 0);
-@@ -106,7 +110,10 @@ fmpz_invmod(fmpz_t f, const fmpz_t g, const fmpz_t h)
-             if (c2 < WORD(0))
-                 c2 = -c2;
-             if (c2 == WORD(1))
--                return 0;       /* special case not handled by z_gcd_invert */
-+            {
-+                fmpz_zero(f);
-+                return 1;       /* special case not handled by z_gcd_invert */
-+            }
-             /* reduce g mod h first */
- 
-             r = flint_mpz_fdiv_ui(COEFF_TO_PTR(c1), c2);
-diff --git a/fmpz/test/t-invmod.c b/fmpz/test/t-invmod.c
-index aea236e..8ff1c7f 100644
---- a/fmpz/test/t-invmod.c
-+++ b/fmpz/test/t-invmod.c
-@@ -30,6 +30,19 @@
- #include "ulong_extras.h"
- #include "fmpz.h"
- 
-+/* Use the definiton of GMP versions >= 6.0 */
-+int
-+mpz_invert2(mpz_t a, const mpz_t b, const mpz_t c)
-+{
-+    if (mpz_cmpabs_ui(c, 1) == 0)
-+    {
-+        mpz_set_ui(a, 0);
-+        return 1;
-+    }
-+    else
-+        return mpz_invert(a, b, c);
-+}
-+
- int
- main(void)
- {
-@@ -63,7 +76,7 @@ main(void)
-         fmpz_get_mpz(e, b);
- 
-         r1 = fmpz_invmod(c, a, b);
--        r2 = mpz_invert(f, d, e);
-+        r2 = mpz_invert2(f, d, e);
- 
-         fmpz_get_mpz(g, c);
- 
-@@ -106,7 +119,7 @@ main(void)
-         fmpz_get_mpz(d, a);
- 
-         r1 = fmpz_invmod(c, a, a);
--        r2 = mpz_invert(f, d, d);
-+        r2 = mpz_invert2(f, d, d);
- 
-         fmpz_get_mpz(g, c);
- 
-@@ -149,7 +162,7 @@ main(void)
-         fmpz_get_mpz(e, b);
- 
-         r1 = fmpz_invmod(a, a, b);
--        r2 = mpz_invert(f, d, e);
-+        r2 = mpz_invert2(f, d, e);
- 
-         fmpz_get_mpz(g, a);
- 
-@@ -192,7 +205,7 @@ main(void)
-         fmpz_get_mpz(e, b);
- 
-         r1 = fmpz_invmod(b, a, b);
--        r2 = mpz_invert(f, d, e);
-+        r2 = mpz_invert2(f, d, e);
- 
-         fmpz_get_mpz(g, b);
- 

diff --git a/sci-mathematics/flint/files/flint-2.4.5-ntl62.patch b/sci-mathematics/flint/files/flint-2.4.5-ntl62.patch
deleted file mode 100644
index e08fa774e29..00000000000
--- a/sci-mathematics/flint/files/flint-2.4.5-ntl62.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -druN flint-2.5.orig/interfaces/NTL-interface.cpp flint-2.5/interfaces/NTL-interface.cpp
---- flint-2.5.orig/interfaces/NTL-interface.cpp	2014-07-16 07:50:40.000000000 -0700
-+++ flint-2.5/interfaces/NTL-interface.cpp	2014-08-26 07:51:55.585884615 -0700
-@@ -32,9 +32,7 @@
- #include <NTL/ZZ.h>
- #include <NTL/ZZX.h>
- #include <NTL/mat_ZZ.h>
--#include <NTL/lip.h>
- #include <NTL/ctools.h>
--#include <NTL/g_lip.h>
- #include <gmp.h>
- 
- #include "flint.h"

diff --git a/sci-mathematics/flint/flint-2.4.4-r1.ebuild b/sci-mathematics/flint/flint-2.4.4-r1.ebuild
deleted file mode 100644
index 846ee038654..00000000000
--- a/sci-mathematics/flint/flint-2.4.4-r1.ebuild
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils multilib toolchain-funcs
-
-DESCRIPTION="Fast Library for Number Theory"
-HOMEPAGE="http://www.flintlib.org/"
-SRC_URI="http://www.flintlib.org/${P}.tar.gz"
-
-RESTRICT="mirror !test? ( test )"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc x86"
-IUSE="doc gc ntl static-libs test"
-
-RDEPEND="dev-libs/gmp:0=
-	dev-libs/mpfr:0
-	gc? ( dev-libs/boehm-gc )
-	ntl? ( dev-libs/ntl )"
-DEPEND="${RDEPEND}
-	doc? (
-		app-text/texlive-core
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexextra
-	)"
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-2.4.3-libdir.patch \
-		"${FILESDIR}"/${PN}-2.4.3-whitespaces.patch \
-		"${FILESDIR}"/${PN}-2.4.3-cflags-ldflags.patch \
-		"${FILESDIR}"/${PN}-2.4.4-test.patch \
-		"${FILESDIR}"/${PN}-2.4.4-PIE-FTBFS.patch
-
-	sed -i \
-		-e '/echo "DLPATH_ADD=/s/\$DLPATH_ADD/\\\$(CURDIR)/' \
-		./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
-
-	if use doc ; then
-		emake -C doc/latex
-	fi
-}
-
-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
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/flint/files/, sci-mathematics/flint/
@ 2021-04-22  1:31 Michael Orlitzky
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Orlitzky @ 2021-04-22  1:31 UTC (permalink / raw
  To: gentoo-commits

commit:     491b50cf718ca492e2d3329545b6709783264a5e
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 22 01:10:11 2021 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Thu Apr 22 01:10:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=491b50cf

sci-mathematics/flint: new revision to fix x86 gmp detection.

The FindGMP routine in upstream's CMake is using voodoo to determine
the version of gmp that's installed. The sorcery succeeds quite
accidentally on amd64, but fails on x86. We patch their cmake
to do something more reliable.

Bug: https://bugs.gentoo.org/771663
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../files/flint-2.7.1-fix-cmake-findgmp.patch      | 152 +++++++++++++++++++++
 .../{flint-2.7.1.ebuild => flint-2.7.1-r1.ebuild}  |   2 +
 2 files changed, 154 insertions(+)

diff --git a/sci-mathematics/flint/files/flint-2.7.1-fix-cmake-findgmp.patch b/sci-mathematics/flint/files/flint-2.7.1-fix-cmake-findgmp.patch
new file mode 100644
index 00000000000..d94d65c08d7
--- /dev/null
+++ b/sci-mathematics/flint/files/flint-2.7.1-fix-cmake-findgmp.patch
@@ -0,0 +1,152 @@
+From 9f1ef23f34a7ceca1063606cfc749e4d32bef81c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 19 Apr 2021 16:56:54 -0400
+Subject: [PATCH 1/1] CMake/FindGMP.cmake: compile a test program to check the
+ gmp version.
+
+The existing GMP version check consists of grepping the contents of
+the gmp.h header to parse out a few constants. This test fails, at
+least, on Gentoo, where the usual header file is a wrapper that
+includes the true header (to allow for simultaneous 32/64-bit
+support).
+
+This commit updates the FindGMP check to compile a test program
+against gmp.h that compares the version bounds within C, and reports
+success or failure as the return value from main().
+---
+ CMake/FindGMP.cmake | 97 +++++++++++++++++++++++++--------------------
+ 1 file changed, 53 insertions(+), 44 deletions(-)
+
+diff --git a/CMake/FindGMP.cmake b/CMake/FindGMP.cmake
+index ce4df70f5..bd2871ca3 100644
+--- a/CMake/FindGMP.cmake
++++ b/CMake/FindGMP.cmake
+@@ -2,28 +2,23 @@
+ # https://gmplib.org/
+ #
+ # This module supports requiring a minimum version, e.g. you can do
+-#   find_package(GMP 6.0.0)
+-# to require version 6.0.0 to newer of GMP.
++#   find_package(GMP 6.2.1)
++# to require version 6.2.1 to newer of GMP.
+ #
+ # Once done this will define
+ #
+ #  GMP_FOUND - system has GMP lib with correct version
+ #  GMP_INCLUDE_DIRS - the GMP include directory
+ #  GMP_LIBRARIES - the GMP library
+-#  GMP_VERSION - GMP version
+ #
+-# Copyright (c) 2016 Jack Poulson, <jack.poulson@gmail.com>
+-# Redistribution and use is allowed according to the terms of the BSD license.
+ 
+-find_path(GMP_INCLUDE_DIRS NAMES gmp.h PATHS $ENV{GMPDIR} ${INCLUDE_INSTALL_DIR})
+-
+-# Set GMP_FIND_VERSION to 5.1.0 if no minimum version is specified
++# Set GMP_FIND_VERSION to 6.0.0 if no minimum version is specified
+ if(NOT GMP_FIND_VERSION)
+   if(NOT GMP_FIND_VERSION_MAJOR)
+-    set(GMP_FIND_VERSION_MAJOR 5)
++    set(GMP_FIND_VERSION_MAJOR 6)
+   endif()
+   if(NOT GMP_FIND_VERSION_MINOR)
+-    set(GMP_FIND_VERSION_MINOR 1)
++    set(GMP_FIND_VERSION_MINOR 0)
+   endif()
+   if(NOT GMP_FIND_VERSION_PATCH)
+     set(GMP_FIND_VERSION_PATCH 0)
+@@ -32,43 +27,57 @@ if(NOT GMP_FIND_VERSION)
+     "${GMP_FIND_VERSION_MAJOR}.${GMP_FIND_VERSION_MINOR}.${GMP_FIND_VERSION_PATCH}")
+ endif()
+ 
+-if(GMP_INCLUDE_DIRS)
+-  # Since the GMP version macros may be in a file included by gmp.h of the form
+-  # gmp-.*[_]?.*.h (e.g., gmp-x86_64.h), we search each of them.
+-  file(GLOB GMP_HEADERS "${GMP_INCLUDE_DIRS}/gmp.h" "${GMP_INCLUDE_DIRS}/gmp-*.h"
+-	  "${GMP_INCLUDE_DIRS}/x86*/gmp.h")
+-  foreach(gmp_header_filename ${GMP_HEADERS})
+-    file(READ "${gmp_header_filename}" _gmp_version_header)
+-    string(REGEX MATCH
+-      "define[ \t]+__GNU_MP_VERSION[ \t]+([0-9]+)" _gmp_major_version_match
+-      "${_gmp_version_header}")
+-    if(_gmp_major_version_match)
+-      set(GMP_MAJOR_VERSION "${CMAKE_MATCH_1}")
+-      string(REGEX MATCH "define[ \t]+__GNU_MP_VERSION_MINOR[ \t]+([0-9]+)"
+-        _gmp_minor_version_match "${_gmp_version_header}")
+-      set(GMP_MINOR_VERSION "${CMAKE_MATCH_1}")
+-      string(REGEX MATCH "define[ \t]+__GNU_MP_VERSION_PATCHLEVEL[ \t]+([0-9]+)"
+-        _gmp_patchlevel_version_match "${_gmp_version_header}")
+-      set(GMP_PATCHLEVEL_VERSION "${CMAKE_MATCH_1}")
+-      set(GMP_VERSION
+-        ${GMP_MAJOR_VERSION}.${GMP_MINOR_VERSION}.${GMP_PATCHLEVEL_VERSION})
+-    endif()
+-  endforeach()
++find_path(GMP_INCLUDE_DIRS
++          NAMES gmp.h
++          PATHS $ENV{GMPDIR} ${INCLUDE_INSTALL_DIR})
+ 
+-  # Check whether found version exists and exceeds the minimum requirement
+-  if(NOT GMP_VERSION)
+-    set(GMP_VERSION_OK FALSE)
+-    message(STATUS "GMP version was not detected")
+-  elseif(${GMP_VERSION} VERSION_LESS ${GMP_FIND_VERSION})
+-    set(GMP_VERSION_OK FALSE)
+-    message(STATUS "GMP version ${GMP_VERSION} found in ${GMP_INCLUDE_DIRS}, "
+-                   "but at least version ${GMP_FIND_VERSION} is required")
+-  else()
+-    set(GMP_VERSION_OK TRUE)
+-  endif()
++find_library(GMP_LIBRARIES
++             gmp
++             PATHS $ENV{GMPDIR} ${LIB_INSTALL_DIR})
++
++if(GMP_INCLUDE_DIRS AND GMP_LIBRARIES)
++
++  # Return "1" if the version is OK, or "0" otherwise.  This is
++  # opposite the usual C program conventions, but makes the purpose of
++  # the result variable semantically clear. We create an integer using
++  # a few basic GMP functions to ensure that we can actually link against
++  # the GMP library.
++  file(WRITE ${PROJECT_BINARY_DIR}/gmp-version-check.c ""
++  "#include <gmp.h>\n"
++  "\n"
++  "int main(int argc, char **argv) {\n"
++  "  mpz_t x;\n"
++  "  mpz_init_set_str(x, \"7612058254738945\", 10);\n"
++  "  mpz_clear(x);\n"
++  "  if (__GNU_MP_VERSION < ${GMP_FIND_VERSION_MAJOR}) {\n"
++  "    return 0;\n"
++  "  }\n"
++  "  else {\n"
++  "    if (__GNU_MP_VERSION_MINOR < ${GMP_FIND_VERSION_MINOR}) {\n"
++  "      return 0;\n"
++  "    }\n"
++  "    else {\n"
++  "      if (__GNU_MP_VERSION_PATCHLEVEL < ${GMP_FIND_VERSION_PATCH}) {\n"
++  "        return 0;\n"
++  "      }\n"
++  "    }\n"
++  "  }\n"
++  "  return 1;\n"
++  "}\n")
++
++  # Try to run the test program above with the appropriate version
++  # strings substituted in.
++  try_run(GMP_VERSION_OK
++          GMP_VERSION_COMPILE_OK
++          "${PROJECT_BINARY_DIR}"
++          "${PROJECT_BINARY_DIR}/gmp-version-check.c"
++          CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${GMP_INCLUDE_DIRS}"
++          LINK_LIBRARIES "${GMP_LIBRARIES}")
+ endif()
+ 
+-find_library(GMP_LIBRARIES gmp PATHS $ENV{GMPDIR} ${LIB_INSTALL_DIR})
++if(NOT GMP_VERSION_OK)
++  message(STATUS "No sufficient GMP version detected")
++endif()
+ 
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(GMP DEFAULT_MSG
+-- 
+2.26.3
+

diff --git a/sci-mathematics/flint/flint-2.7.1.ebuild b/sci-mathematics/flint/flint-2.7.1-r1.ebuild
similarity index 95%
rename from sci-mathematics/flint/flint-2.7.1.ebuild
rename to sci-mathematics/flint/flint-2.7.1-r1.ebuild
index 92eb4e95a2c..912adc940b1 100644
--- a/sci-mathematics/flint/flint-2.7.1.ebuild
+++ b/sci-mathematics/flint/flint-2.7.1-r1.ebuild
@@ -36,6 +36,8 @@ DEPEND="dev-libs/gmp:=
 	virtual/cblas"
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}/${P}-fix-cmake-findgmp.patch" )
+
 src_configure() {
 	local mycmakeargs=(
 		-DWITH_NTL="$(usex ntl)"


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/flint/files/, sci-mathematics/flint/
@ 2023-07-09  4:47 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-07-09  4:47 UTC (permalink / raw
  To: gentoo-commits

commit:     b3d94642a52b8a887c3ae1c249275ba1fb1da2cf
Author:     Matoro Mahri <matoro <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Sun Jul  9 03:23:27 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jul  9 04:46:25 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3d94642

sci-mathematics/flint: remove hardcoded CFLAGS

Bug: https://bugs.gentoo.org/909738
Signed-off-by: Matoro Mahri <matoro <AT> users.noreply.github.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../flint-2.9.0-remove-hardcoded-CFLAGS.patch      | 69 ++++++++++++++++++++++
 sci-mathematics/flint/flint-2.9.0.ebuild           |  1 +
 2 files changed, 70 insertions(+)

diff --git a/sci-mathematics/flint/files/flint-2.9.0-remove-hardcoded-CFLAGS.patch b/sci-mathematics/flint/files/flint-2.9.0-remove-hardcoded-CFLAGS.patch
new file mode 100644
index 000000000000..b057ea207bbd
--- /dev/null
+++ b/sci-mathematics/flint/files/flint-2.9.0-remove-hardcoded-CFLAGS.patch
@@ -0,0 +1,69 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9784633c4..641ab9ed4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,6 +1,5 @@
+ cmake_minimum_required(VERSION 3.9)
+ 
+-include(CheckIPOSupported)
+ include(CheckIncludeFiles)
+ include(CheckFunctionExists)
+ include(CheckPrototypeDefinition)
+@@ -126,13 +125,6 @@ with open(join('${CMAKE_SOURCE_DIR}','qadic', 'CPimport.txt')) as fin:
+ )
+ configure_file(${CMAKE_BINARY_DIR}/CPimport.h.in ${CMAKE_BINARY_DIR}/CPimport.h COPYONLY)
+ 
+-# Setup for flint-config.h
+-check_c_compiler_flag("-mpopcnt" HAS_FLAG_MPOPCNT)
+-check_c_compiler_flag("-funroll-loops" HAS_FLAG_UNROLL_LOOPS)
+-
+-if(HAS_FLAG_MPOPCNT)
+-  set(CMAKE_REQUIRED_FLAGS "-mpopcnt")
+-endif()
+ # Testing __builtin_popcountl...
+ check_c_source_runs([[int main(int argc, char ** argv) {
+   #if defined(_WIN64)
+@@ -141,7 +133,6 @@ check_c_source_runs([[int main(int argc, char ** argv) {
+   return __builtin_popcountl(argc) == 100;
+   #endif
+   }]] FLINT_USES_POPCNT)
+-unset(CMAKE_REQUIRED_FLAGS)
+ 
+ # fenv configuration
+ check_c_source_compiles([[#include <fenv.h>
+@@ -250,13 +241,6 @@ if(BUILD_SHARED_LIBS AND WIN32)
+     target_compile_definitions(flint PUBLIC "MSC_USE_DLL")
+ endif()
+ 
+-if (HAS_FLAG_MPOPCNT)
+-    target_compile_options(flint PUBLIC "-mpopcnt")
+-endif()
+-if (HAS_FLAG_UNROLL_LOOPS)
+-    target_compile_options(flint PUBLIC "-funroll-loops")
+-endif()
+-
+ # Versioning
+ 
+ set_target_properties(flint PROPERTIES
+@@ -279,21 +263,6 @@ elseif (WIN32)
+     set_target_properties(flint PROPERTIES RUNTIME_OUTPUT_NAME "flint-${FLINT_MAJOR}")
+ endif()
+ 
+-if(NOT DEFINED IPO_SUPPORTED)
+-    message(STATUS "Checking for IPO")
+-    check_ipo_supported(RESULT ipo_supported LANGUAGES C)
+-    if(ipo_supported)
+-        message(STATUS "Checking for IPO - found")
+-    else()
+-        message(STATUS "Checking for IPO - not found")
+-    endif()
+-    set(IPO_SUPPORTED ${ipo_supported} CACHE INTERNAL "Introprocedural Optimization" FORCE)
+-endif()
+-
+-if(IPO_SUPPORTED)
+-    set_target_properties(flint PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
+-endif()
+-
+ if(NOT MSVC)
+ 	target_link_libraries(flint PUBLIC m)
+ endif()

diff --git a/sci-mathematics/flint/flint-2.9.0.ebuild b/sci-mathematics/flint/flint-2.9.0.ebuild
index 5a1fb677b0b8..494339dd488e 100644
--- a/sci-mathematics/flint/flint-2.9.0.ebuild
+++ b/sci-mathematics/flint/flint-2.9.0.ebuild
@@ -41,6 +41,7 @@ DEPEND="dev-libs/gmp:=
 RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/flint2-${PV}"
+PATCHES=( "${FILESDIR}/${PN}-2.9.0-remove-hardcoded-CFLAGS.patch" )
 
 src_prepare() {
 	# https://github.com/wbhart/flint2/issues/1140


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/flint/files/, sci-mathematics/flint/
@ 2024-08-03 13:54 Michael Orlitzky
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Orlitzky @ 2024-08-03 13:54 UTC (permalink / raw
  To: gentoo-commits

commit:     67790c24e066fcbce7918b85046cb2342f2197ef
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  3 12:39:08 2024 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Aug  3 13:48:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67790c24

sci-mathematics/flint: drop 3.0.1, 3.1.0

Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 sci-mathematics/flint/Manifest                     |  2 -
 .../flint/files/flint-3.1.0-fix-pc-install.patch   | 29 --------
 sci-mathematics/flint/flint-3.0.1.ebuild           | 81 ---------------------
 sci-mathematics/flint/flint-3.1.0.ebuild           | 84 ----------------------
 4 files changed, 196 deletions(-)

diff --git a/sci-mathematics/flint/Manifest b/sci-mathematics/flint/Manifest
index ed7a401b1771..f1fe7fc91c54 100644
--- a/sci-mathematics/flint/Manifest
+++ b/sci-mathematics/flint/Manifest
@@ -1,3 +1 @@
-DIST flint-3.0.1.tar.gz 7624944 BLAKE2B 0d94252075945f39af3dd2e49803cbe16aa65b108964dfc0c12bdfd9188748944c1e839401e17b974f8f6f8832e4da84d62a63f20b63cfff0ff5c2736bfd2d47 SHA512 4b5b432b962135cd708a0ce4242343f3226f0fdf73c3f541728ed4540e7ef6cb7812a48b6b46e65a8fcc1f5cae93d8bb59838d24728024cd9aa0f7b8e5c6f98f
-DIST flint-3.1.0.tar.gz 7585407 BLAKE2B 697be5bd88e7793eb160d5f0e2110a7b8371ef8d3ca82b576c4cc755983a660a884d35d3cbb442288caa074b7f41699f4c6bc3c244272d9e9f5755d8d209004d SHA512 1d33bb35853f4bdca047899ebb4ac9873748c6d57ad3b6aded32219261e95713fb26b394d8c86f6183b9f44db58697def07e6c565ac789461d5ccc4dca3e9ba7
 DIST flint-3.1.3_p1.tar.gz 7588734 BLAKE2B 87acf8778e21e37c01e12b198ff81e62ab113df3e0e9c6155ff7dd505828f79d5c49d85093e261ea96397e906350caa03477e3ecbdd1fc09d6ae5c984397a2be SHA512 1b16ff2fb9cb2ac4b75513278b8c14683e8d83db39985631df14d6ea74bee4d6ea818a200321d5f0de6f1af89898f7a99dc7088f712f4c6db1a2546199aefba7

diff --git a/sci-mathematics/flint/files/flint-3.1.0-fix-pc-install.patch b/sci-mathematics/flint/files/flint-3.1.0-fix-pc-install.patch
deleted file mode 100644
index 5e0145cb95e7..000000000000
--- a/sci-mathematics/flint/files/flint-3.1.0-fix-pc-install.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From f4e0dfda90f6574048578f112bea1013d54f0987 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Sun, 10 Mar 2024 21:48:51 -0400
-Subject: [PATCH 1/1] CMakeLists.txt: install the pkg-config file to the
- configured libdir
-
-Currently it installs to lib/pkgconfig, which can be incorrect on
-systems where (for example) the normal libdir is lib64 and "lib" is
-reserved for 32-bit libraries.
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 30935cef4..d8dfee38d 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -537,7 +537,7 @@ set(PACKAGE_NAME ${PROJECT_NAME})
- set(PACKAGE_VERSION ${PROJECT_VERSION})
- configure_file(flint.pc.in flint.pc @ONLY)
- 
--install(FILES ${CMAKE_CURRENT_BINARY_DIR}/flint.pc DESTINATION lib/pkgconfig)
-+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/flint.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
- 
- if(BUILD_TESTING)
-     set(FLINT_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src) # To get src/test/main
--- 
-2.43.0
-

diff --git a/sci-mathematics/flint/flint-3.0.1.ebuild b/sci-mathematics/flint/flint-3.0.1.ebuild
deleted file mode 100644
index 7f24b83f5744..000000000000
--- a/sci-mathematics/flint/flint-3.0.1.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic python-any-r1
-
-DESCRIPTION="Fast Library for Number Theory"
-HOMEPAGE="https://www.flintlib.org/"
-
-# flintlib.org tarballs have been broken in the past, Bill Hart suggests
-# we get them from Github (which he has control over).
-SRC_URI="https://github.com/flintlib/flint/archive/refs/tags/v${PV}.tar.gz
-	-> ${P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-
-# Based off the soname, e.g. /usr/lib64/libflint.so -> libflint.so.15
-SLOT="0/18"
-
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
-IUSE="doc ntl test"
-
-RESTRICT="!test? ( test )"
-
-BDEPEND="${PYTHON_DEPS}
-	doc? (
-		app-text/texlive-core
-		dev-python/sphinx
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexextra
-	)
-"
-DEPEND="dev-libs/gmp:=
-	dev-libs/mpfr:=
-	ntl? ( dev-libs/ntl:= )
-	virtual/cblas"
-# flint 3 includes arb and arb cannot use flint 3.
-RDEPEND="${DEPEND}
-	!sci-mathematics/arb"
-
-# The rst files are API docs, but they're very low-effort compared to
-# the PDF and HTML docs, so we ship them unconditionally and hide only
-# the painful parts behind USE=doc.
-DOCS="AUTHORS README.md doc/source/*.rst"
-
-PATCHES=( "${FILESDIR}/flint-3.0.1-find-cblas.patch" )
-
-src_configure() {
-	# https://github.com/flintlib/flint/issues/1683
-	append-cflags -Wno-error=strict-prototypes
-
-	local mycmakeargs=(
-		-DWITH_NTL="$(usex ntl)"
-		-DBUILD_TESTING="$(usex test)"
-		-DBUILD_DOCS="$(usex doc)"
-	)
-
-	cmake_src_configure
-
-	if use doc; then
-		# Avoid the "html/_source" directory that will contain a copy of
-		# the rst sources we've already installed, and also avoid
-		# installing html/objects.inv.
-		HTML_DOCS="${BUILD_DIR}/html/*.html
-			${BUILD_DIR}/html/*.js
-			${BUILD_DIR}/html/_static"
-		DOCS+=" ${BUILD_DIR}/latex/Flint.pdf"
-	fi
-}
-
-src_compile() {
-	cmake_src_compile
-
-	if use doc; then
-		cmake_build html
-		cmake_build pdf
-	fi
-}

diff --git a/sci-mathematics/flint/flint-3.1.0.ebuild b/sci-mathematics/flint/flint-3.1.0.ebuild
deleted file mode 100644
index 7c2c45ffec7e..000000000000
--- a/sci-mathematics/flint/flint-3.1.0.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake flag-o-matic python-any-r1
-
-DESCRIPTION="Fast Library for Number Theory"
-HOMEPAGE="https://www.flintlib.org/"
-
-# flintlib.org tarballs have been broken in the past, Bill Hart suggests
-# we get them from Github (which he has control over).
-SRC_URI="https://github.com/flintlib/flint/archive/refs/tags/v${PV}.tar.gz
-	-> ${P}.tar.gz"
-
-LICENSE="LGPL-2.1+"
-
-# Based off the soname, e.g. /usr/lib64/libflint.so -> libflint.so.15
-SLOT="0/19"
-
-KEYWORDS="amd64 ~arm arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
-IUSE="doc ntl test"
-
-RESTRICT="!test? ( test )"
-
-BDEPEND="${PYTHON_DEPS}
-	doc? (
-		app-text/texlive-core
-		dev-python/sphinx
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexextra
-	)
-"
-DEPEND="dev-libs/gmp:=
-	dev-libs/mpfr:=
-	ntl? ( dev-libs/ntl:= )
-	virtual/cblas"
-# flint 3 includes arb and arb cannot use flint 3.
-RDEPEND="${DEPEND}
-	!sci-mathematics/arb"
-
-# The rst files are API docs, but they're very low-effort compared to
-# the PDF and HTML docs, so we ship them unconditionally and hide only
-# the painful parts behind USE=doc.
-DOCS="AUTHORS README.md doc/source/*.rst"
-
-PATCHES=(
-	"${FILESDIR}/flint-3.0.1-find-cblas.patch"
-	"${FILESDIR}/${P}-fix-pc-install.patch"
-)
-
-src_configure() {
-	# https://github.com/flintlib/flint/issues/1683
-	append-cflags -Wno-error=strict-prototypes
-
-	local mycmakeargs=(
-		-DWITH_NTL="$(usex ntl)"
-		-DBUILD_TESTING="$(usex test)"
-		-DBUILD_DOCS="$(usex doc)"
-	)
-
-	cmake_src_configure
-
-	if use doc; then
-		# Avoid the "html/_source" directory that will contain a copy of
-		# the rst sources we've already installed, and also avoid
-		# installing html/objects.inv.
-		HTML_DOCS="${BUILD_DIR}/html/*.html
-			${BUILD_DIR}/html/*.js
-			${BUILD_DIR}/html/_static"
-		DOCS+=" ${BUILD_DIR}/latex/Flint.pdf"
-	fi
-}
-
-src_compile() {
-	cmake_src_compile
-
-	if use doc; then
-		cmake_build html
-		cmake_build pdf
-	fi
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-03 13:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-03 13:54 [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/flint/files/, sci-mathematics/flint/ Michael Orlitzky
  -- strict thread matches above, loose matches on Subject: below --
2023-07-09  4:47 Sam James
2021-04-22  1:31 Michael Orlitzky
2020-04-06 15:08 Andreas Sturmlechner
2020-02-28 17:23 Michael Orlitzky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox