From a2ad9ab6784fd63a43d4b6eba91ccbf3cb2fbe58 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Thu, 9 Nov 2023 19:51:18 -0500
Subject: [PATCH 17/46] Correct appstreamcli invocation (--nonet no longer
works)
---
Macaulay2.spec | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index a98c4cb..b79525f 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -52,7 +52,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.22
-Release: 1%{?dist}
+Release: 2%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -572,7 +572,8 @@ desktop-file-install --vendor="" \
mkdir -p %{buildroot}%{_metainfodir}
install -pm 644 %{SOURCE12} %{buildroot}%{_metainfodir}
-appstreamcli validate --nonet %{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml
+appstreamcli validate --no-net \
+ %{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml
# Byte compile the Emacs files, and move the documentation
pushd %{buildroot}%{_emacs_sitelispdir}/macaulay2
@@ -616,6 +617,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Fri Nov 10 2023 Benjamin A. Beasley - 1.22-2
+- Correct appstreamcli invocation (--nonet no longer works)
+
* Thu Oct 26 2023 Jerry James - 1.22-1
- Version 1.22
- Drop upstreamed Macaulay2-configure-c99.patch
From 5cd5a8ed12ed0aee77375818e965ac4b988c0433 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley"
Date: Thu, 9 Nov 2023 19:51:51 -0500
Subject: [PATCH 18/46] Ask appstreamcli to explain validation findings
---
Macaulay2.spec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index b79525f..bba5504 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -572,7 +572,7 @@ desktop-file-install --vendor="" \
mkdir -p %{buildroot}%{_metainfodir}
install -pm 644 %{SOURCE12} %{buildroot}%{_metainfodir}
-appstreamcli validate --no-net \
+appstreamcli validate --no-net --explain \
%{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml
# Byte compile the Emacs files, and move the documentation
@@ -619,6 +619,7 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
* Fri Nov 10 2023 Benjamin A. Beasley - 1.22-2
- Correct appstreamcli invocation (--nonet no longer works)
+- Ask appstreamcli to explain validation findings
* Thu Oct 26 2023 Jerry James - 1.22-1
- Version 1.22
From 0023a59935617ed60c82f92a12be5d76355a452f Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley"
Date: Thu, 9 Nov 2023 19:54:43 -0500
Subject: [PATCH 19/46] Also validate AppStream XML with appstream-util,
required by guidelines
---
Macaulay2.spec | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index bba5504..47c8616 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -298,6 +298,7 @@ BuildRequires: givaro-static
BuildRequires: glpk-devel
BuildRequires: iml-devel
BuildRequires: info
+BuildRequires: libappstream-glib
BuildRequires: libfplll-static
BuildRequires: libfrobby-devel
BuildRequires: libgfan-devel
@@ -572,6 +573,11 @@ desktop-file-install --vendor="" \
mkdir -p %{buildroot}%{_metainfodir}
install -pm 644 %{SOURCE12} %{buildroot}%{_metainfodir}
+# Still required by guidelines for now
+# (https://pagure.io/packaging-committee/issue/1053):
+appstream-util validate-relax --nonet \
+ %{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml
+# Matches what gnome-software and others use:
appstreamcli validate --no-net --explain \
%{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml
@@ -620,6 +626,7 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
* Fri Nov 10 2023 Benjamin A. Beasley - 1.22-2
- Correct appstreamcli invocation (--nonet no longer works)
- Ask appstreamcli to explain validation findings
+- Also validate AppStream XML with appstream-util, required by guidelines
* Thu Oct 26 2023 Jerry James - 1.22-1
- Version 1.22
From a4414e91a5f6a6f76696b78125b45fe2952e2916 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely
Date: Wed, 17 Jan 2024 22:58:51 +0000
Subject: [PATCH 20/46] Rebuilt for Boost 1.83
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 47c8616..582cf0c 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -52,7 +52,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.22
-Release: 2%{?dist}
+Release: 3%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -623,6 +623,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Wed Jan 17 2024 Jonathan Wakely - 1.22-3
+- Rebuilt for Boost 1.83
+
* Fri Nov 10 2023 Benjamin A. Beasley - 1.22-2
- Correct appstreamcli invocation (--nonet no longer works)
- Ask appstreamcli to explain validation findings
From ae8d0d9bc2fe5b7c5fea04eb4d306dbd18c57cd4 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Fri, 19 Jan 2024 09:59:00 +0000
Subject: [PATCH 21/46] Rebuilt for
https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 582cf0c..59a4c64 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -52,7 +52,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.22
-Release: 3%{?dist}
+Release: 4%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -623,6 +623,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Fri Jan 19 2024 Fedora Release Engineering - 1.22-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
+
* Wed Jan 17 2024 Jonathan Wakely - 1.22-3
- Rebuilt for Boost 1.83
From a06875216ccf6bf7f1d1cb71215c87ac5f913d8c Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Mon, 22 Jan 2024 21:03:51 +0000
Subject: [PATCH 22/46] Rebuilt for
https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 59a4c64..2aabbab 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -52,7 +52,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.22
-Release: 4%{?dist}
+Release: 5%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -623,6 +623,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Mon Jan 22 2024 Fedora Release Engineering - 1.22-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
+
* Fri Jan 19 2024 Fedora Release Engineering - 1.22-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
From 15c2dabd0d0c70e5514c7127633acba67561e314 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Fri, 23 Feb 2024 19:54:52 -0700
Subject: [PATCH 23/46] Build the polymake and scip examples
- Recommend scip
---
Macaulay2.spec | 16 +-
linbox-1.7.0.patch | 416 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 427 insertions(+), 5 deletions(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 2aabbab..96b77b5 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -52,7 +52,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.22
-Release: 5%{?dist}
+Release: 6%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -228,7 +228,7 @@ Source108: https://github.com/linbox-team/linbox/releases/download/v%{linboxver}
Provides: bundled(linbox) = %{linboxver}
## PATCHES FOR BUNDLED code
-# Fix a buffer overflow
+# Fix a buffer overflow and some constness issues
# https://github.com/linbox-team/linbox/pull/307
Source200: linbox-1.7.0.patch
# MPFR bug fixes from mpfr upstream.
@@ -334,9 +334,9 @@ BuildRequires: pkgconfig(qd)
BuildRequires: pkgconfig(readline)
BuildRequires: pkgconfig(tbb)
BuildRequires: pkgconfig(tinyxml2)
-# Polymake is currently uninstallable
-#BuildRequires: polymake
+BuildRequires: polymake
BuildRequires: python3-devel
+BuildRequires: scip
BuildRequires: texinfo
BuildRequires: time
BuildRequires: TOPCOM
@@ -361,6 +361,7 @@ Requires: TOPCOM
Requires: xdg-utils
Recommends: mathicgb
+Recommends: scip
%if 0%{?common}
Requires: %{name}-common = %{version}-%{release}
@@ -377,7 +378,7 @@ Provides: macaulay2 = %{version}-%{release}
# Macaulay2 no longer builds successfully on 32-bit platforms
# https://bugzilla.redhat.com/show_bug.cgi?id=1874318
-ExcludeArch: %{ix86} %{arm}
+ExcludeArch: %{ix86}
# Do not advertise the bundled mpfr
%global __provides_exclude libmpfr.so*
@@ -422,6 +423,7 @@ tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1
sed -e 's,--with-blas,&=%{_includedir}/flexiblas --with-ntl,' \
-i libraries/flint/Makefile.in
cp -p %{SOURCE200} libraries/linbox/patch-%{linboxver}
+sed -i 's/^#\(PATCHFILE\)/\1/' libraries/linbox/Makefile.in
sed -e '/^TARFILE =/iPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \
-i libraries/mpfr/Makefile.in
cp -p %{SOURCE201} libraries/mpfr/patch-%{mpfrver}
@@ -623,6 +625,10 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Fri Feb 23 2024 Jerry James - 1.22-6
+- Build the polymake and scip examples
+- Recommend scip
+
* Mon Jan 22 2024 Fedora Release Engineering - 1.22-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
diff --git a/linbox-1.7.0.patch b/linbox-1.7.0.patch
index 70edb8c..36fc3b1 100644
--- a/linbox-1.7.0.patch
+++ b/linbox-1.7.0.patch
@@ -13,3 +13,419 @@
//order from major index to minor: combining index, component of sol'n, byte
//compute a product (chunk times x) for each chunk
+--- linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h
++++ linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h
+@@ -208,8 +208,8 @@ namespace LinBox{
+ * @param j Column index of entry, 0...coldim() - 1
+ * @param a_ij Element to set
+ */
+- const Element& setEntry(size_t i, size_t j, const Element& a_ij){
+- return _Mat->setEntry(_r0 + i, _c0 + j, a_ij);
++ const void setEntry(size_t i, size_t j, const Element& a_ij){
++ _Mat->setEntry(_r0 + i, _c0 + j, a_ij);
+ }
+
+ /** Get a writeable reference to an entry in the matrix.
+--- linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl
++++ linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl
+@@ -2,7 +2,7 @@
+ * Copyright (C) LinBox 2008
+ *
+ * Written by Jean-Guillaume Dumas
+- * Time-stamp: <27 Aug 20 15:17:09 Jean-Guillaume.Dumas@imag.fr>
++ * Time-stamp: <26 Jan 24 16:05:55 Jean-Guillaume.Dumas@imag.fr>
+ *
+ *
+ * ========LICENCE========
+@@ -104,11 +104,11 @@ namespace LinBox
+
+ Permutation P(field(),(int)Nj);
+
+- // A.write( std::cerr << "A:=", Tag::FileFormat::Maple ) << ';' << std::endl;
++// A.write( std::cerr << "A:=", Tag::FileFormat::Maple ) << ';' << std::endl;
+ this->InPlaceLinearPivoting(Rank, Det, A, P, Ni, Nj );
+
+- // P.write( std::cerr << "P:=", Tag::FileFormat::Maple ) << ';' << std::endl;
+- // A.write( std::cerr << "Ua:=", Tag::FileFormat::Maple ) << ';' << std::endl;
++// P.write( std::cerr << "P:=", Tag::FileFormat::Maple ) << ';' << std::endl;
++// A.write( std::cerr << "Ua:=", Tag::FileFormat::Maple ) << ';' << std::endl;
+
+ for(size_t i=0; i< Ni; ++i) {
+ if (A[i].size() == 0) {
+@@ -123,7 +123,7 @@ namespace LinBox
+ }
+ }
+
+- // A.write( std::cerr << "Ub:=", Tag::FileFormat::Maple ) << ';' << std::endl;
++// A.write( std::cerr << "Ub:=", Tag::FileFormat::Maple ) << ';' << std::endl;
+
+ return this->nullspacebasis(x, Rank, A, P);
+ }
+--- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h
++++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h
+@@ -1210,10 +1210,10 @@ namespace LinBox
+ _colid_beg = iter._colid_beg ;
+ _colid_it = iter._colid_it ;
+ _data_it = iter._data_it ;
+- _data_beg = iter._data_beg ;
+- _data_end = iter._data_end ;
+- _field = iter._field ;
+- _ld = iter._ld ;
++ const_cast(_data_beg) = iter._data_beg ;
++ const_cast(_data_end) = iter._data_end ;
++ const_cast(_field) = iter._field ;
++ const_cast(ld) = iter._ld ;
+ _row = iter._row ;
+
+ return *this;
+--- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h
++++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h
+@@ -1102,11 +1102,11 @@ namespace LinBox
+ _Iterator &operator = (const _Iterator &iter)
+ {
+ _data_it = iter._data_it ;
+- _data_beg = iter._data_beg ;
+- _data_end = iter._data_end ;
+- _field = iter._field ;
+- _rowid = iter._rowid;
+- _ld = iter._ld ;
++ const_cast(_data_beg) = iter._data_beg ;
++ const_cast(_data_end)= iter._data_end ;
++ const_cast(_field) = iter._field ;
++ const_cast&>(_rowid) = iter._rowid;
++ const_cast(ld) = iter._ld ;
+ _row = iter._row ;
+
+ return *this;
+@@ -1252,10 +1252,10 @@ namespace LinBox
+ _colid_beg = iter._colid_beg ;
+ _colid_it = iter._colid_it ;
+ _data_it = iter._data_it ;
+- _data_beg = iter._data_beg ;
+- _data_end = iter._data_end ;
+- _field = iter._field ;
+- _ld = iter._ld ;
++ const_cast(_data_beg) = iter._data_beg ;
++ const_cast(_data_end) = iter._data_end ;
++ const_cast(_field) = iter._field ;
++ const_cast(ld)= iter._ld ;
+ _row = iter._row ;
+
+ return *this;
+--- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h
++++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h
+@@ -85,7 +85,7 @@ namespace Givaro
+ * @param x reference to Integer to contain output (reference returned).
+ * @param y constant reference to field element.
+ */
+- template <>
++ template <>
+ Integer& Caster(Integer& x, const NTL::zz_p& y)
+ {
+ return x = int64_t(rep(y));
+@@ -130,7 +130,7 @@ namespace LinBox
+ typedef NTL::zz_p Element ;
+ typedef Givaro::UnparametricOperations Father_t ;
+ typedef UnparametricRandIter RandIter;
+-
++
+ const Element zero,one,mOne ;
+
+
+@@ -145,6 +145,11 @@ namespace LinBox
+ ,zero( NTL::to_zz_p(0)),one( NTL::to_zz_p(1)),mOne(-one)
+ {}
+
++ Element &init (Element &x) const
++ {
++ return x = NTL::to_zz_p(0);
++ }
++
+ Element& init(Element& x, const double& y) const
+ {
+ double z = fmod(y,(double)Element::modulus());
+@@ -153,7 +158,7 @@ namespace LinBox
+ return x = NTL::to_zz_p(static_cast(z)); //rounds towards 0
+ }
+
+- Element &init (Element &x, const integer &y=0) const
++ Element &init (Element &x, const integer &y) const
+ {
+ NTL::ZZ tmp= NTL::to_ZZ(std::string(y).data());
+ return x = NTL::to_zz_p(tmp);
+--- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h
++++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h
+@@ -96,18 +96,18 @@ namespace LinBox
+ NTL::zz_pE::init(irredPoly);
+ _f = irredPoly;
+ }
+-
++
+ NTL_zz_pE_Initialiser( const Integer & p, const NTL::zz_pX & f) {
+ NTL::zz_p::init((int64_t) p);
+ NTL::zz_pE::init(f);
+ _f = f;
+ }
+-
++
+ NTL_zz_pE_Initialiser(const NTL::zz_pX &f) {
+ NTL::zz_pE::init(f);
+ _f = f;
+ }
+-
++
+ const NTL::zz_pX& modulus() const {
+ return _f;
+ }
+@@ -143,22 +143,22 @@ namespace LinBox
+ NTL_zz_pE (const integer &p, const integer &k) :
+ NTL_zz_pE_Initialiser(p,k),Father_t ()
+ {
+- init(const_cast(zero), 0);
+- init(const_cast(one), 1);
+- init(const_cast(mOne), p-1);
++ init(const_cast(zero), 0);
++ init(const_cast(one), 1);
++ init(const_cast(mOne), p-1);
+ }
+-
++
+ NTL_zz_pE (const integer &p, const NTL::zz_pX &f) :
+ NTL_zz_pE_Initialiser(p,f), Father_t()
+ {
+ init(const_cast(zero), 0);
+- init(const_cast(one), 1);
+- init(const_cast(mOne), p-1);
++ init(const_cast(one), 1);
++ init(const_cast(mOne), p-1);
+ }
+-
++
+ NTL_zz_pE(const NTL_zz_pE &F) :
+- NTL_zz_pE_Initialiser(F.modulus()), Father_t(),
+- zero(NTL::to_zz_pE(0)), one(NTL::to_zz_pE(1)), mOne(-one)
++ NTL_zz_pE_Initialiser(F.modulus()), Father_t(),
++ zero(NTL::to_zz_pE(0)), one(NTL::to_zz_pE(1)), mOne(-one)
+ {
+ }
+
+@@ -182,15 +182,15 @@ namespace LinBox
+
+ bool isUnit (const Element& x) const
+ {
+- if (isZero(x)) {
+- return false;
+- }
+-
+- NTL::zz_pX g, tmp;
+- tmp = NTL::conv(x);
+- NTL::GCD(g, tmp, modulus());
+-
+- return g == 1;
++ if (isZero(x)) {
++ return false;
++ }
++
++ NTL::zz_pX g, tmp;
++ tmp = NTL::conv(x);
++ NTL::GCD(g, tmp, modulus());
++
++ return g == 1;
+ }
+
+ bool isMOne (const Element& x) const
+@@ -207,7 +207,9 @@ namespace LinBox
+ return f;
+ }
+
+- Element & init(Element & x, integer n = 0) const
++ Element & init(Element & x) const { return x; }
++
++ Element & init(Element & x, integer n) const
+ { // assumes n >= 0.
+ int e = exponent();
+ n %= cardinality();
+@@ -215,14 +217,14 @@ namespace LinBox
+ //write(std::cout << "init-ed ", x) << std::endl;
+ return x;
+ }
+-
++
+ // documentation of NTL::conv:
+ // http://www.shoup.net/ntl/doc/conversions.txt
+ // XXX = long, ZZ, ZZ_p, ZZ_pE, ZZ_pX
+ template
+ Element &init(Element &x, const XXX &y) const {
+- x = NTL::conv(y);
+- return x;
++ x = NTL::conv(y);
++ return x;
+ }
+
+ integer & convert(integer & x, const Element & y) const
+@@ -279,81 +281,80 @@ namespace LinBox
+ x=one/x;
+ return x;
+ }
+-
++
+ Element& div(Element &x, const Element &y, const Element &z) const {
+- NTL::zz_pX g, zx;
+- conv(zx, z);
+- NTL::GCD(g, zx, modulus());
+-
+- NTL::zz_pE zg;
+- conv(zg, zx / g);
+- x = NTL::conv(NTL::conv(y) / g);
+- x /= zg;
+-
+- return x;
++ NTL::zz_pX g, zx;
++ conv(zx, z);
++ NTL::GCD(g, zx, modulus());
++
++ NTL::zz_pE zg;
++ conv(zg, zx / g);
++ x = NTL::conv(NTL::conv(y) / g);
++ x /= zg;
++
++ return x;
+ }
+-
++
+ Element& divin(Element &x, const Element &y) const {
+- Element r;
+- div(r, x, y);
+- return x = r;
++ Element r;
++ div(r, x, y);
++ return x = r;
+ }
+
+ bool isDivisor(const Element &x, const Element &y) const {
+- if (isZero(y)) {
+- return false;
+- }
+-
+- if (isUnit(y)) {
+- return true;
+- }
+-
+- NTL::zz_pX a, b;
+- conv(a, x);
+- conv(b, y);
+-
+- NTL::zz_pX ga, gb;
+- NTL::GCD(ga, a, modulus());
+- NTL::GCD(gb, b, modulus());
+-
+- NTL::zz_pX r;
+- r = ga % gb;
+- return isZero(NTL::conv(r));
++ if (isZero(y)) {
++ return false;
++ }
++
++ if (isUnit(y)) {
++ return true;
++ }
++
++ NTL::zz_pX a, b;
++ conv(a, x);
++ conv(b, y);
++
++ NTL::zz_pX ga, gb;
++ NTL::GCD(ga, a, modulus());
++ NTL::GCD(gb, b, modulus());
++ NTL::zz_pX r;
++ r = ga % gb;
++ return isZero(NTL::conv(r));
+ }
+-
++
+ Element& gcd(Element &g, const Element &a, const Element &b) const {
+ NTL::zz_pX r1, r2, x, y;
+ conv(x, a);
+ conv(y, b);
+-
++
+ NTL::GCD(r1, x, modulus());
+ NTL::GCD(r2, y, r1);
+-
++
+ return g = NTL::conv(r2);
+ }
+-
++
+ Element& gcdin(Element &a, const Element &b) const {
+ NTL::zz_pE g;
+ gcd(g, a, b);
+ return a = g;
+ }
+-
++
+ Element& dxgcd(Element &g, Element &s, Element &t, Element &u, Element &v, const Element &a, const Element &b) const {
+ NTL::zz_pX gx, sx, tx, ux, vx, ax, bx;
+ conv(ax, a);
+ conv(bx, b);
+-
++
+ NTL::XGCD(gx, sx, tx, ax, bx);
+-
++
+ ux = ax / gx;
+ vx = bx / gx;
+-
++
+ conv(g, gx);
+ conv(s, sx);
+ conv(t, tx);
+ conv(u, ux);
+ conv(v, vx);
+-
++
+ return g;
+ }
+
+@@ -364,12 +365,12 @@ namespace LinBox
+ x=NTL::to_zz_pE(tmp);
+ return is;
+ }
+-
++
+ std::ostream& write( std::ostream& os ) const
+ {
+ return os << "Polynomial quotient ring using NTL::zz_pE";
+ }
+-
++
+ std::ostream& write( std::ostream& os, const Element& x) const {
+ os << x;
+ return os;
+@@ -429,7 +430,7 @@ namespace LinBox
+ uint64_t _seed;
+ const NTL_zz_pE& _ring;
+ }; // class UnparametricRandIters
+-
++
+ } // LinBox
+
+ #endif //__LINBOX_ntl_lzz_pe_H
+--- linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h
++++ linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h
+@@ -104,6 +104,12 @@ namespace LinBox
+ ,_CField(cf)
+ {}
+
++ /** Initialize p to 0 */
++ Element& init( Element& p ) const
++ {
++ return p = 0;
++ }
++
+ /** Initialize p to the constant y (p = y*x^0) */
+ template
+ Element& init( Element& p, const ANY& y ) const
+--
+2.43.0
+
From 0a0ed4abf77ebbfe664af7acef641dce72b69547 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Sat, 24 Feb 2024 11:36:16 -0700
Subject: [PATCH 24/46] Disable ppc64le build until segfaults can be diagnosed
---
Macaulay2.spec | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 96b77b5..00f2d43 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -378,7 +378,10 @@ Provides: macaulay2 = %{version}-%{release}
# Macaulay2 no longer builds successfully on 32-bit platforms
# https://bugzilla.redhat.com/show_bug.cgi?id=1874318
-ExcludeArch: %{ix86}
+#
+# Macaulay2 started segfaulting during the build on ppc64le just prior to
+# F40 Beta Freeze. Disable it for now until we can diagnose the problem.
+ExcludeArch: %{ix86} ppc64le
# Do not advertise the bundled mpfr
%global __provides_exclude libmpfr.so*
@@ -628,6 +631,7 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
* Fri Feb 23 2024 Jerry James - 1.22-6
- Build the polymake and scip examples
- Recommend scip
+- Disable ppc64le build until segfaults can be diagnosed
* Mon Jan 22 2024 Fedora Release Engineering - 1.22-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
From 7cd564a535977d54c7ba30450de6734fbe5983fb Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Thu, 20 Jun 2024 06:47:20 -0600
Subject: [PATCH 25/46] Version 1.24.05
---
Macaulay2-1.18-no_gftables.patch | 8 +++---
Macaulay2-1.24-vector-overrun.patch | 40 +++++++++++++++++++++++++++++
Macaulay2.spec | 31 ++++++++++++++--------
sources | 8 +++---
4 files changed, 68 insertions(+), 19 deletions(-)
create mode 100644 Macaulay2-1.24-vector-overrun.patch
diff --git a/Macaulay2-1.18-no_gftables.patch b/Macaulay2-1.18-no_gftables.patch
index 17ebc01..3f5806f 100644
--- a/Macaulay2-1.18-no_gftables.patch
+++ b/Macaulay2-1.18-no_gftables.patch
@@ -1,7 +1,7 @@
---- M2/configure.ac.orig 2021-06-13 14:28:15.330215045 -0600
-+++ M2/configure.ac 2021-06-13 14:28:49.449246006 -0600
-@@ -667,7 +667,7 @@ AC_SUBST(BUILTLIBS)
- AC_SUBST(LIBLIST, " atomic_ops gc gdbm gmp mpir mpfr mpfi readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll linbox gtest ")
+--- M2/configure.ac.orig 2024-06-19 10:44:06.256033026 -0600
++++ M2/configure.ac 2024-06-19 10:44:46.295476556 -0600
+@@ -679,7 +679,7 @@ AC_SUBST(BUILTLIBS)
+ AC_SUBST(LIBLIST, " gc gdbm gmp mpir mpfr mpfi readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll linbox gtest ")
# The list LIBLIST is the list of libraries that might be used and linked into M2.
-AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib gftables topcom cohomcalg")
diff --git a/Macaulay2-1.24-vector-overrun.patch b/Macaulay2-1.24-vector-overrun.patch
new file mode 100644
index 0000000..363fe92
--- /dev/null
+++ b/Macaulay2-1.24-vector-overrun.patch
@@ -0,0 +1,40 @@
+Fixes this error in monoid.cpp:
+
+/usr/include/c++/14/bits/stl_vector.h:1225: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::front() const [with _Tp = int; _Alloc = std::allocator; const_reference = const int&]: Assertion '!this->empty()' failed.
+
+and this error in BasicPolyListParser.cpp:
+
+/usr/include/c++/14/string_view:256: constexpr const std::basic_string_view<_CharT, _Traits>::value_type& std::basic_string_view<_CharT, _Traits>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits; const_reference = const char&; size_type = long unsigned int]: Assertion '__pos < this->_M_len' failed.
+
+--- M2/Macaulay2/e/BasicPolyListParser.cpp.orig 2024-05-14 17:18:01.000000000 -0600
++++ M2/Macaulay2/e/BasicPolyListParser.cpp 2024-06-19 16:10:30.329278475 -0600
+@@ -82,7 +82,7 @@ std::vector readIdentifierL
+ char c = line[i];
+ if (not isalpha(c)) continue; // possibly should give an error if we see a number? or non-identifieer start char?
+ auto loc = i+1;
+- while ((isalpha(line[loc]) or isdigit(line[loc]) or line[loc] == '_') and (loc < line.size()))
++ while ((loc < line.size()) and (isalpha(line[loc]) or isdigit(line[loc]) or line[loc] == '_'))
+ {
+ loc++;
+ }
+--- M2/Macaulay2/e/monoid.cpp.orig 2024-05-14 17:18:01.000000000 -0600
++++ M2/Macaulay2/e/monoid.cpp 2024-06-19 18:48:28.445246775 -0600
+@@ -188,7 +188,7 @@ void Monoid::set_degrees()
+ }
+
+ auto degrk = mDegreeMonoid->n_vars();
+- auto *iter = &mDegrees.front();
++ auto *iter = mDegrees.data();
+
+ if (mHeftVector.size() != degrk)
+ {
+@@ -209,9 +209,7 @@ void Monoid::set_degrees()
+ }
+ else
+ {
+- // TODO: what is iter in this case?!
+ auto m = mDegreeMonoid->make_one();
+- mDegreeMonoid->from_expvector(iter, m);
+ mDegreeOfVar.assign(mVariableCount, m);
+ mHeftDegrees.assign(mVariableCount, 1);
+ }
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 00f2d43..bc82c28 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -21,9 +21,7 @@
# We have to bundle the linbox package. It has global constructors that cause
# the same problem as libfplll.
-%global m2url https://github.com/Macaulay2/M2
-
-%global emacscommit 2bac85883e2edd479f606ef8eedbbf2869770200
+%global emacscommit 90ce16a15ea1f4fad08e8ba0b74b5045f4a72e8f
%global emacsurl https://github.com/Macaulay2/M2-emacs
%global emacsshort %(cut -b -7 <<< %{emacscommit})
@@ -51,8 +49,8 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
-Version: 1.22
-Release: 6%{?dist}
+Version: 1.24.05
+Release: 1%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -163,10 +161,11 @@ Release: 6%{?dist}
# - Macaulay2/packages/SectionRing.m2
License: (GPL-2.0-only OR GPL-3.0-only) AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND Apache-2.0 AND BSD-3-Clause AND MIT AND OFL-1.1-RFN AND LicenseRef-Fedora-Public-Domain
URL: https://macaulay2.com/
+VCS: https://github.com/Macaulay2/M2
%if 0%{?snap:1}
Source0: %{name}-%{version}-%{snap}.tar.xz
%else
-Source0: %{m2url}/archive/release-%{version}/%{name}-%{version}.tar.gz
+Source0: %{vcs}/archive/release-%{version}/%{name}-%{version}.tar.gz
%endif
Source1: %{emacsurl}/tarball/%{emacscommit}/M2-emacs-%{emacsshort}.tar.gz
@@ -196,19 +195,19 @@ Source102: http://www.flintlib.org/flint-%{flintver}.tar.gz
Provides: bundled(flint) = %{flintver}
# FACTORY is bundled because it must be built with special options
-%global factoryver 4.2.1
-Source103: http://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/factory-%{factoryver}.tar.gz
+%global factoryver 4.3.0
+Source103: https://www.singular.uni-kl.de/ftp/pub/Math/Factory/factory-%{factoryver}.tar.gz
Provides: bundled(factory) = %{factoryver}
# MATHICGB is bundled because it must be built with different threading options
%global mathicgbver 1.0
-%global mathicgbcommit de9cc70d7f6d72fe35fc832d7ab478f5debbc90f
+%global mathicgbcommit 4cd2bd1357107cf0c83661fdda66c94987de4608
Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz
Provides: bundled(mathicgb) = %{mathicgbver}
# GTEST is bundled because MATHICGB refuses to build otherwise
%global gtestver 1.10.0
-Source105: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/gtest-%{gtestver}.tar.gz
+Source105: https://macaulay2.com/Downloads/OtherSourceCode/gtest-%{gtestver}.tar.gz
# MEMTAILOR is bundled because it causes garbage collector crashes otherwise
%global memtailorver 1.0
@@ -238,7 +237,7 @@ Source201: mpfr-4.1.0.patch
Source300: frobby_v0.9.0.tar.gz
Source301: cddlib-094m.tar.gz
Source302: lapack-3.9.0.tgz
-Source303: 4ti2-1.6.9.tar.gz
+Source303: 4ti2-1.6.10.tar.gz
Source304: libfplll-5.2.0.tar.gz
Source305: gfan0.6.2.tar.gz
Source306: givaro-4.1.1.tar.gz
@@ -265,6 +264,9 @@ Patch5: %{name}-1.17-configure.patch
Patch6: %{name}-1.16-rightarrow.patch
# Fix LTO warnings about mismatched declarations and definitions
Patch7: %{name}-1.18-lto.patch
+# Avoid accessing invalid vector elements
+# https://github.com/Macaulay2/M2/issues/3316
+Patch8: %{name}-1.24-vector-overrun.patch
BuildRequires: 4ti2
BuildRequires: appstream
@@ -456,6 +458,7 @@ ln -s %{_datadir}/factory \
%patch -P5 -p1 -b .configure
%patch -P6 -p1 -b .rightarrow
%patch -P7 -p1 -b .lto
+%patch -P8 -p1 -b .vector
# repeatable builds: inject a node name
sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac
@@ -505,6 +508,9 @@ optflags=$(sed 's/-O2/-O/g' <<< "%{build_cflags}")
optflags="%{build_cflags}"
%endif
+# Let the configure script find lrslib utilities
+module load lrslib-%{_arch}
+
## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex
mkdir -p BUILD/%{_target_platform}
pushd BUILD/%{_target_platform}
@@ -628,6 +634,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Wed Jun 19 2024 Jerry James - 1.24.05-1
+- Version 1.24.05
+
* Fri Feb 23 2024 Jerry James - 1.22-6
- Build the polymake and scip examples
- Recommend scip
diff --git a/sources b/sources
index 4bf407c..079264f 100644
--- a/sources
+++ b/sources
@@ -1,10 +1,10 @@
SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d
-SHA512 (Macaulay2-1.22.tar.gz) = c66e29ea0cbc824dc2310d7ffca22858719526388ccd1914e11e37e231192e3c96310a4819ed951f9df59f50058dd7a7c041b792ecbf352110659ed1e02ebe49
-SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5
+SHA512 (Macaulay2-1.24.05.tar.gz) = de15faa981491783f9f69c036adab96f19285d4a11dbc77bf77b0d0ded435abb7bca5987094286cdf17835ff81dc122d269e897e4792167d2734ce02760c0190
+SHA512 (4ti2-1.6.10.tar.gz) = 0bdf73a8885fe03258a903f0bfb45b8271dcf755d8033b57b8d5620daba7fc25b51031ffb2c8609e40bc19508e07ba028de035d8c193caeffe6400457fc0e3e1
SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f
SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818
SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82
-SHA512 (factory-4.2.1.tar.gz) = c1c0009cefa769807082b2bf9defb01c286f1bfb9c0c0ac2a07ab87a8019694ff26ba4f7ad43082305dd4fe79a459a340d40f5a2088e963331512c71d3a374c0
+SHA512 (factory-4.3.0.tar.gz) = d88690836f9ac5e29c9118078042436184a88ed4881768f9e5f58a15c973da580847b53466a58310a411db695c82b42667124e85689948c1af72689be4e10272
SHA512 (flint-2.8.4.tar.gz) = 56dbe7b8a4d0d10f79a0d453692a37f74e809ff698440128459b4f4c08c2b8ead23085c92adc944e15e5950371daebfc31e167f24bd9d5ab385bf7018dc4582a
SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6
SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d
@@ -15,7 +15,7 @@ SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf
SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29
SHA512 (linbox-1.7.0.tar.gz) = cb4e848186d1f6357f498d1e3bda6484b4c789c02440f9614a227a2ae206a31fb20b32be40bda74da3f2f8f981bbd58d80fc97c95499b5151bb06eafb867ef9e
SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001
-SHA512 (M2-emacs-2bac858.tar.gz) = 3b44dab7e54e323a3b7f69fa8fe42890d91c9855680af4c10b771446701c268501fcf6362d0b1ba2da6f409f91ff589ad465c2c88ec852c86763d4e6a7a40ab9
+SHA512 (M2-emacs-90ce16a.tar.gz) = f68fe2916b2b030b7ecebf66c8cfe0e3776fd1768bbebece2ce53055d9dcead88b8d679c5320c6e46f6b4d4378fe4a8af62a4912afff51c5253f33ea8665cad1
SHA512 (mathic-1.0.tar.gz) = 9eb2fe94d266ffda4624c89021e08526e073286635dd5439042e744f07ba053534bc9476ab81d37f7622d62d8ce40c3eedbc5f7013cd529584f46d3685f15d3a
SHA512 (mathicgb-1.0.tar.gz) = aea24832681c40c92cad012211ed647ed4e8287964481f36a62d6f0fb0d053fb07c17c49385b4782b380576a92aa387f67fa2843437a0e7b315c74288e65d5a8
SHA512 (memtailor-1.0.tar.gz) = 147ef22f322a82d5336c004ba9cce055ee94eb7ad93d4271524cbee4713f94b258342f4e31569abac2e29472fdd25df2fad94000496ce46e469b7e074af3c86e
From c84c864c7b1183cd7ec62b93914812bf6ab835b5 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Wed, 17 Jul 2024 14:59:12 +0000
Subject: [PATCH 26/46] Rebuilt for
https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index bc82c28..e1a74bd 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -50,7 +50,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.24.05
-Release: 1%{?dist}
+Release: 2%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -634,6 +634,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Wed Jul 17 2024 Fedora Release Engineering - 1.24.05-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
+
* Wed Jun 19 2024 Jerry James - 1.24.05-1
- Version 1.24.05
From e45bdc76df22194cd0805274a1499363ee60652b Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Sat, 24 Aug 2024 06:52:53 -0600
Subject: [PATCH 27/46] Rebuild for Singular 4.4.0p4
---
Macaulay2.spec | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index e1a74bd..c95ebe0 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -24,6 +24,7 @@
%global emacscommit 90ce16a15ea1f4fad08e8ba0b74b5045f4a72e8f
%global emacsurl https://github.com/Macaulay2/M2-emacs
%global emacsshort %(cut -b -7 <<< %{emacscommit})
+%global m2url https://github.com/Macaulay2/M2
# Address randomization interferes with Macaulay2's memory management scheme,
# and linking with -z now breaks configure.
@@ -50,7 +51,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.24.05
-Release: 2%{?dist}
+Release: 3%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -161,11 +162,11 @@ Release: 2%{?dist}
# - Macaulay2/packages/SectionRing.m2
License: (GPL-2.0-only OR GPL-3.0-only) AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND Apache-2.0 AND BSD-3-Clause AND MIT AND OFL-1.1-RFN AND LicenseRef-Fedora-Public-Domain
URL: https://macaulay2.com/
-VCS: https://github.com/Macaulay2/M2
+VCS: git:%{m2url}.git
%if 0%{?snap:1}
Source0: %{name}-%{version}-%{snap}.tar.xz
%else
-Source0: %{vcs}/archive/release-%{version}/%{name}-%{version}.tar.gz
+Source0: %{m2url}/archive/release-%{version}/%{name}-%{version}.tar.gz
%endif
Source1: %{emacsurl}/tarball/%{emacscommit}/M2-emacs-%{emacsshort}.tar.gz
@@ -634,6 +635,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Sat Aug 24 2024 Jerry James - 1.24.05-3
+- Rebuild for Singular 4.4.0p4
+
* Wed Jul 17 2024 Fedora Release Engineering - 1.24.05-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
From ceb56615468fe18ba6392062aaabaf08b4872fd9 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Tue, 24 Sep 2024 21:41:39 -0600
Subject: [PATCH 28/46] Rebuild for nauty 2.8.9
---
Macaulay2.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index c95ebe0..2f3a1cb 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -51,7 +51,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.24.05
-Release: 3%{?dist}
+Release: 4%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -327,11 +327,11 @@ BuildRequires: pkgconfig(gmp)
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(libffi)
BuildRequires: pkgconfig(libmariadb)
+BuildRequires: pkgconfig(libnauty)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(m4ri)
BuildRequires: pkgconfig(m4rie)
BuildRequires: pkgconfig(mpfi)
-BuildRequires: pkgconfig(nauty)
BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(qd)
BuildRequires: pkgconfig(readline)
@@ -635,6 +635,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Mon Sep 23 2024 Jerry James - 1.24.05-4
+- Rebuild for nauty 2.8.9
+
* Sat Aug 24 2024 Jerry James - 1.24.05-3
- Rebuild for Singular 4.4.0p4
From a62e57f082c5a792eb991ef241effe47b3a010ff Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley"
Date: Fri, 22 Nov 2024 14:15:25 -0500
Subject: [PATCH 29/46] libfplll 5.5.0
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 2f3a1cb..8ec1eb9 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -51,7 +51,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.24.05
-Release: 4%{?dist}
+Release: 5%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -635,6 +635,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Fri Nov 22 2024 Benjamin A. Beasley - 1.24.05-5
+- Rebuild for libfplll 5.5.0
+
* Mon Sep 23 2024 Jerry James - 1.24.05-4
- Rebuild for nauty 2.8.9
From e7178e0213c0548d06b3dea933d77c4b8c970123 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Thu, 16 Jan 2025 08:43:25 +0000
Subject: [PATCH 30/46] Rebuilt for
https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 8ec1eb9..a331af4 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -51,7 +51,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.24.05
-Release: 5%{?dist}
+Release: 6%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -635,6 +635,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Thu Jan 16 2025 Fedora Release Engineering - 1.24.05-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
+
* Fri Nov 22 2024 Benjamin A. Beasley - 1.24.05-5
- Rebuild for libfplll 5.5.0
From 2de5ad26e60b879219fd3a38321b53cbddc00dee Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Thu, 20 Feb 2025 14:07:03 -0700
Subject: [PATCH 31/46] Version 1.24.11
- Drop upstreamed vector overrun patch
- Add patch to fix mismatched options to codim
- BR e-antic-devel
- BR and Recommend msolve
- Move configuration steps to %conf
- Remove pessimization on s390x
---
Macaulay2-1.16-ulimit.patch | 22 +-
Macaulay2-1.18-no_gftables.patch | 12 +-
Macaulay2-1.24-codim-option.patch | 52 +
Macaulay2-1.24-vector-overrun.patch | 40 -
Macaulay2.spec | 122 +-
flint-3.1.3.patch | 17 +
linbox-1.7.0.patch | 375 ++++--
mpfr-4.1.0.patch | 1747 ---------------------------
sources | 16 +-
9 files changed, 456 insertions(+), 1947 deletions(-)
create mode 100644 Macaulay2-1.24-codim-option.patch
delete mode 100644 Macaulay2-1.24-vector-overrun.patch
create mode 100644 flint-3.1.3.patch
delete mode 100644 mpfr-4.1.0.patch
diff --git a/Macaulay2-1.16-ulimit.patch b/Macaulay2-1.16-ulimit.patch
index 900bafe..ad15955 100644
--- a/Macaulay2-1.16-ulimit.patch
+++ b/Macaulay2-1.16-ulimit.patch
@@ -1,8 +1,8 @@
---- M2/libraries/Makefile.library.in.orig 2022-05-13 20:58:36.000000000 -0600
-+++ M2/libraries/Makefile.library.in 2022-05-23 06:33:19.410991764 -0600
-@@ -238,10 +238,10 @@ distclean: package-distclean
- clean::; rm -rf .patched* .untarred* $(LIBNAME)* .checked* .compiled* .configured* .installed* .untarred2* diffs tmp $(UNTARDIR) $(OLDUNTARDIR)
- distclean: clean ; rm -rf Makefile
+--- M2/libraries/Makefile.library.in.orig 2024-11-01 04:33:00.000000000 -0600
++++ M2/libraries/Makefile.library.in 2025-02-18 20:23:38.667139158 -0700
+@@ -254,10 +254,10 @@ ifneq (@DOWNLOAD@,yes)
+ @ false
+ endif
-SLIMIT ?= 8192
-TLIMIT ?= 100
@@ -15,8 +15,8 @@
LIMIT := :
ifeq (@ULIMIT_T@,yes)
LIMIT += ; ulimit -t $(TLIMIT)
---- M2/Macaulay2/m2/basictests/Makefile.in.orig 2022-05-13 20:58:36.000000000 -0600
-+++ M2/Macaulay2/m2/basictests/Makefile.in 2022-05-23 06:33:19.417991753 -0600
+--- M2/Macaulay2/m2/basictests/Makefile.in.orig 2024-11-01 04:33:00.000000000 -0600
++++ M2/Macaulay2/m2/basictests/Makefile.in 2025-02-18 20:23:38.667139158 -0700
@@ -22,17 +22,17 @@ $(TESTRESULTS) : @pre_exec_prefix@/bin/M
ARGS := --silent -q --stop --no-core -e 'srcdir = "@srcdir@/"'
@@ -42,8 +42,8 @@
LIMIT :=
ifeq (@ULIMIT_T@,yes)
---- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2022-05-13 20:58:36.000000000 -0600
-+++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2022-05-23 06:33:19.424991742 -0600
+--- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2024-11-01 04:33:00.000000000 -0600
++++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2025-02-18 20:23:38.667139158 -0700
@@ -15,16 +15,16 @@ diff:
LIMIT :=
@@ -65,8 +65,8 @@
endif
---- M2/Macaulay2/tests/Makefile.test.in.orig 2022-05-13 20:58:36.000000000 -0600
-+++ M2/Macaulay2/tests/Makefile.test.in 2022-05-23 06:33:19.431991731 -0600
+--- M2/Macaulay2/tests/Makefile.test.in.orig 2024-11-01 04:33:00.000000000 -0600
++++ M2/Macaulay2/tests/Makefile.test.in 2025-02-18 20:23:38.667139158 -0700
@@ -6,18 +6,18 @@ DEFERRED ?= no
DOTS ?= ../..
diff --git a/Macaulay2-1.18-no_gftables.patch b/Macaulay2-1.18-no_gftables.patch
index 3f5806f..624b4bf 100644
--- a/Macaulay2-1.18-no_gftables.patch
+++ b/Macaulay2-1.18-no_gftables.patch
@@ -1,11 +1,11 @@
---- M2/configure.ac.orig 2024-06-19 10:44:06.256033026 -0600
-+++ M2/configure.ac 2024-06-19 10:44:46.295476556 -0600
-@@ -679,7 +679,7 @@ AC_SUBST(BUILTLIBS)
- AC_SUBST(LIBLIST, " gc gdbm gmp mpir mpfr mpfi readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll linbox gtest ")
+--- M2/configure.ac.orig 2025-02-18 20:23:14.170473648 -0700
++++ M2/configure.ac 2025-02-18 20:25:03.857046789 -0700
+@@ -615,7 +615,7 @@ AC_SUBST(BUILTLIBS)
+ AC_SUBST(LIBLIST, " gc gdbm gmp mpfr mpfi normaliz readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll givaro fflas_ffpack linbox gtest tbb memtailor mathic mathicgb eigen ")
# The list LIBLIST is the list of libraries that might be used and linked into M2.
--AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib gftables topcom cohomcalg")
-+AC_SUBST(PROGLIST, "4ti2 gfan normaliz csdp nauty cddplus lrslib topcom cohomcalg")
+-AC_SUBST(PROGLIST, "4ti2 gfan csdp nauty cddplus lrslib gftables topcom cohomcalg msolve")
++AC_SUBST(PROGLIST, "4ti2 gfan csdp nauty cddplus lrslib topcom cohomcalg msolve")
# The list PROGLIST is the list of programs and libraries for them that are distributed with M2.
# Initially, we offer no option for not compiling some of them.
diff --git a/Macaulay2-1.24-codim-option.patch b/Macaulay2-1.24-codim-option.patch
new file mode 100644
index 0000000..2e4b980
--- /dev/null
+++ b/Macaulay2-1.24-codim-option.patch
@@ -0,0 +1,52 @@
+Fixes these errors:
+
+ -- ___Ignore__Primes.errors
+ -- ************************
+ -- o4 : List
+ --
+ -- i5 : L2 = topMinimalPrimesIP(I, IgnorePrimes=>L1)
+ --
+ -- o5 = {monomialIdeal (x, y, w, v)}
+ --
+ -- o5 : List
+ --
+ -- i6 : minimalPrimes I
+ -- stdio:6:13:(3): error: encountered an unknown key or option: Generic
+ --
+ -- _top__Minimal__Primes__I__P.errors
+ -- **********************************
+ -- i1 : R = QQ[x,y,z,w,v];
+ --
+ -- i2 : I = monomialIdeal(y^12, x*y^3, z*w^3, z*v*y^10, z*x^10, v*z^10, w*v^10, y*v*x*z*w);
+ --
+ -- o2 : MonomialIdeal of R
+ --
+ -- i3 : ScipPrintLevel = 0;
+ --
+ -- i4 : minimalPrimes(I)
+ -- stdio:4:13:(3): error: encountered an unknown key or option: Generic
+ --
+ -- _minimal__Primes__I__P.errors
+ -- *****************************
+ -- i5 : minimalPrimesIP I
+ --
+ -- o5 = {monomialIdeal (y, z, w), monomialIdeal (y, z, v), monomialIdeal (x, y,
+ -- ------------------------------------------------------------------------
+ -- w, v)}
+ --
+ -- o5 : List
+ --
+ -- i6 : minimalPrimes I
+ -- stdio:6:13:(3): error: encountered an unknown key or option: Generic
+
+--- M2/Macaulay2/packages/MonomialIntegerPrograms.m2.orig 2024-11-01 04:33:00.000000000 -0600
++++ M2/Macaulay2/packages/MonomialIntegerPrograms.m2 2025-02-19 19:09:27.203480082 -0700
+@@ -135,7 +135,7 @@ oldCodim = lookup(codim, MonomialIdeal);
+ oldDegree = lookup(degree, MonomialIdeal);
+ loadSCIPCodimAndDegree = method();
+ installMethod(loadSCIPCodimAndDegree,() -> (
+- codim MonomialIdeal := {} >> opts -> m -> ((cacheValue symbol codim) codimensionIP) m;
++ codim MonomialIdeal := options oldCodim >> opts -> m -> ((cacheValue symbol codim) codimensionIP) m;
+ degree MonomialIdeal := m -> ((cacheValue symbol degree) degreeIP) m;
+ ));
+ loadBuiltinCodimAndDegree = method();
diff --git a/Macaulay2-1.24-vector-overrun.patch b/Macaulay2-1.24-vector-overrun.patch
deleted file mode 100644
index 363fe92..0000000
--- a/Macaulay2-1.24-vector-overrun.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Fixes this error in monoid.cpp:
-
-/usr/include/c++/14/bits/stl_vector.h:1225: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::front() const [with _Tp = int; _Alloc = std::allocator; const_reference = const int&]: Assertion '!this->empty()' failed.
-
-and this error in BasicPolyListParser.cpp:
-
-/usr/include/c++/14/string_view:256: constexpr const std::basic_string_view<_CharT, _Traits>::value_type& std::basic_string_view<_CharT, _Traits>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits; const_reference = const char&; size_type = long unsigned int]: Assertion '__pos < this->_M_len' failed.
-
---- M2/Macaulay2/e/BasicPolyListParser.cpp.orig 2024-05-14 17:18:01.000000000 -0600
-+++ M2/Macaulay2/e/BasicPolyListParser.cpp 2024-06-19 16:10:30.329278475 -0600
-@@ -82,7 +82,7 @@ std::vector readIdentifierL
- char c = line[i];
- if (not isalpha(c)) continue; // possibly should give an error if we see a number? or non-identifieer start char?
- auto loc = i+1;
-- while ((isalpha(line[loc]) or isdigit(line[loc]) or line[loc] == '_') and (loc < line.size()))
-+ while ((loc < line.size()) and (isalpha(line[loc]) or isdigit(line[loc]) or line[loc] == '_'))
- {
- loc++;
- }
---- M2/Macaulay2/e/monoid.cpp.orig 2024-05-14 17:18:01.000000000 -0600
-+++ M2/Macaulay2/e/monoid.cpp 2024-06-19 18:48:28.445246775 -0600
-@@ -188,7 +188,7 @@ void Monoid::set_degrees()
- }
-
- auto degrk = mDegreeMonoid->n_vars();
-- auto *iter = &mDegrees.front();
-+ auto *iter = mDegrees.data();
-
- if (mHeftVector.size() != degrk)
- {
-@@ -209,9 +209,7 @@ void Monoid::set_degrees()
- }
- else
- {
-- // TODO: what is iter in this case?!
- auto m = mDegreeMonoid->make_one();
-- mDegreeMonoid->from_expvector(iter, m);
- mDegreeOfVar.assign(mVariableCount, m);
- mHeftDegrees.assign(mVariableCount, 1);
- }
diff --git a/Macaulay2.spec b/Macaulay2.spec
index a331af4..19fdc5f 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -21,7 +21,7 @@
# We have to bundle the linbox package. It has global constructors that cause
# the same problem as libfplll.
-%global emacscommit 90ce16a15ea1f4fad08e8ba0b74b5045f4a72e8f
+%global emacscommit f0bb736dff7bbf30d143ecc68700ee747263a35d
%global emacsurl https://github.com/Macaulay2/M2-emacs
%global emacsshort %(cut -b -7 <<< %{emacscommit})
%global m2url https://github.com/Macaulay2/M2
@@ -50,8 +50,8 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
-Version: 1.24.05
-Release: 6%{?dist}
+Version: 1.24.11
+Release: 1%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -180,23 +180,23 @@ Source20: etags.sh
## BUNDLED code
# Normaliz must sometimes be bundled due to version differences
%if ! %system_normaliz
-%global normalizver 3.9.2
+%global normalizver 3.10.4
Source100: http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/normaliz-%{normalizver}.tar.gz
Provides: bundled(normaliz) = %{normalizver}
%endif
# MPFR is bundled because it must be built with different threading options
-%global mpfrver 4.1.0
-Source101: http://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.xz
+%global mpfrver 4.2.1
+Source101: https://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.gz
Provides: bundled(mpfr) = %{mpfrver}
# FLINT is bundled because it must be linked with the specially-built MPFR
-%global flintver 2.8.4
-Source102: http://www.flintlib.org/flint-%{flintver}.tar.gz
+%global flintver 3.1.3
+Source102: https://flintlib.org/download/flint-%{flintver}.tar.gz
Provides: bundled(flint) = %{flintver}
# FACTORY is bundled because it must be built with special options
-%global factoryver 4.3.0
+%global factoryver 4.4.0
Source103: https://www.singular.uni-kl.de/ftp/pub/Math/Factory/factory-%{factoryver}.tar.gz
Provides: bundled(factory) = %{factoryver}
@@ -207,8 +207,8 @@ Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathi
Provides: bundled(mathicgb) = %{mathicgbver}
# GTEST is bundled because MATHICGB refuses to build otherwise
-%global gtestver 1.10.0
-Source105: https://macaulay2.com/Downloads/OtherSourceCode/gtest-%{gtestver}.tar.gz
+%global gtestver 1.11.0
+Source105: https://github.com/google/googletest/archive/release-%{gtestver}/gtest-%{gtestver}.tar.gz
# MEMTAILOR is bundled because it causes garbage collector crashes otherwise
%global memtailorver 1.0
@@ -228,20 +228,19 @@ Source108: https://github.com/linbox-team/linbox/releases/download/v%{linboxver}
Provides: bundled(linbox) = %{linboxver}
## PATCHES FOR BUNDLED code
-# Fix a buffer overflow and some constness issues
-# https://github.com/linbox-team/linbox/pull/307
+# This is a conglomeration of all current patches for the Fedora linbox package
Source200: linbox-1.7.0.patch
-# MPFR bug fixes from mpfr upstream.
-Source201: mpfr-4.1.0.patch
+# Fix a header bug in flint
+Source201: flint-3.1.3.patch
## FAKE library tarballs that convince Macaulay2 to use the system versions
-Source300: frobby_v0.9.0.tar.gz
+Source300: frobby_v0.9.5.tar.gz
Source301: cddlib-094m.tar.gz
Source302: lapack-3.9.0.tgz
Source303: 4ti2-1.6.10.tar.gz
Source304: libfplll-5.2.0.tar.gz
Source305: gfan0.6.2.tar.gz
-Source306: givaro-4.1.1.tar.gz
+Source306: givaro-4.2.0.tar.gz
Source307: lrslib-071a.tar.gz
Source308: TOPCOM-0.17.8.tar.gz
Source309: cohomCalg-0.32.tar.gz
@@ -265,9 +264,9 @@ Patch5: %{name}-1.17-configure.patch
Patch6: %{name}-1.16-rightarrow.patch
# Fix LTO warnings about mismatched declarations and definitions
Patch7: %{name}-1.18-lto.patch
-# Avoid accessing invalid vector elements
-# https://github.com/Macaulay2/M2/issues/3316
-Patch8: %{name}-1.24-vector-overrun.patch
+# Fix a build error due to mismatched options to codim
+# https://github.com/Macaulay2/M2/pull/3651
+Patch8: %{name}-1.24-codim-option.patch
BuildRequires: 4ti2
BuildRequires: appstream
@@ -279,11 +278,13 @@ BuildRequires: chrpath
BuildRequires: cohomCalg
BuildRequires: csdp-tools
BuildRequires: desktop-file-utils
+BuildRequires: diffutils
%if 0%{?fedora}
BuildRequires: doxygen-latex
%else
BuildRequires: doxygen
%endif
+BuildRequires: e-antic-devel
BuildRequires: eigen3-static
# etags
BuildRequires: emacs
@@ -305,12 +306,13 @@ BuildRequires: libappstream-glib
BuildRequires: libfplll-static
BuildRequires: libfrobby-devel
BuildRequires: libgfan-devel
-BuildRequires: libnormaliz-devel >= 3.9.2
+BuildRequires: libnormaliz-devel >= 3.10.4
BuildRequires: libtool
BuildRequires: lrslib-devel
BuildRequires: lrslib-utils
BuildRequires: make
BuildRequires: mpsolve-devel
+BuildRequires: msolve
BuildRequires: msolve-devel
BuildRequires: nauty
BuildRequires: normaliz
@@ -318,7 +320,7 @@ BuildRequires: ntl-devel
BuildRequires: ocl-icd-devel
BuildRequires: pari-devel
BuildRequires: pkgconfig(atomic_ops)
-BuildRequires: pkgconfig(bdw-gc) >= 8.0.4
+BuildRequires: pkgconfig(bdw-gc) >= 8.2.6
BuildRequires: pkgconfig(cddlib)
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(fflas-ffpack)
@@ -364,6 +366,7 @@ Requires: TOPCOM
Requires: xdg-utils
Recommends: mathicgb
+Recommends: msolve
Recommends: scip
%if 0%{?common}
@@ -427,12 +430,14 @@ tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1
## patches for bundled code
sed -e 's,--with-blas,&=%{_includedir}/flexiblas --with-ntl,' \
+ -e 's/3\.0\.0/%{flintver}/' \
+ -e 's/\(LICENSEFILES = \).*/\1COPYING COPYING.LESSER/' \
+ -e 's/-pedantic-errors/& -fno-strict-aliasing/' \
-i libraries/flint/Makefile.in
+cp -p %{SOURCE201} libraries/flint/patch-%{flintver}
+sed -i 's/^# \(PATCHFILE\)/\1/' libraries/flint/Makefile.in
cp -p %{SOURCE200} libraries/linbox/patch-%{linboxver}
sed -i 's/^#\(PATCHFILE\)/\1/' libraries/linbox/Makefile.in
-sed -e '/^TARFILE =/iPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \
- -i libraries/mpfr/Makefile.in
-cp -p %{SOURCE201} libraries/mpfr/patch-%{mpfrver}
## fake library tarballs
install -p -m644 %{SOURCE300} %{SOURCE301} %{SOURCE302} %{SOURCE303} \
@@ -447,6 +452,15 @@ sed -i 's,install \(lib.*\.a\),ln -s %{_libdir}/\1,' libraries/lapack/Makefile.i
## fake givaro submodule
tar -C submodules/givaro --strip-components=1 -xzf %{SOURCE306}
+## flint submodule
+tar -C submodules/flint --strip-components=1 -xzf %{SOURCE102}
+cd submodules/flint
+patch -p1 < %{SOURCE201}
+cd -
+
+## gtest submodule
+tar -C submodules/googletest --strip-components=1 -xzf %{SOURCE105}
+
%patch -P0 -p1 -b .optflags
%patch -P1 -p1 -b .ulimit
%patch -P2 -p1 -b .default_make_targets
@@ -459,8 +473,10 @@ ln -s %{_datadir}/factory \
%patch -P5 -p1 -b .configure
%patch -P6 -p1 -b .rightarrow
%patch -P7 -p1 -b .lto
-%patch -P8 -p1 -b .vector
+%patch -P8 -p1 -b .codim
+
+%conf
# repeatable builds: inject a node name
sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac
@@ -478,66 +494,55 @@ sed -e 's/BUILD_cddlib=yes/BUILD_cddlib=no/' \
-e 's,-lfplll,%{_libdir}/libfplll.a -lqd,' \
-e 's,`\$PKG_CONFIG --libs givaro`,%{_libdir}/libgivaro.a,' \
-e 's,-lgivaro,%{_libdir}/libgivaro.a,' \
- -e 's,-llapack -lrefblas,-lflexiblas,' \
+ -e 's,-lrefblas,-lflexiblas,' \
+ -e 's,-llapack,-lflexiblas,' \
-e 's,\$added_fclibs != yes,"$added_fclibs" != yes,' \
-i configure.ac
-# We call it flint. Upstream calls it flint2.
-sed -i 's/\(LIBNAME = flint\)2/\1/' libraries/flint/Makefile.in
-
-# Cannot do git submodule operations on a koji builder
-sed -i 's/git-checkout-in-\$1, git-checkout-warning-for-\$1//' GNUmakefile.in
-
# Avoid obsolescence warnings
-sed -i 's/egrep/grep -E/g' GNUmakefile.in Makefile Macaulay2/bin/Makefile.in \
+sed -i 's/egrep/grep -E/g' Makefile.in Macaulay2/bin/Makefile.in \
Macaulay2/tests/Makefile{,.test}.in libraries/Makefile.library.in
sed -i 's/fgrep/grep -F/g' Macaulay2/util/linkexec-alternative
+# Do not try to download tarballs
+sed -i '/^fetch: download-enabled/d' libraries/Makefile.library.in
+
+# Do not try to fetch sources with git
+sed -i 's/^\(fetch:\) update-submodule/\1/' libraries/Makefile.library.in
+
# (re)generate configure
autoreconf -fi .
%build
-%ifarch s390x
-# For as yet unknown reasons, when this package is built with optimization
-# level -O2 on s390x, the mathicgb code accesses out-of-bounds array elements.
-# In addition, valgrind shows accesses to uninitialized elements of arrays
-# that should not have any uninitialized elements. The code eventually
-# segfaults.
-optflags=$(sed 's/-O2/-O/g' <<< "%{build_cflags}")
-%else
-optflags="%{build_cflags}"
-%endif
-
# Let the configure script find lrslib utilities
module load lrslib-%{_arch}
## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex
mkdir -p BUILD/%{_target_platform}
-pushd BUILD/%{_target_platform}
+cd BUILD/%{_target_platform}
CPPFLAGS="$CPPFLAGS -I%{_includedir}/cddlib -I%{_includedir}/frobby" \
-CFLAGS="$optflags -fsigned-char" \
-CXXFLAGS="$optflags -fsigned-char" \
+CFLAGS='%{build_cflags} -fsigned-char' \
+CXXFLAGS='%{build_cflags} -fsigned-char' \
LIBS="-lflexiblas" \
../../configure \
--build=%{_build} \
--host=%{_host} \
--with-issue=%{ISSUE} \
--prefix=%{_prefix} \
- --disable-dumpdata \
--enable-shared \
- --disable-fc-lib-ldflags \
--disable-strip \
--enable-fplll \
--enable-linbox \
- --with-integer-package=gmp \
+ --with-blas=flexiblas \
+ --with-lapack=flexiblas \
--with-unbuilt-programs="cddplus nauty" \
--enable-build-libraries="mpfr flint factory lapack fplll givaro linbox gtest"
# The list of libraries and submodules above should include only those that:
# 1. We bundle (mpfr, flint, factory, and linbox)
# 2. We sneakily substitute one library for another (lapack -> flexiblas)
# 3. Have to be linked with the static library (fplll and givaro)
-popd
+cd -
# link with static libraries when global constructors run prior to GC
# initialization. Otherwise, unloading the shared object causes a crash.
@@ -594,11 +599,11 @@ appstreamcli validate --no-net --explain \
%{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml
# Byte compile the Emacs files, and move the documentation
-pushd %{buildroot}%{_emacs_sitelispdir}/macaulay2
+cd %{buildroot}%{_emacs_sitelispdir}/macaulay2
mv M2-emacs* %{buildroot}%{_pkgdocdir}
mv README.md %{buildroot}%{_pkgdocdir}/README-emacs.md
%{_emacs_bytecompile} *.el
-popd
+cd -
## unpackaged files
# info dir
@@ -635,6 +640,15 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Thu Feb 20 2025 Jerry James - 1.24.11-1
+- Version 1.24.11
+- Drop upstreamed vector overrun patch
+- Add patch to fix mismatched options to codim
+- BR e-antic-devel
+- BR and Recommend msolve
+- Move configuration steps to %%conf
+- Remove pessimization on s390x
+
* Thu Jan 16 2025 Fedora Release Engineering - 1.24.05-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
diff --git a/flint-3.1.3.patch b/flint-3.1.3.patch
new file mode 100644
index 0000000..932be7b
--- /dev/null
+++ b/flint-3.1.3.patch
@@ -0,0 +1,17 @@
+--- flint-3.1.3/src/flint.h.in.orig
++++ flint-3.1.3/src/flint.h.in
+@@ -141,12 +141,10 @@ typedef struct __FLINT_FILE FLINT_FILE;
+ # define FLINT_CONSTANT_P(x) 0
+ #endif
+
+-#if defined(__cplusplus)
++#if defined(__cplusplus) || ( __STDC_VERSION__ >= 202300L )
+ # define FLINT_NORETURN [[noreturn]]
+-#elif __STDC_VERSION__ < 202300L
+-# define FLINT_NORETURN _Noreturn
+ #else
+-# define FLINT_NORETURN noreturn
++# define FLINT_NORETURN _Noreturn
+ #endif
+
+ #if FLINT_USES_TLS
diff --git a/linbox-1.7.0.patch b/linbox-1.7.0.patch
index 36fc3b1..74da7d0 100644
--- a/linbox-1.7.0.patch
+++ b/linbox-1.7.0.patch
@@ -1,33 +1,5 @@
---- linbox-1.7.0/linbox/blackbox/apply.h.orig 2021-12-13 13:01:21.000000000 -0700
-+++ linbox-1.7.0/linbox/blackbox/apply.h 2023-10-20 13:30:15.295959186 -0600
-@@ -593,8 +593,10 @@ namespace LinBox
- */
- int rclen = (int)num_chunks*2 + 5;
-
-- unsigned char* combined = new unsigned char[(size_t)rc*_n*(size_t)rclen];
-- memset(combined, 0, (size_t)rc*_n*(size_t)rclen);
-+ // https://github.com/linbox-team/linbox/issues/304#issuecomment-1766621021
-+ size_t combined_size = (size_t)rc*_n*(size_t)rclen + 1;
-+ unsigned char* combined = new unsigned char[combined_size];
-+ memset(combined, 0, combined_size);
-
- //order from major index to minor: combining index, component of sol'n, byte
- //compute a product (chunk times x) for each chunk
---- linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h
-+++ linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h
-@@ -208,8 +208,8 @@ namespace LinBox{
- * @param j Column index of entry, 0...coldim() - 1
- * @param a_ij Element to set
- */
-- const Element& setEntry(size_t i, size_t j, const Element& a_ij){
-- return _Mat->setEntry(_r0 + i, _c0 + j, a_ij);
-+ const void setEntry(size_t i, size_t j, const Element& a_ij){
-+ _Mat->setEntry(_r0 + i, _c0 + j, a_ij);
- }
-
- /** Get a writeable reference to an entry in the matrix.
---- linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl
-+++ linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl
+--- linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl.orig 2020-09-10 03:26:43.000000000 -0600
++++ linbox-1.7.0/linbox/algorithms/gauss/gauss-nullspace.inl 2025-02-18 20:18:35.488279051 -0700
@@ -2,7 +2,7 @@
* Copyright (C) LinBox 2008
*
@@ -61,8 +33,36 @@
return this->nullspacebasis(x, Rank, A, P);
}
---- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h
-+++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h
+--- linbox-1.7.0/linbox/blackbox/apply.h.orig 2021-12-13 13:01:21.000000000 -0700
++++ linbox-1.7.0/linbox/blackbox/apply.h 2025-02-18 20:17:28.073199632 -0700
+@@ -593,8 +593,10 @@ namespace LinBox
+ */
+ int rclen = (int)num_chunks*2 + 5;
+
+- unsigned char* combined = new unsigned char[(size_t)rc*_n*(size_t)rclen];
+- memset(combined, 0, (size_t)rc*_n*(size_t)rclen);
++ // https://github.com/linbox-team/linbox/issues/304#issuecomment-1766621021
++ size_t combined_size = (size_t)rc*_n*(size_t)rclen + 1;
++ unsigned char* combined = new unsigned char[combined_size];
++ memset(combined, 0, combined_size);
+
+ //order from major index to minor: combining index, component of sol'n, byte
+ //compute a product (chunk times x) for each chunk
+--- linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h.orig 2021-12-10 07:36:06.000000000 -0700
++++ linbox-1.7.0/linbox/matrix/matrixdomain/opencl-domain.h 2025-02-18 20:17:41.112021598 -0700
+@@ -208,8 +208,8 @@ namespace LinBox{
+ * @param j Column index of entry, 0...coldim() - 1
+ * @param a_ij Element to set
+ */
+- const Element& setEntry(size_t i, size_t j, const Element& a_ij){
+- return _Mat->setEntry(_r0 + i, _c0 + j, a_ij);
++ const void setEntry(size_t i, size_t j, const Element& a_ij){
++ _Mat->setEntry(_r0 + i, _c0 + j, a_ij);
+ }
+
+ /** Get a writeable reference to an entry in the matrix.
+--- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h.orig 2020-06-26 09:09:12.000000000 -0600
++++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ell-matrix.h 2025-02-18 20:18:35.488279051 -0700
@@ -1210,10 +1210,10 @@ namespace LinBox
_colid_beg = iter._colid_beg ;
_colid_it = iter._colid_it ;
@@ -78,8 +78,8 @@
_row = iter._row ;
return *this;
---- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h
-+++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h
+--- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h.orig 2020-06-26 09:09:12.000000000 -0600
++++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-ellr-matrix.h 2025-02-18 20:18:35.488279051 -0700
@@ -1102,11 +1102,11 @@ namespace LinBox
_Iterator &operator = (const _Iterator &iter)
{
@@ -112,49 +112,22 @@
_row = iter._row ;
return *this;
---- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h
-+++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h
-@@ -85,7 +85,7 @@ namespace Givaro
- * @param x reference to Integer to contain output (reference returned).
- * @param y constant reference to field element.
- */
-- template <>
-+ template <>
- Integer& Caster(Integer& x, const NTL::zz_p& y)
- {
- return x = int64_t(rep(y));
-@@ -130,7 +130,7 @@ namespace LinBox
- typedef NTL::zz_p Element ;
- typedef Givaro::UnparametricOperations Father_t ;
- typedef UnparametricRandIter RandIter;
--
-+
- const Element zero,one,mOne ;
+--- linbox-1.7.0/linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h.orig 2020-06-26 09:09:12.000000000 -0600
++++ linbox-1.7.0/linbox/matrix/sparsematrix/sparse-tpl-matrix-omp.h 2025-02-18 20:19:35.886454322 -0700
+@@ -318,9 +318,9 @@ class SparseMatrix(z)); //rounds towards 0
- }
-
-- Element &init (Element &x, const integer &y=0) const
-+ Element &init (Element &x, const integer &y) const
- {
- NTL::ZZ tmp= NTL::to_ZZ(std::string(y).data());
- return x = NTL::to_zz_p(tmp);
---- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h
-+++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h
+- Ap.data_.resize(A.data.size());
++ Ap.data_.resize(A.data_.size());
+ for (v_p = A.data_.begin(), vp_p = Ap.data_.begin();
+- v_p != A.data.end(); ++ v_p, ++ vp_p)
++ v_p != A.data_.end(); ++ v_p, ++ vp_p)
+ hom.image (vp_p->elt, v_p->elt);
+ }
+ };
+--- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h.orig 2021-12-13 13:01:21.000000000 -0700
++++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_pe.h 2025-02-18 20:18:35.488279051 -0700
@@ -96,18 +96,18 @@ namespace LinBox
NTL::zz_pE::init(irredPoly);
_f = irredPoly;
@@ -411,8 +384,49 @@
} // LinBox
#endif //__LINBOX_ntl_lzz_pe_H
---- linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h
-+++ linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h
+--- linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h.orig 2021-12-13 13:01:21.000000000 -0700
++++ linbox-1.7.0/linbox/ring/ntl/ntl-lzz_p.h 2025-02-18 20:18:35.488279051 -0700
+@@ -85,7 +85,7 @@ namespace Givaro
+ * @param x reference to Integer to contain output (reference returned).
+ * @param y constant reference to field element.
+ */
+- template <>
++ template <>
+ Integer& Caster(Integer& x, const NTL::zz_p& y)
+ {
+ return x = int64_t(rep(y));
+@@ -130,7 +130,7 @@ namespace LinBox
+ typedef NTL::zz_p Element ;
+ typedef Givaro::UnparametricOperations Father_t ;
+ typedef UnparametricRandIter RandIter;
+-
++
+ const Element zero,one,mOne ;
+
+
+@@ -145,6 +145,11 @@ namespace LinBox
+ ,zero( NTL::to_zz_p(0)),one( NTL::to_zz_p(1)),mOne(-one)
+ {}
+
++ Element &init (Element &x) const
++ {
++ return x = NTL::to_zz_p(0);
++ }
++
+ Element& init(Element& x, const double& y) const
+ {
+ double z = fmod(y,(double)Element::modulus());
+@@ -153,7 +158,7 @@ namespace LinBox
+ return x = NTL::to_zz_p(static_cast(z)); //rounds towards 0
+ }
+
+- Element &init (Element &x, const integer &y=0) const
++ Element &init (Element &x, const integer &y) const
+ {
+ NTL::ZZ tmp= NTL::to_ZZ(std::string(y).data());
+ return x = NTL::to_zz_p(tmp);
+--- linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h.orig 2020-06-26 09:09:12.000000000 -0600
++++ linbox-1.7.0/linbox/ring/ntl/ntl-zz_px.h 2025-02-18 20:18:35.488279051 -0700
@@ -104,6 +104,12 @@ namespace LinBox
,_CField(cf)
{}
@@ -426,6 +440,205 @@
/** Initialize p to the constant y (p = y*x^0) */
template
Element& init( Element& p, const ANY& y ) const
---
-2.43.0
-
+--- linbox-1.7.0/linbox/vector/blas-subvector.h.orig 2020-09-10 03:26:43.000000000 -0600
++++ linbox-1.7.0/linbox/vector/blas-subvector.h 2025-02-18 20:19:06.510855483 -0700
+@@ -1,6 +1,6 @@
+ /* linbox/matrix/blas-vector.h
+ * Copyright (C) 2013 the LinBox group
+- * 2019 Pascal Giorgi
++ * 2019 Pascal Giorgi
+ *
+ * Written by :
+ * Pascal Giorgi pascal.giorgi@lirmm.fr
+@@ -45,7 +45,7 @@ namespace LinBox {
+ // forward declaration
+ template
+ class BlasVector;
+-
++
+
+ template
+ class VectorEltPointer {
+@@ -61,7 +61,7 @@ namespace LinBox {
+ typedef typename _Vector::Storage::const_reference reference;
+ using Element=const typename _Vector::Field::Element;
+ };
+-
++
+ template
+ class BlasSubvector {
+
+@@ -88,7 +88,7 @@ namespace LinBox {
+ typedef std::reverse_iterator const_reverse_iterator;
+
+ protected:
+- pointer _ptr;
++ pointer _ptr;
+ size_t _size;
+ size_t _inc;
+ Field const*_field;
+@@ -101,7 +101,7 @@ namespace LinBox {
+ //////////////////
+
+ BlasSubvector(){}
+-
++
+ /** Constructor from an existing @ref BlasVector and dimensions.
+ * \param V Pointer to @ref BlasVector of which to construct subvector
+ * \param beg Starting idx
+@@ -110,7 +110,7 @@ namespace LinBox {
+ */
+ BlasSubvector (vectorType &V, size_t beg, size_t inc, size_t dim) :
+ _ptr(V.getPointer()+beg), _size(dim), _inc(inc), _field(&V.field()) {}
+-
++
+ /** Constructor from an existing @ref BlasSubvector and dimensions.
+ * \param V Pointer to @ref DenseSubector of which to construct subvector
+ * \param beg Starting idx
+@@ -118,9 +118,9 @@ namespace LinBox {
+ * \param inc distance between two element
+ */
+ BlasSubvector (Self_t &V, size_t beg, size_t inc, size_t dim) :
+- _ptr(V.data()+beg), _size(dim), _inc(inc), _field(&V.field()) {}
++ _ptr(V.getPointer()+beg), _size(dim), _inc(inc), _field(&V.field()) {}
++
+
+-
+ /** Constructor from an existing @ref BlasVector
+ * \param V Pointer to @ref BlasVector of which to construct submatrix
+ */
+@@ -132,17 +132,17 @@ namespace LinBox {
+ */
+ BlasSubvector (const Field& F, pointer ptr, size_t inc, size_t dim) :
+ _ptr(ptr), _size(dim), _inc(inc), _field(&F) {}
+-
+-
++
++
+
+ BlasSubvector (const Field& F, std::vector& v) :
+- _ptr(v.data()), _size(v.size()), _inc(1), _field(&F)
++ _ptr(v.data()), _size(v.size()), _inc(1), _field(&F)
+ {
+ std::cerr<<"WARNING "<<__LINE__<<" ("<<__FILE__<<") : creating a BlasSubvector from a std::vector -> MUST BE DEPRECATED"<
+ Self_t& copy(const Vect& A){
+- assert(_size == A.size());
++ assert(_size == A.size());
+ auto it=A.begin(); auto jt=begin();
+ for( ; it!=A.end();++it,++jt)
+ field().assign(*jt,*it);
+ return *this;
+ }
+-
++
+ //! Rebind operator
+ template::other>
+ struct rebind {
+ typedef BlasVector<_Tp1, _Rep2> other;
+-
++
+ void operator() (other & Ap, const Self_t& A) {
+ typedef typename Self_t::const_iterator ConstSelfIterator ;
+ typedef typename other::iterator OtherIterator ;
+@@ -180,14 +180,14 @@ namespace LinBox {
+ }
+ };
+
+-
++
+
+ /////////////////
+ // ACCESSORS //
+ /////////////////
+
+ const Field& field() const { return *_field;}
+-
++
+ // dimension of the vector
+ size_t size() const{ return _size; }
+ size_t max_size() const{ return _size; }
+@@ -203,14 +203,14 @@ namespace LinBox {
+ * @return the inc value of the subvector
+ */
+ size_t getInc() const {return _inc;}
+-
++
+
+ void setEntry (size_t i, const Element &a_i){ field().assign(_ptr[i],a_i); }
+-
++
+ reference refEntry (size_t i){ return _ptr[i]; }
+
+ const_reference getEntry (size_t i) const { return _ptr[i]; }
+-
++
+ Element& getEntry (Element &x, size_t i) const{ return field().assign(x,_ptr[i]); }
+
+ // write
+@@ -226,7 +226,7 @@ namespace LinBox {
+ case (Tag::FileFormat::Maple) :
+ {
+ os << '<' ;
+- for(size_t i=0; i<_size; i++){
++ for(size_t i=0; i<_size; i++){
+ field().write(os, *(_ptr+_inc*i));
+ if (i != _size-1)
+ os << ',' ;
+@@ -237,7 +237,7 @@ namespace LinBox {
+ return os << "not implemented" ;
+ }
+ }
+-
++
+ //read
+ std::istream &read ( std::istream &is, Tag::FileFormat fmt = Tag::FileFormat::Pretty ) {
+ return is;
+@@ -275,10 +275,10 @@ namespace LinBox {
+ const_reference front (void) const { return _ptr[0];}
+ reference back (void) { return _ptr[(_size-1)*_inc];}
+ const_reference back (void) const { return _ptr[(_size-1)*_inc];}
+-
++
+ bool empty() const {return (_size==0);}
+ };
+-
++
+ template
+ std::ostream& operator<< (std::ostream & os, const BlasSubvector & V) {
+ return V.write(os);
+@@ -296,7 +296,7 @@ namespace LinBox {
+
+
+
+-
++
+ } // LinBox
+ #endif
+ // Local Variables:
+--- linbox-1.7.0/tests/test-subvector.C.orig 2020-06-26 09:09:12.000000000 -0600
++++ linbox-1.7.0/tests/test-subvector.C 2025-02-18 20:19:06.510855483 -0700
+@@ -752,6 +752,12 @@ static bool testSubvector3(Field &F, siz
+ //vector ww(3, 77);
+ w = ww;
+ report << ww << std::endl;
++
++ report << "Constructing subvectors from subvector: ";
++ subVector ww1(w, 0, 0, Length);
++ report << ww1 << std::endl;
++
++
+ #if 0
+ report << "Constructing subvector from iterators: ";
+ Subvect www(w.begin(), w.end());
diff --git a/mpfr-4.1.0.patch b/mpfr-4.1.0.patch
deleted file mode 100644
index 30775a5..0000000
--- a/mpfr-4.1.0.patch
+++ /dev/null
@@ -1,1747 +0,0 @@
---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:40:40.079363480 +0000
-+++ mpfr-4.1.0/PATCHES 2021-02-11 12:40:40.119363040 +0000
-@@ -0,0 +1 @@
-+decimal128-conv
---- mpfr-4.1.0/VERSION.orig 2020-07-10 11:52:33.000000000 +0000
-+++ mpfr-4.1.0/VERSION 2021-02-11 12:40:40.119363040 +0000
-@@ -1 +1 @@
--4.1.0
-+4.1.0-p1
---- mpfr-4.1.0/src/get_d128.c.orig 2020-04-08 22:39:35.000000000 +0000
-+++ mpfr-4.1.0/src/get_d128.c 2021-02-11 12:40:40.103363216 +0000
-@@ -40,22 +40,21 @@
- static _Decimal128
- get_decimal128_nan (void)
- {
-- return (_Decimal128) MPFR_DBL_NAN;
-+ return 0.0dl / 0.0dl;
- }
-
- /* construct the decimal128 Inf with given sign */
- static _Decimal128
- get_decimal128_inf (int negative)
- {
-- return (_Decimal128) (negative ? MPFR_DBL_INFM : MPFR_DBL_INFP);
-+ return negative ? - 1.0dl / 0.0dl : 1.0dl / 0.0dl;
- }
-
- /* construct the decimal128 zero with given sign */
- static _Decimal128
- get_decimal128_zero (int negative)
- {
-- _Decimal128 zero = 0;
-- return (_Decimal128) (negative ? -zero : zero);
-+ return negative ? - 0.0dl : 0.0dl;
- }
-
- /* construct the decimal128 smallest non-zero with given sign:
---- mpfr-4.1.0/src/mpfr.h.orig 2020-07-10 11:52:33.000000000 +0000
-+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:40:40.115363084 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 4
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "4.1.0"
-+#define MPFR_VERSION_STRING "4.1.0-p1"
-
- /* User macros:
- MPFR_USE_FILE: Define it to make MPFR define functions dealing
---- mpfr-4.1.0/src/version.c.orig 2020-07-10 11:52:33.000000000 +0000
-+++ mpfr-4.1.0/src/version.c 2021-02-11 12:40:40.119363040 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "4.1.0";
-+ return "4.1.0-p1";
- }
---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:43:51.761257868 +0000
-+++ mpfr-4.1.0/PATCHES 2021-02-11 12:43:51.801257430 +0000
-@@ -0,0 +1 @@
-+random_deviate
---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:40:40.119363040 +0000
-+++ mpfr-4.1.0/VERSION 2021-02-11 12:43:51.801257430 +0000
-@@ -1 +1 @@
--4.1.0-p1
-+4.1.0-p2
---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:40:40.115363084 +0000
-+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:43:51.801257430 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 4
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "4.1.0-p1"
-+#define MPFR_VERSION_STRING "4.1.0-p2"
-
- /* User macros:
- MPFR_USE_FILE: Define it to make MPFR define functions dealing
---- mpfr-4.1.0/src/random_deviate.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/random_deviate.c 2021-02-11 12:43:51.789257562 +0000
-@@ -289,6 +289,7 @@
- mpfr_random_size_t p = mpfr_get_prec (z); /* Number of bits in result */
- mpz_t t;
- int inex;
-+ mpfr_exp_t negxe;
-
- if (n == 0)
- {
-@@ -370,14 +371,22 @@
- mpz_setbit (t, 0); /* Set the trailing bit so result is always inexact */
- if (neg)
- mpz_neg (t, t);
-- /* Is -x->e representable as a mpfr_exp_t? */
-- MPFR_ASSERTN (x->e <= (mpfr_uexp_t)(-1) >> 1);
-+ /* Portable version of the negation of x->e, with a check of overflow. */
-+ if (MPFR_UNLIKELY (x->e > MPFR_EXP_MAX))
-+ {
-+ /* Overflow, except when x->e = MPFR_EXP_MAX + 1 = - MPFR_EXP_MIN. */
-+ MPFR_ASSERTN (MPFR_EXP_MIN + MPFR_EXP_MAX == -1 &&
-+ x->e == (mpfr_random_size_t) MPFR_EXP_MAX + 1);
-+ negxe = MPFR_EXP_MIN;
-+ }
-+ else
-+ negxe = - (mpfr_exp_t) x->e;
- /*
- * Let mpfr_set_z_2exp do all the work of rounding to the requested
- * precision, setting overflow/underflow flags, and returning the right
- * inexact value.
- */
-- inex = mpfr_set_z_2exp (z, t, -x->e, rnd);
-+ inex = mpfr_set_z_2exp (z, t, negxe, rnd);
- mpz_clear (t);
- return inex;
- }
---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:40:40.119363040 +0000
-+++ mpfr-4.1.0/src/version.c 2021-02-11 12:43:51.801257430 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "4.1.0-p1";
-+ return "4.1.0-p2";
- }
---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:46:49.075316772 +0000
-+++ mpfr-4.1.0/PATCHES 2021-02-11 12:46:49.115316335 +0000
-@@ -0,0 +1 @@
-+set_z_2exp-overflow
---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:43:51.801257430 +0000
-+++ mpfr-4.1.0/VERSION 2021-02-11 12:46:49.115316335 +0000
-@@ -1 +1 @@
--4.1.0-p2
-+4.1.0-p3
---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:43:51.801257430 +0000
-+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:46:49.115316335 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 4
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "4.1.0-p2"
-+#define MPFR_VERSION_STRING "4.1.0-p3"
-
- /* User macros:
- MPFR_USE_FILE: Define it to make MPFR define functions dealing
---- mpfr-4.1.0/src/set_z_exp.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/set_z_exp.c 2021-02-11 12:46:49.103316466 +0000
-@@ -28,10 +28,11 @@
- int
- mpfr_set_z_2exp (mpfr_ptr f, mpz_srcptr z, mpfr_exp_t e, mpfr_rnd_t rnd_mode)
- {
-- mp_size_t fn, zn, dif, en;
-+ mp_size_t fn, zn, dif;
- int k, sign_z, inex;
- mp_limb_t *fp, *zp;
-- mpfr_exp_t exp;
-+ mpfr_exp_t exp, nmax;
-+ mpfr_uexp_t uexp;
-
- sign_z = mpz_sgn (z);
- if (MPFR_UNLIKELY (sign_z == 0)) /* ignore the exponent for 0 */
-@@ -43,10 +44,15 @@
- MPFR_ASSERTD (sign_z == MPFR_SIGN_POS || sign_z == MPFR_SIGN_NEG);
-
- zn = ABSIZ(z); /* limb size of z */
-- /* compute en = floor(e/GMP_NUMB_BITS) */
-- en = (e >= 0) ? e / GMP_NUMB_BITS : (e + 1) / GMP_NUMB_BITS - 1;
- MPFR_ASSERTD (zn >= 1);
-- if (MPFR_UNLIKELY (zn + en > MPFR_EMAX_MAX / GMP_NUMB_BITS + 1))
-+ nmax = MPFR_EMAX_MAX / GMP_NUMB_BITS + 1;
-+ /* Detect early overflow with zn + en > nmax,
-+ where en = floor(e / GMP_NUMB_BITS).
-+ This is checked without an integer overflow (even assuming some
-+ future version of GMP, where limitations may be removed). */
-+ if (MPFR_UNLIKELY (e >= 0 ?
-+ zn > nmax - e / GMP_NUMB_BITS :
-+ zn + (e + 1) / GMP_NUMB_BITS - 1 > nmax))
- return mpfr_overflow (f, rnd_mode, sign_z);
- /* because zn + en >= MPFR_EMAX_MAX / GMP_NUMB_BITS + 2
- implies (zn + en) * GMP_NUMB_BITS >= MPFR_EMAX_MAX + GMP_NUMB_BITS + 1
-@@ -64,8 +70,21 @@
- and exp = zn * GMP_NUMB_BITS + e - k
- <= (zn + en) * GMP_NUMB_BITS - k + GMP_NUMB_BITS - 1
- <= MPFR_EMAX_MAX + 2 * GMP_NUMB_BITS - 1 */
-- exp = (mpfr_prec_t) zn * GMP_NUMB_BITS + e - k;
-+ /* We need to compute exp = zn * GMP_NUMB_BITS + e - k with well-defined
-+ operations (no integer overflows / no implementation-defined results).
-+ The mathematical result of zn * GMP_NUMB_BITS may be larger than
-+ the largest value of mpfr_exp_t while exp could still be less than
-+ __gmpfr_emax. Thanks to early overflow detection, we can compute the
-+ result in modular arithmetic, using mpfr_uexp_t, and convert it to
-+ mpfr_exp_t. */
-+ uexp = (mpfr_uexp_t) zn * GMP_NUMB_BITS + (mpfr_uexp_t) e - k;
-+
-+ /* Convert to signed in a portable way (see doc/README.dev).
-+ On most platforms, this can be optimized to identity (no-op). */
-+ exp = uexp > MPFR_EXP_MAX ? -1 - (mpfr_exp_t) ~uexp : (mpfr_exp_t) uexp;
-+
- /* The exponent will be exp or exp + 1 (due to rounding) */
-+
- if (MPFR_UNLIKELY (exp > __gmpfr_emax))
- return mpfr_overflow (f, rnd_mode, sign_z);
- if (MPFR_UNLIKELY (exp + 1 < __gmpfr_emin))
---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:43:51.801257430 +0000
-+++ mpfr-4.1.0/src/version.c 2021-02-11 12:46:49.115316335 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "4.1.0-p2";
-+ return "4.1.0-p3";
- }
---- mpfr-4.1.0/tests/tset_z_exp.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/tests/tset_z_exp.c 2021-02-11 12:46:49.103316466 +0000
-@@ -97,49 +97,149 @@
- mpfr_get_si is a rather indirect test of a low level routine. */
-
- static void
--check (long i, mpfr_rnd_t rnd)
-+check (long i, mpfr_rnd_t rnd, int reduced)
- {
-- mpfr_t f;
-+ mpfr_t f1, f2, f3;
- mpz_t z;
-- mpfr_exp_t e;
-+ mpfr_exp_t e, old_emin, old_emax;
- int inex;
-+ mpfr_flags_t flags;
-+
-+ old_emin = mpfr_get_emin ();
-+ old_emax = mpfr_get_emax ();
-
- /* using CHAR_BIT * sizeof(long) bits of precision ensures that
- mpfr_set_z_2exp is exact below */
-- mpfr_init2 (f, CHAR_BIT * sizeof(long));
-+ mpfr_inits2 (CHAR_BIT * sizeof(long), f1, f2, f3, (mpfr_ptr) 0);
- mpz_init (z);
- mpz_set_ui (z, i);
- /* the following loop ensures that no overflow occurs */
- do
- e = randexp ();
- while (e > mpfr_get_emax () - CHAR_BIT * sizeof(long));
-- inex = mpfr_set_z_2exp (f, z, e, rnd);
-- if (inex != 0)
-+
-+ mpfr_clear_flags ();
-+ inex = mpfr_set_z_2exp (f1, z, e, rnd);
-+ flags = __gmpfr_flags;
-+
-+ if (inex != 0 || flags != 0 ||
-+ (mpfr_div_2si (f2, f1, e, rnd), mpfr_get_si (f2, MPFR_RNDZ) != i))
- {
-- printf ("Error in mpfr_set_z_2exp for i=%ld, e=%ld,"
-- " wrong ternary value\n", i, (long) e);
-- printf ("expected 0, got %d\n", inex);
-+ printf ("Error in mpfr_set_z_2exp for i=%ld e=%" MPFR_EXP_FSPEC
-+ "d rnd_mode=%d\n", i, (mpfr_eexp_t) e, rnd);
-+ mpfr_set_si_2exp (f2, i, e, MPFR_RNDN);
-+ printf ("expected "); mpfr_dump (f2);
-+ printf ("with inex = %d and flags =", 0);
-+ flags_out (0);
-+ printf ("got "); mpfr_dump (f1);
-+ printf ("with inex = %d and flags =", inex);
-+ flags_out (flags);
- exit (1);
- }
-- mpfr_div_2si (f, f, e, rnd);
-- if (mpfr_get_si (f, MPFR_RNDZ) != i)
-+
-+ if (reduced)
- {
-- printf ("Error in mpfr_set_z_2exp for i=%ld e=", i);
-- if (e < LONG_MIN)
-- printf ("( LONG_MAX)
-- printf ("(>LONG_MAX)");
-- else
-- printf ("%ld", (long) e);
-- printf (" rnd_mode=%d\n", rnd);
-- printf ("expected %ld\n", i);
-- printf ("got "); mpfr_dump (f);
-- exit (1);
-+ mpfr_exp_t ef, emin, emax;
-+ int inex2, inex3;
-+ mpfr_flags_t flags2, flags3;
-+
-+ ef = i == 0 ? 0 : mpfr_get_exp (f1);
-+ for (emin = ef - 2; emin <= ef + 2; emin++)
-+ for (emax = emin; emax <= ef + 2; emax++)
-+ {
-+ inex3 = mpfr_set (f3, f1, rnd);
-+ MPFR_ASSERTN (inex3 == 0);
-+ mpfr_set_emin (emin);
-+ mpfr_set_emax (emax);
-+ mpfr_clear_flags ();
-+ inex2 = mpfr_set_z_2exp (f2, z, e, rnd);
-+ flags2 = __gmpfr_flags;
-+ mpfr_clear_flags ();
-+ inex3 = mpfr_check_range (f3, 0, rnd);
-+ flags3 = __gmpfr_flags;
-+ if (!(mpfr_equal_p (f2, f3) &&
-+ SAME_SIGN (inex2, inex3) &&
-+ flags2 == flags3))
-+ {
-+ printf ("Error in mpfr_set_z_2exp for i=%ld e=%"
-+ MPFR_EXP_FSPEC "d rnd_mode=%d\nand emin=%"
-+ MPFR_EXP_FSPEC "d emax=%" MPFR_EXP_FSPEC
-+ "d\n", i, (mpfr_eexp_t) e, rnd,
-+ (mpfr_eexp_t) emin, (mpfr_eexp_t) emax);
-+ printf ("expected "); mpfr_dump (f3);
-+ printf ("with inex = %d and flags =", inex3);
-+ flags_out (flags3);
-+ printf ("got "); mpfr_dump (f2);
-+ printf ("with inex = %d and flags =", inex2);
-+ flags_out (flags2);
-+ exit (1);
-+ }
-+ }
-+ mpfr_set_emin (old_emin);
-+ mpfr_set_emax (old_emax);
- }
-- mpfr_clear (f);
-+
-+ mpfr_clears (f1, f2, f3, (mpfr_ptr) 0);
- mpz_clear (z);
- }
-
-+static void
-+check_huge (void)
-+{
-+ if (getenv ("MPFR_CHECK_LARGEMEM") != NULL)
-+ {
-+ mpfr_t x;
-+ mpz_t z;
-+ long e;
-+
-+ /* Increase tests_memory_limit to the maximum in order to avoid
-+ an obvious failure due to insufficient memory. */
-+ tests_memory_limit = (size_t) -1; /* no memory limit */
-+
-+ mpfr_init2 (x, 32);
-+
-+ /* In r14140, with a 32-bit ABI (GCC's -m32):
-+ - With UBsan (-fsanitize=undefined -fno-sanitize-recover),
-+ this fails with:
-+ set_z_2exp.c:71:26: runtime error: signed integer overflow:
-+ 67108864 * 32 cannot be represented in type 'long int'
-+ - With -D_MPFR_EXP_FORMAT=4, this fails with:
-+ Expected 0.10001000000000000000000000000000E5
-+ Got 0
-+ */
-+ mpz_init_set_ui (z, 17);
-+ e = 0x7ffffff0;
-+ mpz_mul_2exp (z, z, e);
-+ mpz_add_ui (z, z, 1);
-+ mpfr_set_z_2exp (x, z, -e, MPFR_RNDN);
-+ if (mpfr_cmp_ui0 (x, 17) != 0)
-+ {
-+ printf ("Error 1 in check_huge\n");
-+ printf ("Expected 0.10001000000000000000000000000000E5\n");
-+ printf ("Got ");
-+ mpfr_dump (x);
-+ exit (1);
-+ }
-+ mpz_clear (z);
-+
-+ mpz_init_set_ui (z, 17);
-+ mpz_mul_2exp (z, z, 0xffffffb0);
-+ mpz_add_ui (z, z, 1);
-+ mpfr_set_z_2exp (x, z, -1, MPFR_RNDN);
-+ if (! MPFR_IS_INF (x) || MPFR_IS_NEG (x))
-+ {
-+ printf ("Error 2 in check_huge\n");
-+ printf ("Expected @Inf@\n");
-+ printf ("Got ");
-+ mpfr_dump (x);
-+ exit (1);
-+ }
-+ mpz_clear (z);
-+
-+ mpfr_clear (x);
-+ }
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -147,11 +247,13 @@
-
- tests_start_mpfr ();
-
-- check (0, MPFR_RNDN);
-+ check (0, MPFR_RNDN, 0);
- for (j = 0; j < 200000; j++)
-- check (randlimb () & LONG_MAX, RND_RAND ());
-+ check (randlimb () & LONG_MAX, RND_RAND (), j < 200);
- check0 ();
-
-+ check_huge ();
-+
- tests_end_mpfr ();
-
- return 0;
---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:48:27.322243271 +0000
-+++ mpfr-4.1.0/PATCHES 2021-02-11 12:48:27.370242746 +0000
-@@ -0,0 +1 @@
-+prototypes
---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:46:49.115316335 +0000
-+++ mpfr-4.1.0/VERSION 2021-02-11 12:48:27.370242746 +0000
-@@ -1 +1 @@
--4.1.0-p3
-+4.1.0-p4
---- mpfr-4.1.0/src/atan.c.orig 2020-04-22 15:27:07.000000000 +0000
-+++ mpfr-4.1.0/src/atan.c 2021-02-11 12:48:27.354242922 +0000
-@@ -56,7 +56,7 @@
- };
-
- static void
--set_table (mpfr_t y, const mp_limb_t x[3])
-+set_table (mpfr_ptr y, const mp_limb_t x[3])
- {
- mpfr_prec_t p = MPFR_PREC(y);
- mp_size_t n = MPFR_PREC2LIMBS(p);
---- mpfr-4.1.0/src/const_euler.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/const_euler.c 2021-02-11 12:48:27.354242922 +0000
-@@ -181,7 +181,7 @@
- }
-
- int
--mpfr_const_euler_internal (mpfr_t x, mpfr_rnd_t rnd)
-+mpfr_const_euler_internal (mpfr_ptr x, mpfr_rnd_t rnd)
- {
- mpfr_const_euler_bs_t sum;
- mpz_t t, u, v;
---- mpfr-4.1.0/src/eint.c.orig 2020-03-09 15:31:45.000000000 +0000
-+++ mpfr-4.1.0/src/eint.c 2021-02-11 12:48:27.354242922 +0000
-@@ -36,7 +36,7 @@
- Return PREC(y) when the truncated series does not converge.
- */
- static mpfr_exp_t
--mpfr_eint_aux (mpfr_t y, mpfr_srcptr x)
-+mpfr_eint_aux (mpfr_ptr y, mpfr_srcptr x)
- {
- mpfr_t eps; /* dynamic (absolute) error bound on t */
- mpfr_t erru, errs;
---- mpfr-4.1.0/src/erandom.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/erandom.c 2021-02-11 12:48:27.354242922 +0000
-@@ -80,7 +80,7 @@
-
- /* return an exponential random deviate with mean 1 as a MPFR */
- int
--mpfr_erandom (mpfr_t z, gmp_randstate_t r, mpfr_rnd_t rnd)
-+mpfr_erandom (mpfr_ptr z, gmp_randstate_t r, mpfr_rnd_t rnd)
- {
- mpfr_random_deviate_t x, p, q;
- int inex;
---- mpfr-4.1.0/src/fpif.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/fpif.c 2021-02-11 12:48:27.354242922 +0000
-@@ -291,7 +291,8 @@
- * until one has integer types larger than 128 bits).
- */
- static unsigned char*
--mpfr_fpif_store_exponent (unsigned char *buffer, size_t *buffer_size, mpfr_t x)
-+mpfr_fpif_store_exponent (unsigned char *buffer, size_t *buffer_size,
-+ mpfr_ptr x)
- {
- unsigned char *result;
- mpfr_uexp_t uexp;
-@@ -372,7 +373,7 @@
- * than 128 bits).
- */
- static int
--mpfr_fpif_read_exponent_from_file (mpfr_t x, FILE * fh)
-+mpfr_fpif_read_exponent_from_file (mpfr_ptr x, FILE * fh)
- {
- mpfr_exp_t exponent;
- mpfr_uexp_t uexp;
-@@ -456,7 +457,7 @@
- * format
- */
- static unsigned char*
--mpfr_fpif_store_limbs (unsigned char *buffer, size_t *buffer_size, mpfr_t x)
-+mpfr_fpif_store_limbs (unsigned char *buffer, size_t *buffer_size, mpfr_ptr x)
- {
- unsigned char *result;
- mpfr_prec_t precision;
-@@ -492,7 +493,7 @@
- * Assume buffer is not NULL.
- */
- static void
--mpfr_fpif_read_limbs (mpfr_t x, unsigned char *buffer, size_t nb_byte)
-+mpfr_fpif_read_limbs (mpfr_ptr x, unsigned char *buffer, size_t nb_byte)
- {
- size_t mp_bytes_per_limb;
- size_t nb_partial_byte;
-@@ -522,7 +523,7 @@
- * return 0 if successful
- */
- int
--mpfr_fpif_export (FILE *fh, mpfr_t x)
-+mpfr_fpif_export (FILE *fh, mpfr_ptr x)
- {
- int status;
- unsigned char *buf;
-@@ -582,7 +583,7 @@
- * Return 0 if the import was successful.
- */
- int
--mpfr_fpif_import (mpfr_t x, FILE *fh)
-+mpfr_fpif_import (mpfr_ptr x, FILE *fh)
- {
- int status;
- mpfr_prec_t precision;
---- mpfr-4.1.0/src/li2.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/li2.c 2021-02-11 12:48:27.354242922 +0000
-@@ -31,7 +31,7 @@
- for determinating the relative error.
- */
- static int
--li2_series (mpfr_t sum, mpfr_srcptr z, mpfr_rnd_t rnd_mode)
-+li2_series (mpfr_ptr sum, mpfr_srcptr z, mpfr_rnd_t rnd_mode)
- {
- int i;
- mpfr_t s, u, v, w;
---- mpfr-4.1.0/src/lngamma.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/lngamma.c 2021-02-11 12:48:27.354242922 +0000
-@@ -31,7 +31,7 @@
- precision should be >= 4.
- */
- static void
--mpfr_gamma_alpha (mpfr_t s, mpfr_prec_t p)
-+mpfr_gamma_alpha (mpfr_ptr s, mpfr_prec_t p)
- {
- MPFR_LOG_FUNC
- (("p=%Pu", p),
---- mpfr-4.1.0/src/mpfr-impl.h.orig 2020-06-10 21:50:12.000000000 +0000
-+++ mpfr-4.1.0/src/mpfr-impl.h 2021-02-11 12:48:27.354242922 +0000
-@@ -2474,7 +2474,8 @@
- __MPFR_DECLSPEC mpz_srcptr mpfr_bernoulli_cache (unsigned long);
- __MPFR_DECLSPEC void mpfr_bernoulli_freecache (void);
-
--__MPFR_DECLSPEC int mpfr_sincos_fast (mpfr_t, mpfr_t, mpfr_srcptr, mpfr_rnd_t);
-+__MPFR_DECLSPEC int mpfr_sincos_fast (mpfr_ptr, mpfr_ptr, mpfr_srcptr,
-+ mpfr_rnd_t);
-
- __MPFR_DECLSPEC double mpfr_scale2 (double, int);
-
-@@ -2485,7 +2486,7 @@
- mpfr_prec_t);
-
- __MPFR_DECLSPEC void mpfr_mpz_init (mpz_ptr);
--__MPFR_DECLSPEC void mpfr_mpz_init2 (mpz_t, mp_bitcnt_t);
-+__MPFR_DECLSPEC void mpfr_mpz_init2 (mpz_ptr, mp_bitcnt_t);
- __MPFR_DECLSPEC void mpfr_mpz_clear (mpz_ptr);
-
- __MPFR_DECLSPEC int mpfr_odd_p (mpfr_srcptr);
---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:46:49.115316335 +0000
-+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:48:27.366242791 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 4
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "4.1.0-p3"
-+#define MPFR_VERSION_STRING "4.1.0-p4"
-
- /* User macros:
- MPFR_USE_FILE: Define it to make MPFR define functions dealing
-@@ -781,8 +781,8 @@
- __MPFR_DECLSPEC int mpfr_strtofr (mpfr_ptr, const char *, char **, int,
- mpfr_rnd_t);
-
--__MPFR_DECLSPEC void mpfr_round_nearest_away_begin (mpfr_t);
--__MPFR_DECLSPEC int mpfr_round_nearest_away_end (mpfr_t, int);
-+__MPFR_DECLSPEC void mpfr_round_nearest_away_begin (mpfr_ptr);
-+__MPFR_DECLSPEC int mpfr_round_nearest_away_end (mpfr_ptr, int);
-
- __MPFR_DECLSPEC size_t mpfr_custom_get_size (mpfr_prec_t);
- __MPFR_DECLSPEC void mpfr_custom_init (void *, mpfr_prec_t);
-@@ -1080,10 +1080,12 @@
- #define mpfr_set_uj_2exp __gmpfr_set_uj_2exp
- #define mpfr_get_sj __gmpfr_mpfr_get_sj
- #define mpfr_get_uj __gmpfr_mpfr_get_uj
--__MPFR_DECLSPEC int mpfr_set_sj (mpfr_t, intmax_t, mpfr_rnd_t);
--__MPFR_DECLSPEC int mpfr_set_sj_2exp (mpfr_t, intmax_t, intmax_t, mpfr_rnd_t);
--__MPFR_DECLSPEC int mpfr_set_uj (mpfr_t, uintmax_t, mpfr_rnd_t);
--__MPFR_DECLSPEC int mpfr_set_uj_2exp (mpfr_t, uintmax_t, intmax_t, mpfr_rnd_t);
-+__MPFR_DECLSPEC int mpfr_set_sj (mpfr_ptr, intmax_t, mpfr_rnd_t);
-+__MPFR_DECLSPEC int mpfr_set_sj_2exp (mpfr_ptr, intmax_t, intmax_t,
-+ mpfr_rnd_t);
-+__MPFR_DECLSPEC int mpfr_set_uj (mpfr_ptr, uintmax_t, mpfr_rnd_t);
-+__MPFR_DECLSPEC int mpfr_set_uj_2exp (mpfr_ptr, uintmax_t, intmax_t,
-+ mpfr_rnd_t);
- __MPFR_DECLSPEC intmax_t mpfr_get_sj (mpfr_srcptr, mpfr_rnd_t);
- __MPFR_DECLSPEC uintmax_t mpfr_get_uj (mpfr_srcptr, mpfr_rnd_t);
-
---- mpfr-4.1.0/src/nrandom.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/nrandom.c 2021-02-11 12:48:27.354242922 +0000
-@@ -155,7 +155,7 @@
-
- /* return a normal random deviate with mean 0 and variance 1 as a MPFR */
- int
--mpfr_nrandom (mpfr_t z, gmp_randstate_t r, mpfr_rnd_t rnd)
-+mpfr_nrandom (mpfr_ptr z, gmp_randstate_t r, mpfr_rnd_t rnd)
- {
- mpfr_random_deviate_t x, p, q;
- int inex;
---- mpfr-4.1.0/src/pool.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/pool.c 2021-02-11 12:48:27.354242922 +0000
-@@ -35,7 +35,7 @@
- static MPFR_THREAD_ATTR __mpz_struct mpz_tab[MPFR_POOL_NENTRIES];
-
- MPFR_HOT_FUNCTION_ATTR void
--mpfr_mpz_init (mpz_t z)
-+mpfr_mpz_init (mpz_ptr z)
- {
- if (MPFR_LIKELY (n_alloc > 0))
- {
-@@ -54,7 +54,7 @@
- }
-
- MPFR_HOT_FUNCTION_ATTR void
--mpfr_mpz_init2 (mpz_t z, mp_bitcnt_t n)
-+mpfr_mpz_init2 (mpz_ptr z, mp_bitcnt_t n)
- {
- /* The condition on n is used below as the argument n will be ignored if
- the mpz_t is obtained from the MPFR stack of previously used mpz_t.
-@@ -82,7 +82,7 @@
-
-
- MPFR_HOT_FUNCTION_ATTR void
--mpfr_mpz_clear (mpz_t z)
-+mpfr_mpz_clear (mpz_ptr z)
- {
- /* We only put objects with at most MPFR_POOL_MAX_SIZE in the mpz_t pool,
- to avoid it takes too much memory (and anyway the speedup is mainly
---- mpfr-4.1.0/src/random_deviate.c.orig 2021-02-11 12:43:51.789257562 +0000
-+++ mpfr-4.1.0/src/random_deviate.c 2021-02-11 12:48:27.354242922 +0000
-@@ -64,7 +64,7 @@
-
- /* allocate and set to (0,1) */
- void
--mpfr_random_deviate_init (mpfr_random_deviate_t x)
-+mpfr_random_deviate_init (mpfr_random_deviate_ptr x)
- {
- mpz_init (x->f);
- x->e = 0;
-@@ -72,21 +72,22 @@
-
- /* reset to (0,1) */
- void
--mpfr_random_deviate_reset (mpfr_random_deviate_t x)
-+mpfr_random_deviate_reset (mpfr_random_deviate_ptr x)
- {
- x->e = 0;
- }
-
- /* deallocate */
- void
--mpfr_random_deviate_clear (mpfr_random_deviate_t x)
-+mpfr_random_deviate_clear (mpfr_random_deviate_ptr x)
- {
- mpz_clear (x->f);
- }
-
- /* swap two random deviates */
- void
--mpfr_random_deviate_swap (mpfr_random_deviate_t x, mpfr_random_deviate_t y)
-+mpfr_random_deviate_swap (mpfr_random_deviate_ptr x,
-+ mpfr_random_deviate_ptr y)
- {
- mpfr_random_size_t s;
- unsigned long t;
-@@ -107,7 +108,7 @@
-
- /* ensure x has at least k bits */
- static void
--random_deviate_generate (mpfr_random_deviate_t x, mpfr_random_size_t k,
-+random_deviate_generate (mpfr_random_deviate_ptr x, mpfr_random_size_t k,
- gmp_randstate_t r, mpz_t t)
- {
- /* Various compile time checks on mpfr_random_deviate_t */
-@@ -223,7 +224,7 @@
-
- /* return position of leading bit, counting from 1 */
- static mpfr_random_size_t
--random_deviate_leading_bit (mpfr_random_deviate_t x, gmp_randstate_t r)
-+random_deviate_leading_bit (mpfr_random_deviate_ptr x, gmp_randstate_t r)
- {
- mpfr_random_size_t l;
- random_deviate_generate (x, W, r, 0);
-@@ -243,7 +244,7 @@
-
- /* return kth bit of fraction, representing 2^-k */
- int
--mpfr_random_deviate_tstbit (mpfr_random_deviate_t x, mpfr_random_size_t k,
-+mpfr_random_deviate_tstbit (mpfr_random_deviate_ptr x, mpfr_random_size_t k,
- gmp_randstate_t r)
- {
- if (k == 0)
-@@ -256,7 +257,8 @@
-
- /* compare two random deviates, x < y */
- int
--mpfr_random_deviate_less (mpfr_random_deviate_t x, mpfr_random_deviate_t y,
-+mpfr_random_deviate_less (mpfr_random_deviate_ptr x,
-+ mpfr_random_deviate_ptr y,
- gmp_randstate_t r)
- {
- mpfr_random_size_t k = 1;
-@@ -280,7 +282,7 @@
- /* set mpfr_t z = (neg ? -1 : 1) * (n + x) */
- int
- mpfr_random_deviate_value (int neg, unsigned long n,
-- mpfr_random_deviate_t x, mpfr_t z,
-+ mpfr_random_deviate_ptr x, mpfr_ptr z,
- gmp_randstate_t r, mpfr_rnd_t rnd)
- {
- /* r is used to add as many bits as necessary to match the precision of z */
---- mpfr-4.1.0/src/random_deviate.h.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/random_deviate.h 2021-02-11 12:48:27.354242922 +0000
-@@ -76,7 +76,7 @@
- /* set mpfr_t z = (neg ? -1 : 1) * (n + x) */
- __MPFR_DECLSPEC int
- mpfr_random_deviate_value (int, unsigned long,
-- mpfr_random_deviate_ptr, mpfr_t,
-+ mpfr_random_deviate_ptr, mpfr_ptr,
- gmp_randstate_t, mpfr_rnd_t);
-
- #if defined(__cplusplus)
---- mpfr-4.1.0/src/rndna.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/rndna.c 2021-02-11 12:48:27.354242922 +0000
-@@ -61,7 +61,7 @@
- and prepares rop to give it one more bit of precision
- and to save its old value within it. */
- void
--mpfr_round_nearest_away_begin (mpfr_t rop)
-+mpfr_round_nearest_away_begin (mpfr_ptr rop)
- {
- mpfr_t tmp;
- mp_size_t xsize;
-@@ -129,7 +129,7 @@
- copying it back the result of the applied function
- and performing additional roundings. */
- int
--mpfr_round_nearest_away_end (mpfr_t rop, int inex)
-+mpfr_round_nearest_away_end (mpfr_ptr rop, int inex)
- {
- mpfr_t tmp;
- mp_size_t xsize;
---- mpfr-4.1.0/src/set_sj.c.orig 2020-06-01 10:39:52.000000000 +0000
-+++ mpfr-4.1.0/src/set_sj.c 2021-02-11 12:48:27.354242922 +0000
-@@ -26,13 +26,13 @@
- #ifdef _MPFR_H_HAVE_INTMAX_T
-
- int
--mpfr_set_sj (mpfr_t x, intmax_t j, mpfr_rnd_t rnd)
-+mpfr_set_sj (mpfr_ptr x, intmax_t j, mpfr_rnd_t rnd)
- {
- return mpfr_set_sj_2exp (x, j, 0, rnd);
- }
-
- int
--mpfr_set_sj_2exp (mpfr_t x, intmax_t j, intmax_t e, mpfr_rnd_t rnd)
-+mpfr_set_sj_2exp (mpfr_ptr x, intmax_t j, intmax_t e, mpfr_rnd_t rnd)
- {
- if (j >= 0)
- return mpfr_set_uj_2exp (x, j, e, rnd);
---- mpfr-4.1.0/src/set_str.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/set_str.c 2021-02-11 12:48:27.354242922 +0000
-@@ -23,7 +23,7 @@
- #include "mpfr-impl.h"
-
- int
--mpfr_set_str (mpfr_t x, const char *str, int base, mpfr_rnd_t rnd)
-+mpfr_set_str (mpfr_ptr x, const char *str, int base, mpfr_rnd_t rnd)
- {
- char *p;
-
---- mpfr-4.1.0/src/set_uj.c.orig 2020-06-01 10:39:52.000000000 +0000
-+++ mpfr-4.1.0/src/set_uj.c 2021-02-11 12:48:27.354242922 +0000
-@@ -29,13 +29,13 @@
- #define uintmaxpml (sizeof(uintmax_t) / sizeof(mp_limb_t))
-
- int
--mpfr_set_uj (mpfr_t x, uintmax_t j, mpfr_rnd_t rnd)
-+mpfr_set_uj (mpfr_ptr x, uintmax_t j, mpfr_rnd_t rnd)
- {
- return mpfr_set_uj_2exp (x, j, 0, rnd);
- }
-
- int
--mpfr_set_uj_2exp (mpfr_t x, uintmax_t j, intmax_t e, mpfr_rnd_t rnd)
-+mpfr_set_uj_2exp (mpfr_ptr x, uintmax_t j, intmax_t e, mpfr_rnd_t rnd)
- {
- int cnt, inex;
- mp_size_t i, k;
---- mpfr-4.1.0/src/sin_cos.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/sin_cos.c 2021-02-11 12:48:27.354242922 +0000
-@@ -463,7 +463,7 @@
- Return err such that the relative error is bounded by 2^err ulps.
- */
- static int
--sincos_aux (mpfr_t s, mpfr_t c, mpfr_srcptr x, mpfr_rnd_t rnd_mode)
-+sincos_aux (mpfr_ptr s, mpfr_ptr c, mpfr_srcptr x, mpfr_rnd_t rnd_mode)
- {
- mpfr_prec_t prec_s, sh;
- mpz_t Q, S, C, Q2, S2, C2, y;
-@@ -577,7 +577,7 @@
- Assumes s differs from c.
- */
- int
--mpfr_sincos_fast (mpfr_t s, mpfr_t c, mpfr_srcptr x, mpfr_rnd_t rnd)
-+mpfr_sincos_fast (mpfr_ptr s, mpfr_ptr c, mpfr_srcptr x, mpfr_rnd_t rnd)
- {
- int inexs, inexc;
- mpfr_t x_red, ts, tc;
---- mpfr-4.1.0/src/strtofr.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/strtofr.c 2021-02-11 12:48:27.354242922 +0000
-@@ -226,7 +226,7 @@
- BUT if it returns 0 (NAN or INF), the ternary value is also '0'
- (ie NAN and INF are exact) */
- static int
--parse_string (mpfr_t x, struct parsed_string *pstr,
-+parse_string (mpfr_ptr x, struct parsed_string *pstr,
- const char **string, int base)
- {
- const char *str = *string;
-@@ -451,7 +451,7 @@
- and the precision of x.
- Returns the ternary value. */
- static int
--parsed_string_to_mpfr (mpfr_t x, struct parsed_string *pstr, mpfr_rnd_t rnd)
-+parsed_string_to_mpfr (mpfr_ptr x, struct parsed_string *pstr, mpfr_rnd_t rnd)
- {
- mpfr_prec_t precx, prec, ysize_bits, pstr_size;
- mpfr_exp_t exp;
-@@ -934,7 +934,7 @@
- }
-
- int
--mpfr_strtofr (mpfr_t x, const char *string, char **end, int base,
-+mpfr_strtofr (mpfr_ptr x, const char *string, char **end, int base,
- mpfr_rnd_t rnd)
- {
- int res;
---- mpfr-4.1.0/src/vasprintf.c.orig 2020-06-01 10:39:52.000000000 +0000
-+++ mpfr-4.1.0/src/vasprintf.c 2021-02-11 12:48:27.354242922 +0000
-@@ -963,7 +963,7 @@
- #define NDIGITS 8
-
- MPFR_RETURNS_NONNULL static char *
--mpfr_get_str_wrapper (mpfr_exp_t *exp, int base, size_t n, const mpfr_t op,
-+mpfr_get_str_wrapper (mpfr_exp_t *exp, int base, size_t n, mpfr_srcptr op,
- const struct printf_spec spec)
- {
- size_t ndigits;
---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:46:49.115316335 +0000
-+++ mpfr-4.1.0/src/version.c 2021-02-11 12:48:27.370242746 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "4.1.0-p3";
-+ return "4.1.0-p4";
- }
---- mpfr-4.1.0/src/zeta.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/src/zeta.c 2021-02-11 12:48:27.354242922 +0000
-@@ -35,7 +35,7 @@
- sum(tc[i]*product((s+2j)*(s+2j-1)/n^2,j=1..i-1), i=1..p)*s*n^(-s-1)
- */
- static void
--mpfr_zeta_part_b (mpfr_t b, mpfr_srcptr s, int n, int p, mpfr_t *tc)
-+mpfr_zeta_part_b (mpfr_ptr b, mpfr_srcptr s, int n, int p, mpfr_t *tc)
- {
- mpfr_t s1, d, u;
- unsigned long n2;
-@@ -130,7 +130,7 @@
- n - an integer
- Output: sum - a floating-point number approximating sum(1/i^s, i=1..n-1) */
- static void
--mpfr_zeta_part_a (mpfr_t sum, mpfr_srcptr s, int n)
-+mpfr_zeta_part_a (mpfr_ptr sum, mpfr_srcptr s, int n)
- {
- mpfr_t u, s1;
- int i;
-@@ -158,7 +158,7 @@
- Output: z - Zeta(s) rounded to the precision of z with direction rnd_mode
- */
- static int
--mpfr_zeta_pos (mpfr_t z, mpfr_srcptr s, mpfr_rnd_t rnd_mode)
-+mpfr_zeta_pos (mpfr_ptr z, mpfr_srcptr s, mpfr_rnd_t rnd_mode)
- {
- mpfr_t b, c, z_pre, f, s1;
- double beta, sd, dnep;
-@@ -356,8 +356,8 @@
- At input, p is Pi rounded down.
- The comments in the code are for rnd = RNDD. */
- static void
--mpfr_reflection_overflow (mpfr_t z, mpfr_t s1, const mpfr_t s, mpfr_t y,
-- mpfr_t p, mpfr_rnd_t rnd)
-+mpfr_reflection_overflow (mpfr_ptr z, mpfr_ptr s1, mpfr_srcptr s, mpfr_ptr y,
-+ mpfr_ptr p, mpfr_rnd_t rnd)
- {
- mpz_t sint;
-
-@@ -432,7 +432,7 @@
- }
-
- int
--mpfr_zeta (mpfr_t z, mpfr_srcptr s, mpfr_rnd_t rnd_mode)
-+mpfr_zeta (mpfr_ptr z, mpfr_srcptr s, mpfr_rnd_t rnd_mode)
- {
- mpfr_t z_pre, s1, y, p;
- long add;
---- mpfr-4.1.0/tests/tcmp2.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/tests/tcmp2.c 2021-02-11 12:48:27.350242965 +0000
-@@ -24,7 +24,7 @@
-
- /* set bit n of x to b, where bit 0 is the most significant one */
- static void
--set_bit (mpfr_t x, unsigned int n, int b)
-+set_bit (mpfr_ptr x, unsigned int n, int b)
- {
- unsigned l;
- mp_size_t xn;
---- mpfr-4.1.0/tests/tdiv.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/tests/tdiv.c 2021-02-11 12:48:27.350242965 +0000
-@@ -369,7 +369,7 @@
- /* given y = o(x/u), x, u, find the inexact flag by
- multiplying y by u */
- static int
--get_inexact (mpfr_t y, mpfr_t x, mpfr_t u)
-+get_inexact (mpfr_ptr y, mpfr_ptr x, mpfr_ptr u)
- {
- mpfr_t xx;
- int inex;
---- mpfr-4.1.0/tests/teq.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/tests/teq.c 2021-02-11 12:48:27.350242965 +0000
-@@ -23,7 +23,7 @@
- #include "mpfr-test.h"
-
- static void
--teq (mpfr_t x)
-+teq (mpfr_ptr x)
- {
- mpfr_t y;
- unsigned long k, px, mx;
---- mpfr-4.1.0/tests/terandom_chisq.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/tests/terandom_chisq.c 2021-02-11 12:48:27.350242965 +0000
-@@ -26,7 +26,7 @@
- * exponential distribution. We only take differences of this function so the
- * offset doesn't matter; here Phi(0) = 0. */
- static void
--exponential_cumulative (mpfr_t z, mpfr_t x, mpfr_rnd_t rnd)
-+exponential_cumulative (mpfr_ptr z, mpfr_ptr x, mpfr_rnd_t rnd)
- {
- mpfr_neg (z, x, rnd);
- mpfr_expm1 (z, z, rnd);
-@@ -43,7 +43,7 @@
- * TAOCP, Vol 2, 3.3.1, Table 1. It more accurate than the similar formula,
- * DLMF 8.11.10. */
- static void
--chisq_prob (mpfr_t q, long nu, mpfr_t chisqp)
-+chisq_prob (mpfr_ptr q, long nu, mpfr_ptr chisqp)
- {
- mpfr_t t;
- mpfr_rnd_t rnd;
-@@ -170,7 +170,7 @@
- * this function. low precision means prec = 2, 3, or 4. High values of
- * precision will result in integer overflow. */
- static long
--sequential (mpfr_t x)
-+sequential (mpfr_ptr x)
- {
- long expt, prec;
-
---- mpfr-4.1.0/tests/tfmma.c.orig 2020-03-24 13:47:38.000000000 +0000
-+++ mpfr-4.1.0/tests/tfmma.c 2021-02-11 12:48:27.350242965 +0000
-@@ -24,7 +24,7 @@
-
- /* check both mpfr_fmma and mpfr_fmms */
- static void
--random_test (mpfr_t a, mpfr_t b, mpfr_t c, mpfr_t d, mpfr_rnd_t rnd)
-+random_test (mpfr_ptr a, mpfr_ptr b, mpfr_ptr c, mpfr_ptr d, mpfr_rnd_t rnd)
- {
- mpfr_t ref, res, ab, cd;
- int inex_ref, inex_res;
---- mpfr-4.1.0/tests/tfmod.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/tests/tfmod.c 2021-02-11 12:48:27.350242965 +0000
-@@ -62,8 +62,8 @@
- }
-
- static void
--test_failed (mpfr_t erem, mpfr_t grem, int eret, int gret, mpfr_t x, mpfr_t y,
-- mpfr_rnd_t rnd)
-+test_failed (mpfr_ptr erem, mpfr_ptr grem, int eret, int gret,
-+ mpfr_ptr x, mpfr_ptr y, mpfr_rnd_t rnd)
- {
- printf ("error: mpfr_fmod (r, x, y, rnd)\n x = ");
- mpfr_out_str (stdout, 10, 0, x, MPFR_RNDD);
-@@ -83,7 +83,7 @@
- }
-
- static void
--check (mpfr_t r0, mpfr_t x, mpfr_t y, mpfr_rnd_t rnd)
-+check (mpfr_ptr r0, mpfr_ptr x, mpfr_ptr y, mpfr_rnd_t rnd)
- {
- int inex0, inex1;
- mpfr_t r1;
---- mpfr-4.1.0/tests/tfprintf.c.orig 2020-06-01 10:39:52.000000000 +0000
-+++ mpfr-4.1.0/tests/tfprintf.c 2021-02-11 12:48:27.350242965 +0000
-@@ -65,7 +65,7 @@
- const int prec_max_printf = 5000;
-
- static void
--check (FILE *fout, const char *fmt, mpfr_t x)
-+check (FILE *fout, const char *fmt, mpfr_ptr x)
- {
- if (mpfr_fprintf (fout, fmt, x) == -1)
- {
---- mpfr-4.1.0/tests/tgamma.c.orig 2020-06-01 00:15:37.000000000 +0000
-+++ mpfr-4.1.0/tests/tgamma.c 2021-02-11 12:48:27.350242965 +0000
-@@ -890,7 +890,7 @@
- computing with a working precision p2. Assume that x is not an
- integer <= 2. */
- static void
--exp_lgamma (mpfr_t x, mpfr_prec_t p1, mpfr_prec_t p2)
-+exp_lgamma (mpfr_ptr x, mpfr_prec_t p1, mpfr_prec_t p2)
- {
- mpfr_t yd, yu, zd, zu;
- int inexd, inexu, sign;
---- mpfr-4.1.0/tests/tnrandom_chisq.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/tests/tnrandom_chisq.c 2021-02-11 12:48:27.350242965 +0000
-@@ -26,7 +26,7 @@
- * for the normal distribution. We only take differences of this function so
- * the offset doesn't matter; here Phi(0) = 0. */
- static void
--normal_cumulative (mpfr_t z, mpfr_t x, mpfr_rnd_t rnd)
-+normal_cumulative (mpfr_ptr z, mpfr_ptr x, mpfr_rnd_t rnd)
- {
- mpfr_sqrt_ui (z, 2, rnd);
- mpfr_div (z, x, z, rnd);
-@@ -44,7 +44,7 @@
- * TAOCP, Vol 2, 3.3.1, Table 1. It more accurate than the similar formula,
- * DLMF 8.11.10. */
- static void
--chisq_prob (mpfr_t q, long nu, mpfr_t chisqp)
-+chisq_prob (mpfr_ptr q, long nu, mpfr_ptr chisqp)
- {
- mpfr_t t;
- mpfr_rnd_t rnd;
-@@ -166,7 +166,7 @@
- * this function. low precision means prec = 2, 3, or 4. High values of
- * precision will result in integer overflow. */
- static long
--sequential (mpfr_t x)
-+sequential (mpfr_ptr x)
- {
- long expt, prec;
-
---- mpfr-4.1.0/tests/tprintf.c.orig 2020-06-01 10:39:52.000000000 +0000
-+++ mpfr-4.1.0/tests/tprintf.c 2021-02-11 12:48:27.350242965 +0000
-@@ -74,7 +74,7 @@
- int stdout_redirect;
-
- static void
--check (const char *fmt, mpfr_t x)
-+check (const char *fmt, mpfr_ptr x)
- {
- if (mpfr_printf (fmt, x) == -1)
- {
---- mpfr-4.1.0/tests/trint.c.orig 2020-02-12 13:04:50.000000000 +0000
-+++ mpfr-4.1.0/tests/trint.c 2021-02-11 12:48:27.350242965 +0000
-@@ -367,7 +367,7 @@
- #endif
-
- static void
--err (const char *str, mp_size_t s, mpfr_t x, mpfr_t y, mpfr_prec_t p,
-+err (const char *str, mp_size_t s, mpfr_ptr x, mpfr_ptr y, mpfr_prec_t p,
- mpfr_rnd_t r, int trint, int inexact)
- {
- printf ("Error: %s\ns = %u, p = %u, r = %s, trint = %d, inexact = %d\nx = ",
---- mpfr-4.1.0/tests/tsinh_cosh.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/tests/tsinh_cosh.c 2021-02-11 12:48:27.350242965 +0000
-@@ -23,7 +23,7 @@
- #include "mpfr-test.h"
-
- static void
--failed (mpfr_t x, mpfr_t esh, mpfr_t gsh, mpfr_t ech, mpfr_t gch)
-+failed (mpfr_ptr x, mpfr_ptr esh, mpfr_ptr gsh, mpfr_ptr ech, mpfr_ptr gch)
- {
- printf ("error : mpfr_sinh_cosh (x) x = ");
- mpfr_out_str (stdout, 10, 0, x, MPFR_RNDD);
-@@ -43,7 +43,7 @@
-
- /* check against sinh, cosh */
- static void
--check (mpfr_t x, mpfr_rnd_t rnd)
-+check (mpfr_ptr x, mpfr_rnd_t rnd)
- {
- mpfr_t s, c, sx, cx;
- int isc, is, ic;
---- mpfr-4.1.0/tests/tsqr.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/tests/tsqr.c 2021-02-11 12:48:27.350242965 +0000
-@@ -33,7 +33,7 @@
-
- static void
- error1 (mpfr_rnd_t rnd, mpfr_prec_t prec,
-- mpfr_t in, mpfr_t outmul, mpfr_t outsqr)
-+ mpfr_t in, mpfr_ptr outmul, mpfr_ptr outsqr)
- {
- printf("ERROR: for %s and prec=%lu\nINPUT=", mpfr_print_rnd_mode(rnd),
- (unsigned long) prec);
-@@ -44,7 +44,7 @@
- }
-
- static void
--error2 (mpfr_rnd_t rnd, mpfr_prec_t prec, mpfr_t in, mpfr_t out,
-+error2 (mpfr_rnd_t rnd, mpfr_prec_t prec, mpfr_ptr in, mpfr_ptr out,
- int inexactmul, int inexactsqr)
- {
- printf("ERROR: for %s and prec=%lu\nINPUT=", mpfr_print_rnd_mode(rnd),
---- mpfr-4.1.0/tests/tsum.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/tests/tsum.c 2021-02-11 12:48:27.350242965 +0000
-@@ -59,7 +59,7 @@
- }
-
- static void
--get_exact_sum (mpfr_t sum, mpfr_t *tab, int n)
-+get_exact_sum (mpfr_ptr sum, mpfr_t *tab, int n)
- {
- int i;
-
-@@ -1198,7 +1198,7 @@
- }
-
- static int
--mpfr_sum_naive (mpfr_t s, mpfr_t *x, int n, mpfr_rnd_t rnd)
-+mpfr_sum_naive (mpfr_ptr s, mpfr_t *x, int n, mpfr_rnd_t rnd)
- {
- int ret, i;
- switch (n)
---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:50:22.384987438 +0000
-+++ mpfr-4.1.0/PATCHES 2021-02-11 12:50:22.424987002 +0000
-@@ -0,0 +1 @@
-+digamma-hugemem
---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:48:27.370242746 +0000
-+++ mpfr-4.1.0/VERSION 2021-02-11 12:50:22.424987002 +0000
-@@ -1 +1 @@
--4.1.0-p4
-+4.1.0-p5
---- mpfr-4.1.0/src/digamma.c.orig 2020-06-18 17:17:18.000000000 +0000
-+++ mpfr-4.1.0/src/digamma.c 2021-02-11 12:50:22.412987133 +0000
-@@ -214,19 +214,27 @@
- (("x[%Pu]=%.*Rg rnd=%d", mpfr_get_prec(x), mpfr_log_prec, x, rnd_mode),
- ("y[%Pu]=%.*Rg inexact=%d", mpfr_get_prec(y), mpfr_log_prec, y, inex));
-
-- /* compute a precision q such that x+1 is exact */
-- if (MPFR_PREC(x) < MPFR_GET_EXP(x))
-- q = MPFR_EXP(x);
-- else
-- q = MPFR_PREC(x) + 1;
--
-- /* for very large x, use |digamma(x) - log(x)| < 1/x < 2^(1-EXP(x)) */
-- if (MPFR_PREC(y) + 10 < MPFR_EXP(x))
-+ /* For very large x, use |digamma(x) - log(x)| < 1/x < 2^(1-EXP(x)).
-+ However, for a fixed value of GUARD, MPFR_CAN_ROUND() might fail
-+ with probability 1/2^GUARD, in which case the default code will
-+ fail since it requires x+1 to be exact, thus a huge precision if
-+ x is huge. There are two workarounds:
-+ * either perform a Ziv's loop, by increasing GUARD at each step.
-+ However, this might fail if x is moderately large, in which case
-+ more terms of the asymptotic expansion would be needed.
-+ * implement a full asymptotic expansion (with Ziv's loop). */
-+#define GUARD 30
-+ if (MPFR_PREC(y) + GUARD < MPFR_EXP(x))
- {
- /* this ensures EXP(x) >= 3, thus x >= 4, thus log(x) > 1 */
-- mpfr_init2 (t, MPFR_PREC(y) + 10);
-- mpfr_log (t, x, MPFR_RNDZ);
-- if (MPFR_CAN_ROUND (t, MPFR_PREC(y) + 10, MPFR_PREC(y), rnd_mode))
-+ mpfr_init2 (t, MPFR_PREC(y) + GUARD);
-+ mpfr_log (t, x, MPFR_RNDN);
-+ /* |t - digamma(x)| <= 1/2*ulp(t) + |digamma(x) - log(x)|
-+ <= 1/2*ulp(t) + 2^(1-EXP(x))
-+ <= 1/2*ulp(t) + 2^(-PREC(y)-GUARD)
-+ <= ulp(t)
-+ since |t| >= 1 thus ulp(t) >= 2^(1-PREC(y)-GUARD) */
-+ if (MPFR_CAN_ROUND (t, MPFR_PREC(y) + GUARD, MPFR_PREC(y), rnd_mode))
- {
- inex = mpfr_set (y, t, rnd_mode);
- mpfr_clear (t);
-@@ -235,6 +243,21 @@
- mpfr_clear (t);
- }
-
-+ /* compute a precision q such that x+1 is exact */
-+ if (MPFR_PREC(x) < MPFR_GET_EXP(x))
-+ {
-+ /* The goal of the first assertion is to let the compiler ignore
-+ the second one when MPFR_EMAX_MAX <= MPFR_PREC_MAX. */
-+ MPFR_ASSERTD (MPFR_EXP(x) <= MPFR_EMAX_MAX);
-+ MPFR_ASSERTN (MPFR_EXP(x) <= MPFR_PREC_MAX);
-+ q = MPFR_EXP(x);
-+ }
-+ else
-+ q = MPFR_PREC(x) + 1;
-+
-+ /* FIXME: q can be much too large, e.g. equal to the maximum exponent! */
-+ MPFR_LOG_MSG (("q=%Pu\n", q));
-+
- mpfr_init2 (x_plus_j, q);
-
- mpfr_init2 (t, p);
---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:48:27.366242791 +0000
-+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:50:22.424987002 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 4
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "4.1.0-p4"
-+#define MPFR_VERSION_STRING "4.1.0-p5"
-
- /* User macros:
- MPFR_USE_FILE: Define it to make MPFR define functions dealing
---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:48:27.370242746 +0000
-+++ mpfr-4.1.0/src/version.c 2021-02-11 12:50:22.424987002 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "4.1.0-p4";
-+ return "4.1.0-p5";
- }
---- mpfr-4.1.0/tests/tdigamma.c.orig 2020-06-18 17:17:18.000000000 +0000
-+++ mpfr-4.1.0/tests/tdigamma.c 2021-02-11 12:50:22.412987133 +0000
-@@ -49,12 +49,54 @@
- mpfr_clear (y);
- }
-
-+/* With some GMP_CHECK_RANDOMIZE values, test_generic triggers an error
-+ tests_addsize(): too much memory (576460752303432776 bytes)
-+ Each time on prec = 200, n = 3, xprec = 140.
-+ The following test is a more general testcase.
-+*/
-+static void
-+bug20210206 (void)
-+{
-+#define NPREC 4
-+ mpfr_t x, y[NPREC], z;
-+ mpfr_exp_t emin, emax;
-+ int i, precx, precy[NPREC] = { 200, 400, 520, 1416 };
-+
-+ emin = mpfr_get_emin ();
-+ emax = mpfr_get_emax ();
-+ set_emin (MPFR_EMIN_MIN);
-+ set_emax (MPFR_EMAX_MAX);
-+
-+ for (i = 0; i < NPREC; i++)
-+ mpfr_init2 (y[i], precy[i]);
-+ mpfr_init2 (z, precy[0]);
-+
-+ for (precx = MPFR_PREC_MIN; precx < 150; precx++)
-+ {
-+ mpfr_init2 (x, precx);
-+ mpfr_setmax (x, __gmpfr_emax);
-+ for (i = 0; i < NPREC; i++)
-+ mpfr_digamma (y[i], x, MPFR_RNDA);
-+ mpfr_set (z, y[1], MPFR_RNDA);
-+ MPFR_ASSERTN (mpfr_equal_p (y[0], z));
-+ mpfr_clear (x);
-+ }
-+
-+ for (i = 0; i < NPREC; i++)
-+ mpfr_clear (y[i]);
-+ mpfr_clear (z);
-+
-+ set_emin (emin);
-+ set_emax (emax);
-+}
-+
- int
- main (int argc, char *argv[])
- {
- tests_start_mpfr ();
-
- special ();
-+ bug20210206 ();
-
- test_generic (MPFR_PREC_MIN, 200, 20);
-
---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:52:52.519350662 +0000
-+++ mpfr-4.1.0/PATCHES 2021-02-11 12:52:52.563350183 +0000
-@@ -0,0 +1 @@
-+digamma-interm-zero
---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:50:22.424987002 +0000
-+++ mpfr-4.1.0/VERSION 2021-02-11 12:52:52.563350183 +0000
-@@ -1 +1 @@
--4.1.0-p5
-+4.1.0-p6
---- mpfr-4.1.0/src/digamma.c.orig 2021-02-11 12:50:22.412987133 +0000
-+++ mpfr-4.1.0/src/digamma.c 2021-02-11 12:52:52.547350357 +0000
-@@ -296,21 +296,26 @@
- errt = mpfr_digamma_approx (t, x_plus_j);
- expt = MPFR_GET_EXP (t);
- mpfr_sub (t, t, u, MPFR_RNDN);
-- if (MPFR_GET_EXP (t) < expt)
-- errt += expt - MPFR_EXP(t);
-- /* Warning: if u is zero (which happens when x_plus_j >= min at the
-- beginning of the while loop above), EXP(u) is not defined.
-- In this case we have no error from u. */
-- if (MPFR_NOTZERO(u) && MPFR_GET_EXP (t) < MPFR_GET_EXP (u))
-- erru += MPFR_EXP(u) - MPFR_EXP(t);
-- if (errt > erru)
-- errt = errt + 1;
-- else if (errt == erru)
-- errt = errt + 2;
-- else
-- errt = erru + 1;
-- if (MPFR_CAN_ROUND (t, p - errt, MPFR_PREC(y), rnd_mode))
-- break;
-+ /* Warning! t may be zero (more likely in small precision). Note
-+ that in this case, this is an exact zero, not an underflow. */
-+ if (MPFR_NOTZERO(t))
-+ {
-+ if (MPFR_GET_EXP (t) < expt)
-+ errt += expt - MPFR_EXP(t);
-+ /* Warning: if u is zero (which happens when x_plus_j >= min at the
-+ beginning of the while loop above), EXP(u) is not defined.
-+ In this case we have no error from u. */
-+ if (MPFR_NOTZERO(u) && MPFR_GET_EXP (t) < MPFR_GET_EXP (u))
-+ erru += MPFR_EXP(u) - MPFR_EXP(t);
-+ if (errt > erru)
-+ errt = errt + 1;
-+ else if (errt == erru)
-+ errt = errt + 2;
-+ else
-+ errt = erru + 1;
-+ if (MPFR_CAN_ROUND (t, p - errt, MPFR_PREC(y), rnd_mode))
-+ break;
-+ }
- MPFR_ZIV_NEXT (loop, p);
- mpfr_set_prec (t, p);
- mpfr_set_prec (u, p);
---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:50:22.424987002 +0000
-+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:52:52.559350226 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 4
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "4.1.0-p5"
-+#define MPFR_VERSION_STRING "4.1.0-p6"
-
- /* User macros:
- MPFR_USE_FILE: Define it to make MPFR define functions dealing
---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:50:22.424987002 +0000
-+++ mpfr-4.1.0/src/version.c 2021-02-11 12:52:52.559350226 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "4.1.0-p5";
-+ return "4.1.0-p6";
- }
---- mpfr-4.1.0/tests/tdigamma.c.orig 2021-02-11 12:50:22.412987133 +0000
-+++ mpfr-4.1.0/tests/tdigamma.c 2021-02-11 12:52:52.547350357 +0000
-@@ -90,6 +90,26 @@
- set_emax (emax);
- }
-
-+/* another test that fails with GMP_CHECK_RANDOMIZE=1612741376857003
-+ on revision 14398 */
-+static void
-+bug20210208 (void)
-+{
-+ mpfr_t x, y;
-+ int inex;
-+
-+ mpfr_init2 (x, 73);
-+ mpfr_init2 (y, 1);
-+ mpfr_set_str (x, "1.4613470547060071827450", 10, MPFR_RNDN);
-+ mpfr_clear_flags ();
-+ inex = mpfr_digamma (y, x, MPFR_RNDU);
-+ MPFR_ASSERTN (mpfr_cmp_si_2exp (y, -1, -12) == 0);
-+ MPFR_ASSERTN (inex > 0);
-+ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT);
-+ mpfr_clear (x);
-+ mpfr_clear (y);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -97,6 +117,7 @@
-
- special ();
- bug20210206 ();
-+ bug20210208 ();
-
- test_generic (MPFR_PREC_MIN, 200, 20);
-
---- mpfr-4.1.0/PATCHES.orig 2021-02-11 12:53:38.382850990 +0000
-+++ mpfr-4.1.0/PATCHES 2021-02-11 12:53:38.426850512 +0000
-@@ -0,0 +1 @@
-+jn-interm-zero
---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:52:52.563350183 +0000
-+++ mpfr-4.1.0/VERSION 2021-02-11 12:53:38.426850512 +0000
-@@ -1 +1 @@
--4.1.0-p6
-+4.1.0-p7
---- mpfr-4.1.0/src/jyn_asympt.c.orig 2020-07-10 10:33:32.000000000 +0000
-+++ mpfr-4.1.0/src/jyn_asympt.c 2021-02-11 12:53:38.410850685 +0000
-@@ -69,6 +69,8 @@
- MPFR_ZIV_INIT (loop, w);
- for (;;)
- {
-+ int ok = 1;
-+
- mpfr_set_prec (c, w);
- mpfr_init2 (s, w);
- mpfr_init2 (P, w);
-@@ -92,6 +94,13 @@
- /* now s approximates sin(z)+cos(z), and c approximates sin(z)-cos(z),
- with total absolute error bounded by 2^(1-w). */
-
-+ /* if s or c is zero, MPFR_GET_EXP will fail below */
-+ if (MPFR_IS_ZERO(s) || MPFR_IS_ZERO(c))
-+ {
-+ ok = 0;
-+ goto clear;
-+ }
-+
- /* precompute 1/(8|z|) */
- mpfr_si_div (iz, MPFR_IS_POS(z) ? 1 : -1, z, MPFR_RNDN); /* err <= 1 */
- mpfr_div_2ui (iz, iz, 3, MPFR_RNDN);
-@@ -257,6 +266,9 @@
- err = (err >= err2) ? err + 1 : err2 + 1;
- /* the absolute error on c is bounded by 2^(err - w) */
-
-+ err -= MPFR_GET_EXP (c);
-+
-+ clear:
- mpfr_clear (s);
- mpfr_clear (P);
- mpfr_clear (Q);
-@@ -266,8 +278,7 @@
- mpfr_clear (err_s);
- mpfr_clear (err_u);
-
-- err -= MPFR_GET_EXP (c);
-- if (MPFR_LIKELY (MPFR_CAN_ROUND (c, w - err, MPFR_PREC(res), r)))
-+ if (ok && MPFR_LIKELY (MPFR_CAN_ROUND (c, w - err, MPFR_PREC(res), r)))
- break;
- if (diverge != 0)
- {
---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:52:52.559350226 +0000
-+++ mpfr-4.1.0/src/mpfr.h 2021-02-11 12:53:38.422850555 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 4
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "4.1.0-p6"
-+#define MPFR_VERSION_STRING "4.1.0-p7"
-
- /* User macros:
- MPFR_USE_FILE: Define it to make MPFR define functions dealing
---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:52:52.559350226 +0000
-+++ mpfr-4.1.0/src/version.c 2021-02-11 12:53:38.426850512 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "4.1.0-p6";
-+ return "4.1.0-p7";
- }
---- mpfr-4.1.0/tests/tj0.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/tests/tj0.c 2021-02-11 12:53:38.410850685 +0000
-@@ -27,6 +27,25 @@
- #define REDUCE_EMAX 262143 /* otherwise arg. reduction is too expensive */
- #include "tgeneric.c"
-
-+/* bug found in revision 14399 with GMP_CHECK_RANDOMIZE=1612721106588971 */
-+static void
-+bug20210208 (void)
-+{
-+ mpfr_t x, y;
-+ int inex;
-+
-+ mpfr_init2 (x, 79);
-+ mpfr_init2 (y, 1);
-+ mpfr_set_str (x, "2.552495117262005805960565e+02", 10, MPFR_RNDN);
-+ mpfr_clear_flags ();
-+ inex = mpfr_j0 (y, x, MPFR_RNDZ);
-+ MPFR_ASSERTN (mpfr_cmp_si_2exp (y, -1, -5) == 0);
-+ MPFR_ASSERTN (inex > 0);
-+ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT);
-+ mpfr_clear (x);
-+ mpfr_clear (y);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -35,6 +54,8 @@
-
- tests_start_mpfr ();
-
-+ bug20210208 ();
-+
- mpfr_init (x);
- mpfr_init (y);
-
---- mpfr-4.1.0/PATCHES.orig 2021-02-17 17:22:34.594973310 +0000
-+++ mpfr-4.1.0/PATCHES 2021-02-17 17:22:34.702972090 +0000
-@@ -0,0 +1 @@
-+digamma-interm-zero2
---- mpfr-4.1.0/VERSION.orig 2021-02-11 12:53:38.426850512 +0000
-+++ mpfr-4.1.0/VERSION 2021-02-17 17:22:34.702972090 +0000
-@@ -1 +1 @@
--4.1.0-p7
-+4.1.0-p8
---- mpfr-4.1.0/src/digamma.c.orig 2021-02-11 12:52:52.547350357 +0000
-+++ mpfr-4.1.0/src/digamma.c 2021-02-17 17:22:34.690972226 +0000
-@@ -173,16 +173,19 @@
- mpfr_digamma (v, u, MPFR_RNDN); /* error <= 1/2 ulp */
- expv = MPFR_GET_EXP (v);
- mpfr_sub (v, v, t, MPFR_RNDN);
-- if (MPFR_GET_EXP (v) < MPFR_GET_EXP (t))
-- e1 += MPFR_EXP(t) - MPFR_EXP(v); /* scale error for t wrt new v */
-- /* now take into account the 1/2 ulp error for v */
-- if (expv - MPFR_EXP(v) - 1 > e1)
-- e1 = expv - MPFR_EXP(v) - 1;
-- else
-- e1 ++;
-- e1 ++; /* rounding error for mpfr_sub */
-- if (MPFR_CAN_ROUND (v, p - e1, MPFR_PREC(y), rnd_mode))
-- break;
-+ if (MPFR_NOTZERO(v))
-+ {
-+ if (MPFR_GET_EXP (v) < MPFR_GET_EXP (t))
-+ e1 += MPFR_EXP(t) - MPFR_EXP(v); /* scale error for t wrt new v */
-+ /* now take into account the 1/2 ulp error for v */
-+ if (expv - MPFR_EXP(v) - 1 > e1)
-+ e1 = expv - MPFR_EXP(v) - 1;
-+ else
-+ e1 ++;
-+ e1 ++; /* rounding error for mpfr_sub */
-+ if (MPFR_CAN_ROUND (v, p - e1, MPFR_PREC(y), rnd_mode))
-+ break;
-+ }
- MPFR_ZIV_NEXT (loop, p);
- mpfr_set_prec (t, p);
- mpfr_set_prec (v, p);
-@@ -416,10 +419,8 @@
- }
- }
-
-- if (MPFR_IS_NEG(x))
-- inex = mpfr_digamma_reflection (y, x, rnd_mode);
- /* if x < 1/2 we use the reflection formula */
-- else if (MPFR_EXP(x) < 0)
-+ if (MPFR_IS_NEG(x) || MPFR_EXP(x) < 0)
- inex = mpfr_digamma_reflection (y, x, rnd_mode);
- else
- inex = mpfr_digamma_positive (y, x, rnd_mode);
---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-11 12:53:38.422850555 +0000
-+++ mpfr-4.1.0/src/mpfr.h 2021-02-17 17:22:34.702972090 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 4
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "4.1.0-p7"
-+#define MPFR_VERSION_STRING "4.1.0-p8"
-
- /* User macros:
- MPFR_USE_FILE: Define it to make MPFR define functions dealing
---- mpfr-4.1.0/src/version.c.orig 2021-02-11 12:53:38.426850512 +0000
-+++ mpfr-4.1.0/src/version.c 2021-02-17 17:22:34.702972090 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "4.1.0-p7";
-+ return "4.1.0-p8";
- }
---- mpfr-4.1.0/tests/tdigamma.c.orig 2021-02-11 12:52:52.547350357 +0000
-+++ mpfr-4.1.0/tests/tdigamma.c 2021-02-17 17:22:34.690972226 +0000
-@@ -110,6 +110,26 @@
- mpfr_clear (y);
- }
-
-+/* another test that fails with GMP_CHECK_RANDOMIZE=1613197421465830
-+ on revision 14429 */
-+static void
-+bug20210215 (void)
-+{
-+ mpfr_t x, y;
-+ int inex;
-+
-+ mpfr_init2 (x, 510);
-+ mpfr_init2 (y, 4);
-+ mpfr_set_str (x, "-8.2923051438433494998166335341807999322052669984208422481227138906096000469898717007386115912802685588348601663465077353194268894939972221117314512518182580e+35", 10, MPFR_RNDN);
-+ mpfr_clear_flags ();
-+ inex = mpfr_digamma (y, x, MPFR_RNDU);
-+ MPFR_ASSERTN (mpfr_cmp_ui0 (y, 88) == 0);
-+ MPFR_ASSERTN (inex > 0);
-+ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT);
-+ mpfr_clear (x);
-+ mpfr_clear (y);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -118,6 +138,7 @@
- special ();
- bug20210206 ();
- bug20210208 ();
-+ bug20210215 ();
-
- test_generic (MPFR_PREC_MIN, 200, 20);
-
---- mpfr-4.1.0/PATCHES.orig 2021-02-17 17:25:46.396981483 +0000
-+++ mpfr-4.1.0/PATCHES 2021-02-17 17:25:46.440981068 +0000
-@@ -0,0 +1 @@
-+jyn_asympt-interm-zero
---- mpfr-4.1.0/VERSION.orig 2021-02-17 17:22:34.702972090 +0000
-+++ mpfr-4.1.0/VERSION 2021-02-17 17:25:46.440981068 +0000
-@@ -1 +1 @@
--4.1.0-p8
-+4.1.0-p9
---- mpfr-4.1.0/src/jyn_asympt.c.orig 2021-02-11 12:53:38.410850685 +0000
-+++ mpfr-4.1.0/src/jyn_asympt.c 2021-02-17 17:25:46.424981219 +0000
-@@ -69,7 +69,7 @@
- MPFR_ZIV_INIT (loop, w);
- for (;;)
- {
-- int ok = 1;
-+ int ok = 0;
-
- mpfr_set_prec (c, w);
- mpfr_init2 (s, w);
-@@ -96,10 +96,7 @@
-
- /* if s or c is zero, MPFR_GET_EXP will fail below */
- if (MPFR_IS_ZERO(s) || MPFR_IS_ZERO(c))
-- {
-- ok = 0;
-- goto clear;
-- }
-+ goto clear; /* with ok=0 */
-
- /* precompute 1/(8|z|) */
- mpfr_si_div (iz, MPFR_IS_POS(z) ? 1 : -1, z, MPFR_RNDN); /* err <= 1 */
-@@ -227,6 +224,9 @@
- mpfr_sub (s, c, s, MPFR_RNDN);
- #endif
- }
-+ if (MPFR_IS_ZERO(s))
-+ goto clear; /* with ok=0 */
-+ ok = 1;
- if ((n & 2) != 0)
- mpfr_neg (s, s, MPFR_RNDN);
- if (MPFR_GET_EXP (s) > err)
---- mpfr-4.1.0/src/mpfr.h.orig 2021-02-17 17:22:34.702972090 +0000
-+++ mpfr-4.1.0/src/mpfr.h 2021-02-17 17:25:46.436981105 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 4
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "4.1.0-p8"
-+#define MPFR_VERSION_STRING "4.1.0-p9"
-
- /* User macros:
- MPFR_USE_FILE: Define it to make MPFR define functions dealing
---- mpfr-4.1.0/src/version.c.orig 2021-02-17 17:22:34.702972090 +0000
-+++ mpfr-4.1.0/src/version.c 2021-02-17 17:25:46.440981068 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "4.1.0-p8";
-+ return "4.1.0-p9";
- }
---- mpfr-4.1.0/tests/mpfr-test.h.orig 2020-06-29 13:57:32.000000000 +0000
-+++ mpfr-4.1.0/tests/mpfr-test.h 2021-02-17 17:25:46.424981219 +0000
-@@ -191,6 +191,8 @@
-
- #define mpfr_cmp0(x,y) (MPFR_ASSERTN (!MPFR_IS_NAN (x) && !MPFR_IS_NAN (y)), mpfr_cmp (x,y))
- #define mpfr_cmp_ui0(x,i) (MPFR_ASSERTN (!MPFR_IS_NAN (x)), mpfr_cmp_ui (x,i))
-+#define mpfr_cmp_si_2exp0(x,i,e) (MPFR_ASSERTN (!MPFR_IS_NAN (x)), \
-+ mpfr_cmp_si_2exp (x,i,e))
-
- /* define CHECK_EXTERNAL if you want to check mpfr against another library
- with correct rounding. You'll probably have to modify mpfr_print_raw()
---- mpfr-4.1.0/tests/tj1.c.orig 2020-01-08 18:11:13.000000000 +0000
-+++ mpfr-4.1.0/tests/tj1.c 2021-02-17 17:25:46.424981219 +0000
-@@ -55,14 +55,14 @@
- /* since |x| is just above 2^e, |j1(x)| is just above 2^(e-1),
- thus y should be 2^(e-1) and the inexact flag should be
- of opposite sign of x */
-- MPFR_ASSERTN(mpfr_cmp_si_2exp (y, sign, e - 1) == 0);
-+ MPFR_ASSERTN(mpfr_cmp_si_2exp0 (y, sign, e - 1) == 0);
- MPFR_ASSERTN(VSIGN (inex) * sign < 0);
- }
- else
- {
- /* here |y| should be 0.5*2^emin and the inexact flag should
- have the sign of x */
-- MPFR_ASSERTN(mpfr_cmp_si_2exp (y, sign, e) == 0);
-+ MPFR_ASSERTN(mpfr_cmp_si_2exp0 (y, sign, e) == 0);
- MPFR_ASSERTN(VSIGN (inex) * sign > 0);
- }
- }
-@@ -72,6 +72,26 @@
- mpfr_clear (y);
- }
-
-+/* a test that fails with GMP_CHECK_RANDOMIZE=1613146232984428
-+ on revision 14429 */
-+static void
-+bug20210215 (void)
-+{
-+ mpfr_t x, y;
-+ int inex;
-+
-+ mpfr_init2 (x, 221);
-+ mpfr_init2 (y, 1);
-+ mpfr_set_str (x, "1.6484611511696130037307738844228498447763863563070374544054791168614e+01", 10, MPFR_RNDN);
-+ mpfr_clear_flags ();
-+ inex = mpfr_j1 (y, x, MPFR_RNDZ);
-+ MPFR_ASSERTN (mpfr_cmp_si_2exp0 (y, -1, -9) == 0);
-+ MPFR_ASSERTN (inex > 0);
-+ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_INEXACT);
-+ mpfr_clear (x);
-+ mpfr_clear (y);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -79,6 +99,8 @@
-
- tests_start_mpfr ();
-
-+ bug20210215 ();
-+
- test_small ();
-
- mpfr_init (x);
diff --git a/sources b/sources
index 079264f..9f65891 100644
--- a/sources
+++ b/sources
@@ -1,24 +1,24 @@
SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d
-SHA512 (Macaulay2-1.24.05.tar.gz) = de15faa981491783f9f69c036adab96f19285d4a11dbc77bf77b0d0ded435abb7bca5987094286cdf17835ff81dc122d269e897e4792167d2734ce02760c0190
+SHA512 (Macaulay2-1.24.11.tar.gz) = 22af8b04877f2e88ebfd548a6f4aad7e873d2d638e3c1fbe51dfc2ffae1ad71551dfc018542ea64750a3ffb18c6825ac047c088c00543f2f282a939aad953f9f
SHA512 (4ti2-1.6.10.tar.gz) = 0bdf73a8885fe03258a903f0bfb45b8271dcf755d8033b57b8d5620daba7fc25b51031ffb2c8609e40bc19508e07ba028de035d8c193caeffe6400457fc0e3e1
SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f
SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818
SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82
-SHA512 (factory-4.3.0.tar.gz) = d88690836f9ac5e29c9118078042436184a88ed4881768f9e5f58a15c973da580847b53466a58310a411db695c82b42667124e85689948c1af72689be4e10272
-SHA512 (flint-2.8.4.tar.gz) = 56dbe7b8a4d0d10f79a0d453692a37f74e809ff698440128459b4f4c08c2b8ead23085c92adc944e15e5950371daebfc31e167f24bd9d5ab385bf7018dc4582a
-SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6
+SHA512 (factory-4.4.0.tar.gz) = 790f2de716a953933cd678d9cf972e0f141c4bae958c36ffd28a8dc9d2f61c49f40f475ffe88931b159c38f19b144b99434138c8dd9ef701aefcce76c96530e5
+SHA512 (flint-3.1.3.tar.gz) = 01a26a39424b2b9f6c5a6e91f2257332dbabf821a96bd0485eb5a6665d82a8b3ebb759da039104f7da3011bd91f5694a3554f34f08368fb635ceb8cadd9a0997
+SHA512 (frobby_v0.9.5.tar.gz) = 321da2c83ddd1e1364a2e97cdf69c9b7bc6d2a59583aeab93526030151222049bb7b7e32287e7575cab4d0d22593a92a1f926092b1ed8f9da6b4d68118371bdb
SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d
-SHA512 (givaro-4.1.1.tar.gz) = baaf139f42176838c541143a5b69acf47a8f31c17020a85cf413ce18ade2c3048e009d15c2acf4d71041c0776cd42f5fedb1c183ce1cc0f85cb8672ceac00ee7
+SHA512 (givaro-4.2.0.tar.gz) = 8258507f4ac2643ab39d1802ec79cf24051e7a70e167fcee1362c1a8ac12f924e831ce24450055cea96a8824f34fa83ad344d240a55571f7d522787db16afdfc
SHA512 (glpk-4.59.tar.gz) = ca05bd085880143acf4a440cf7efd2392d4dde89bed53a0e5726526cb210eee004bfcd434aeb8ca8abb1dc89ff93e72054489911e5e2c843e0ed631d50c55f56
-SHA512 (gtest-1.10.0.tar.gz) = bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b065e165bc7477d762bce0997a427131866a89f1001e3f3315198204ffa5d643a9355f1f4d0d7b1a9
+SHA512 (gtest-1.11.0.tar.gz) = 6fcc7827e4c4d95e3ae643dd65e6c4fc0e3d04e1778b84f6e06e390410fe3d18026c131d828d949d2f20dde6327d30ecee24dcd3ef919e21c91e010d149f3a28
SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf6adec6622f557c332f09e7eb46f71e5e3f2e852f25a640bde2bf9f4be7205cecf01cb07b6bc8
SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29
SHA512 (linbox-1.7.0.tar.gz) = cb4e848186d1f6357f498d1e3bda6484b4c789c02440f9614a227a2ae206a31fb20b32be40bda74da3f2f8f981bbd58d80fc97c95499b5151bb06eafb867ef9e
SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001
-SHA512 (M2-emacs-90ce16a.tar.gz) = f68fe2916b2b030b7ecebf66c8cfe0e3776fd1768bbebece2ce53055d9dcead88b8d679c5320c6e46f6b4d4378fe4a8af62a4912afff51c5253f33ea8665cad1
+SHA512 (M2-emacs-f0bb736.tar.gz) = eefef21cb613e6ad6e8e73b0cec08aab95e948323472e585d69421c2ec23d05e03730dc231ed262cc86b705081fad0329b2e298455dc73f28425f30cb3f9c670
SHA512 (mathic-1.0.tar.gz) = 9eb2fe94d266ffda4624c89021e08526e073286635dd5439042e744f07ba053534bc9476ab81d37f7622d62d8ce40c3eedbc5f7013cd529584f46d3685f15d3a
SHA512 (mathicgb-1.0.tar.gz) = aea24832681c40c92cad012211ed647ed4e8287964481f36a62d6f0fb0d053fb07c17c49385b4782b380576a92aa387f67fa2843437a0e7b315c74288e65d5a8
SHA512 (memtailor-1.0.tar.gz) = 147ef22f322a82d5336c004ba9cce055ee94eb7ad93d4271524cbee4713f94b258342f4e31569abac2e29472fdd25df2fad94000496ce46e469b7e074af3c86e
-SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273
+SHA512 (mpfr-4.2.1.tar.gz) = 858b7c2c3018e4099a7cd6d9d38eca7c46af90fa2c307d9417518027f07b6c43c51152c60b56359a53e7101a5d0629753f3eb5c54e17574742c374830832fcfe
SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f
SHA512 (TOPCOM-0.17.8.tar.gz) = 8611e8bd36eda00646fb40794435f23e6af81ecbee93c40e8fe5f73905e673e6244cb0f8cc1fe5c29050e40c7d53a44c615c60cbbecc8452b3c85f1d8a816d7a
From d4d2e5d33e2a6d0c9a83df275f1950cbd28f43e5 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Thu, 29 May 2025 09:21:26 -0600
Subject: [PATCH 32/46] Version 1.25.05
- Drop upstreamed patches: no_gftables, fplll, codim-option, rightarrow
- Add patch to avoid the deprecated strstream C++ header
- Unbundle memtailor, mathic, and mathicgb
---
Macaulay2-1.15-fplll.patch | 73 --------
Macaulay2-1.15-optflags.patch | 21 ---
Macaulay2-1.16-rightarrow.patch | 11 --
Macaulay2-1.18-no_gftables.patch | 11 --
Macaulay2-1.24-codim-option.patch | 52 ------
... Macaulay2-1.25-default_make_targets.patch | 6 +-
Macaulay2-1.25-optflags.patch | 42 +++++
Macaulay2-1.25-strstream.patch | 10 ++
Macaulay2.spec | 158 +++++++-----------
sources | 24 ++-
10 files changed, 122 insertions(+), 286 deletions(-)
delete mode 100644 Macaulay2-1.15-fplll.patch
delete mode 100644 Macaulay2-1.15-optflags.patch
delete mode 100644 Macaulay2-1.16-rightarrow.patch
delete mode 100644 Macaulay2-1.18-no_gftables.patch
delete mode 100644 Macaulay2-1.24-codim-option.patch
rename Macaulay2-1.17-default_make_targets.patch => Macaulay2-1.25-default_make_targets.patch (69%)
create mode 100644 Macaulay2-1.25-optflags.patch
create mode 100644 Macaulay2-1.25-strstream.patch
diff --git a/Macaulay2-1.15-fplll.patch b/Macaulay2-1.15-fplll.patch
deleted file mode 100644
index c216db9..0000000
--- a/Macaulay2-1.15-fplll.patch
+++ /dev/null
@@ -1,73 +0,0 @@
---- M2/Macaulay2/e/fplll-interface.cpp.orig 2020-05-22 08:58:09.000000000 -0600
-+++ M2/Macaulay2/e/fplll-interface.cpp 2020-05-31 20:25:06.775601853 -0600
-@@ -1,10 +1,10 @@
--#include "fplll-interface.hpp"
--#include "mutablemat.hpp"
--
- #ifdef HAVE_FPLLL
- #include
--#include
- #endif
-+#include
-+
-+#include "fplll-interface.hpp"
-+#include "mutablemat.hpp"
-
- bool fp_LLL(MutableMatrix *M, MutableMatrix *U, int strategy)
- {
-@@ -15,15 +15,15 @@ bool fp_LLL(MutableMatrix *M, MutableMat
- assert(U == NULL);
- double delta = 0.99;
- double eta = 0.51;
-- LLLMethod method = LM_WRAPPER;
-- FloatType floatType = FT_DEFAULT;
-+ fplll::LLLMethod method = fplll::LM_WRAPPER;
-+ fplll::FloatType floatType = fplll::FT_DEFAULT;
- int precision = 0;
-- int flags = LLL_DEFAULT;
-+ int flags = fplll::LLL_DEFAULT;
-
- int ncols = static_cast(M->n_rows());
- int nrows = static_cast(M->n_cols());
-
-- ZZ_mat mat(nrows, ncols);
-+ fplll::ZZ_mat mat(nrows, ncols);
-
- for (int i = 0; i < nrows; i++)
- for (int j = 0; j < ncols; j++)
-@@ -31,21 +31,21 @@ bool fp_LLL(MutableMatrix *M, MutableMat
- ring_elem a;
- if (M->get_entry(j, i, a))
- {
-- mpz_set(mat[i][j].getData(), a.get_mpz());
-+ mpz_set(mat[i][j].get_data(), a.get_mpz());
- }
- }
-
- int result =
-- lllReduction(mat, delta, eta, method, floatType, precision, flags);
-+ lll_reduction(mat, delta, eta, method, floatType, precision, flags);
-
- switch (result)
- {
-- case RED_SUCCESS:
-+ case fplll::RED_SUCCESS:
- break;
-- case RED_BABAI_FAILURE:
-+ case fplll::RED_BABAI_FAILURE:
- ERROR("Error in fpLLL");
- return 0;
-- case RED_LLL_FAILURE:
-+ case fplll::RED_LLL_FAILURE:
- ERROR("infinite loop in LLL");
- return 0;
- default:
-@@ -60,7 +60,7 @@ bool fp_LLL(MutableMatrix *M, MutableMat
- for (int j = 0; j < ncols; j++)
- for (int i = 0; i < nrows; i++)
- {
-- mpz_set(a, mat[i][j].getData());
-+ mpz_set(a, mat[i][j].get_data());
- ring_elem b = globalZZ->from_int(a);
- M->set_entry(j, i, b);
- }
diff --git a/Macaulay2-1.15-optflags.patch b/Macaulay2-1.15-optflags.patch
deleted file mode 100644
index d27c278..0000000
--- a/Macaulay2-1.15-optflags.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- M2/configure.ac.orig 2020-05-22 08:58:09.000000000 -0600
-+++ M2/configure.ac 2020-05-28 19:59:37.838647299 -0600
-@@ -308,12 +308,12 @@ fi
- ]
-
- if test "$OPTIMIZE" = yes
--then CFLAGS="$CFLAGS -O2"
-- CXXFLAGS="$CXXFLAGS -O2"
-- FCFLAGS="$FCFLAGS -O2"
--else CFLAGS="$CFLAGS -O0"
-- CXXFLAGS="$CXXFLAGS -O0"
-- FCFLAGS="$FCFLAGS -O0"
-+then CFLAGS="-O2 $CFLAGS"
-+ CXXFLAGS="-O2 $CXXFLAGS"
-+ FCFLAGS="-O2 $FCFLAGS"
-+else CFLAGS="-O0 $CFLAGS"
-+ CXXFLAGS="-O0 $CXXFLAGS"
-+ FCFLAGS="-O0 $FCFLAGS"
- fi
-
- AC_SUBST(GCCVERSION)
diff --git a/Macaulay2-1.16-rightarrow.patch b/Macaulay2-1.16-rightarrow.patch
deleted file mode 100644
index 1c4abd5..0000000
--- a/Macaulay2-1.16-rightarrow.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- M2/Macaulay2/packages/Macaulay2Doc/overview_modules.m2.orig 2020-07-11 05:04:29.000000000 -0600
-+++ M2/Macaulay2/packages/Macaulay2Doc/overview_modules.m2 2020-07-12 19:27:28.520963206 -0600
-@@ -347,7 +347,7 @@ document {
- },
- TEX "Macaulay2 represents each module (at least conceptually) as a subquotient module, that is, a submodule of
- a quotient of an ambient free module. A subquotient module is determined by two
-- matrices $f : R^m \\rightarrow{} R^n$ and $g : R^p \\rightarrow{} R^n$.
-+ matrices $f : R^m \\rightarrow R^n$ and $g : R^p \\rightarrow R^n$.
- The {\\em subquotient module} with generators $f$ and relations $g$ is by definition the module
- $M = ((image f) + (image g))/(image g)$.",
- PARA{},
diff --git a/Macaulay2-1.18-no_gftables.patch b/Macaulay2-1.18-no_gftables.patch
deleted file mode 100644
index 624b4bf..0000000
--- a/Macaulay2-1.18-no_gftables.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- M2/configure.ac.orig 2025-02-18 20:23:14.170473648 -0700
-+++ M2/configure.ac 2025-02-18 20:25:03.857046789 -0700
-@@ -615,7 +615,7 @@ AC_SUBST(BUILTLIBS)
- AC_SUBST(LIBLIST, " gc gdbm gmp mpfr mpfi normaliz readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll givaro fflas_ffpack linbox gtest tbb memtailor mathic mathicgb eigen ")
- # The list LIBLIST is the list of libraries that might be used and linked into M2.
-
--AC_SUBST(PROGLIST, "4ti2 gfan csdp nauty cddplus lrslib gftables topcom cohomcalg msolve")
-+AC_SUBST(PROGLIST, "4ti2 gfan csdp nauty cddplus lrslib topcom cohomcalg msolve")
- # The list PROGLIST is the list of programs and libraries for them that are distributed with M2.
- # Initially, we offer no option for not compiling some of them.
-
diff --git a/Macaulay2-1.24-codim-option.patch b/Macaulay2-1.24-codim-option.patch
deleted file mode 100644
index 2e4b980..0000000
--- a/Macaulay2-1.24-codim-option.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Fixes these errors:
-
- -- ___Ignore__Primes.errors
- -- ************************
- -- o4 : List
- --
- -- i5 : L2 = topMinimalPrimesIP(I, IgnorePrimes=>L1)
- --
- -- o5 = {monomialIdeal (x, y, w, v)}
- --
- -- o5 : List
- --
- -- i6 : minimalPrimes I
- -- stdio:6:13:(3): error: encountered an unknown key or option: Generic
- --
- -- _top__Minimal__Primes__I__P.errors
- -- **********************************
- -- i1 : R = QQ[x,y,z,w,v];
- --
- -- i2 : I = monomialIdeal(y^12, x*y^3, z*w^3, z*v*y^10, z*x^10, v*z^10, w*v^10, y*v*x*z*w);
- --
- -- o2 : MonomialIdeal of R
- --
- -- i3 : ScipPrintLevel = 0;
- --
- -- i4 : minimalPrimes(I)
- -- stdio:4:13:(3): error: encountered an unknown key or option: Generic
- --
- -- _minimal__Primes__I__P.errors
- -- *****************************
- -- i5 : minimalPrimesIP I
- --
- -- o5 = {monomialIdeal (y, z, w), monomialIdeal (y, z, v), monomialIdeal (x, y,
- -- ------------------------------------------------------------------------
- -- w, v)}
- --
- -- o5 : List
- --
- -- i6 : minimalPrimes I
- -- stdio:6:13:(3): error: encountered an unknown key or option: Generic
-
---- M2/Macaulay2/packages/MonomialIntegerPrograms.m2.orig 2024-11-01 04:33:00.000000000 -0600
-+++ M2/Macaulay2/packages/MonomialIntegerPrograms.m2 2025-02-19 19:09:27.203480082 -0700
-@@ -135,7 +135,7 @@ oldCodim = lookup(codim, MonomialIdeal);
- oldDegree = lookup(degree, MonomialIdeal);
- loadSCIPCodimAndDegree = method();
- installMethod(loadSCIPCodimAndDegree,() -> (
-- codim MonomialIdeal := {} >> opts -> m -> ((cacheValue symbol codim) codimensionIP) m;
-+ codim MonomialIdeal := options oldCodim >> opts -> m -> ((cacheValue symbol codim) codimensionIP) m;
- degree MonomialIdeal := m -> ((cacheValue symbol degree) degreeIP) m;
- ));
- loadBuiltinCodimAndDegree = method();
diff --git a/Macaulay2-1.17-default_make_targets.patch b/Macaulay2-1.25-default_make_targets.patch
similarity index 69%
rename from Macaulay2-1.17-default_make_targets.patch
rename to Macaulay2-1.25-default_make_targets.patch
index fb6da94..3f97dc6 100644
--- a/Macaulay2-1.17-default_make_targets.patch
+++ b/Macaulay2-1.25-default_make_targets.patch
@@ -1,9 +1,9 @@
---- M2/Macaulay2/Makefile.in.orig 2022-05-23 06:34:31.896886749 -0600
-+++ M2/Macaulay2/Makefile.in 2022-05-23 06:35:19.380825646 -0600
+--- M2/Macaulay2/Makefile.in.orig 2025-05-15 13:11:03.000000000 -0600
++++ M2/Macaulay2/Makefile.in 2025-05-27 07:06:53.335036043 -0600
@@ -3,8 +3,7 @@
VPATH = @srcdir@
include ../include/config.Makefile
- all: @pre_docdir@/COPYING-GPL-2 @pre_docdir@/COPYING-GPL-3 @pre_docdir@/README @pre_docdir@/LAYOUT
+ all: @pre_docdir@/COPYING-GPL-2 @pre_docdir@/COPYING-GPL-3 @pre_docdir@/LAYOUT
-SUBDIRS = util c d e system bin m2 man packages editors \
- $(if $(filter html, @DOCUMENTATION@), html-check-links) tests
+SUBDIRS = util c d e system bin m2 man packages editors tests
diff --git a/Macaulay2-1.25-optflags.patch b/Macaulay2-1.25-optflags.patch
new file mode 100644
index 0000000..1210bda
--- /dev/null
+++ b/Macaulay2-1.25-optflags.patch
@@ -0,0 +1,42 @@
+--- M2/configure.ac.orig 2025-05-15 13:11:03.000000000 -0600
++++ M2/configure.ac 2025-05-27 10:03:26.646029450 -0600
+@@ -314,12 +314,12 @@ fi
+ ]
+
+ if test "$OPTIMIZE" = yes
+-then CFLAGS="$CFLAGS -O2"
+- CXXFLAGS="$CXXFLAGS -O2"
+- FCFLAGS="$FCFLAGS -O2"
+-else CFLAGS="$CFLAGS -O0"
+- CXXFLAGS="$CXXFLAGS -O0"
+- FCFLAGS="$FCFLAGS -O0"
++then CFLAGS="-O2 $CFLAGS"
++ CXXFLAGS="-O2 $CXXFLAGS"
++ FCFLAGS="-O2 $FCFLAGS"
++else CFLAGS="-O0 $CFLAGS"
++ CXXFLAGS="-O0 $CXXFLAGS"
++ FCFLAGS="-O0 $FCFLAGS"
+ fi
+
+ AC_SUBST(GCCVERSION)
+--- M2/libraries/factory/Makefile.in.orig 2025-05-15 13:11:03.000000000 -0600
++++ M2/libraries/factory/Makefile.in 2025-05-27 10:06:05.923689632 -0600
+@@ -7,7 +7,7 @@
+ URL = https://macaulay2.com/Downloads/OtherSourceCode
+ VERSION = 4.4.1
+ #PATCHFILE = @abs_srcdir@/patch-$(VERSION)
+-PRECONFIGURE = autoreconf -vif
++PRECONFIGURE = sed -i 's/-g0 -O3 //' m4/flags.m4 && autoreconf -vif
+
+ BUILDTARGET = all ftmpl_inst.o
+ LIBRARIES = ftmpl_inst.o
+--- M2/libraries/mpfr/Makefile.in.orig 2025-05-15 13:11:03.000000000 -0600
++++ M2/libraries/mpfr/Makefile.in 2025-05-28 10:00:08.231129391 -0600
+@@ -36,6 +36,7 @@ CONFIGOPTIONS += --disable-shared
+ # endif
+
+ # PRECONFIGURE = autoreconf -i
++PRECONFIGURE = sed -i '/LDFLAGS/s/ -Wl,--disable-new-dtags//g' configure
+ include ../Makefile.library
+
+ BUILDOPTIONS += CPPFLAGS="$(CPPFLAGS)"
diff --git a/Macaulay2-1.25-strstream.patch b/Macaulay2-1.25-strstream.patch
new file mode 100644
index 0000000..a451e15
--- /dev/null
+++ b/Macaulay2-1.25-strstream.patch
@@ -0,0 +1,10 @@
+--- M2/Macaulay2/e/f4/f4.cpp.orig 2025-05-15 13:11:03.000000000 -0600
++++ M2/Macaulay2/e/f4/f4.cpp 2025-05-27 14:07:27.737228269 -0600
+@@ -26,7 +26,6 @@
+ #include // for stable_sort
+ #include // for swap, vector
+ #include // for atomic ints in gauss_reduce
+-#include
+ #include
+
+ class RingElement;
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 19fdc5f..5ea7a8a 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -2,15 +2,12 @@
# Macaulay2's memory management scheme requires close cooperation with libgc,
# and some of the supporting libraries must be compiled with special options to
# accomplish this. In particular, Macaulay2 needs:
-# - mathicgb configured --without-tbb
# - mpfr configured with --disable-thread-safe
# - flint linked with the GC-enabled mpfr
# - factory (from Singular) configured with --disable-omalloc --enable-streamio
# and linked with the flint that is linked with the GC-enabled mpfr
# Since the main Fedora packages are not built in this way, we are forced to
-# bundle these packages to avoid random GC-related crashes. The packages
-# memtailor and mathic, which sit underneath mathicgb, must also be bundled or
-# we get random GC-related crashes for an as yet undiagnosed reason.
+# bundle these packages to avoid random GC-related crashes.
#
# We have to use the static versions of the libfplll and givaro libraries.
# They have global objects whose constructors run before GC is initialized.
@@ -21,7 +18,7 @@
# We have to bundle the linbox package. It has global constructors that cause
# the same problem as libfplll.
-%global emacscommit f0bb736dff7bbf30d143ecc68700ee747263a35d
+%global emacscommit 6d0db52505c524d02c2270059767644aea360fd0
%global emacsurl https://github.com/Macaulay2/M2-emacs
%global emacsshort %(cut -b -7 <<< %{emacscommit})
%global m2url https://github.com/Macaulay2/M2
@@ -50,7 +47,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
-Version: 1.24.11
+Version: 1.25.05
Release: 1%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
@@ -64,7 +61,6 @@ Release: 1%{?dist}
# - Macaulay2/packages/QuillenSuslin.m2
# - Macaulay2/packages/Visualize.m2
# GPL-2.0-or-later:
-# - mathicgb (bundled)
# - Macaulay2/e/bibasis
# - Macaulay2/m2/computations.m2
# - Macaulay2/packages/AlgebraicSplines.m2
@@ -135,14 +131,11 @@ Release: 1%{?dist}
# LGPL-2.0-or-later:
# - flint (bundled)
# - linbox (bundled)
-# - mathic (bundled)
# LGPL-3.0-or-later:
# - mpfr (bundled)
# Apache-2.0:
# - Macaulay2/packages/OpenMath.m2
# - Macaulay2/packages/SCSCP.m2
-# BSD-3-Clause:
-# - memtailor (bundled)
# MIT:
# - Macaulay2/packages/Visualize/css
# - Macaulay2/packages/Visualize/js
@@ -160,7 +153,7 @@ Release: 1%{?dist}
# - Macaulay2/packages/NoetherNormalization.m2
# - Macaulay2/packages/RationalMaps.m2
# - Macaulay2/packages/SectionRing.m2
-License: (GPL-2.0-only OR GPL-3.0-only) AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND Apache-2.0 AND BSD-3-Clause AND MIT AND OFL-1.1-RFN AND LicenseRef-Fedora-Public-Domain
+License: (GPL-2.0-only OR GPL-3.0-only) AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND Apache-2.0 AND MIT AND OFL-1.1-RFN AND LicenseRef-Fedora-Public-Domain
URL: https://macaulay2.com/
VCS: git:%{m2url}.git
%if 0%{?snap:1}
@@ -186,87 +179,57 @@ Provides: bundled(normaliz) = %{normalizver}
%endif
# MPFR is bundled because it must be built with different threading options
-%global mpfrver 4.2.1
+%global mpfrver 4.2.2
Source101: https://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.gz
Provides: bundled(mpfr) = %{mpfrver}
# FLINT is bundled because it must be linked with the specially-built MPFR
-%global flintver 3.1.3
-Source102: https://flintlib.org/download/flint-%{flintver}.tar.gz
+%global flintver 3.2.2
+Source102: https://github.com/flintlib/flint/archive/v%{flintver}/flint-%{flintver}.tar.gz
Provides: bundled(flint) = %{flintver}
# FACTORY is bundled because it must be built with special options
-%global factoryver 4.4.0
+%global factoryver 4.4.1
Source103: https://www.singular.uni-kl.de/ftp/pub/Math/Factory/factory-%{factoryver}.tar.gz
Provides: bundled(factory) = %{factoryver}
-# MATHICGB is bundled because it must be built with different threading options
-%global mathicgbver 1.0
-%global mathicgbcommit 4cd2bd1357107cf0c83661fdda66c94987de4608
-Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz
-Provides: bundled(mathicgb) = %{mathicgbver}
-
-# GTEST is bundled because MATHICGB refuses to build otherwise
-%global gtestver 1.11.0
-Source105: https://github.com/google/googletest/archive/release-%{gtestver}/gtest-%{gtestver}.tar.gz
-
-# MEMTAILOR is bundled because it causes garbage collector crashes otherwise
-%global memtailorver 1.0
-%global memtailorcommit f785005b92a54463dbd5377ab80855a3d2a5f92d
-Source106: https://github.com/Macaulay2/memtailor/tarball/%{memtailorcommit}/memtailor-%{memtailorver}.tar.gz
-Provides: bundled(memtailor) = %{memtailorver}
-
-# MATHIC is bundled because it causes garbage collector crashes otherwise
-%global mathicver 1.0
-%global mathiccommit 07e8df4ded6b586c0ce9eec0f9096690379749cb
-Source107: https://github.com/Macaulay2/mathic/tarball/%{mathiccommit}/mathic-%{mathicver}.tar.gz
-Provides: bundled(mathic) = %{mathicver}
-
# LINBOX is bundled because it introduces static global objects
%global linboxver 1.7.0
-Source108: https://github.com/linbox-team/linbox/releases/download/v%{linboxver}/linbox-%{linboxver}.tar.gz
+Source104: https://github.com/linbox-team/linbox/releases/download/v%{linboxver}/linbox-%{linboxver}.tar.gz
Provides: bundled(linbox) = %{linboxver}
## PATCHES FOR BUNDLED code
# This is a conglomeration of all current patches for the Fedora linbox package
Source200: linbox-1.7.0.patch
-# Fix a header bug in flint
-Source201: flint-3.1.3.patch
## FAKE library tarballs that convince Macaulay2 to use the system versions
Source300: frobby_v0.9.5.tar.gz
Source301: cddlib-094m.tar.gz
-Source302: lapack-3.9.0.tgz
+# lapack
+Source302: v3.12.1.tar.gz
Source303: 4ti2-1.6.10.tar.gz
-Source304: libfplll-5.2.0.tar.gz
+Source304: fplll-5.5.0.tar.gz
Source305: gfan0.6.2.tar.gz
Source306: givaro-4.2.0.tar.gz
-Source307: lrslib-071a.tar.gz
-Source308: TOPCOM-0.17.8.tar.gz
+Source307: lrslib-073.tar.gz
+Source308: TOPCOM-1.1.2.tar.gz
Source309: cohomCalg-0.32.tar.gz
-Source310: glpk-4.59.tar.gz
+Source310: glpk-5.0.tar.gz
Source311: Csdp-6.2.0.tgz
Source312: mpsolve-3.2.1.tar.gz
# let Fedora optflags override the defaults
-Patch0: %{name}-1.15-optflags.patch
+Patch: %{name}-1.25-optflags.patch
# give the build a little more time and space than upstream permits
-Patch1: %{name}-1.16-ulimit.patch
-# drop 'tests' from default make target
-Patch2: %{name}-1.17-default_make_targets.patch
-# disable check for gftables
-Patch3: %{name}-1.18-no_gftables.patch
-# adapt to libfplll 5.2.1
-Patch4: %{name}-1.15-fplll.patch
+Patch: %{name}-1.16-ulimit.patch
+# drop checking of html links from default make target
+Patch: %{name}-1.25-default_make_targets.patch
# do not override the debug level
-Patch5: %{name}-1.17-configure.patch
-# Fix "error: in conversion to html, unknown TeX control sequence(s): \rightarrow"
-Patch6: %{name}-1.16-rightarrow.patch
+Patch: %{name}-1.17-configure.patch
# Fix LTO warnings about mismatched declarations and definitions
-Patch7: %{name}-1.18-lto.patch
-# Fix a build error due to mismatched options to codim
-# https://github.com/Macaulay2/M2/pull/3651
-Patch8: %{name}-1.24-codim-option.patch
+Patch: %{name}-1.18-lto.patch
+# Avoid use of the deprecated strstream C++ header
+Patch: %{name}-1.25-strstream.patch
BuildRequires: 4ti2
BuildRequires: appstream
@@ -275,6 +238,7 @@ BuildRequires: autoconf-archive
BuildRequires: bison
BuildRequires: boost-devel
BuildRequires: chrpath
+BuildRequires: cmake
BuildRequires: cohomCalg
BuildRequires: csdp-tools
BuildRequires: desktop-file-utils
@@ -303,6 +267,7 @@ BuildRequires: glpk-devel
BuildRequires: iml-devel
BuildRequires: info
BuildRequires: libappstream-glib
+BuildRequires: libatomic
BuildRequires: libfplll-static
BuildRequires: libfrobby-devel
BuildRequires: libgfan-devel
@@ -333,6 +298,9 @@ BuildRequires: pkgconfig(libnauty)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(m4ri)
BuildRequires: pkgconfig(m4rie)
+BuildRequires: pkgconfig(mathic)
+BuildRequires: pkgconfig(mathicgb)
+BuildRequires: pkgconfig(memtailor)
BuildRequires: pkgconfig(mpfi)
BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(qd)
@@ -341,6 +309,7 @@ BuildRequires: pkgconfig(tbb)
BuildRequires: pkgconfig(tinyxml2)
BuildRequires: polymake
BuildRequires: python3-devel
+BuildRequires: R
BuildRequires: scip
BuildRequires: texinfo
BuildRequires: time
@@ -382,12 +351,11 @@ Provides: Macaulay2-emacs = %{version}-%{release}
Provides: macaulay2 = %{version}-%{release}
-# Macaulay2 no longer builds successfully on 32-bit platforms
-# https://bugzilla.redhat.com/show_bug.cgi?id=1874318
-#
-# Macaulay2 started segfaulting during the build on ppc64le just prior to
-# F40 Beta Freeze. Disable it for now until we can diagnose the problem.
-ExcludeArch: %{ix86} ppc64le
+# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
+# Macaulay2 takes more than 14 hours to build on ppc64le, more than twice as
+# long as the x86_64 build, and it is doubtful that anyone will ever use it on
+# that platform anyway.
+ExcludeArch: %{ix86} %{power64}
# Do not advertise the bundled mpfr
%global __provides_exclude libmpfr.so*
@@ -417,25 +385,20 @@ install -p -m755 %{SOURCE20} ./etags
%if ! %system_normaliz
install -p -m644 %{SOURCE100} BUILD/tarfiles/
%endif
-install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE105} \
- BUILD/tarfiles/
-install -p -m644 %{SOURCE108} BUILD/tarfiles/v%{linboxver}.tar.gz
+install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} BUILD/tarfiles/
+install -p -m644 %{SOURCE104} BUILD/tarfiles/v%{linboxver}.tar.gz
sed -i 's/\(VERSION = \).*/\1%{mpfrver}/' libraries/mpfr/Makefile.in
sed -e 's/\(VERSION = \).*/\1%{linboxver}/' \
-e 's,--with-gmp.*,--without-archnative GIVARO_CFLAGS=-I$(LIBRARIESDIR) GIVARO_LIBS="%{_libdir}/libgivaro.a",' \
-i libraries/linbox/Makefile.in
-tar -C submodules/mathicgb -xf %{SOURCE104} --strip-components=1
-tar -C submodules/memtailor -xf %{SOURCE106} --strip-components=1
-tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1
## patches for bundled code
-sed -e 's,--with-blas,&=%{_includedir}/flexiblas --with-ntl,' \
- -e 's/3\.0\.0/%{flintver}/' \
+sed -e 's,--disable-shared,& --disable-arch --with-blas-include=%{_includedir}/flexiblas --with-ntl-include=%{_includedir}/NTL,' \
+ -e 's/3\.2\.1/%{flintver}/' \
-e 's/\(LICENSEFILES = \).*/\1COPYING COPYING.LESSER/' \
-e 's/-pedantic-errors/& -fno-strict-aliasing/' \
+ -e "s,PRECONFIGURE.*,& \&\& sed -i 's/openblas/flexiblas/' configure," \
-i libraries/flint/Makefile.in
-cp -p %{SOURCE201} libraries/flint/patch-%{flintver}
-sed -i 's/^# \(PATCHFILE\)/\1/' libraries/flint/Makefile.in
cp -p %{SOURCE200} libraries/linbox/patch-%{linboxver}
sed -i 's/^#\(PATCHFILE\)/\1/' libraries/linbox/Makefile.in
@@ -444,7 +407,6 @@ install -p -m644 %{SOURCE300} %{SOURCE301} %{SOURCE302} %{SOURCE303} \
%{SOURCE304} %{SOURCE305} %{SOURCE306} %{SOURCE307} %{SOURCE308} \
%{SOURCE309} %{SOURCE310} %{SOURCE311} %{SOURCE312} BUILD/tarfiles/
sed -i '/PRECONFIGURE/d' libraries/{4ti2,cddlib,givaro,normaliz,topcom}/Makefile.in
-sed -i 's/VERSION = 4\.0\.4/VERSION = 5.2.0/;/PATCHFILE/d' libraries/fplll/Makefile.in
sed -i '/PATCHFILE/d' libraries/{csdp,frobby,gfan,givaro,mpsolve,normaliz,topcom}/Makefile.in
sed -i '/INSTALLCMD/,/stdinc/d' libraries/frobby/Makefile.in
sed -i 's,install \(lib.*\.a\),ln -s %{_libdir}/\1,' libraries/lapack/Makefile.in
@@ -454,26 +416,8 @@ tar -C submodules/givaro --strip-components=1 -xzf %{SOURCE306}
## flint submodule
tar -C submodules/flint --strip-components=1 -xzf %{SOURCE102}
-cd submodules/flint
-patch -p1 < %{SOURCE201}
-cd -
-## gtest submodule
-tar -C submodules/googletest --strip-components=1 -xzf %{SOURCE105}
-
-%patch -P0 -p1 -b .optflags
-%patch -P1 -p1 -b .ulimit
-%patch -P2 -p1 -b .default_make_targets
-%patch -P3 -p1 -b .no_gftables
-# factory-gftables symlink
-mkdir -p BUILD/%{_target_platform}/usr-dist/common/share/Macaulay2/Core
-ln -s %{_datadir}/factory \
- BUILD/%{_target_platform}/usr-dist/common/share/Macaulay2/Core/factory
-%patch -P4 -p1 -b .fplll
-%patch -P5 -p1 -b .configure
-%patch -P6 -p1 -b .rightarrow
-%patch -P7 -p1 -b .lto
-%patch -P8 -p1 -b .codim
+%autopatch -p1
%conf
@@ -510,6 +454,15 @@ sed -i '/^fetch: download-enabled/d' libraries/Makefile.library.in
# Do not try to fetch sources with git
sed -i 's/^\(fetch:\) update-submodule/\1/' libraries/Makefile.library.in
+# All examples should produce expected results on x86_64. Other platforms
+# sometimes encounter problems; e.g., due to differences in rounding error of
+# floating point numbers.
+%ifnarch %{x86_64}
+sed -e '/^IgnoreExampleErrors/s/false/true/' \
+ -e '/^CheckDocumentation/s/true/false/' \
+ -i Macaulay2/packages/Makefile.in
+%endif
+
# (re)generate configure
autoreconf -fi .
@@ -532,12 +485,12 @@ LIBS="-lflexiblas" \
--prefix=%{_prefix} \
--enable-shared \
--disable-strip \
- --enable-fplll \
--enable-linbox \
--with-blas=flexiblas \
--with-lapack=flexiblas \
+ --with-system-libs \
--with-unbuilt-programs="cddplus nauty" \
- --enable-build-libraries="mpfr flint factory lapack fplll givaro linbox gtest"
+ --enable-build-libraries="mpfr flint factory lapack fplll givaro linbox"
# The list of libraries and submodules above should include only those that:
# 1. We bundle (mpfr, flint, factory, and linbox)
# 2. We sneakily substitute one library for another (lapack -> flexiblas)
@@ -609,9 +562,6 @@ cd -
# info dir
rm -fv %{buildroot}%{_infodir}/dir
-# Delete misinstalled memtailor, mathic, and mathicgb libraries
-rm -fr %{buildroot}/builddir
-
%check
# The test suite has grown to the point where it takes many hours to run.
@@ -640,6 +590,12 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Thu May 29 2025 Jerry James - 1.25.05-1
+- Version 1.25.05
+- Drop upstreamed patches: no_gftables, fplll, codim-option, rightarrow
+- Add patch to avoid the deprecated strstream C++ header
+- Unbundle memtailor, mathic, and mathicgb
+
* Thu Feb 20 2025 Jerry James - 1.24.11-1
- Version 1.24.11
- Drop upstreamed vector overrun patch
diff --git a/sources b/sources
index 9f65891..afd777f 100644
--- a/sources
+++ b/sources
@@ -1,24 +1,20 @@
SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d
-SHA512 (Macaulay2-1.24.11.tar.gz) = 22af8b04877f2e88ebfd548a6f4aad7e873d2d638e3c1fbe51dfc2ffae1ad71551dfc018542ea64750a3ffb18c6825ac047c088c00543f2f282a939aad953f9f
+SHA512 (Macaulay2-1.25.05.tar.gz) = 00bc29fb15f01b354f94ff8088f362375e34d3d5c83f8a08365bcbd69156ae3c1fcd3104f788c759a6ad5e06faa24f7f01f9d628b01497fb031ad6e2454765b8
SHA512 (4ti2-1.6.10.tar.gz) = 0bdf73a8885fe03258a903f0bfb45b8271dcf755d8033b57b8d5620daba7fc25b51031ffb2c8609e40bc19508e07ba028de035d8c193caeffe6400457fc0e3e1
SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f
SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818
SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82
-SHA512 (factory-4.4.0.tar.gz) = 790f2de716a953933cd678d9cf972e0f141c4bae958c36ffd28a8dc9d2f61c49f40f475ffe88931b159c38f19b144b99434138c8dd9ef701aefcce76c96530e5
-SHA512 (flint-3.1.3.tar.gz) = 01a26a39424b2b9f6c5a6e91f2257332dbabf821a96bd0485eb5a6665d82a8b3ebb759da039104f7da3011bd91f5694a3554f34f08368fb635ceb8cadd9a0997
+SHA512 (factory-4.4.1.tar.gz) = a6ebed7cc0dea06a40c596f8845194633b6175670119afc11cb93269940ff6866a270549b9796929c1cc216645d01386ddea455a07d9ea033ce937baa4a05dfe
+SHA512 (flint-3.2.2.tar.gz) = 6856e617efb0369a3b90c8d3a7eb734cfad263c1450f1c2d92236d61294dd8e9c3da3769d10e28aa42d4340c979ad01ee665deef68c0666c7ef48d831e308c8b
+SHA512 (fplll-5.5.0.tar.gz) = ffeeeb55c2e4dccb9c7fd2753e49fa3514ae0c88a119131fa6281b213566813c481f95befe0acde344c8c032d8341ef1ec074cd66b130de4f8b8f6eb20f40613
SHA512 (frobby_v0.9.5.tar.gz) = 321da2c83ddd1e1364a2e97cdf69c9b7bc6d2a59583aeab93526030151222049bb7b7e32287e7575cab4d0d22593a92a1f926092b1ed8f9da6b4d68118371bdb
SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d
SHA512 (givaro-4.2.0.tar.gz) = 8258507f4ac2643ab39d1802ec79cf24051e7a70e167fcee1362c1a8ac12f924e831ce24450055cea96a8824f34fa83ad344d240a55571f7d522787db16afdfc
-SHA512 (glpk-4.59.tar.gz) = ca05bd085880143acf4a440cf7efd2392d4dde89bed53a0e5726526cb210eee004bfcd434aeb8ca8abb1dc89ff93e72054489911e5e2c843e0ed631d50c55f56
-SHA512 (gtest-1.11.0.tar.gz) = 6fcc7827e4c4d95e3ae643dd65e6c4fc0e3d04e1778b84f6e06e390410fe3d18026c131d828d949d2f20dde6327d30ecee24dcd3ef919e21c91e010d149f3a28
-SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf6adec6622f557c332f09e7eb46f71e5e3f2e852f25a640bde2bf9f4be7205cecf01cb07b6bc8
-SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29
+SHA512 (glpk-5.0.tar.gz) = 36bcba534ed69b0f5328f4626018359efe07f802322c0821db75c7d1935f760af8cb907189d7d7c5b2f134a8b6214ae747ca004acc4c5ceccf157f6fc311523d
SHA512 (linbox-1.7.0.tar.gz) = cb4e848186d1f6357f498d1e3bda6484b4c789c02440f9614a227a2ae206a31fb20b32be40bda74da3f2f8f981bbd58d80fc97c95499b5151bb06eafb867ef9e
-SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001
-SHA512 (M2-emacs-f0bb736.tar.gz) = eefef21cb613e6ad6e8e73b0cec08aab95e948323472e585d69421c2ec23d05e03730dc231ed262cc86b705081fad0329b2e298455dc73f28425f30cb3f9c670
-SHA512 (mathic-1.0.tar.gz) = 9eb2fe94d266ffda4624c89021e08526e073286635dd5439042e744f07ba053534bc9476ab81d37f7622d62d8ce40c3eedbc5f7013cd529584f46d3685f15d3a
-SHA512 (mathicgb-1.0.tar.gz) = aea24832681c40c92cad012211ed647ed4e8287964481f36a62d6f0fb0d053fb07c17c49385b4782b380576a92aa387f67fa2843437a0e7b315c74288e65d5a8
-SHA512 (memtailor-1.0.tar.gz) = 147ef22f322a82d5336c004ba9cce055ee94eb7ad93d4271524cbee4713f94b258342f4e31569abac2e29472fdd25df2fad94000496ce46e469b7e074af3c86e
-SHA512 (mpfr-4.2.1.tar.gz) = 858b7c2c3018e4099a7cd6d9d38eca7c46af90fa2c307d9417518027f07b6c43c51152c60b56359a53e7101a5d0629753f3eb5c54e17574742c374830832fcfe
+SHA512 (lrslib-073.tar.gz) = f5d283c3c9bcc8ea83c1f6a0ce184202ccd0818987caaa7cf32fe8287cf8277802587f5001dc44878658c962c48fe6ae1250e9a522bb2bf0fa1d0ca8b84e1b9a
+SHA512 (M2-emacs-6d0db52.tar.gz) = e0bc13093ad931c19673c1ea6adb279d6b7934cc38caf3d5359c6241e349b2d22695db6c35a9c7e12c943863f8923da25c9d4b4f35e0b7bffc52a9bdd376e402
+SHA512 (mpfr-4.2.2.tar.gz) = 373c5ce2c9636e45685dfa94f45bc4f8f6c2c0512d634b9e065ec33cb29da727b3ea13cf23aff307c1da765a40064f0fd4a347a3849ebd97252984fc85a0a400
SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f
-SHA512 (TOPCOM-0.17.8.tar.gz) = 8611e8bd36eda00646fb40794435f23e6af81ecbee93c40e8fe5f73905e673e6244cb0f8cc1fe5c29050e40c7d53a44c615c60cbbecc8452b3c85f1d8a816d7a
+SHA512 (TOPCOM-1.1.2.tar.gz) = 8f0d6dcfe5d83b260f671d4fd231a8e5a902668d2bf02d0977fbfa6a1d49e0ba3f1f51f2305267a4cbc0591c183c07642ef3d9613aae8f27f1832fe96ca90abb
+SHA512 (v3.12.1.tar.gz) = eedfbae0447a965da66fea6dcd1a561717faede85e0f2e19a794d3947f6b8b4649b3415786ceba65914755766fafc0c2ff4ba80dfd309230145f879e6b900284
From e03e7aac2345146e13419aacd9cdccaa412218e2 Mon Sep 17 00:00:00 2001
From: Python Maint
Date: Tue, 3 Jun 2025 15:32:49 +0200
Subject: [PATCH 33/46] Rebuilt for Python 3.14
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 5ea7a8a..897dd0a 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -48,7 +48,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.25.05
-Release: 1%{?dist}
+Release: 2%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -590,6 +590,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Tue Jun 03 2025 Python Maint - 1.25.05-2
+- Rebuilt for Python 3.14
+
* Thu May 29 2025 Jerry James - 1.25.05-1
- Version 1.25.05
- Drop upstreamed patches: no_gftables, fplll, codim-option, rightarrow
From 59b47bf61faa00155a199a7a90bba100d5b890a3 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Wed, 11 Jun 2025 20:54:55 -0600
Subject: [PATCH 34/46] Rebuild for normaliz 3.10.5
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 897dd0a..1e61592 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -48,7 +48,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.25.05
-Release: 2%{?dist}
+Release: 3%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -590,6 +590,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Wed Jun 11 2025 Jerry James - 1.25.05-3
+- Rebuild for normaliz 3.10.5
+
* Tue Jun 03 2025 Python Maint - 1.25.05-2
- Rebuilt for Python 3.14
From 2347c2ca2e8283b373d30b61354f40243878d0c6 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Fri, 13 Jun 2025 08:01:32 -0600
Subject: [PATCH 35/46] Unbundle factory-gftables (bz 2372455)
---
Macaulay2.spec | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 1e61592..f445cd8 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -48,7 +48,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.25.05
-Release: 3%{?dist}
+Release: 4%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -529,6 +529,10 @@ for fil in checkregularity chiro2circuits chiro2cocircuits cohomcalg csdp lrs \
ln -s %{_bindir}/$fil $mbindir/$fil
done
+# unbundle factory-gftables
+rm -fr %{buildroot}%{_datadir}/Macaulay2/Core/factory
+ln -s ../../factory %{buildroot}%{_datadir}/Macaulay2/Core
+
# app img
for sz in 64 72 96 128 192 256 512; do
sz2=${sz}x${sz}
@@ -590,6 +594,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Fri Jun 13 2025 Jerry James - 1.25.05-4
+- Unbundle factory-gftables (bz 2372455)
+
* Wed Jun 11 2025 Jerry James - 1.25.05-3
- Rebuild for normaliz 3.10.5
From 03495424bf3935678fd5fc0c582c41b1184633ea Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Wed, 23 Jul 2025 15:51:02 +0000
Subject: [PATCH 36/46] Rebuilt for
https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index f445cd8..de5a9b2 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -48,7 +48,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.25.05
-Release: 4%{?dist}
+Release: 5%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -594,6 +594,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Wed Jul 23 2025 Fedora Release Engineering - 1.25.05-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
+
* Fri Jun 13 2025 Jerry James - 1.25.05-4
- Unbundle factory-gftables (bz 2372455)
From e36d37b56d1f0424c7337bb3e1512c479b40cc9d Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Fri, 8 Aug 2025 13:54:08 -0600
Subject: [PATCH 37/46] Version 1.25.06
---
Macaulay2.spec | 11 +++++++----
sources | 2 +-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index de5a9b2..3e4929e 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -47,8 +47,8 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
-Version: 1.25.05
-Release: 5%{?dist}
+Version: 1.25.06
+Release: 1%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -594,13 +594,16 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Fri Aug 08 2025 Jerry James - 1.25.06-1
+- Version 1.25.06
+
* Wed Jul 23 2025 Fedora Release Engineering - 1.25.05-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
-* Fri Jun 13 2025 Jerry James - 1.25.05-4
+* Fri Jun 13 2025 Jerry James - 1.25.05-4
- Unbundle factory-gftables (bz 2372455)
-* Wed Jun 11 2025 Jerry James - 1.25.05-3
+* Wed Jun 11 2025 Jerry James - 1.25.05-3
- Rebuild for normaliz 3.10.5
* Tue Jun 03 2025 Python Maint - 1.25.05-2
diff --git a/sources b/sources
index afd777f..d32f616 100644
--- a/sources
+++ b/sources
@@ -1,5 +1,5 @@
SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d
-SHA512 (Macaulay2-1.25.05.tar.gz) = 00bc29fb15f01b354f94ff8088f362375e34d3d5c83f8a08365bcbd69156ae3c1fcd3104f788c759a6ad5e06faa24f7f01f9d628b01497fb031ad6e2454765b8
+SHA512 (Macaulay2-1.25.06.tar.gz) = 4493fd9142ea78d3a30f289f7bd03666f646858798b93feb7c8a96669a6ef1a47b30914ba9be34af5b36d1623aba6c8394d795b6688b36ac1b7fbccb96e34fea
SHA512 (4ti2-1.6.10.tar.gz) = 0bdf73a8885fe03258a903f0bfb45b8271dcf755d8033b57b8d5620daba7fc25b51031ffb2c8609e40bc19508e07ba028de035d8c193caeffe6400457fc0e3e1
SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f
SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818
From 80d72d3d57ce0913e9015d4ef13e694ad0d9c6ba Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Wed, 20 Aug 2025 06:34:04 -0600
Subject: [PATCH 38/46] Rebuild for tbb 2022.2.0
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 3e4929e..ef90c4c 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -48,7 +48,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.25.06
-Release: 1%{?dist}
+Release: 2%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -594,6 +594,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Wed Aug 20 2025 Jerry James - 1.25.06-2
+- Rebuild for tbb 2022.2.0
+
* Fri Aug 08 2025 Jerry James - 1.25.06-1
- Version 1.25.06
From b201a8d33f382501e21daabc46203445b3c72275 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley"
Date: Sat, 23 Aug 2025 06:54:31 -0400
Subject: [PATCH 39/46] Rebuilt for tinyxml2 11.0.0
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index ef90c4c..a1fdfe3 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -48,7 +48,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.25.06
-Release: 2%{?dist}
+Release: 3%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -594,6 +594,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Sat Aug 23 2025 Benjamin A. Beasley - 1.25.06-3
+- Rebuilt for tinyxml2 11.0.0
+
* Wed Aug 20 2025 Jerry James - 1.25.06-2
- Rebuild for tbb 2022.2.0
From c0e21ea5f6f00aedd70f1ac81e87f5ed34c8bed5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Terje=20R=C3=B8sten?=
Date: Wed, 8 Oct 2025 13:37:01 +0200
Subject: [PATCH 40/46] Move to C++17 for gtest 1.17.0
---
Macaulay2-1.25-c++17.patch | 11 +++++++++++
Macaulay2.spec | 7 ++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
create mode 100644 Macaulay2-1.25-c++17.patch
diff --git a/Macaulay2-1.25-c++17.patch b/Macaulay2-1.25-c++17.patch
new file mode 100644
index 0000000..7c1cc08
--- /dev/null
+++ b/Macaulay2-1.25-c++17.patch
@@ -0,0 +1,11 @@
+--- M2/configure.ac
++++ M2/configure.ac
+@@ -262,7 +262,7 @@ AC_SUBST(M2_CFLAGS)
+ AC_SUBST(M2_CXXFLAGS)
+
+ dnl Fix standards, apply everywhere
+-CXXFLAGS="-std=gnu++14 $CXXFLAGS"
++CXXFLAGS="-std=gnu++17 $CXXFLAGS"
+ CFLAGS="-std=gnu11 $CFLAGS"
+
+ AC_PROG_CC() # set CFLAGS before this
diff --git a/Macaulay2.spec b/Macaulay2.spec
index a1fdfe3..1e03b9e 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -48,7 +48,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.25.06
-Release: 3%{?dist}
+Release: 4%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -230,6 +230,8 @@ Patch: %{name}-1.17-configure.patch
Patch: %{name}-1.18-lto.patch
# Avoid use of the deprecated strstream C++ header
Patch: %{name}-1.25-strstream.patch
+# Move to C++17 for gtest 1.17.0
+Patch: %{name}-1.25-c++17.patch
BuildRequires: 4ti2
BuildRequires: appstream
@@ -594,6 +596,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Wed Oct 08 2025 Terje Rosten - 1.25.06-4
+- Move to C++17 for gtest 1.17.0
+
* Sat Aug 23 2025 Benjamin A. Beasley - 1.25.06-3
- Rebuilt for tinyxml2 11.0.0
From f8f7eed549a6df58f818a88ada511319ccba76af Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Mon, 13 Oct 2025 16:47:42 -0600
Subject: [PATCH 41/46] Drop unused atomic_ops dependency
---
Macaulay2.spec | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 1e03b9e..4b173d7 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -286,7 +286,6 @@ BuildRequires: normaliz
BuildRequires: ntl-devel
BuildRequires: ocl-icd-devel
BuildRequires: pari-devel
-BuildRequires: pkgconfig(atomic_ops)
BuildRequires: pkgconfig(bdw-gc) >= 8.2.6
BuildRequires: pkgconfig(cddlib)
BuildRequires: pkgconfig(expat)
@@ -596,6 +595,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Mon Oct 13 2025 Jerry James - 1.25.06-4
+- Drop unused atomic_ops dependency
+
* Wed Oct 08 2025 Terje Rosten - 1.25.06-4
- Move to C++17 for gtest 1.17.0
From 39960738e324259232d37bf476f84ad7c8b09128 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Fri, 14 Nov 2025 12:09:39 -0700
Subject: [PATCH 42/46] Convert to %autorelease and %autochangelog
[skip changelog]
---
Macaulay2.spec | 686 +------------------------------------------------
changelog | 682 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 684 insertions(+), 684 deletions(-)
create mode 100644 changelog
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 4b173d7..e81b2f2 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -48,7 +48,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.25.06
-Release: 4%{?dist}
+Release: %autorelease
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -595,686 +595,4 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
-* Mon Oct 13 2025 Jerry James - 1.25.06-4
-- Drop unused atomic_ops dependency
-
-* Wed Oct 08 2025 Terje Rosten - 1.25.06-4
-- Move to C++17 for gtest 1.17.0
-
-* Sat Aug 23 2025 Benjamin A. Beasley - 1.25.06-3
-- Rebuilt for tinyxml2 11.0.0
-
-* Wed Aug 20 2025 Jerry James - 1.25.06-2
-- Rebuild for tbb 2022.2.0
-
-* Fri Aug 08 2025 Jerry James - 1.25.06-1
-- Version 1.25.06
-
-* Wed Jul 23 2025 Fedora Release Engineering - 1.25.05-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
-
-* Fri Jun 13 2025 Jerry James - 1.25.05-4
-- Unbundle factory-gftables (bz 2372455)
-
-* Wed Jun 11 2025 Jerry James - 1.25.05-3
-- Rebuild for normaliz 3.10.5
-
-* Tue Jun 03 2025 Python Maint - 1.25.05-2
-- Rebuilt for Python 3.14
-
-* Thu May 29 2025 Jerry James - 1.25.05-1
-- Version 1.25.05
-- Drop upstreamed patches: no_gftables, fplll, codim-option, rightarrow
-- Add patch to avoid the deprecated strstream C++ header
-- Unbundle memtailor, mathic, and mathicgb
-
-* Thu Feb 20 2025 Jerry James - 1.24.11-1
-- Version 1.24.11
-- Drop upstreamed vector overrun patch
-- Add patch to fix mismatched options to codim
-- BR e-antic-devel
-- BR and Recommend msolve
-- Move configuration steps to %%conf
-- Remove pessimization on s390x
-
-* Thu Jan 16 2025 Fedora Release Engineering - 1.24.05-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
-
-* Fri Nov 22 2024 Benjamin A. Beasley - 1.24.05-5
-- Rebuild for libfplll 5.5.0
-
-* Mon Sep 23 2024 Jerry James - 1.24.05-4
-- Rebuild for nauty 2.8.9
-
-* Sat Aug 24 2024 Jerry James - 1.24.05-3
-- Rebuild for Singular 4.4.0p4
-
-* Wed Jul 17 2024 Fedora Release Engineering - 1.24.05-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
-
-* Wed Jun 19 2024 Jerry James - 1.24.05-1
-- Version 1.24.05
-
-* Fri Feb 23 2024 Jerry James - 1.22-6
-- Build the polymake and scip examples
-- Recommend scip
-- Disable ppc64le build until segfaults can be diagnosed
-
-* Mon Jan 22 2024 Fedora Release Engineering - 1.22-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
-
-* Fri Jan 19 2024 Fedora Release Engineering - 1.22-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
-
-* Wed Jan 17 2024 Jonathan Wakely - 1.22-3
-- Rebuilt for Boost 1.83
-
-* Fri Nov 10 2023 Benjamin A. Beasley - 1.22-2
-- Correct appstreamcli invocation (--nonet no longer works)
-- Ask appstreamcli to explain validation findings
-- Also validate AppStream XML with appstream-util, required by guidelines
-
-* Thu Oct 26 2023 Jerry James - 1.22-1
-- Version 1.22
-- Drop upstreamed Macaulay2-configure-c99.patch
-- Build against mariadb-connector-c instead of the server package
-
-* Wed Jul 19 2023 Fedora Release Engineering - 1.21-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
-
-* Sat Apr 15 2023 Florian Weimer - 1.21-5
-- Port configure script to C99
-
-* Mon Feb 20 2023 Jonathan Wakely - 1.21-4
-- Rebuilt for Boost 1.81
-
-* Wed Jan 18 2023 Fedora Release Engineering - 1.21-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
-
-* Thu Jan 12 2023 Jerry James - 1.21-2
-- Rebuild for libfplll 5.4.4
-
-* Thu Dec 22 2022 Jerry James - 1.21-1
-- Version 1.21
-- Drop upstreamed patch for crash when building documentation
-- Use rdns names for the desktop and metainfo files
-
-* Tue Dec 20 2022 Jerry James - 1.20-2
-- Convert License tag to SPDX
-
-* Sun Sep 25 2022 Rich Mattes - 1.20-2
-- Rebuild for tinyxml2-9.0.0
-
-* Thu Aug 4 2022 Jerry James - 1.20-1
-- Version 1.20
-
-* Wed Jul 20 2022 Fedora Release Engineering - 1.19.1-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
-
-* Wed May 04 2022 Thomas Rodgers - 1.19.1-2
-- Rebuilt for Boost 1.78
-
-* Mon Feb 21 2022 Jerry James - 1.19.1-1
-- Version 1.19.1
-- Disable LTO to work around segfaults
-
-* Wed Jan 19 2022 Fedora Release Engineering - 1.19-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
-
-* Wed Nov 24 2021 Jerry James - 1.19-1
-- Version 1.19
-
-* Fri Aug 06 2021 Jonathan Wakely - 1.18-4
-- Rebuilt for Boost 1.76
-
-* Wed Jul 21 2021 Fedora Release Engineering - 1.18-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
-
-* Tue Jun 29 2021 Jerry James - 1.18-2
-- Rebuild for ntl 11.5.1
-
-* Thu Jun 17 2021 Jerry James - 1.18-1
-- Version 1.18
-
-* Thu Feb 18 2021 Jerry James - 1.17-2
-- Reduce optimization level on s390x to work around FTBFS
-- Install metainfo
-- Add -mathic patch to silence GCC warnings
-- Add -lto patch to silence LTO warnings
-
-* Mon Jan 25 2021 Fedora Release Engineering - 1.17-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
-
-* Sat Jan 16 2021 Jerry James - 1.17-1
-- Version 1.17
-- Drop upstreamed patches: -nauty-paths, -format
-- Merge -gcc11 patch into mathicgb-1.0.patch
-
-* Thu Oct 15 2020 Jeff Law - 1.16-2
-- Add missing #includes for gcc-11
-
-* Mon Aug 31 2020 Jerry James - 1.16-1
-- Version 1.16
-- Drop upstreamed patch: -xdg_open
-- Add -ulimit patch for the slower builders
-- Add -format and -rightarrow patches
-- Bundle packages due to garbage collector crashes: linbox, memtailor, mathic
-- Drop the XEmacs subpackage; XEmacs support no longer works
-
-* Sun Aug 16 2020 Iñaki Úcar - 1.15.1.0-5
-- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager
-
-* Sat Aug 01 2020 Fedora Release Engineering - 1.15.1.0-4
-- Second attempt - Rebuilt for
- https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
-* Mon Jul 27 2020 Fedora Release Engineering - 1.15.1.0-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
-* Wed Jul 1 2020 Jeff Law - 1.15.1.0-2
-- Disable LTO
-
-* Wed Jun 3 2020 Jerry James - 1.15.1.0-1
-- Version 1.15.1.0
-- Drop upstreamed patches: -no_Werror, -mpir, -pthreads, -fflas-ffpack,
- -fno-common, -gtest, -pthreads
-
-* Tue Feb 11 2020 Jerry James - 1.14.0.1-4
-- Add -fno-common patch to fix FTBFS with GCC 10
-
-* Tue Jan 28 2020 Fedora Release Engineering - 1.14.0.1-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
-
-* Fri Jan 10 2020 Jerry James - 1.14.0.1-3
-- Rebuild for ntl 11.4.3
-
-* Fri Nov 1 2019 Jerry James - 1.14.0.1-2
-- Rebuild for givaro 4.1.1, fflas-ffpack 2.4.3, and linbox 1.6.3
-
-* Thu Sep 26 2019 Jerry James - 1.14.0.1-1
-- Macaulay2-1.14.0.1
-- Drop upstreamed -format and -exception patches
-- Also bundle libmpc since it is linked with mpfr
-- Drop fix for F26 symlink-file snafu
-- Build with python 3 instead of python 2
-
-* Wed Jul 24 2019 Fedora Release Engineering - 1.12.0.1-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
-
-* Sun Feb 17 2019 Igor Gnatenko - 1.12.0.1-5
-- Rebuild for readline 8.0
-
-* Thu Jan 31 2019 Fedora Release Engineering - 1.12.0.1-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
-
-* Tue Nov 20 2018 Jerry James - 1.12.0.1-3
-- Rebuild for lrslib 070
-
-* Wed Oct 10 2018 Jerry James - 1.12.0.1-2
-- Rebuild for ntl 11.3.0
-- Build with openblas instead of atlas (bz 1618938)
-
-* Fri Aug 10 2018 Jerry James - 1.12.0.1-1
-- Macaulay2-1.12.0.1
-- Replace tiny icon of unknown origin with various sizes of upstream's icon
-- Remove deprecated entries from the desktop file
-- Add upstream mpfr 3.1.6 patches
-
-* Thu Jul 12 2018 Fedora Release Engineering - 1.11-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
-
-* Tue Jul 3 2018 Jerry James - 1.11-2
-- Rebuild for ntl 11.1.0
-- Remove scriptlets that call install-info
-- Do not byte compile python files in the examples
-
-* Sat Jun 2 2018 Jerry James - 1.11-1
-- Macaulay2-1.11
-- Drop upstreamed patches: -verbose_build, -givaro, -pari, -endian
-- New patches: -fflas-ffpack, -format, -exception, -fplll, -configure
-- Update bundled software
-- Refresh INFO_FILES list
-
-* Fri Feb 09 2018 Igor Gnatenko