From 992ddb3934d4fea5dcf3e67f76460b60190e9d2f Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 17 Jul 2021 07:12:17 -0600 Subject: [PATCH] Rebuild for flint 2.7.1 and normaliz 3.9.0. Add -eclib patch to adapt to eclib 20210625. --- sagemath-eclib.patch | 40 ++++++++++++++++++++++++++++++++++++++++ sagemath.spec | 10 +++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 sagemath-eclib.patch diff --git a/sagemath-eclib.patch b/sagemath-eclib.patch new file mode 100644 index 0000000..761b0de --- /dev/null +++ b/sagemath-eclib.patch @@ -0,0 +1,40 @@ +diff -up src/sage/libs/eclib/mwrank.pyx.orig src/sage/libs/eclib/mwrank.pyx +--- src/sage/libs/eclib/mwrank.pyx.orig 2021-05-09 16:00:11.000000000 -0600 ++++ src/sage/libs/eclib/mwrank.pyx 2021-07-07 09:31:20.972526814 -0600 +@@ -55,7 +55,7 @@ cdef extern from "wrap.cpp": + char* mw_getbasis(mw* m) + double mw_regulator(mw* m) + int mw_rank(mw* m) +- int mw_saturate(mw* m, bigint* index, char** unsat, ++ int mw_saturate(mw* m, long* index, char** unsat, + long sat_bd, int odd_primes_only) + void mw_search(mw* m, char* h_lim, int moduli_option, int verb) + +@@ -894,12 +894,12 @@ cdef class _mw: + + + """ +- cdef _bigint index ++ cdef long index + cdef char* s + cdef int ok + sig_on() +- index = _bigint() +- ok = mw_saturate(self.x, index.x, &s, sat_bd, odd_primes_only) ++ index = 0 ++ ok = mw_saturate(self.x, &index, &s, sat_bd, odd_primes_only) + unsat = string_sigoff(s) + return ok, index, unsat + +diff -up src/sage/libs/eclib/wrap.cpp.orig src/sage/libs/eclib/wrap.cpp +--- src/sage/libs/eclib/wrap.cpp.orig 2021-05-09 16:00:11.000000000 -0600 ++++ src/sage/libs/eclib/wrap.cpp 2021-07-06 17:38:03.377018615 -0600 +@@ -178,7 +178,7 @@ int mw_rank(struct mw* m) + } + + /* Returns index and unsat long array, which user must deallocate */ +-int mw_saturate(struct mw* m, bigint* index, char** unsat, ++int mw_saturate(struct mw* m, long* index, char** unsat, + long sat_bd, int odd_primes_only) + { + vector v; diff --git a/sagemath.spec b/sagemath.spec index e63ef61..28f8ad4 100644 --- a/sagemath.spec +++ b/sagemath.spec @@ -90,7 +90,7 @@ Name: sagemath Summary: A free open-source mathematics software system Version: 9.3 -Release: 2%{?dist} +Release: 3%{?dist} # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file # Additionally, every $files section has a comment with the license name # before files with that license @@ -189,6 +189,9 @@ Patch23: %{name}-intersphinx.patch # Remove an unused call to a primecount function that no longer exists Patch24: %{name}-primecount.patch +# Adapt to recent changes in eclib +Patch25: %{name}-eclib.patch + BuildRequires: 4ti2 BuildRequires: appstream BuildRequires: arb-devel @@ -927,6 +930,7 @@ popd %patch22 %patch23 %patch24 +%patch25 sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \ -e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \ @@ -2001,6 +2005,10 @@ end ######################################################################## %changelog +* Fri Jul 16 2021 Jerry James - 9.3-3 +- Rebuild for flint 2.7.1 and normaliz 3.9.0 +- Add -eclib patch to adapt to eclib 20210625 + * Tue Jun 29 2021 Jerry James - 9.3-2 - Rebuild for ntl 11.5.1