From 94c421004b252bbd3f28b120630c0199004bb889 Mon Sep 17 00:00:00 2001
From: Jeff Law
Date: Thu, 15 Oct 2020 07:05:47 -0600
Subject: [PATCH 01/57] Add missing #includes for gcc-11
---
Macaulay2-gcc11.patch | 24 ++++++++++++++++++++++++
Macaulay2.spec | 8 +++++++-
2 files changed, 31 insertions(+), 1 deletion(-)
create mode 100644 Macaulay2-gcc11.patch
diff --git a/Macaulay2-gcc11.patch b/Macaulay2-gcc11.patch
new file mode 100644
index 0000000..4aecfb6
--- /dev/null
+++ b/Macaulay2-gcc11.patch
@@ -0,0 +1,24 @@
+diff --git a/M2/submodules/mathicgb/src/mathicgb/RawVector.hpp b/M2/submodules/mathicgb/src/mathicgb/RawVector.hpp
+index 10ea2d5..fbdbd27 100644
+--- M2/submodules/mathicgb/src/mathicgb/RawVector.hpp
++++ M2/submodules/mathicgb/src/mathicgb/RawVector.hpp
+@@ -3,6 +3,7 @@
+ #ifndef MATHICGB_RAW_VECTOR_GUARD
+ #define MATHICGB_RAW_VECTOR_GUARD
+
++#include
+ #include
+ #include
+ #include
+diff --git a/M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp b/M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp
+index 7d41d47..dd15705 100644
+--- M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp
++++ M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp
+@@ -1,6 +1,7 @@
+ // MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
+ // NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
+ #include "stdinc.h"
++#include
+ #include "SparseMatrix.hpp"
+
+ #include "Poly.hpp"
diff --git a/Macaulay2.spec b/Macaulay2.spec
index b28494a..9da014a 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -59,7 +59,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.16
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2 or GPLv3
URL: http://macaulay2.com/
@@ -165,6 +165,8 @@ Patch6: %{name}-1.12-configure.patch
Patch7: %{name}-1.16-format.patch
# Fix "error: in conversion to html, unknown TeX control sequence(s): \rightarrow"
Patch8: %{name}-1.16-rightarrow.patch
+# Fix minor errors found when building with gcc-11
+Patch9: %{name}-gcc11.patch
BuildRequires: 4ti2
BuildRequires: autoconf
@@ -355,6 +357,7 @@ ln -s %{_datadir}/factory \
%patch6 -p1 -b .configure
%patch7 -p1 -b .format
%patch8 -p1 -b .rightarrow
+%patch9 -p1 -b .gcc11
# repeatable builds: inject a node name
sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac
@@ -515,6 +518,9 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||:
%changelog
+* 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
From 77c821002fcecce8693fb03503fb0b14b4058e93 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Wed, 11 Nov 2020 11:21:16 -0700
Subject: [PATCH 02/57] Explicitly BR make. Drop unused pari dependency.
---
Macaulay2.spec | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 9da014a..40c64c5 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -224,13 +224,13 @@ BuildRequires: lrslib-devel
BuildRequires: lrslib-utils
BuildRequires: m4ri-devel
BuildRequires: m4rie-devel
+BuildRequires: make
BuildRequires: mariadb-devel
BuildRequires: mpsolve-devel
BuildRequires: nauty
BuildRequires: normaliz
BuildRequires: ntl-devel
BuildRequires: %{blaslib}-devel
-BuildRequires: pari-devel
BuildRequires: pkgconfig(bdw-gc) >= 7.6.2
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(ncurses)
@@ -396,18 +396,9 @@ autoreconf -fi .
## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex
mkdir -p BUILD/%{_target_platform}
pushd BUILD/%{_target_platform}
-# On ppc64le with the compiler in strict mode, the pari declaration of
-# vec_insert() is deemed to ambiguate the declaration of the AltiVec function
-# __builtin_vec_insert(). We add -fpermissive to downgrade the error to a
-# warning, but we should find a better fix.
-%ifarch ppc64le
-cxxflags="%{optflags} -fsigned-char -fpermissive"
-%else
-cxxflags="%{optflags} -fsigned-char"
-%endif
CPPFLAGS="-I%{_includedir}/cddlib -I%{_includedir}/frobby" \
CFLAGS="%{optflags} -fsigned-char" \
-CXXFLAGS="$cxxflags" \
+CXXFLAGS="%{optflags} -fsigned-char" \
LIBS="-l%{blaslib}" \
../../configure \
--build=%{_build} \
@@ -452,7 +443,7 @@ find BUILD/%{_target_platform}/ -name *.errors -execdir echo {} \; -execdir cat
%install
-make install -C BUILD/%{_target_platform} DESTDIR=%{buildroot} IgnoreExampleErrors=true
+%make_install -C BUILD/%{_target_platform} IgnoreExampleErrors=true
# link, don't copy, the binaries
mbindir=%{buildroot}%{_libexecdir}/Macaulay2/bin
From 808cc8ca97e96a677dafa5691129b373e4e7c45d Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Sat, 16 Jan 2021 09:28:39 -0700
Subject: [PATCH 03/57] Version 1.17
- Drop upstreamed patches: -nauty-paths, -format
- Merge -gcc11 patch into mathicgb-1.0.patch
---
Macaulay2-1.11-nauty-paths.patch | 46 ------------
Macaulay2-1.16-default_make_targets.patch | 11 ---
Macaulay2-1.16-format.patch | 11 ---
...re.patch => Macaulay2-1.17-configure.patch | 8 +-
Macaulay2-1.17-default_make_targets.patch | 11 +++
Macaulay2-gcc11.patch | 24 ------
Macaulay2.spec | 73 ++++++++----------
factory-4.1.1.patch | 74 -------------------
factory-4.1.3.patch | 72 ++++++++++++++++++
mathicgb-1.0.patch | 24 +++++-
sources | 14 ++--
11 files changed, 147 insertions(+), 221 deletions(-)
delete mode 100644 Macaulay2-1.11-nauty-paths.patch
delete mode 100644 Macaulay2-1.16-default_make_targets.patch
delete mode 100644 Macaulay2-1.16-format.patch
rename Macaulay2-1.12-configure.patch => Macaulay2-1.17-configure.patch (55%)
create mode 100644 Macaulay2-1.17-default_make_targets.patch
delete mode 100644 Macaulay2-gcc11.patch
delete mode 100644 factory-4.1.1.patch
create mode 100644 factory-4.1.3.patch
diff --git a/Macaulay2-1.11-nauty-paths.patch b/Macaulay2-1.11-nauty-paths.patch
deleted file mode 100644
index c270fa5..0000000
--- a/Macaulay2-1.11-nauty-paths.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- M2/Macaulay2/packages/NautyGraphs.m2.orig 2016-08-15 12:38:31.000000000 -0600
-+++ M2/Macaulay2/packages/NautyGraphs.m2 2017-02-27 21:49:22.976044001 -0700
-@@ -30,9 +30,9 @@ newPackage select((
- -------------------
-
- -- Check the ~/.Macaulay2/init-NautyGraphs.m2 file for the absolute path.
---- If it's not there, then use the M2-Programs directory.
-+-- If it's not there, then use the system binary directory.
- nauty'path = (options NautyGraphs).Configuration#"path";
--if nauty'path == "" then nauty'path = prefixDirectory | currentLayout#"programs";
-+if nauty'path == "" then nauty'path = "/usr/bin/";
-
- -------------------
- -- Exports
-@@ -420,7 +420,7 @@ callNauty (String, List) := List => opts
- scan(graphToString \ dataList, d -> o << d << endl);
- close o;
- -- try to harvest the lines
-- r := lines try get openIn ("!" | nauty'path | cmdStr | " <" | infn | " 2>" | erfn)
-+ r := lines try get openIn ("!" | nauty'path | "nauty-" | cmdStr | " <" | infn | " 2>" | erfn)
- else (
- -- nauty errored, harvest the error
- e := last separate(":", first lines get openIn erfn);
---- M2/Macaulay2/packages/Nauty.m2.orig 2016-08-15 12:38:31.000000000 -0600
-+++ M2/Macaulay2/packages/Nauty.m2 2017-02-27 21:49:22.977043998 -0700
-@@ -37,9 +37,9 @@ newPackage select((
- -------------------
-
- -- Check the ~/.Macaulay2/init-Nauty.m2 file for the absolute path.
---- If it's not there, then use the M2-Programs directory.
-+-- If it's not there, then use the system binary directory.
- nauty'path = (options Nauty).Configuration#"path";
--if nauty'path == "" then nauty'path = prefixDirectory | currentLayout#"programs";
-+if nauty'path == "" then nauty'path = "/usr/bin/";
-
- -------------------
- -- Exports
-@@ -472,7 +472,7 @@ callNauty (String, List) := List => opts
- scan(graphToString \ dataList, d -> o << d << endl);
- close o;
- -- try to harvest the lines
-- r := lines try get openIn ("!" | nauty'path | cmdStr | " <" | infn | " 2>" | erfn)
-+ r := lines try get openIn ("!" | nauty'path | "nauty-" | cmdStr | " <" | infn | " 2>" | erfn)
- else (
- -- nauty errored, harvest the error
- e := last separate(":", first lines get openIn erfn);
diff --git a/Macaulay2-1.16-default_make_targets.patch b/Macaulay2-1.16-default_make_targets.patch
deleted file mode 100644
index 1e77bcf..0000000
--- a/Macaulay2-1.16-default_make_targets.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- M2/Macaulay2/Makefile.in.orig 2020-07-12 19:17:33.241211749 -0600
-+++ M2/Macaulay2/Makefile.in 2020-07-12 19:18:07.133195781 -0600
-@@ -3,7 +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
--SUBDIRS = util regex c d e system bin m2 man packages editors html-check-links tests
-+SUBDIRS = util regex c d e system bin m2 man packages editors
-
- define do-in-subdirs
- $(foreach d,$(SUBDIRS),
diff --git a/Macaulay2-1.16-format.patch b/Macaulay2-1.16-format.patch
deleted file mode 100644
index 2ffd3f5..0000000
--- a/Macaulay2-1.16-format.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- M2/Macaulay2/e/mem.cpp.orig 2020-07-11 05:04:29.000000000 -0600
-+++ M2/Macaulay2/e/mem.cpp 2020-07-12 19:26:39.391982818 -0600
-@@ -71,7 +71,7 @@ void stash::text_out(buffer &o) const
- {
- char s[200];
- sprintf(s,
-- "%16s %9dk %9dk %10zd %10lu %10lu %10lu %10lu%s",
-+ "%16s %9dk %9dk %10zu %10zu %10zu %10zu %10zu%s",
- name,
- static_cast((element_size * highwater + 1023) / 1024),
- static_cast((element_size * n_inuse + 1023) / 1024),
diff --git a/Macaulay2-1.12-configure.patch b/Macaulay2-1.17-configure.patch
similarity index 55%
rename from Macaulay2-1.12-configure.patch
rename to Macaulay2-1.17-configure.patch
index 58f9764..8086b88 100644
--- a/Macaulay2-1.12-configure.patch
+++ b/Macaulay2-1.17-configure.patch
@@ -1,17 +1,15 @@
---- M2/configure.ac.orig 2018-08-06 14:16:21.725371828 -0600
-+++ M2/configure.ac 2018-08-06 14:22:27.632902514 -0600
-@@ -266,10 +266,10 @@ AC_MSG_NOTICE([checking for C compiler f
+--- M2/configure.ac.orig 2021-01-12 14:20:55.509886490 -0700
++++ M2/configure.ac 2021-01-12 14:21:55.866785423 -0700
+@@ -252,9 +252,9 @@ AC_MSG_NOTICE([checking for C compiler f
dnl always compile with "-g", so we can debug even optimized versions
if test "$GCC" = yes
-then CFLAGS="$CFLAGS -g3"
- CXXFLAGS="$CXXFLAGS -g3"
- LDFLAGS="$LDFLAGS -g3"
-- LDFLAGS_FOR_BUILD="$LDFLAGS_FOR_BUILD -g3"
+then CFLAGS="$CFLAGS -g"
+ CXXFLAGS="$CXXFLAGS -g"
+ LDFLAGS="$LDFLAGS -g"
-+ LDFLAGS_FOR_BUILD="$LDFLAGS_FOR_BUILD -g"
else CFLAGS="$CFLAGS -g"
CXXFLAGS="$CXXFLAGS -g"
LDFLAGS="$LDFLAGS -g"
diff --git a/Macaulay2-1.17-default_make_targets.patch b/Macaulay2-1.17-default_make_targets.patch
new file mode 100644
index 0000000..96be906
--- /dev/null
+++ b/Macaulay2-1.17-default_make_targets.patch
@@ -0,0 +1,11 @@
+--- M2/Macaulay2/Makefile.in.orig 2021-01-12 14:18:59.570080654 -0700
++++ M2/Macaulay2/Makefile.in 2021-01-12 14:19:19.802046768 -0700
+@@ -3,7 +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
+-SUBDIRS = util c d e system bin m2 man packages editors html-check-links tests
++SUBDIRS = util c d e system bin m2 man packages editors
+
+ define do-in-subdirs
+ $(foreach d,$(SUBDIRS),
diff --git a/Macaulay2-gcc11.patch b/Macaulay2-gcc11.patch
deleted file mode 100644
index 4aecfb6..0000000
--- a/Macaulay2-gcc11.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/M2/submodules/mathicgb/src/mathicgb/RawVector.hpp b/M2/submodules/mathicgb/src/mathicgb/RawVector.hpp
-index 10ea2d5..fbdbd27 100644
---- M2/submodules/mathicgb/src/mathicgb/RawVector.hpp
-+++ M2/submodules/mathicgb/src/mathicgb/RawVector.hpp
-@@ -3,6 +3,7 @@
- #ifndef MATHICGB_RAW_VECTOR_GUARD
- #define MATHICGB_RAW_VECTOR_GUARD
-
-+#include
- #include
- #include
- #include
-diff --git a/M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp b/M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp
-index 7d41d47..dd15705 100644
---- M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp
-+++ M2/submodules/mathicgb/src/mathicgb/SparseMatrix.cpp
-@@ -1,6 +1,7 @@
- // MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
- // NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
- #include "stdinc.h"
-+#include
- #include "SparseMatrix.hpp"
-
- #include "Poly.hpp"
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 40c64c5..077da64 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -21,14 +21,9 @@
# We have to bundle the linbox package. It has global constructors that cause
# the same problem as libfplll.
-# Upstream wants us to build the final commit in a release branch. We wait
-# for a release announcement, then pull from git. The tarballs in the git repo
-# are for upstream's use, not for distributions to build.
-%global commit 94c4b7db5dcafeaf2b97315a2bed6ac8ba16ee6b
-%global shortcommit %(cut -b -7 <<< %{commit})
%global m2url https://github.com/Macaulay2/M2
-%global emacscommit 7460c448d40571866e8290ac862abbc28c1b5b37
+%global emacscommit d1809568339948182cb967f5d54884d5e7213dca
%global emacsurl https://github.com/Macaulay2/M2-emacs
%global emacsshort %(cut -b -7 <<< %{emacscommit})
@@ -58,15 +53,15 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
-Version: 1.16
-Release: 2%{?dist}
+Version: 1.17
+Release: 1%{?dist}
License: GPLv2 or GPLv3
URL: http://macaulay2.com/
%if 0%{?snap:1}
Source0: %{name}-%{version}-%{snap}.tar.xz
%else
-Source0: %{m2url}/tarball/%{commit}/%{name}-%{version}.tar.gz
+Source0: %{m2url}/archive/release-%{version}/%{name}-%{version}.tar.gz
%endif
Source1: %{emacsurl}/tarball/%{emacscommit}/M2-emacs-%{emacsshort}.tar.gz
@@ -93,13 +88,13 @@ 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.1.1
+%global factoryver 4.1.3
Source103: http://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/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 0d70da731a84008143a00cf1effd978dc8607879
+%global mathicgbcommit 4d23c24302c2395efbbeef9ea1fd52e4f0f56f65
Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz
Provides: bundled(mathicgb) = %{mathicgbver}
@@ -109,33 +104,33 @@ Source105: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode
# MEMTAILOR is bundled because it causes garbage collector crashes otherwise
%global memtailorver 1.0
-%global memtailorcommit 1d13f96bc7d84b7ac401e6b8c936fad26f08786c
+%global memtailorcommit 777c5d2d341ff742850b86e2fb29d24007ac9bae
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 44095b846a83c05cbff6f3e8765070e5cda40e67
+%global mathiccommit cc52f4685b1e1f1af084d22cfb730f62e34c2dfc
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.6.3
-Source108: https://github.com/linbox-team/linbox/archive/v%{linboxver}}/linbox-%{linboxver}.tar.gz
+Source108: https://github.com/linbox-team/linbox/releases/download/v%{linboxver}/linbox-%{linboxver}.tar.gz
Provides: bundled(linbox) = %{linboxver}
## PATCHES FOR BUNDLED code
# Work around an ambiguous overload on 32-bit platforms
Source200: linbox-1.6.3.patch
# Fix factory build failure. REPLACES the upstream patch.
-Source201: factory-4.1.1.patch
-# Fix mathicgb build on big endian machines.
+Source201: factory-4.1.3.patch
+# Fix mathicgb build on big endian machines and with gcc 11
Source202: mathicgb-1.0.patch
## FAKE library tarballs that convince Macaulay2 to use the system versions
Source300: frobby_v0.9.0.tar.gz
Source301: cddlib-094h.tar.gz
-Source302: lapack-3.6.0.tgz
+Source302: lapack-3.9.0.tgz
Source303: 4ti2-1.6.9.tar.gz
Source304: libfplll-5.2.0.tar.gz
Source305: gfan0.6.2.tar.gz
@@ -151,22 +146,16 @@ Source312: mpsolve-3.2.1.tar.gz
Patch0: %{name}-1.15-optflags.patch
# give the build a little more time and space than upstream permits
Patch1: %{name}-1.16-ulimit.patch
-# fix paths to nauty binaries
-Patch2: %{name}-1.11-nauty-paths.patch
# drop 'tests' from default make target
-Patch3: %{name}-1.16-default_make_targets.patch
+Patch2: %{name}-1.17-default_make_targets.patch
# disable check for gftables
-Patch4: %{name}-1.16-no_gftables.patch
+Patch3: %{name}-1.16-no_gftables.patch
# adapt to libfplll 5.2.1
-Patch5: %{name}-1.15-fplll.patch
+Patch4: %{name}-1.15-fplll.patch
# do not override the debug level
-Patch6: %{name}-1.12-configure.patch
-# fix some -Wformat warnings
-Patch7: %{name}-1.16-format.patch
+Patch5: %{name}-1.17-configure.patch
# Fix "error: in conversion to html, unknown TeX control sequence(s): \rightarrow"
-Patch8: %{name}-1.16-rightarrow.patch
-# Fix minor errors found when building with gcc-11
-Patch9: %{name}-gcc11.patch
+Patch6: %{name}-1.16-rightarrow.patch
BuildRequires: 4ti2
BuildRequires: autoconf
@@ -299,8 +288,8 @@ BuildArch: noarch
%prep
-%setup -q -n %{name}-M2-%{shortcommit}/M2
-%setup -q -n %{name}-M2-%{shortcommit}/M2 -T -D -a 10
+%setup -q -n M2-release-%{version}/M2
+%setup -q -n M2-release-%{version}/M2 -T -D -a 10
tar -C Macaulay2/editors/emacs --strip-components=1 -xzf %{SOURCE1}
install -p -m755 %{SOURCE20} ./etags
@@ -346,18 +335,15 @@ tar -C submodules/givaro --strip-components=1 -xzf %{SOURCE306}
%patch0 -p1 -b .optflags
%patch1 -p1 -b .ulimit
-%patch2 -p1 -b .nauty
-%patch3 -p1 -b .default_make_targets
-%patch4 -p1 -b .no_gftables
+%patch2 -p1 -b .default_make_targets
+%patch3 -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
-%patch5 -p1 -b .fplll
-%patch6 -p1 -b .configure
-%patch7 -p1 -b .format
-%patch8 -p1 -b .rightarrow
-%patch9 -p1 -b .gcc11
+%patch4 -p1 -b .fplll
+%patch5 -p1 -b .configure
+%patch6 -p1 -b .rightarrow
# repeatable builds: inject a node name
sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac
@@ -484,9 +470,9 @@ rm -fr %{buildroot}/builddir
%check
-CFLAGS="%{optflags}" \
-CXXFLAGS="%{optflags}" \
-LDFLAGS="$RPM_LD_FLAGS" \
+CFLAGS="%{build_cflags}" \
+CXXFLAGS="%{build_cxxflags}" \
+LDFLAGS="%{build_ldflags}" \
time make -k check -C BUILD/%{_target_platform} Verbose=true ||:
@@ -509,6 +495,11 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||:
%changelog
+* 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
diff --git a/factory-4.1.1.patch b/factory-4.1.1.patch
deleted file mode 100644
index 4438666..0000000
--- a/factory-4.1.1.patch
+++ /dev/null
@@ -1,74 +0,0 @@
---- m4/flags.m4.orig 2018-02-15 07:02:18.000000000 -0700
-+++ m4/flags.m4 2020-07-12 20:46:53.024384864 -0600
-@@ -122,7 +122,7 @@ AC_DEFUN([SING_CHECK_SET_ARGS], [
- ## for clang: -Wunneeded-internal-declaration
-
- if test "x${ENABLE_OPTIMIZATION}" != xno; then
-- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
-+ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
- # -O3 - crashes gcc???!!!
- # -fpermissive
- AC_LANG_PUSH([C])
---- m4/flint-check.m4.orig 2018-02-15 07:02:18.000000000 -0700
-+++ m4/flint-check.m4 2020-07-12 20:46:08.072325817 -0600
-@@ -69,7 +69,7 @@ for FLINT_HOME in ${FLINT_HOME_PATH}
- [
- AC_TRY_RUN(
- [#include
-- int main () { if ((int) version[0] < 2) return -1; else return 0; }
-+ int main () { if (__FLINT_VERSION < 2) return -1; else return 0; }
- ],[
- flint_found="yes"
- break
---- factory-4.1.1/cf_factory.h.orig 2017-12-06 10:37:14.000000000 -0700
-+++ factory-4.1.1/cf_factory.h 2018-02-17 14:34:52.000000000 -0700
-@@ -15,7 +15,7 @@
- #include "variable.h"
-
- #include "factory/cf_gmp.h"
--#include "factory/cf_assert.h"
-+#include "cf_assert.h"
-
- class InternalCF;
- class CanonicalForm;
---- factory-4.1.1/cf_switches.cc.orig 2017-12-06 10:37:11.000000000 -0700
-+++ factory-4.1.1/cf_switches.cc 2018-06-26 09:07:29.000000000 -0600
-@@ -31,6 +31,7 @@ CFSwitches::CFSwitches ()
- // and set the default (recommended) On-values:
- #ifdef HAVE_NTL
- On(SW_USE_CHINREM_GCD);
-+ On(SW_USE_EZGCD_P); // provided to me by Hans Schoenemann
- //Off(SW_USE_NTL_SORT);
- #endif
- On(SW_USE_EZGCD);
---- factory-4.1.1/configure.orig 2018-02-09 07:29:54.000000000 -0700
-+++ factory-4.1.1/configure 2020-07-12 20:19:22.755415850 -0600
-@@ -5827,7 +5827,7 @@ done
- ## for clang: -Wunneeded-internal-declaration
-
- if test "x${ENABLE_OPTIMIZATION}" != xno; then
-- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
-+ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
- # -O3 - crashes gcc???!!!
- # -fpermissive
- ac_ext=c
-@@ -22481,7 +22481,7 @@ else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include
-- int main () { if ((int) version[0] < 2) return -1; else return 0; }
-+ int main () { if (__FLINT_VERSION < 2) return -1; else return 0; }
-
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
---- factory-4.1.1/ftmpl_inst.cc.orig 2017-12-06 10:37:12.000000000 -0700
-+++ factory-4.1.1/ftmpl_inst.cc 2018-05-15 12:28:00.560409016 -0600
-@@ -73,7 +73,7 @@ template List Difference ( con
- // NTL 6
- #ifdef HAVE_NTL
- #include
--#if NTL_MAJOR_VERSION == 6
-+#if NTL_MAJOR_VERSION >= 6
-
- #include
- #include
diff --git a/factory-4.1.3.patch b/factory-4.1.3.patch
new file mode 100644
index 0000000..71f2cf4
--- /dev/null
+++ b/factory-4.1.3.patch
@@ -0,0 +1,72 @@
+--- factory-4.1.3/ftmpl_inst.cc.orig 2019-04-10 10:20:16.000000000 -0600
++++ factory-4.1.3/ftmpl_inst.cc 2021-01-12 13:57:49.211563226 -0700
+@@ -73,7 +73,7 @@ template List Difference ( con
+ // NTL 6
+ #ifdef HAVE_NTL
+ #include
+-#if NTL_MAJOR_VERSION == 6
++#if NTL_MAJOR_VERSION >= 6
+
+ #include
+ #include
+--- factory-4.1.3/m4/flags.m4.orig 2020-05-14 08:01:02.000000000 -0600
++++ factory-4.1.3/m4/flags.m4 2021-01-12 13:55:01.715902074 -0700
+@@ -122,7 +122,7 @@ AC_DEFUN([SING_CHECK_SET_ARGS], [
+ ## for clang: -Wunneeded-internal-declaration
+
+ if test "x${ENABLE_OPTIMIZATION}" != xno; then
+- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
++ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
+ # -O3 - crashes gcc???!!!
+ # -fpermissive
+ AC_LANG_PUSH([C])
+--- factory-4.1.3/m4/flint-check.m4.orig 2020-05-14 08:01:02.000000000 -0600
++++ factory-4.1.3/m4/flint-check.m4 2021-01-12 13:54:28.179969923 -0700
+@@ -44,7 +44,7 @@ if test "$FLINT_HOME_PATH" = "$DEFAULT_C
+
+ # we suppose that mpfr and mpir to be in the same place or available by default
+ CFLAGS="${BACKUP_CFLAGS} ${GMP_CPPFLAGS}"
+- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}"
++ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}"
+
+ AC_CHECK_HEADER([flint/fmpz.h],
+ [AC_CHECK_LIB(flint,fmpz_init,
+@@ -66,7 +66,7 @@ if test "x$flint_found" = "xno" ; then
+
+ # we suppose that mpfr and mpir to be in the same place or available by default
+ CFLAGS="${BACKUP_CFLAGS} ${FLINT_CFLAGS} ${GMP_CPPFLAGS}"
+- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}"
++ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}"
+
+ AC_CHECK_LIB(flint,fmpz_init,
+ [flint_found="yes"],
+--- factory-4.1.3/configure.orig 2020-05-14 08:16:23.000000000 -0600
++++ factory-4.1.3/configure 2021-01-12 13:59:22.956373563 -0700
+@@ -5811,7 +5811,7 @@ done
+ ## for clang: -Wunneeded-internal-declaration
+
+ if test "x${ENABLE_OPTIMIZATION}" != xno; then
+- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
++ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
+ # -O3 - crashes gcc???!!!
+ # -fpermissive
+ ac_ext=c
+@@ -22401,7 +22401,7 @@ if test "$FLINT_HOME_PATH" = "$DEFAULT_C
+
+ # we suppose that mpfr and mpir to be in the same place or available by default
+ CFLAGS="${BACKUP_CFLAGS} ${GMP_CPPFLAGS}"
+- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}"
++ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}"
+
+ ac_fn_c_check_header_mongrel "$LINENO" "flint/fmpz.h" "ac_cv_header_flint_fmpz_h" "$ac_includes_default"
+ if test "x$ac_cv_header_flint_fmpz_h" = xyes; then :
+@@ -22460,7 +22460,7 @@ if test "x$flint_found" = "xno" ; then
+
+ # we suppose that mpfr and mpir to be in the same place or available by default
+ CFLAGS="${BACKUP_CFLAGS} ${FLINT_CFLAGS} ${GMP_CPPFLAGS}"
+- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}"
++ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmpz_init in -lflint" >&5
+ $as_echo_n "checking for fmpz_init in -lflint... " >&6; }
+
diff --git a/mathicgb-1.0.patch b/mathicgb-1.0.patch
index bcadb6a..e9c0c14 100644
--- a/mathicgb-1.0.patch
+++ b/mathicgb-1.0.patch
@@ -1,5 +1,5 @@
---- src/mathicgb/MonoMonoid.hpp.orig 2017-06-06 10:08:53.000000000 -0600
-+++ src/mathicgb/MonoMonoid.hpp 2018-10-06 16:57:04.776068625 -0600
+--- src/mathicgb/MonoMonoid.hpp.orig 2021-01-09 10:32:37.000000000 -0700
++++ src/mathicgb/MonoMonoid.hpp 2021-01-12 14:25:20.021443559 -0700
@@ -582,6 +582,7 @@ public:
MATHICGB_ASSERT(i == varCount() / 2 || access(a, i*2+1) >= 0);
@@ -40,3 +40,23 @@
orOfXor |= (A1B ^ (A1 + B)) | (A2B ^ (A2 + B));
}
MATHICGB_ASSERT
+--- src/mathicgb/RawVector.hpp.orig 2021-01-09 10:32:37.000000000 -0700
++++ src/mathicgb/RawVector.hpp 2021-01-12 14:26:02.384372562 -0700
+@@ -3,6 +3,7 @@
+ #ifndef MATHICGB_RAW_VECTOR_GUARD
+ #define MATHICGB_RAW_VECTOR_GUARD
+
++#include
+ #include
+ #include
+ #include
+--- src/mathicgb/SparseMatrix.cpp.orig 2021-01-09 10:32:37.000000000 -0700
++++ src/mathicgb/SparseMatrix.cpp 2021-01-12 14:26:30.569325348 -0700
+@@ -1,6 +1,7 @@
+ // MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
+ // NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
+ #include "stdinc.h"
++#include
+ #include "SparseMatrix.hpp"
+
+ #include "Poly.hpp"
diff --git a/sources b/sources
index dfff0b4..8f73cc5 100644
--- a/sources
+++ b/sources
@@ -1,24 +1,24 @@
SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d
-SHA512 (Macaulay2-1.16.tar.gz) = 3e69e2dc407af9bc6b4f7db2046788e509effb543286a98406655828ab1c462cb406abe350f91ba5d204934fa3f5d04f82d454cd441dce428f8d02ded68f2372
+SHA512 (Macaulay2-1.17.tar.gz) = de6d903fcf85fe51757d3fad31b59d4346072e04da889ad54128e0c4dd8485e62721a8888b9015fc1e7af07d1bb529b55e763216095b816b5b37ab5bd18cf127
SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5
SHA512 (cddlib-094h.tar.gz) = 94a3ef03fd86ece7e61e4f9bec283862594b05a6faca76897e33ad15762527c885cee5439bb8a5d337a608ceb17baff24910da326071a3107df17a0c07f5e774
SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818
SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82
-SHA512 (factory-4.1.1.tar.gz) = f08d74cb860145c07b9f1cc0a3fe44cb6fb2fc158a9b992f0db55eeef9e93d280cf66a5c8822236389e54b8084d2a37c174b32864e4dc12b8ee3c4760e9fe2bf
+SHA512 (factory-4.1.3.tar.gz) = 38e75556bcf8c9f4610dd5322d20b339d1c5ad9a6400f20d1bce5317bc4f3fdb97e33294088ea7b80e9bda1c482dd1e5327ec408d9f1dadf3c28c2b928519053
SHA512 (flint-2.6.3.tar.gz) = 8e71570364c789b1d4eaaa5f5adf10212cab47bf1a9f45c333211035ed021a86bb7b1de1feec51e83b2e113e8168853e370f127d2d2b1e941a12aec71fe8ae9e
SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6
SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d
SHA512 (givaro-4.1.1.tar.gz) = baaf139f42176838c541143a5b69acf47a8f31c17020a85cf413ce18ade2c3048e009d15c2acf4d71041c0776cd42f5fedb1c183ce1cc0f85cb8672ceac00ee7
SHA512 (glpk-4.59.tar.gz) = ca05bd085880143acf4a440cf7efd2392d4dde89bed53a0e5726526cb210eee004bfcd434aeb8ca8abb1dc89ff93e72054489911e5e2c843e0ed631d50c55f56
SHA512 (gtest-1.10.0.tar.gz) = bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b065e165bc7477d762bce0997a427131866a89f1001e3f3315198204ffa5d643a9355f1f4d0d7b1a9
-SHA512 (lapack-3.6.0.tgz) = 0975c721abe38ef46cda2ba446060428e2f576ec4558cc0205ca6af2af2bd8f7f4c31fd0c90d77a92719a73e1942fade19b4c17e6fe2da29d54ad1adccf5a6b2
+SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf6adec6622f557c332f09e7eb46f71e5e3f2e852f25a640bde2bf9f4be7205cecf01cb07b6bc8
SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29
SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0
SHA512 (lrslib-062.tar.gz) = 78fa6d470b2dd9cb06d1d15023debd8fafc27ed4df93cd90ef746071755f6b1fe9ee2c6a24659030b9a8851bd3ee3a699407586d320f3760c3d8a3a1c79d7116
-SHA512 (M2-emacs-7460c44.tar.gz) = 295e78238300dbefaa82ac0ea5b7d3eb538e2ec5677dd7f0588ee89c515ab29de899a0d1aa11b35f9d5c1e883e6f53059042662579740d43fc980e595100d11c
-SHA512 (mathic-1.0.tar.gz) = 3bf767f77cec8aed0267752f8328d0599b2f4d31c3e4cffea69d9e9aa26a163d6a38e52e5b371e2ffc391f954003008cf734a75440b538d7ae4107ee1dd95f90
-SHA512 (mathicgb-1.0.tar.gz) = b7fdcbf20dc0bfaa3251bd681f4a61d5bbb16f62f4a577a902ad9bf176c359ad8ab10dd20b6ef06040c9955e149d8e022ce98c15531a6dd339876fa3a187ea68
-SHA512 (memtailor-1.0.tar.gz) = f3f185200b9f9cd381e9b920f0d6feb4bc721c5235a38b0d68515184430ca2fcb7d1c87762e6489d735d4791bd8cb63eb8bf1400b86e439188df8d9741dea943
+SHA512 (M2-emacs-d180956.tar.gz) = e50a2c739624bb4bd3ccf295f7b392edf3531f7f4d73026d9efbc11200ce4b7477b572805577ce0b1b8af115e2467989b9d31b9750a6a13c6a770bacaaa68929
+SHA512 (mathic-1.0.tar.gz) = dd675985fc2a5c7efab3ec6492e4b4e4d7273f4d88bdee6d9dc19174d3e319baa5fd94994563efe46c7ed7685e253c173606efdfb2a66af2d1db35e6265d473d
+SHA512 (mathicgb-1.0.tar.gz) = 09db7dd226b4a50fea5dbcf175d1da2136541b33ae098ed540735315a4eb33be2ca62d7c996b0d86470d1cad9d93261fd211635f84292ecbf7da04c83f4950f2
+SHA512 (memtailor-1.0.tar.gz) = 3d93cad8a8e62c4f4b8bd074019f44d2fd8b35cf7e50ccafea85fe15aaeb3af0b175bcd7ed055ee3d789ad557fdb83382e4b66826e7fb849521ff375f25fd16f
SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273
SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f
SHA512 (normaliz-3.7.2.tar.gz) = 044a1b5c7e877cdfceedbe6b283b982b66e58f0cc5b0ccf6a63a293044d1348290fde92531b4c4a0a58f5263bb7696a2511b5a1dff94222c9e56a2fe3fccb69b
From 73e779d851d5993edf42d00ec4f0849ca64d28a7 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Mon, 25 Jan 2021 22:30:24 +0000
Subject: [PATCH 04/57] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 077da64..9be5b65 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -54,7 +54,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.17
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2 or GPLv3
URL: http://macaulay2.com/
@@ -495,6 +495,9 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||:
%changelog
+* 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
From dae8e82f0e28fb503196164a733530c3c2bd943c Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Thu, 18 Feb 2021 10:21:33 -0700
Subject: [PATCH 05/57] 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.
---
Macaulay2-1.16-ulimit.patch | 32 +++----
Macaulay2-1.17-lto.patch | 48 ++++++++++
Macaulay2.metainfo.xml | 35 ++++++++
Macaulay2.spec | 40 +++++++--
mathic-1.0.patch | 95 ++++++++++++++++++++
mathicgb-1.0.patch | 170 +++++++++++++++++++++++++++++++++++-
6 files changed, 397 insertions(+), 23 deletions(-)
create mode 100644 Macaulay2-1.17-lto.patch
create mode 100644 Macaulay2.metainfo.xml
create mode 100644 mathic-1.0.patch
diff --git a/Macaulay2-1.16-ulimit.patch b/Macaulay2-1.16-ulimit.patch
index 96065a5..aa13e8b 100644
--- a/Macaulay2-1.16-ulimit.patch
+++ b/Macaulay2-1.16-ulimit.patch
@@ -1,5 +1,5 @@
---- M2/GNUmakefile.in.orig 2020-07-11 05:04:29.000000000 -0600
-+++ M2/GNUmakefile.in 2020-07-12 19:24:55.838024149 -0600
+--- M2/GNUmakefile.in.orig 2021-01-08 08:30:25.000000000 -0700
++++ M2/GNUmakefile.in 2021-02-15 15:47:32.292569472 -0700
@@ -136,7 +136,7 @@ build-in-$1: submodules/$1/Makefile
$(MAKE) -C submodules/$1 all
check-in-$1: run-configure-in-$1
@@ -9,8 +9,8 @@
endif
install-in-$1: build-in-$1; + $(MAKE) -C submodules/$1 install
---- M2/libraries/Makefile.library.in.orig 2020-07-11 05:04:29.000000000 -0600
-+++ M2/libraries/Makefile.library.in 2020-07-12 19:20:23.705132772 -0600
+--- M2/libraries/Makefile.library.in.orig 2021-01-08 08:30:25.000000000 -0700
++++ M2/libraries/Makefile.library.in 2021-02-15 15:48:02.429394066 -0700
@@ -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
@@ -26,8 +26,8 @@
LIMIT := :
ifeq (@ULIMIT_T@,yes)
LIMIT += ; ulimit -t $(TLIMIT)
---- M2/Macaulay2/m2/basictests/Makefile.in.orig 2020-07-11 05:04:29.000000000 -0600
-+++ M2/Macaulay2/m2/basictests/Makefile.in 2020-07-12 19:23:46.653051760 -0600
+--- M2/Macaulay2/m2/basictests/Makefile.in.orig 2021-01-08 08:30:25.000000000 -0700
++++ M2/Macaulay2/m2/basictests/Makefile.in 2021-02-15 15:47:13.769677288 -0700
@@ -22,17 +22,17 @@ $(TESTRESULTS) : @pre_exec_prefix@/bin/M
ARGS := --silent -q --stop --no-setup -e 'srcdir = "@srcdir@/"'
@@ -53,8 +53,8 @@
LIMIT :=
ifeq (@ULIMIT_T@,yes)
---- M2/Macaulay2/m2/run.m2.orig 2020-07-11 05:04:29.000000000 -0600
-+++ M2/Macaulay2/m2/run.m2 2020-07-12 19:22:43.157077109 -0600
+--- M2/Macaulay2/m2/run.m2.orig 2021-01-08 08:30:25.000000000 -0700
++++ M2/Macaulay2/m2/run.m2 2021-02-15 15:47:13.770677282 -0700
@@ -7,7 +7,7 @@
utest := opt -> (
cmd := "ulimit " | opt | "; ";
@@ -64,8 +64,8 @@
M2statusRegexp := "^--status:"
statusLines := file -> select(lines file, s -> match(M2statusRegexp,s))
---- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2020-07-11 05:04:29.000000000 -0600
-+++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2020-07-12 19:20:27.318131329 -0600
+--- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2021-01-08 08:30:25.000000000 -0700
++++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2021-02-15 15:47:13.770677282 -0700
@@ -15,16 +15,16 @@ diff:
LIMIT :=
@@ -83,12 +83,12 @@
endif
ifeq (@ULIMIT_S@,yes)
-LIMIT += ulimit -s 8192 ;
-+LIMIT += ulimit -s 16834 ;
++LIMIT += ulimit -s 16384 ;
endif
---- M2/Macaulay2/tests/Makefile.test.in.orig 2020-07-11 05:04:29.000000000 -0600
-+++ M2/Macaulay2/tests/Makefile.test.in 2020-07-12 19:20:27.319131328 -0600
+--- M2/Macaulay2/tests/Makefile.test.in.orig 2021-01-08 08:30:25.000000000 -0700
++++ M2/Macaulay2/tests/Makefile.test.in 2021-02-15 15:49:32.468869998 -0700
@@ -6,18 +6,18 @@ DEFERRED ?= no
DOTS ?= ../..
@@ -97,15 +97,17 @@
+TLIMIT ?= 180
# one test doesn't work with only 150MB RAM, ext-total.m2, on a 64 bit intel machine:
-MLIMIT ?= 800000
+-VLIMIT ?= 2000000
+MLIMIT ?= 1600000
- VLIMIT ?= 2000000
++VLIMIT ?= 4000000
else
# give the debug version more time and space
-TLIMIT ?= 140
-MLIMIT ?= 1200000
+-VLIMIT ?= 2000000
+TLIMIT ?= 280
+MLIMIT ?= 2400000
- VLIMIT ?= 2000000
++VLIMIT ?= 4000000
endif
# make the stack limit always the same as it would be under MacOS
-SLIMIT ?= 8192
diff --git a/Macaulay2-1.17-lto.patch b/Macaulay2-1.17-lto.patch
new file mode 100644
index 0000000..07a07f6
--- /dev/null
+++ b/Macaulay2-1.17-lto.patch
@@ -0,0 +1,48 @@
+--- M2/Macaulay2/c/compat.h.orig 2021-01-08 08:30:25.000000000 -0700
++++ M2/Macaulay2/c/compat.h 2021-02-15 12:16:12.570716693 -0700
+@@ -1,7 +1,7 @@
+ /* Copyright 1993 by Daniel R. Grayson */
+
+ #ifndef __cplusplus
+-typedef char bool;
++typedef _Bool bool;
+ #endif
+
+ extern char posfmt[];
+--- M2/Macaulay2/d/boost-regex.cpp.orig 2021-01-08 08:30:25.000000000 -0700
++++ M2/Macaulay2/d/boost-regex.cpp 2021-01-29 09:45:58.311601390 -0700
+@@ -48,8 +48,8 @@ extern "C" {
+ /* returns an array of pairs (s, r), indicating starting point
+ * and length of the first match and its capture groups */
+ M2_arrayint regex_search(const M2_string pattern,
+- const size_t start,
+- const size_t range,
++ const int start,
++ const int range,
+ const M2_string text,
+ int regex_flags,
+ int match_flags)
+--- M2/Macaulay2/d/types.h.orig 2021-01-08 08:30:25.000000000 -0700
++++ M2/Macaulay2/d/types.h 2021-02-15 12:15:52.755753702 -0700
+@@ -37,6 +37,10 @@
+ # define LONGJUMP(env) longjmp(env, 1)
+ #endif
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ struct ArgCell
+ {
+ int argc, envc;
+@@ -50,6 +54,10 @@ struct JumpCell
+ bool is_set;
+ };
+
++#ifdef __cplusplus
++}
++#endif
++
+ #ifdef HAVE_UNISTD_H
+ #include
+ #endif
diff --git a/Macaulay2.metainfo.xml b/Macaulay2.metainfo.xml
new file mode 100644
index 0000000..5d7bd15
--- /dev/null
+++ b/Macaulay2.metainfo.xml
@@ -0,0 +1,35 @@
+
+
+ Macaulay2
+ CC0-1.0
+ GPL-2.0 or GPL-3.0
+ Macaulay2
+ System for algebraic geometry and commutative algebra
+
+
+ Macaulay 2 is a software system devoted to supporting research in
+ algebraic geometry and commutative algebra written by Daniel R. Grayson
+ and Michael E. Stillman.
+
+
+ Macaulay2.desktop
+
+
+ https://faculty.math.illinois.edu/Macaulay2/Screenshots/texmacs.png
+ Macaulay2 with TeXmacs
+
+
+ https://faculty.math.illinois.edu/Macaulay2/Screenshots/emacs-M2-c.png
+ Macaulay2 with Emacs
+
+
+ loganjerry@gmail.com
+ http://macaulay2.com/
+ https://github.com/Macaulay2/M2/issues
+ https://groups.google.com/g/macaulay2
+
+
+ M2
+ M2-binary
+
+
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 9be5b65..94b869e 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -69,6 +69,7 @@ Source1: %{emacsurl}/tarball/%{emacscommit}/M2-emacs-%{emacsshort}.tar.gz
# the tar file for details on how these icons were created.
Source10: Macaulay2-icons.tar.xz
Source11: Macaulay2.desktop
+Source12: Macaulay2.metainfo.xml
Source20: etags.sh
## BUNDLED code
@@ -126,6 +127,8 @@ Source200: linbox-1.6.3.patch
Source201: factory-4.1.3.patch
# Fix mathicgb build on big endian machines and with gcc 11
Source202: mathicgb-1.0.patch
+# Silence GCC warnings about mathic code
+Source203: mathic-1.0.patch
## FAKE library tarballs that convince Macaulay2 to use the system versions
Source300: frobby_v0.9.0.tar.gz
@@ -156,6 +159,8 @@ Patch4: %{name}-1.15-fplll.patch
Patch5: %{name}-1.17-configure.patch
# Fix "error: in conversion to html, unknown TeX control sequence(s): \rightarrow"
Patch6: %{name}-1.16-rightarrow.patch
+# Fix LTO warnings about mismatched declarations and definitions
+Patch7: %{name}-1.17-lto.patch
BuildRequires: 4ti2
BuildRequires: autoconf
@@ -199,6 +204,7 @@ BuildRequires: mpir-devel
BuildRequires: gtest-devel
BuildRequires: iml-devel
BuildRequires: info
+BuildRequires: libappstream-glib
BuildRequires: libgfan-devel
BuildRequires: libtool
BuildRequires: libatomic_ops-devel
@@ -312,6 +318,7 @@ tar -C submodules/mathicgb -xf %{SOURCE104} --strip-components=1
patch -d submodules/mathicgb -p0 < %{SOURCE202}
tar -C submodules/memtailor -xf %{SOURCE106} --strip-components=1
tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1
+patch -d submodules/mathic -p0 < %{SOURCE203}
## patches for bundled code
sed -e 's,--with-blas,&=%{_includedir}/%{blaslib} --with-ntl,' \
@@ -344,6 +351,7 @@ ln -s %{_datadir}/factory \
%patch4 -p1 -b .fplll
%patch5 -p1 -b .configure
%patch6 -p1 -b .rightarrow
+%patch7 -p1 -b .lto
# repeatable builds: inject a node name
sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac
@@ -372,19 +380,25 @@ autoreconf -fi .
%build
-# This package has a configure test which compiles code and expects it to
-# behave in a very specific way (__builtin_return_address). LTO changs the
-# behavior and the configure test does not know how to handle it.
-# Until the configure script is fixed this seems like the best thing to do
-# Disable LTO
+%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. When built with -O1 and LTO, the linker segfaults. Until we can
+# diagnose and fix these issues, we build with -O1 and without LTO on s390x.
%define _lto_cflags %{nil}
+optflags=$(sed 's/-O2/-O/g' <<< "%{optflags}")
+%else
+optflags="%{optflags}"
+%endif
## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex
mkdir -p BUILD/%{_target_platform}
pushd BUILD/%{_target_platform}
CPPFLAGS="-I%{_includedir}/cddlib -I%{_includedir}/frobby" \
-CFLAGS="%{optflags} -fsigned-char" \
-CXXFLAGS="%{optflags} -fsigned-char" \
+CFLAGS="${optflags} -fsigned-char" \
+CXXFLAGS="${optflags} -fsigned-char" \
LIBS="-l%{blaslib}" \
../../configure \
--build=%{_build} \
@@ -454,6 +468,11 @@ desktop-file-install --vendor="" \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE11}
+mkdir -p %{buildroot}%{_metainfodir}
+install -pm 644 %{SOURCE12} %{buildroot}%{_metainfodir}/%{name}.metainfo.xml
+appstream-util validate-relax --nonet \
+ %{buildroot}%{_metainfodir}/%{name}.metainfo.xml
+
# Byte compile the Emacs files, and move the documentation
pushd %{buildroot}%{_emacs_sitelispdir}/%{name}
mv M2-emacs* %{buildroot}%{_pkgdocdir}
@@ -488,6 +507,7 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||:
%{_datadir}/Macaulay2/
%{_datadir}/applications/*Macaulay2.desktop
%{_datadir}/icons/hicolor/*/*/*
+%{_metainfodir}/%{name}.metainfo.xml
%{_docdir}/Macaulay2/
%{_infodir}/*.info*
%{_mandir}/man1/*
@@ -495,6 +515,12 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||:
%changelog
+* 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
diff --git a/mathic-1.0.patch b/mathic-1.0.patch
new file mode 100644
index 0000000..e479efc
--- /dev/null
+++ b/mathic-1.0.patch
@@ -0,0 +1,95 @@
+--- src/mathic/ColumnPrinter.cpp.orig 2020-07-09 10:51:54.000000000 -0600
++++ src/mathic/ColumnPrinter.cpp 2021-02-12 09:12:52.257016443 -0700
+@@ -193,7 +193,7 @@ namespace mathic {
+ MATHIC_ASSERT(maxSize == std::string("100.0%").size());
+ const auto size = str.size();
+ if (size > maxSize)
+- return std::move(str);
++ return str;
+ return std::string(maxSize - str.size(), ' ') + std::move(str);
+ }
+
+--- src/mathic/error.cpp.orig 2020-07-09 10:51:54.000000000 -0600
++++ src/mathic/error.cpp 2021-02-12 09:12:33.688040243 -0700
+@@ -2,15 +2,15 @@
+ #include
+
+ namespace mathic {
+- void reportError(const std::string& errorMsg) {
++ void reportError [[noreturn]] (const std::string& errorMsg) {
+ throw MathicException("ERROR: " + errorMsg);
+ }
+
+- void reportInternalError(const std::string& errorMsg) {
++ void reportInternalError [[noreturn]] (const std::string& errorMsg) {
+ throw InternalMathicException("INTERNAL ERROR: " + errorMsg);
+ }
+
+- void reportInternalError
++ void reportInternalError [[noreturn]]
+ (const std::string& errorMsg, const char* file, unsigned int lineNumber) {
+
+ std::ostringstream err;
+--- src/mathic/error.h.orig 2020-07-09 10:51:54.000000000 -0600
++++ src/mathic/error.h 2021-02-12 09:12:33.689040242 -0700
+@@ -18,26 +18,19 @@ namespace mathic {
+ InternalMathicException(const std::string& str): logic_error(str) {}
+ };
+
+- // The do {...} while (0) is to collect everything into a single
+- // statement that still requires a semicolon after it. The throw is to
+- // prevent spurious compiler warnings about a missing return
+- // statement.
+ #define MATHIC_INTERNAL_ERROR(msg) \
+- do { \
+- reportInternalError(msg, __FILE__, __LINE__); \
+- throw; \
+- } while (false)
++ reportInternalError(msg, __FILE__, __LINE__)
+ #define INTERNAL_ERROR_UNIMPLEMENTED() \
+ INTERNAL_ERROR("Called function that has not been implemented.")
+
+ // These methods throw exceptions.
+- void reportError(const std::string& errorMsg);
+- void reportInternalError(const std::string& errorMsg);
+- void reportInternalError
++ void reportError [[noreturn]] (const std::string& errorMsg);
++ void reportInternalError [[noreturn]] (const std::string& errorMsg);
++ void reportInternalError [[noreturn]]
+ (const std::string& errorMsg, const char* file, unsigned int lineNumber);
+
+ template
+- void throwError(const std::string& errorMsg) {
++ void throwError [[noreturn]] (const std::string& errorMsg) {
+ throw Exception("ERROR: " + errorMsg + '\n');
+ }
+
+--- src/mathic/PairQueue.h.orig 2020-07-09 10:51:54.000000000 -0600
++++ src/mathic/PairQueue.h 2021-02-12 15:20:39.649741958 -0700
+@@ -149,7 +149,7 @@ namespace mathic {
+ template
+ class SupportRetirement {
+ public:
+- void addNextIndex() {mRetired.push_back(false);}
++ void addNextIndex() {mRetired.push_back('\0');}
+ void undoAdd() {
+ MATHIC_ASSERT(!mRetired.empty());
+ mRetired.pop_back();
+@@ -157,15 +157,12 @@ namespace mathic {
+
+ void retireIndex(size_t index) {
+ MATHIC_ASSERT(index < mRetired.size());
+- mRetired[index] = true;
++ mRetired[index] = '\1';
+ }
+
+ bool retired(size_t index) const {
+ MATHIC_ASSERT(index < mRetired.size());
+- // if we just cast to bool here the compiler has to ensure that the
+- // value is not something other than 0 or 1. By reinterpreting the
+- // reference as a bool we free the compiler from this obligation.
+- return reinterpret_cast(mRetired[index]);
++ return mRetired[index] != '\0';
+ }
+
+ private:
diff --git a/mathicgb-1.0.patch b/mathicgb-1.0.patch
index e9c0c14..7baf96c 100644
--- a/mathicgb-1.0.patch
+++ b/mathicgb-1.0.patch
@@ -1,5 +1,121 @@
+--- src/mathicgb/F4MatrixBuilder.cpp.orig 2021-01-09 10:32:37.000000000 -0700
++++ src/mathicgb/F4MatrixBuilder.cpp 2021-02-12 09:09:35.256270557 -0700
+@@ -146,7 +146,7 @@ void F4MatrixBuilder::buildMatrixAndClea
+ *monoid().alloc().release(),
+ *monoid().alloc().release()
+ };
+- return std::move(data);
++ return data;
+ });
+
+ mgb::mtbb::parallel_do(mTodo.begin(), mTodo.end(),
+--- src/mathicgb/F4MatrixProjection.cpp.orig 2021-01-09 10:32:37.000000000 -0700
++++ src/mathicgb/F4MatrixProjection.cpp 2021-02-12 09:09:35.257270555 -0700
+@@ -275,7 +275,7 @@ done:;
+ qm.bottomLeft = bottom.moveLeft();
+ qm.bottomRight = bottom.moveRight();
+
+- return std::move(qm);
++ return qm;
+ }
+
+ namespace {
+@@ -352,7 +352,7 @@ QuadMatrix F4MatrixProjection::makeAndCl
+ qm.bottomRight = std::move(right.second);
+ qm.leftColumnMonomials = std::move(mLeftMonomials);
+ qm.rightColumnMonomials = std::move(mRightMonomials);
+- return std::move(qm);
++ return qm;
+ }
+
+ MATHICGB_NAMESPACE_END
+--- src/mathicgb/F4MatrixReducer.cpp.orig 2021-01-09 10:32:37.000000000 -0700
++++ src/mathicgb/F4MatrixReducer.cpp 2021-02-12 09:09:35.258270554 -0700
+@@ -314,7 +314,7 @@ namespace {
+ if (!zero)
+ reduced.rowDone();
+ }});
+- return std::move(reduced);
++ return reduced;
+ }
+
+ SparseMatrix reduceToEchelonFormSparse(
+@@ -392,7 +392,7 @@ namespace {
+ pivotRowOfCol[pivotCol] = reduced.rowCount();
+ rowToReduce.appendTo(reduced);
+ }
+- return std::move(reduced);
++ return reduced;
+ }
+
+ SparseMatrix reduceToEchelonForm(
+@@ -546,7 +546,7 @@ namespace {
+ for (size_t row = 0; row < rowCount; ++row)
+ if (!dense[row].empty())
+ dense[row].appendTo(reduced);
+- return std::move(reduced);
++ return reduced;
+ }
+ }
+
+@@ -686,7 +686,7 @@ SparseMatrix reduceToEchelonFormShrawan(
+ if (!rowIsZero)
+ reduced.rowDone();
+ }
+- return std::move(reduced);
++ return reduced;
+ }
+
+ SparseMatrix reduceToEchelonFormShrawanDelayedModulus(
+@@ -723,7 +723,7 @@ SparseMatrix reduceToEchelonFormShrawanD
+ if (!rowIsZero)
+ reduced.rowDone();
+ }
+- return std::move(reduced);
++ return reduced;
+ }
+
+ SparseMatrix F4MatrixReducer::reduceToBottomRight(const QuadMatrix& matrix) {
+--- src/mathicgb/MathicIO.hpp.orig 2021-01-09 10:32:37.000000000 -0700
++++ src/mathicgb/MathicIO.hpp 2021-02-12 09:09:35.258270554 -0700
+@@ -300,7 +300,7 @@ auto MathicIO::readOrder(
+ componentsAscendingDesired,
+ schreyering
+ );
+- return std::move(order);
++ return order;
+ }
+
+ template
+@@ -355,7 +355,7 @@ Basis MathicIO::readBasis(
+ *p = p->polyWithTermsDescending();
+ basis.insert(std::move(p));
+ }
+- return std::move(basis);
++ return basis;
+ }
+
+ template
+@@ -391,7 +391,7 @@ Poly MathicIO::readPolyDoNotOrder
+
+ // also skips whitespace
+ if (in.match('0') || in.match("+0") || in.match("-0"))
+- return std::move(p);
++ return p;
+ MATHICGB_ASSERT(!in.peekWhite());
+
+ auto mono = ring.monoid().alloc();
+@@ -402,7 +402,7 @@ Poly MathicIO::readPolyDoNotOrder
+ readTerm(ring, readComponent, coef, mono, in);
+ p.append(coef.value(), *mono);
+ } while (!in.peekWhite() && !in.matchEOF());
+- return std::move(p);
++ return p;
+ }
+
+ template
--- src/mathicgb/MonoMonoid.hpp.orig 2021-01-09 10:32:37.000000000 -0700
-+++ src/mathicgb/MonoMonoid.hpp 2021-01-12 14:25:20.021443559 -0700
++++ src/mathicgb/MonoMonoid.hpp 2021-02-15 13:14:11.464204458 -0700
@@ -582,6 +582,7 @@ public:
MATHICGB_ASSERT(i == varCount() / 2 || access(a, i*2+1) >= 0);
@@ -40,6 +156,47 @@
orOfXor |= (A1B ^ (A1 + B)) | (A2B ^ (A2 + B));
}
MATHICGB_ASSERT
+--- src/mathicgb/MonoProcessor.hpp.orig 2021-01-09 10:32:37.000000000 -0700
++++ src/mathicgb/MonoProcessor.hpp 2021-02-12 14:47:07.794824672 -0700
+@@ -121,7 +121,6 @@ private:
+ return *mSchreyerMultipliers[component];
+ }
+
+- bool mOrderFromLeft;
+ bool mComponentsAscendingDesired;
+ Component mComponentCount;
+ bool mSchreyering;
+--- src/mathicgb/QuadMatrixBuilder.cpp.orig 2021-01-09 10:32:37.000000000 -0700
++++ src/mathicgb/QuadMatrixBuilder.cpp 2021-02-12 09:09:35.258270554 -0700
+@@ -130,7 +130,7 @@ QuadMatrix QuadMatrixBuilder::buildMatri
+ mBottomRight.clear();
+
+ MATHICGB_ASSERT(out.debugAssertValid());
+- return std::move(out);
++ return out;
+ }
+
+ MATHICGB_NAMESPACE_END
+--- src/mathicgb/QuadMatrix.cpp.orig 2021-01-09 10:32:37.000000000 -0700
++++ src/mathicgb/QuadMatrix.cpp 2021-02-12 09:09:35.258270554 -0700
+@@ -247,7 +247,7 @@ QuadMatrix QuadMatrix::toCanonical() con
+ matrix.leftColumnMonomials = leftColumnMonomials;
+ matrix.rightColumnMonomials = rightColumnMonomials;
+
+- return std::move(matrix);
++ return matrix;
+ }
+
+ std::ostream& operator<<(std::ostream& out, const QuadMatrix& qm) {
+@@ -310,7 +310,7 @@ namespace {
+ permutation[columns[col].second] = col;
+ }
+
+- return std::move(permutation);
++ return permutation;
+ }
+ }
+
--- src/mathicgb/RawVector.hpp.orig 2021-01-09 10:32:37.000000000 -0700
+++ src/mathicgb/RawVector.hpp 2021-01-12 14:26:02.384372562 -0700
@@ -3,6 +3,7 @@
@@ -60,3 +217,14 @@
#include "SparseMatrix.hpp"
#include "Poly.hpp"
+--- src/mathicgb/TypicalReducer.cpp.orig 2021-01-09 10:32:37.000000000 -0700
++++ src/mathicgb/TypicalReducer.cpp 2021-02-12 09:09:35.258270554 -0700
+@@ -133,7 +133,7 @@ std::unique_ptr TypicalReducer::cl
+ ring.freeMonomial(lcm);
+ ring.freeMonomial(multiple1);
+ ring.freeMonomial(multiple2);
+- return std::move(reduced);
++ return reduced;
+ }
+
+ void TypicalReducer::classicReduceSPolySet
From a2616121398c2a324a5e30b873a65a9b9ec46e85 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Fri, 18 Jun 2021 08:53:16 -0600
Subject: [PATCH 06/57] Version 1.18.
---
Macaulay2-1.16-ulimit.patch | 11 -
Macaulay2-1.17-lto.patch | 48 -
Macaulay2-1.18-lto.patch | 35 +
....patch => Macaulay2-1.18-no_gftables.patch | 8 +-
Macaulay2.spec | 91 +-
mpfr-4.1.0.patch | 1747 +++++++++++++++++
sources | 12 +-
7 files changed, 1834 insertions(+), 118 deletions(-)
delete mode 100644 Macaulay2-1.17-lto.patch
create mode 100644 Macaulay2-1.18-lto.patch
rename Macaulay2-1.16-no_gftables.patch => Macaulay2-1.18-no_gftables.patch (59%)
create mode 100644 mpfr-4.1.0.patch
diff --git a/Macaulay2-1.16-ulimit.patch b/Macaulay2-1.16-ulimit.patch
index aa13e8b..2da04af 100644
--- a/Macaulay2-1.16-ulimit.patch
+++ b/Macaulay2-1.16-ulimit.patch
@@ -53,17 +53,6 @@
LIMIT :=
ifeq (@ULIMIT_T@,yes)
---- M2/Macaulay2/m2/run.m2.orig 2021-01-08 08:30:25.000000000 -0700
-+++ M2/Macaulay2/m2/run.m2 2021-02-15 15:47:13.770677282 -0700
-@@ -7,7 +7,7 @@
- utest := opt -> (
- cmd := "ulimit " | opt | "; ";
- if chkrun("2>/dev/null >/dev/null "|cmd) == 0 then cmd else "")
--ulimit := utest "-c unlimited" | utest "-t 700" | utest "-m 850000" | utest "-s 8192" | utest "-n 512"
-+ulimit := utest "-c unlimited" | utest "-t 1400" | utest "-m 1700000" | utest "-s 16384" | utest "-n 512"
-
- M2statusRegexp := "^--status:"
- statusLines := file -> select(lines file, s -> match(M2statusRegexp,s))
--- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2021-01-08 08:30:25.000000000 -0700
+++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2021-02-15 15:47:13.770677282 -0700
@@ -15,16 +15,16 @@ diff:
diff --git a/Macaulay2-1.17-lto.patch b/Macaulay2-1.17-lto.patch
deleted file mode 100644
index 07a07f6..0000000
--- a/Macaulay2-1.17-lto.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- M2/Macaulay2/c/compat.h.orig 2021-01-08 08:30:25.000000000 -0700
-+++ M2/Macaulay2/c/compat.h 2021-02-15 12:16:12.570716693 -0700
-@@ -1,7 +1,7 @@
- /* Copyright 1993 by Daniel R. Grayson */
-
- #ifndef __cplusplus
--typedef char bool;
-+typedef _Bool bool;
- #endif
-
- extern char posfmt[];
---- M2/Macaulay2/d/boost-regex.cpp.orig 2021-01-08 08:30:25.000000000 -0700
-+++ M2/Macaulay2/d/boost-regex.cpp 2021-01-29 09:45:58.311601390 -0700
-@@ -48,8 +48,8 @@ extern "C" {
- /* returns an array of pairs (s, r), indicating starting point
- * and length of the first match and its capture groups */
- M2_arrayint regex_search(const M2_string pattern,
-- const size_t start,
-- const size_t range,
-+ const int start,
-+ const int range,
- const M2_string text,
- int regex_flags,
- int match_flags)
---- M2/Macaulay2/d/types.h.orig 2021-01-08 08:30:25.000000000 -0700
-+++ M2/Macaulay2/d/types.h 2021-02-15 12:15:52.755753702 -0700
-@@ -37,6 +37,10 @@
- # define LONGJUMP(env) longjmp(env, 1)
- #endif
-
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
- struct ArgCell
- {
- int argc, envc;
-@@ -50,6 +54,10 @@ struct JumpCell
- bool is_set;
- };
-
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #ifdef HAVE_UNISTD_H
- #include
- #endif
diff --git a/Macaulay2-1.18-lto.patch b/Macaulay2-1.18-lto.patch
new file mode 100644
index 0000000..becd01c
--- /dev/null
+++ b/Macaulay2-1.18-lto.patch
@@ -0,0 +1,35 @@
+--- M2/Macaulay2/c/compat.h.orig 2021-06-13 14:30:17.341325747 -0600
++++ M2/Macaulay2/c/compat.h 2021-06-14 06:52:52.648631798 -0600
+@@ -2,7 +2,7 @@
+
+ #ifndef __cplusplus
+ #undef bool
+-typedef char bool;
++typedef _Bool bool;
+ #endif
+
+ extern char posfmt[];
+--- M2/Macaulay2/d/types.h.orig 2021-06-04 17:33:04.000000000 -0600
++++ M2/Macaulay2/d/types.h 2021-06-13 14:30:27.804335244 -0600
+@@ -37,6 +37,10 @@
+ # define LONGJUMP(env) longjmp(env, 1)
+ #endif
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ struct ArgCell
+ {
+ int argc, envc;
+@@ -50,6 +54,10 @@ struct JumpCell
+ bool is_set;
+ };
+
++#ifdef __cplusplus
++}
++#endif
++
+ #ifdef HAVE_UNISTD_H
+ #include
+ #endif
diff --git a/Macaulay2-1.16-no_gftables.patch b/Macaulay2-1.18-no_gftables.patch
similarity index 59%
rename from Macaulay2-1.16-no_gftables.patch
rename to Macaulay2-1.18-no_gftables.patch
index e491a6e..17ebc01 100644
--- a/Macaulay2-1.16-no_gftables.patch
+++ b/Macaulay2-1.18-no_gftables.patch
@@ -1,7 +1,7 @@
---- M2/configure.ac.orig 2020-07-12 19:15:12.986277846 -0600
-+++ M2/configure.ac 2020-07-12 19:19:00.202170774 -0600
-@@ -673,7 +673,7 @@ AC_SUBST(BUILTLIBS)
- AC_SUBST(LIBLIST, " atomic_ops gc gdbm gmp mpir mpfr readline ntl flint factory lapack mpsolve frobby glpk cddlib fplll linbox gtest ")
+--- 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 ")
# 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.spec b/Macaulay2.spec
index 94b869e..21af2b1 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -23,7 +23,7 @@
%global m2url https://github.com/Macaulay2/M2
-%global emacscommit d1809568339948182cb967f5d54884d5e7213dca
+%global emacscommit 01af405c5c92f90e4009ff580a1b1dcefe43a714
%global emacsurl https://github.com/Macaulay2/M2-emacs
%global emacsshort %(cut -b -7 <<< %{emacscommit})
@@ -45,16 +45,10 @@
# The examples contain some python files which should not be byte compiled
%global _python_bytecompile_extra 0
-%if 0%{?fedora} >= 33
-%global blaslib flexiblas
-%else
-%global blaslib openblas
-%endif
-
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
-Version: 1.17
-Release: 2%{?dist}
+Version: 1.18
+Release: 1%{?dist}
License: GPLv2 or GPLv3
URL: http://macaulay2.com/
@@ -84,12 +78,12 @@ Source101: http://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.xz
Provides: bundled(mpfr) = %{mpfrver}
# FLINT is bundled because it must be linked with the specially-built MPFR
-%global flintver 2.6.3
+%global flintver 2.7.1
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.1.3
+%global factoryver 4.2.0
Source103: http://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/factory-%{factoryver}.tar.gz
Provides: bundled(factory) = %{factoryver}
@@ -123,8 +117,8 @@ Provides: bundled(linbox) = %{linboxver}
## PATCHES FOR BUNDLED code
# Work around an ambiguous overload on 32-bit platforms
Source200: linbox-1.6.3.patch
-# Fix factory build failure. REPLACES the upstream patch.
-Source201: factory-4.1.3.patch
+# MPFR bug fixes from mpfr upstream.
+Source201: mpfr-4.1.0.patch
# Fix mathicgb build on big endian machines and with gcc 11
Source202: mathicgb-1.0.patch
# Silence GCC warnings about mathic code
@@ -132,13 +126,13 @@ Source203: mathic-1.0.patch
## FAKE library tarballs that convince Macaulay2 to use the system versions
Source300: frobby_v0.9.0.tar.gz
-Source301: cddlib-094h.tar.gz
+Source301: cddlib-094m.tar.gz
Source302: lapack-3.9.0.tgz
Source303: 4ti2-1.6.9.tar.gz
Source304: libfplll-5.2.0.tar.gz
Source305: gfan0.6.2.tar.gz
Source306: givaro-4.1.1.tar.gz
-Source307: lrslib-062.tar.gz
+Source307: lrslib-071a.tar.gz
Source308: TOPCOM-0.17.8.tar.gz
Source309: cohomCalg-0.32.tar.gz
Source310: glpk-4.59.tar.gz
@@ -152,7 +146,7 @@ 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.16-no_gftables.patch
+Patch3: %{name}-1.18-no_gftables.patch
# adapt to libfplll 5.2.1
Patch4: %{name}-1.15-fplll.patch
# do not override the debug level
@@ -160,7 +154,7 @@ Patch5: %{name}-1.17-configure.patch
# Fix "error: in conversion to html, unknown TeX control sequence(s): \rightarrow"
Patch6: %{name}-1.16-rightarrow.patch
# Fix LTO warnings about mismatched declarations and definitions
-Patch7: %{name}-1.17-lto.patch
+Patch7: %{name}-1.18-lto.patch
BuildRequires: 4ti2
BuildRequires: autoconf
@@ -169,9 +163,6 @@ BuildRequires: bison
BuildRequires: boost-devel
BuildRequires: cddlib-devel
BuildRequires: chrpath
-%if ! 0%{?system_normaliz}
-BuildRequires: cmake
-%endif
BuildRequires: cohomCalg
BuildRequires: csdp-tools
BuildRequires: desktop-file-utils
@@ -180,12 +171,14 @@ BuildRequires: doxygen-latex
%else
BuildRequires: doxygen
%endif
+BuildRequires: eigen3-static
# etags
BuildRequires: emacs
BuildRequires: expat-devel
BuildRequires: factory-gftables
BuildRequires: fflas-ffpack-devel
BuildRequires: flex
+BuildRequires: flexiblas-devel
BuildRequires: gawk
BuildRequires: gcc-c++
BuildRequires: gcc-gfortran
@@ -211,9 +204,7 @@ BuildRequires: libatomic_ops-devel
BuildRequires: libfplll-static
BuildRequires: libfrobby-devel
BuildRequires: libnauty-devel
-%if 0%{?system_normaliz}
BuildRequires: libnormaliz-devel >= 3.6.3
-%endif
BuildRequires: libtool
BuildRequires: lrslib-devel
BuildRequires: lrslib-utils
@@ -221,18 +212,20 @@ BuildRequires: m4ri-devel
BuildRequires: m4rie-devel
BuildRequires: make
BuildRequires: mariadb-devel
+BuildRequires: mpfi-devel
BuildRequires: mpsolve-devel
BuildRequires: nauty
BuildRequires: normaliz
BuildRequires: ntl-devel
-BuildRequires: %{blaslib}-devel
BuildRequires: pkgconfig(bdw-gc) >= 7.6.2
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(ncurses)
BuildRequires: polymake
-BuildRequires: python3
+BuildRequires: python3-devel
BuildRequires: qd-devel
BuildRequires: readline-devel
+BuildRequires: tbb-devel
+BuildRequires: texinfo
BuildRequires: time
BuildRequires: tinyxml2-devel
BuildRequires: TOPCOM
@@ -248,8 +241,12 @@ Requires: gfan
Requires: hicolor-icon-theme
Requires: lrslib-utils
Requires: nauty
+Requires: normaliz
Requires: TOPCOM
+# M2-help
+Requires: xdg-utils
+
Recommends: mathicgb
%if 0%{?common}
@@ -265,13 +262,6 @@ Provides: Macaulay2-emacs = %{version}-%{release}
Provides: macaulay2 = %{version}-%{release}
-# M2-help
-Requires: xdg-utils
-
-%if 0%{?system_normaliz}
-Requires: normaliz
-%endif
-
# Macaulay2 no longer builds successfully on 32-bit platforms
# https://bugzilla.redhat.com/show_bug.cgi?id=1874318
ExcludeArch: %{ix86} %{arm}
@@ -302,11 +292,6 @@ install -p -m755 %{SOURCE20} ./etags
## bundled code
install -p -m644 %{SOURCE100} BUILD/tarfiles/
-%if ! 0%{?system_normaliz}
-sed -e '/PROGRAMS =/aPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \
- -e '/PRECONFIGURE/d' \
- -i libraries/normaliz/Makefile.in
-%endif
install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE105} \
%{SOURCE108} BUILD/tarfiles/
sed -i 's/\(VERSION = \).*/\1%{mpfrver}/' libraries/mpfr/Makefile.in
@@ -321,11 +306,13 @@ tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1
patch -d submodules/mathic -p0 < %{SOURCE203}
## patches for bundled code
-sed -e 's,--with-blas,&=%{_includedir}/%{blaslib} --with-ntl,' \
+sed -e 's,--with-blas,&=%{_includedir}/flexiblas --with-ntl,' \
-e 's,2\.6\.0,%{flintver},' \
-i libraries/flint/Makefile.in
cp -p %{SOURCE200} libraries/linbox/patch-%{linboxver}
-cp -p %{SOURCE201} libraries/factory/patch-%{factoryver}
+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} \
@@ -362,16 +349,15 @@ if [ "$HOME" = "/builddir" ]; then
fi
# Use, but don't build, cddlib, fflas-ffpack, and gc. Use the static versions
-# of libfplll and givaro. Do not invoke git on a nonrepository. Link with
-# blaslib instead of the reference blas and lapack. Fix typos.
-sed -e 's/^BUILD_cddlib=yes/BUILD_cddlib=no/' \
- -e 's/^BUILD_gc=yes/BUILD_gc=no/' \
+# of libfplll and givaro. Link with flexiblas instead of the reference blas
+# and lapack. Fix typos.
+sed -e 's/BUILD_cddlib=yes/BUILD_cddlib=no/' \
+ -e 's/BUILD_gc=yes/BUILD_gc=no/' \
-e 's/BUILD_fflas_ffpack=yes/BUILD_fflas_ffpack=no/' \
- -e 's/^\(GIT_DESCRIPTION=\).*/\1"unknown"/' \
-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,-l%{blaslib},' \
+ -e 's,-llapack -lrefblas,-lflexiblas,' \
-e 's,\$added_fclibs != yes,"$added_fclibs" != yes,' \
-i configure.ac
@@ -399,7 +385,7 @@ pushd BUILD/%{_target_platform}
CPPFLAGS="-I%{_includedir}/cddlib -I%{_includedir}/frobby" \
CFLAGS="${optflags} -fsigned-char" \
CXXFLAGS="${optflags} -fsigned-char" \
-LIBS="-l%{blaslib}" \
+LIBS="-lflexiblas" \
../../configure \
--build=%{_build} \
--host=%{_host} \
@@ -420,7 +406,7 @@ LIBS="-l%{blaslib}" \
--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 -> blaslib)
+ # 2. We sneakily substitute one library for another (lapack -> flexiblas)
# 3. Have to be linked with the static library (fplll and givaro)
popd
@@ -474,7 +460,7 @@ appstream-util validate-relax --nonet \
%{buildroot}%{_metainfodir}/%{name}.metainfo.xml
# Byte compile the Emacs files, and move the documentation
-pushd %{buildroot}%{_emacs_sitelispdir}/%{name}
+pushd %{buildroot}%{_emacs_sitelispdir}/macaulay2
mv M2-emacs* %{buildroot}%{_pkgdocdir}
mv README.md %{buildroot}%{_pkgdocdir}/README-emacs.md
%{_emacs_bytecompile} *.el
@@ -492,7 +478,11 @@ rm -fr %{buildroot}/builddir
CFLAGS="%{build_cflags}" \
CXXFLAGS="%{build_cxxflags}" \
LDFLAGS="%{build_ldflags}" \
-time make -k check -C BUILD/%{_target_platform} Verbose=true ||:
+
+# The test suite has grown to the point where it takes many hours to run.
+# Just run the most basic tests.
+make check -C BUILD/%{_target_platform}/Macaulay2/e
+make check -C BUILD/%{_target_platform}/Macaulay2/bin
%files
@@ -511,10 +501,13 @@ time make -k check -C BUILD/%{_target_platform} Verbose=true ||:
%{_docdir}/Macaulay2/
%{_infodir}/*.info*
%{_mandir}/man1/*
-%{_emacs_sitelispdir}/%{name}/
+%{_emacs_sitelispdir}/macaulay2/
%changelog
+* 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
diff --git a/mpfr-4.1.0.patch b/mpfr-4.1.0.patch
new file mode 100644
index 0000000..30775a5
--- /dev/null
+++ b/mpfr-4.1.0.patch
@@ -0,0 +1,1747 @@
+--- 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 8f73cc5..d65ebe7 100644
--- a/sources
+++ b/sources
@@ -1,11 +1,11 @@
SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d
-SHA512 (Macaulay2-1.17.tar.gz) = de6d903fcf85fe51757d3fad31b59d4346072e04da889ad54128e0c4dd8485e62721a8888b9015fc1e7af07d1bb529b55e763216095b816b5b37ab5bd18cf127
+SHA512 (Macaulay2-1.18.tar.gz) = 7c5a5c550a206ac11fa8cb5345af16f1244cebd40b0bf4ba8681192b4d579b90136d52d15650052d5fa0efc0f1f356a23e90788d2606d69e1e054d8475ce86db
SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5
-SHA512 (cddlib-094h.tar.gz) = 94a3ef03fd86ece7e61e4f9bec283862594b05a6faca76897e33ad15762527c885cee5439bb8a5d337a608ceb17baff24910da326071a3107df17a0c07f5e774
+SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f
SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818
SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82
-SHA512 (factory-4.1.3.tar.gz) = 38e75556bcf8c9f4610dd5322d20b339d1c5ad9a6400f20d1bce5317bc4f3fdb97e33294088ea7b80e9bda1c482dd1e5327ec408d9f1dadf3c28c2b928519053
-SHA512 (flint-2.6.3.tar.gz) = 8e71570364c789b1d4eaaa5f5adf10212cab47bf1a9f45c333211035ed021a86bb7b1de1feec51e83b2e113e8168853e370f127d2d2b1e941a12aec71fe8ae9e
+SHA512 (factory-4.2.0.tar.gz) = 4da0414c69c531b9b3744b7f2b20524ed11637dd848b8ab929be383143e94ff083165df34ae69ca8f973911969e55e263416dfd0a8038eb847bcdf26e72bd9ad
+SHA512 (flint-2.7.1.tar.gz) = abea97228e91089d82a9a44714e719064bef261c45f5f5b24700955bb841cc98a8182e04e6054fcbcaa3bd92f2f95a82bd5d168ec2171af6a58d4f71eb0a479a
SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6
SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d
SHA512 (givaro-4.1.1.tar.gz) = baaf139f42176838c541143a5b69acf47a8f31c17020a85cf413ce18ade2c3048e009d15c2acf4d71041c0776cd42f5fedb1c183ce1cc0f85cb8672ceac00ee7
@@ -14,8 +14,8 @@ SHA512 (gtest-1.10.0.tar.gz) = bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b0
SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf6adec6622f557c332f09e7eb46f71e5e3f2e852f25a640bde2bf9f4be7205cecf01cb07b6bc8
SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29
SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0
-SHA512 (lrslib-062.tar.gz) = 78fa6d470b2dd9cb06d1d15023debd8fafc27ed4df93cd90ef746071755f6b1fe9ee2c6a24659030b9a8851bd3ee3a699407586d320f3760c3d8a3a1c79d7116
-SHA512 (M2-emacs-d180956.tar.gz) = e50a2c739624bb4bd3ccf295f7b392edf3531f7f4d73026d9efbc11200ce4b7477b572805577ce0b1b8af115e2467989b9d31b9750a6a13c6a770bacaaa68929
+SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001
+SHA512 (M2-emacs-01af405.tar.gz) = c3b59fa53a75682e9b3a719665169aecac97d341b2ac90a076373b235e1da337f8065b2874231db666ed0a2f885487824a31d090aa079f96f1c6e6ba58d24490
SHA512 (mathic-1.0.tar.gz) = dd675985fc2a5c7efab3ec6492e4b4e4d7273f4d88bdee6d9dc19174d3e319baa5fd94994563efe46c7ed7685e253c173606efdfb2a66af2d1db35e6265d473d
SHA512 (mathicgb-1.0.tar.gz) = 09db7dd226b4a50fea5dbcf175d1da2136541b33ae098ed540735315a4eb33be2ca62d7c996b0d86470d1cad9d93261fd211635f84292ecbf7da04c83f4950f2
SHA512 (memtailor-1.0.tar.gz) = 3d93cad8a8e62c4f4b8bd074019f44d2fd8b35cf7e50ccafea85fe15aaeb3af0b175bcd7ed055ee3d789ad557fdb83382e4b66826e7fb849521ff375f25fd16f
From f141288b8042a7eb04911c33b34c35470f498e6b Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Tue, 29 Jun 2021 14:38:09 -0600
Subject: [PATCH 07/57] Rebuild for ntl 11.5.1.
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 21af2b1..38bba12 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -48,7 +48,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.18
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2 or GPLv3
URL: http://macaulay2.com/
@@ -505,6 +505,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
From 89e532a3e70f027b206d02f11e9d7918a284a956 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Wed, 21 Jul 2021 10:59:02 +0000
Subject: [PATCH 08/57] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
From b480014616c0a9298a7bfe54ec66859ffefe5074 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Wed, 21 Jul 2021 15:53:37 +0000
Subject: [PATCH 09/57] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 38bba12..f672199 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -48,7 +48,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.18
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2 or GPLv3
URL: http://macaulay2.com/
@@ -505,6 +505,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
From 78c38cc9b1193c19d7ebf26a3701027d7f47cb24 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely
Date: Fri, 6 Aug 2021 22:00:49 +0100
Subject: [PATCH 10/57] Rebuilt for Boost 1.76
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index f672199..87b2c75 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -48,7 +48,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.18
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2 or GPLv3
URL: http://macaulay2.com/
@@ -505,6 +505,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
From 782f9fde143a2fe8c53f774aea7a62ac720e4e3b Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Thu, 25 Nov 2021 20:43:36 -0700
Subject: [PATCH 11/57] Version 1.19.
---
Macaulay2-1.16-ulimit.patch | 22 ++--
Macaulay2.spec | 30 +++--
README.md | 7 ++
factory-4.1.3.patch | 72 -----------
mathic-1.0.patch | 66 ++++------
mathicgb-1.0.patch | 237 +++---------------------------------
sources | 12 +-
7 files changed, 89 insertions(+), 357 deletions(-)
create mode 100644 README.md
delete mode 100644 factory-4.1.3.patch
diff --git a/Macaulay2-1.16-ulimit.patch b/Macaulay2-1.16-ulimit.patch
index 2da04af..9d25e39 100644
--- a/Macaulay2-1.16-ulimit.patch
+++ b/Macaulay2-1.16-ulimit.patch
@@ -1,5 +1,5 @@
---- M2/GNUmakefile.in.orig 2021-01-08 08:30:25.000000000 -0700
-+++ M2/GNUmakefile.in 2021-02-15 15:47:32.292569472 -0700
+--- M2/GNUmakefile.in.orig 2021-11-17 15:21:40.000000000 -0700
++++ M2/GNUmakefile.in 2021-11-24 16:10:22.499027509 -0700
@@ -136,7 +136,7 @@ build-in-$1: submodules/$1/Makefile
$(MAKE) -C submodules/$1 all
check-in-$1: run-configure-in-$1
@@ -9,8 +9,8 @@
endif
install-in-$1: build-in-$1; + $(MAKE) -C submodules/$1 install
---- M2/libraries/Makefile.library.in.orig 2021-01-08 08:30:25.000000000 -0700
-+++ M2/libraries/Makefile.library.in 2021-02-15 15:48:02.429394066 -0700
+--- M2/libraries/Makefile.library.in.orig 2021-11-17 15:21:40.000000000 -0700
++++ M2/libraries/Makefile.library.in 2021-11-24 16:10:22.499027509 -0700
@@ -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
@@ -26,10 +26,10 @@
LIMIT := :
ifeq (@ULIMIT_T@,yes)
LIMIT += ; ulimit -t $(TLIMIT)
---- M2/Macaulay2/m2/basictests/Makefile.in.orig 2021-01-08 08:30:25.000000000 -0700
-+++ M2/Macaulay2/m2/basictests/Makefile.in 2021-02-15 15:47:13.769677288 -0700
+--- M2/Macaulay2/m2/basictests/Makefile.in.orig 2021-11-17 15:21:40.000000000 -0700
++++ M2/Macaulay2/m2/basictests/Makefile.in 2021-11-24 16:10:22.499027509 -0700
@@ -22,17 +22,17 @@ $(TESTRESULTS) : @pre_exec_prefix@/bin/M
- ARGS := --silent -q --stop --no-setup -e 'srcdir = "@srcdir@/"'
+ ARGS := --silent -q --stop --no-core -e 'srcdir = "@srcdir@/"'
ifeq "@DEBUG@" "no"
-TLIMIT ?= 20
@@ -53,8 +53,8 @@
LIMIT :=
ifeq (@ULIMIT_T@,yes)
---- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2021-01-08 08:30:25.000000000 -0700
-+++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2021-02-15 15:47:13.770677282 -0700
+--- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2021-11-17 15:21:40.000000000 -0700
++++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2021-11-24 16:10:22.500027511 -0700
@@ -15,16 +15,16 @@ diff:
LIMIT :=
@@ -76,8 +76,8 @@
endif
---- M2/Macaulay2/tests/Makefile.test.in.orig 2021-01-08 08:30:25.000000000 -0700
-+++ M2/Macaulay2/tests/Makefile.test.in 2021-02-15 15:49:32.468869998 -0700
+--- M2/Macaulay2/tests/Makefile.test.in.orig 2021-11-17 15:21:40.000000000 -0700
++++ M2/Macaulay2/tests/Makefile.test.in 2021-11-24 16:10:22.500027511 -0700
@@ -6,18 +6,18 @@ DEFERRED ?= no
DOTS ?= ../..
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 87b2c75..aafe8f4 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -47,8 +47,8 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
-Version: 1.18
-Release: 4%{?dist}
+Version: 1.19
+Release: 1%{?dist}
License: GPLv2 or GPLv3
URL: http://macaulay2.com/
@@ -78,18 +78,18 @@ Source101: http://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.xz
Provides: bundled(mpfr) = %{mpfrver}
# FLINT is bundled because it must be linked with the specially-built MPFR
-%global flintver 2.7.1
+%global flintver 2.8.3
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.0
+%global factoryver 4.2.1
Source103: http://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode/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 4d23c24302c2395efbbeef9ea1fd52e4f0f56f65
+%global mathicgbcommit 9ed59d9afe69253ea1d1ddeeaf5eb300d45ed9e1
Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz
Provides: bundled(mathicgb) = %{mathicgbver}
@@ -99,13 +99,13 @@ Source105: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode
# MEMTAILOR is bundled because it causes garbage collector crashes otherwise
%global memtailorver 1.0
-%global memtailorcommit 777c5d2d341ff742850b86e2fb29d24007ac9bae
+%global memtailorcommit 123afe02b7a458faa4be8ec3a85d6a362a5e7c89
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 cc52f4685b1e1f1af084d22cfb730f62e34c2dfc
+%global mathiccommit 68da8d452dcafeb07fc8749839c566662a2f9b03
Source107: https://github.com/Macaulay2/mathic/tarball/%{mathiccommit}/mathic-%{mathicver}.tar.gz
Provides: bundled(mathic) = %{mathicver}
@@ -361,6 +361,12 @@ sed -e 's/BUILD_cddlib=yes/BUILD_cddlib=no/' \
-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-memtailor.*//' GNUmakefile.in
+
# (re)generate configure
autoreconf -fi .
@@ -379,10 +385,15 @@ optflags=$(sed 's/-O2/-O/g' <<< "%{optflags}")
optflags="%{optflags}"
%endif
+# Possible bug in Macaulay2 1.19: the memtailor, mathic, and mathicgb headers
+# cannot be found. We work around this here. See if the problem has been fixed
+# in later versions.
+CPPFLAGS="-I$PWD/submodules/memtailor/src -I$PWD/submodules/mathic/src -I$PWD/submodules/mathicgb/src"
+
## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex
mkdir -p BUILD/%{_target_platform}
pushd BUILD/%{_target_platform}
-CPPFLAGS="-I%{_includedir}/cddlib -I%{_includedir}/frobby" \
+CPPFLAGS="$CPPFLAGS -I%{_includedir}/cddlib -I%{_includedir}/frobby" \
CFLAGS="${optflags} -fsigned-char" \
CXXFLAGS="${optflags} -fsigned-char" \
LIBS="-lflexiblas" \
@@ -505,6 +516,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7d3e139
--- /dev/null
+++ b/README.md
@@ -0,0 +1,7 @@
+# Macaulay2
+
+[Macaulay2](http://macaulay2.com/) is a system for computing in commutative
+algebra, algebraic geometry and related fields. The system was originally
+written by Dan Grayson and Mike Stillman. David Eisenbud joined the project a
+number of years ago, and many users are writing packages for the system, and
+some are contributing source code.
diff --git a/factory-4.1.3.patch b/factory-4.1.3.patch
deleted file mode 100644
index 71f2cf4..0000000
--- a/factory-4.1.3.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- factory-4.1.3/ftmpl_inst.cc.orig 2019-04-10 10:20:16.000000000 -0600
-+++ factory-4.1.3/ftmpl_inst.cc 2021-01-12 13:57:49.211563226 -0700
-@@ -73,7 +73,7 @@ template List Difference ( con
- // NTL 6
- #ifdef HAVE_NTL
- #include
--#if NTL_MAJOR_VERSION == 6
-+#if NTL_MAJOR_VERSION >= 6
-
- #include
- #include
---- factory-4.1.3/m4/flags.m4.orig 2020-05-14 08:01:02.000000000 -0600
-+++ factory-4.1.3/m4/flags.m4 2021-01-12 13:55:01.715902074 -0700
-@@ -122,7 +122,7 @@ AC_DEFUN([SING_CHECK_SET_ARGS], [
- ## for clang: -Wunneeded-internal-declaration
-
- if test "x${ENABLE_OPTIMIZATION}" != xno; then
-- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
-+ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
- # -O3 - crashes gcc???!!!
- # -fpermissive
- AC_LANG_PUSH([C])
---- factory-4.1.3/m4/flint-check.m4.orig 2020-05-14 08:01:02.000000000 -0600
-+++ factory-4.1.3/m4/flint-check.m4 2021-01-12 13:54:28.179969923 -0700
-@@ -44,7 +44,7 @@ if test "$FLINT_HOME_PATH" = "$DEFAULT_C
-
- # we suppose that mpfr and mpir to be in the same place or available by default
- CFLAGS="${BACKUP_CFLAGS} ${GMP_CPPFLAGS}"
-- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}"
-+ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}"
-
- AC_CHECK_HEADER([flint/fmpz.h],
- [AC_CHECK_LIB(flint,fmpz_init,
-@@ -66,7 +66,7 @@ if test "x$flint_found" = "xno" ; then
-
- # we suppose that mpfr and mpir to be in the same place or available by default
- CFLAGS="${BACKUP_CFLAGS} ${FLINT_CFLAGS} ${GMP_CPPFLAGS}"
-- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}"
-+ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}"
-
- AC_CHECK_LIB(flint,fmpz_init,
- [flint_found="yes"],
---- factory-4.1.3/configure.orig 2020-05-14 08:16:23.000000000 -0600
-+++ factory-4.1.3/configure 2021-01-12 13:59:22.956373563 -0700
-@@ -5811,7 +5811,7 @@ done
- ## for clang: -Wunneeded-internal-declaration
-
- if test "x${ENABLE_OPTIMIZATION}" != xno; then
-- OPTFLAGS="-g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
-+ OPTFLAGS="-Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks"
- # -O3 - crashes gcc???!!!
- # -fpermissive
- ac_ext=c
-@@ -22401,7 +22401,7 @@ if test "$FLINT_HOME_PATH" = "$DEFAULT_C
-
- # we suppose that mpfr and mpir to be in the same place or available by default
- CFLAGS="${BACKUP_CFLAGS} ${GMP_CPPFLAGS}"
-- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}"
-+ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}"
-
- ac_fn_c_check_header_mongrel "$LINENO" "flint/fmpz.h" "ac_cv_header_flint_fmpz_h" "$ac_includes_default"
- if test "x$ac_cv_header_flint_fmpz_h" = xyes; then :
-@@ -22460,7 +22460,7 @@ if test "x$flint_found" = "xno" ; then
-
- # we suppose that mpfr and mpir to be in the same place or available by default
- CFLAGS="${BACKUP_CFLAGS} ${FLINT_CFLAGS} ${GMP_CPPFLAGS}"
-- LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}"
-+ LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmpz_init in -lflint" >&5
- $as_echo_n "checking for fmpz_init in -lflint... " >&6; }
-
diff --git a/mathic-1.0.patch b/mathic-1.0.patch
index e479efc..d45f2a6 100644
--- a/mathic-1.0.patch
+++ b/mathic-1.0.patch
@@ -1,16 +1,25 @@
---- src/mathic/ColumnPrinter.cpp.orig 2020-07-09 10:51:54.000000000 -0600
-+++ src/mathic/ColumnPrinter.cpp 2021-02-12 09:12:52.257016443 -0700
-@@ -193,7 +193,7 @@ namespace mathic {
- MATHIC_ASSERT(maxSize == std::string("100.0%").size());
- const auto size = str.size();
- if (size > maxSize)
-- return std::move(str);
-+ return str;
- return std::string(maxSize - str.size(), ' ') + std::move(str);
- }
+--- Makefile.am.orig 2021-09-30 19:42:32.000000000 -0600
++++ Makefile.am 2021-10-07 09:21:40.078080233 -0600
+@@ -10,7 +10,7 @@ libmathic_la_CPPFLAGS = $(DEPS_CFLAGS)
+ lib_LTLIBRARIES = libmathic.la
---- src/mathic/error.cpp.orig 2020-07-09 10:51:54.000000000 -0600
-+++ src/mathic/error.cpp 2021-02-12 09:12:33.688040243 -0700
+ # set the C++ compiler to include src/
+-AM_CXXFLAGS=-I$(top_srcdir)/src/ -std=gnu++0x
++AM_CXXFLAGS=-I$(top_srcdir)/src/ -std=gnu++14
+
+ # libraries that are needed by this library
+ libmathic_la_LIBADD= $(DEPS_LIBS)
+@@ -85,7 +85,7 @@ if with_gtest
+ TESTS=unittest
+ check_PROGRAMS=$(TESTS)
+
+-unittest_CXXFLAGS = -I$(top_srcdir)/src/ -std=gnu++0x
++unittest_CXXFLAGS = -I$(top_srcdir)/src/ -std=gnu++14
+ unittest_LDADD = $(top_builddir)/libmathic.la $(DEPS_LIBS) -lmemtailor -lpthread
+ unittest_CPPFLAGS = $(DEPS_CFLAGS)
+
+--- src/mathic/error.cpp.orig 2021-09-30 19:42:32.000000000 -0600
++++ src/mathic/error.cpp 2021-10-07 09:21:23.097049833 -0600
@@ -2,15 +2,15 @@
#include
@@ -30,8 +39,8 @@
(const std::string& errorMsg, const char* file, unsigned int lineNumber) {
std::ostringstream err;
---- src/mathic/error.h.orig 2020-07-09 10:51:54.000000000 -0600
-+++ src/mathic/error.h 2021-02-12 09:12:33.689040242 -0700
+--- src/mathic/error.h.orig 2021-09-30 19:42:32.000000000 -0600
++++ src/mathic/error.h 2021-10-07 09:21:23.098049835 -0600
@@ -18,26 +18,19 @@ namespace mathic {
InternalMathicException(const std::string& str): logic_error(str) {}
};
@@ -64,32 +73,3 @@
throw Exception("ERROR: " + errorMsg + '\n');
}
---- src/mathic/PairQueue.h.orig 2020-07-09 10:51:54.000000000 -0600
-+++ src/mathic/PairQueue.h 2021-02-12 15:20:39.649741958 -0700
-@@ -149,7 +149,7 @@ namespace mathic {
- template
- class SupportRetirement {
- public:
-- void addNextIndex() {mRetired.push_back(false);}
-+ void addNextIndex() {mRetired.push_back('\0');}
- void undoAdd() {
- MATHIC_ASSERT(!mRetired.empty());
- mRetired.pop_back();
-@@ -157,15 +157,12 @@ namespace mathic {
-
- void retireIndex(size_t index) {
- MATHIC_ASSERT(index < mRetired.size());
-- mRetired[index] = true;
-+ mRetired[index] = '\1';
- }
-
- bool retired(size_t index) const {
- MATHIC_ASSERT(index < mRetired.size());
-- // if we just cast to bool here the compiler has to ensure that the
-- // value is not something other than 0 or 1. By reinterpreting the
-- // reference as a bool we free the compiler from this obligation.
-- return reinterpret_cast(mRetired[index]);
-+ return mRetired[index] != '\0';
- }
-
- private:
diff --git a/mathicgb-1.0.patch b/mathicgb-1.0.patch
index 7baf96c..1a0f8a3 100644
--- a/mathicgb-1.0.patch
+++ b/mathicgb-1.0.patch
@@ -1,83 +1,5 @@
---- src/mathicgb/F4MatrixBuilder.cpp.orig 2021-01-09 10:32:37.000000000 -0700
-+++ src/mathicgb/F4MatrixBuilder.cpp 2021-02-12 09:09:35.256270557 -0700
-@@ -146,7 +146,7 @@ void F4MatrixBuilder::buildMatrixAndClea
- *monoid().alloc().release(),
- *monoid().alloc().release()
- };
-- return std::move(data);
-+ return data;
- });
-
- mgb::mtbb::parallel_do(mTodo.begin(), mTodo.end(),
---- src/mathicgb/F4MatrixProjection.cpp.orig 2021-01-09 10:32:37.000000000 -0700
-+++ src/mathicgb/F4MatrixProjection.cpp 2021-02-12 09:09:35.257270555 -0700
-@@ -275,7 +275,7 @@ done:;
- qm.bottomLeft = bottom.moveLeft();
- qm.bottomRight = bottom.moveRight();
-
-- return std::move(qm);
-+ return qm;
- }
-
- namespace {
-@@ -352,7 +352,7 @@ QuadMatrix F4MatrixProjection::makeAndCl
- qm.bottomRight = std::move(right.second);
- qm.leftColumnMonomials = std::move(mLeftMonomials);
- qm.rightColumnMonomials = std::move(mRightMonomials);
-- return std::move(qm);
-+ return qm;
- }
-
- MATHICGB_NAMESPACE_END
---- src/mathicgb/F4MatrixReducer.cpp.orig 2021-01-09 10:32:37.000000000 -0700
-+++ src/mathicgb/F4MatrixReducer.cpp 2021-02-12 09:09:35.258270554 -0700
-@@ -314,7 +314,7 @@ namespace {
- if (!zero)
- reduced.rowDone();
- }});
-- return std::move(reduced);
-+ return reduced;
- }
-
- SparseMatrix reduceToEchelonFormSparse(
-@@ -392,7 +392,7 @@ namespace {
- pivotRowOfCol[pivotCol] = reduced.rowCount();
- rowToReduce.appendTo(reduced);
- }
-- return std::move(reduced);
-+ return reduced;
- }
-
- SparseMatrix reduceToEchelonForm(
-@@ -546,7 +546,7 @@ namespace {
- for (size_t row = 0; row < rowCount; ++row)
- if (!dense[row].empty())
- dense[row].appendTo(reduced);
-- return std::move(reduced);
-+ return reduced;
- }
- }
-
-@@ -686,7 +686,7 @@ SparseMatrix reduceToEchelonFormShrawan(
- if (!rowIsZero)
- reduced.rowDone();
- }
-- return std::move(reduced);
-+ return reduced;
- }
-
- SparseMatrix reduceToEchelonFormShrawanDelayedModulus(
-@@ -723,7 +723,7 @@ SparseMatrix reduceToEchelonFormShrawanD
- if (!rowIsZero)
- reduced.rowDone();
- }
-- return std::move(reduced);
-+ return reduced;
- }
-
- SparseMatrix F4MatrixReducer::reduceToBottomRight(const QuadMatrix& matrix) {
---- src/mathicgb/MathicIO.hpp.orig 2021-01-09 10:32:37.000000000 -0700
-+++ src/mathicgb/MathicIO.hpp 2021-02-12 09:09:35.258270554 -0700
+--- src/mathicgb/MathicIO.hpp.orig 2021-09-30 19:41:54.000000000 -0600
++++ src/mathicgb/MathicIO.hpp 2021-11-24 16:04:28.969499776 -0700
@@ -300,7 +300,7 @@ auto MathicIO::readOrder(
componentsAscendingDesired,
schreyering
@@ -87,144 +9,25 @@
}
template
-@@ -355,7 +355,7 @@ Basis MathicIO::readBasis(
- *p = p->polyWithTermsDescending();
- basis.insert(std::move(p));
- }
-- return std::move(basis);
-+ return basis;
- }
+--- src/mathicgb/MonoMonoid.hpp.orig 2021-09-30 19:41:54.000000000 -0600
++++ src/mathicgb/MonoMonoid.hpp 2021-11-24 16:05:44.657612757 -0700
+@@ -573,7 +573,8 @@ public:
+ // for unaligned access. Performance seems to be no worse than for using
+ // 32 bit integers directly.
- template
-@@ -391,7 +391,7 @@ Poly MathicIO::readPolyDoNotOrder
+- if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder))
++ if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder) ||
++ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return isProductOf(a, b, ab);
- // also skips whitespace
- if (in.match('0') || in.match("+0") || in.match("-0"))
-- return std::move(p);
-+ return p;
- MATHICGB_ASSERT(!in.peekWhite());
-
- auto mono = ring.monoid().alloc();
-@@ -402,7 +402,7 @@ Poly MathicIO::readPolyDoNotOrder
- readTerm(ring, readComponent, coef, mono, in);
- p.append(coef.value(), *mono);
- } while (!in.peekWhite() && !in.matchEOF());
-- return std::move(p);
-+ return p;
- }
-
- template
---- src/mathicgb/MonoMonoid.hpp.orig 2021-01-09 10:32:37.000000000 -0700
-+++ src/mathicgb/MonoMonoid.hpp 2021-02-15 13:14:11.464204458 -0700
-@@ -582,6 +582,7 @@ public:
- MATHICGB_ASSERT(i == varCount() / 2 || access(a, i*2+1) >= 0);
-
- uint64 A, B, AB;
-+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- // We have to use std::memcpy here because just casting to a int64 breaks
- // the strict aliasing rule which implies undefined behavior. Both MSVC and
- // gcc don't actually call memcpy here. MSVC is a tiny bit slower for this
-@@ -589,6 +590,11 @@ public:
- std::memcpy(&A, ptr(a, i*2), 8);
- std::memcpy(&B, ptr(b, i*2), 8);
- std::memcpy(&AB, ptr(ab, i*2), 8);
-+#else
-+ A = *ptr(a, i*2) | (((uint64)*ptr(a, i*2 + 1)) << 32);
-+ B = *ptr(b, i*2) | (((uint64)*ptr(b, i*2 + 1)) << 32);
-+ AB = *ptr(ab, i*2) | (((uint64)*ptr(ab, i*2 + 1)) << 32);
-+#endif
- orOfXor |= AB ^ (A + B);
- }
- MATHICGB_ASSERT((orOfXor == 0) == isProductOf(a, b, ab));
-@@ -608,11 +614,19 @@ public:
uint64 orOfXor = 0;
- for (VarIndex i = varCount() / 2; i != beforeEntriesIndexBegin(); --i) {
- uint64 A1, A2, B, A1B, A2B;
-+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- std::memcpy(&A1, ptr(a1, i*2), 8);
- std::memcpy(&A2, ptr(a2, i*2), 8);
- std::memcpy(&B, ptr(b, i*2), 8);
- std::memcpy(&A1B, ptr(a1b, i*2), 8);
- std::memcpy(&A2B, ptr(a2b, i*2), 8);
-+#else
-+ A1 = *ptr(a1, i*2) | (((uint64)*ptr(a1, i*2 + 1)) << 32);
-+ A2 = *ptr(a2, i*2) | (((uint64)*ptr(a2, i*2 + 1)) << 32);
-+ B = *ptr(b, i*2) | (((uint64)*ptr(b, i*2 + 1)) << 32);
-+ A1B = *ptr(a1b, i*2) | (((uint64)*ptr(a1b, i*2 + 1)) << 32);
-+ A2B = *ptr(a2b, i*2) | (((uint64)*ptr(a2b, i*2 + 1)) << 32);
-+#endif
- orOfXor |= (A1B ^ (A1 + B)) | (A2B ^ (A2 + B));
- }
- MATHICGB_ASSERT
---- src/mathicgb/MonoProcessor.hpp.orig 2021-01-09 10:32:37.000000000 -0700
-+++ src/mathicgb/MonoProcessor.hpp 2021-02-12 14:47:07.794824672 -0700
-@@ -121,7 +121,6 @@ private:
- return *mSchreyerMultipliers[component];
- }
+@@ -602,7 +603,8 @@ public:
+ ConstMonoRef a1b,
+ ConstMonoRef a2b
+ ) const {
+- if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder))
++ if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder) ||
++ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ return (isProductOf(a1, b, a1b) && isProductOf(a2, b, a2b));
-- bool mOrderFromLeft;
- bool mComponentsAscendingDesired;
- Component mComponentCount;
- bool mSchreyering;
---- src/mathicgb/QuadMatrixBuilder.cpp.orig 2021-01-09 10:32:37.000000000 -0700
-+++ src/mathicgb/QuadMatrixBuilder.cpp 2021-02-12 09:09:35.258270554 -0700
-@@ -130,7 +130,7 @@ QuadMatrix QuadMatrixBuilder::buildMatri
- mBottomRight.clear();
-
- MATHICGB_ASSERT(out.debugAssertValid());
-- return std::move(out);
-+ return out;
- }
-
- MATHICGB_NAMESPACE_END
---- src/mathicgb/QuadMatrix.cpp.orig 2021-01-09 10:32:37.000000000 -0700
-+++ src/mathicgb/QuadMatrix.cpp 2021-02-12 09:09:35.258270554 -0700
-@@ -247,7 +247,7 @@ QuadMatrix QuadMatrix::toCanonical() con
- matrix.leftColumnMonomials = leftColumnMonomials;
- matrix.rightColumnMonomials = rightColumnMonomials;
-
-- return std::move(matrix);
-+ return matrix;
- }
-
- std::ostream& operator<<(std::ostream& out, const QuadMatrix& qm) {
-@@ -310,7 +310,7 @@ namespace {
- permutation[columns[col].second] = col;
- }
-
-- return std::move(permutation);
-+ return permutation;
- }
- }
-
---- src/mathicgb/RawVector.hpp.orig 2021-01-09 10:32:37.000000000 -0700
-+++ src/mathicgb/RawVector.hpp 2021-01-12 14:26:02.384372562 -0700
-@@ -3,6 +3,7 @@
- #ifndef MATHICGB_RAW_VECTOR_GUARD
- #define MATHICGB_RAW_VECTOR_GUARD
-
-+#include
- #include
- #include
- #include
---- src/mathicgb/SparseMatrix.cpp.orig 2021-01-09 10:32:37.000000000 -0700
-+++ src/mathicgb/SparseMatrix.cpp 2021-01-12 14:26:30.569325348 -0700
-@@ -1,6 +1,7 @@
- // MathicGB copyright 2012 all rights reserved. MathicGB comes with ABSOLUTELY
- // NO WARRANTY and is licensed as GPL v2.0 or later - see LICENSE.txt.
- #include "stdinc.h"
-+#include
- #include "SparseMatrix.hpp"
-
- #include "Poly.hpp"
---- src/mathicgb/TypicalReducer.cpp.orig 2021-01-09 10:32:37.000000000 -0700
-+++ src/mathicgb/TypicalReducer.cpp 2021-02-12 09:09:35.258270554 -0700
-@@ -133,7 +133,7 @@ std::unique_ptr TypicalReducer::cl
- ring.freeMonomial(lcm);
- ring.freeMonomial(multiple1);
- ring.freeMonomial(multiple2);
-- return std::move(reduced);
-+ return reduced;
- }
-
- void TypicalReducer::classicReduceSPolySet
+ uint64 orOfXor = 0;
diff --git a/sources b/sources
index d65ebe7..6aab3c6 100644
--- a/sources
+++ b/sources
@@ -1,11 +1,11 @@
SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d
-SHA512 (Macaulay2-1.18.tar.gz) = 7c5a5c550a206ac11fa8cb5345af16f1244cebd40b0bf4ba8681192b4d579b90136d52d15650052d5fa0efc0f1f356a23e90788d2606d69e1e054d8475ce86db
+SHA512 (Macaulay2-1.19.tar.gz) = f72647ab923c36de44b861e15e4158c0ff4688be40795ad5def8954325f51ef07e79b43c2545e9e4c56b4f0efc6a59f6983a63416d288365e7e4fb08621301ca
SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5
SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f
SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818
SHA512 (Csdp-6.2.0.tgz) = 6f6c44abcb7b0e277f5a42a1e31acbd41c8fbdce0c1641982a48199fe1d922b28d86433d1a98ac71ae521bea04188a830c441db1e9d8eebf174debf501430e82
-SHA512 (factory-4.2.0.tar.gz) = 4da0414c69c531b9b3744b7f2b20524ed11637dd848b8ab929be383143e94ff083165df34ae69ca8f973911969e55e263416dfd0a8038eb847bcdf26e72bd9ad
-SHA512 (flint-2.7.1.tar.gz) = abea97228e91089d82a9a44714e719064bef261c45f5f5b24700955bb841cc98a8182e04e6054fcbcaa3bd92f2f95a82bd5d168ec2171af6a58d4f71eb0a479a
+SHA512 (factory-4.2.1.tar.gz) = c1c0009cefa769807082b2bf9defb01c286f1bfb9c0c0ac2a07ab87a8019694ff26ba4f7ad43082305dd4fe79a459a340d40f5a2088e963331512c71d3a374c0
+SHA512 (flint-2.8.3.tar.gz) = c3d35ac4c840d0985291f54c7a1cd3c54eb90b3016ae3e94e3051bf1e010f3a4b53b0f05cfa5df0c6f99f398e259b25ec3563515e04ec9f5f9187624b3206aa9
SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6
SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d
SHA512 (givaro-4.1.1.tar.gz) = baaf139f42176838c541143a5b69acf47a8f31c17020a85cf413ce18ade2c3048e009d15c2acf4d71041c0776cd42f5fedb1c183ce1cc0f85cb8672ceac00ee7
@@ -16,9 +16,9 @@ SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea
SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0
SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001
SHA512 (M2-emacs-01af405.tar.gz) = c3b59fa53a75682e9b3a719665169aecac97d341b2ac90a076373b235e1da337f8065b2874231db666ed0a2f885487824a31d090aa079f96f1c6e6ba58d24490
-SHA512 (mathic-1.0.tar.gz) = dd675985fc2a5c7efab3ec6492e4b4e4d7273f4d88bdee6d9dc19174d3e319baa5fd94994563efe46c7ed7685e253c173606efdfb2a66af2d1db35e6265d473d
-SHA512 (mathicgb-1.0.tar.gz) = 09db7dd226b4a50fea5dbcf175d1da2136541b33ae098ed540735315a4eb33be2ca62d7c996b0d86470d1cad9d93261fd211635f84292ecbf7da04c83f4950f2
-SHA512 (memtailor-1.0.tar.gz) = 3d93cad8a8e62c4f4b8bd074019f44d2fd8b35cf7e50ccafea85fe15aaeb3af0b175bcd7ed055ee3d789ad557fdb83382e4b66826e7fb849521ff375f25fd16f
+SHA512 (mathic-1.0.tar.gz) = 4c1dffe5fd45dfa5df9c01477828bba38905ec0b4b30052c821f535a1a8de34139fc91b364fb4fa779299c1ffb1a8a91ac37383d3bcb383f53c33055c7165f41
+SHA512 (mathicgb-1.0.tar.gz) = 5f419a0ad59610eba18edf69012603e0026c6de7c457546f40122b6fdd8bfb46a25b691cbdcd7e83c7495f21cbf1412c7b6a042e18e64500dfa18b368b3f9a5e
+SHA512 (memtailor-1.0.tar.gz) = 54bbc2711bc463d3200de82fcdb7abe1da0bb6c2c3bf1f27b68d24ed2500e55daec1b3f3855e1a67e1fb14c8ab9c05d2b88b4daba7e99bf709939749d6a90032
SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273
SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f
SHA512 (normaliz-3.7.2.tar.gz) = 044a1b5c7e877cdfceedbe6b283b982b66e58f0cc5b0ccf6a63a293044d1348290fde92531b4c4a0a58f5263bb7696a2511b5a1dff94222c9e56a2fe3fccb69b
From a2ad9ab6784fd63a43d4b6eba91ccbf3cb2fbe58 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Wed, 19 Jan 2022 19:28:35 +0000
Subject: [PATCH 12/57] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index aafe8f4..d3ed51e 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -48,7 +48,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.19
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2 or GPLv3
URL: http://macaulay2.com/
@@ -516,6 +516,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
From 0c8f1948445671ea434fb2f21e2411b9a7fc39b7 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Mon, 21 Feb 2022 09:25:53 -0700
Subject: [PATCH 13/57] Version 1.19.1. Disable LTO to work around segfaults.
---
Macaulay2.spec | 22 ++++++++++++++++------
sources | 10 +++++-----
2 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index d3ed51e..b184ccb 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -45,10 +45,16 @@
# The examples contain some python files which should not be byte compiled
%global _python_bytecompile_extra 0
+# Starting with GCC 12, Macaulay2 segfaults during the build on all
+# architectures when LTO is enabled. (With GCC 11, s390x did this, but the
+# other architectures did not.) Until somebody can figure out what is going
+# on, disable LTO universally.
+%define _lto_cflags %{nil}
+
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
-Version: 1.19
-Release: 2%{?dist}
+Version: 1.19.1
+Release: 1%{?dist}
License: GPLv2 or GPLv3
URL: http://macaulay2.com/
@@ -78,7 +84,7 @@ Source101: http://www.mpfr.org/mpfr-%{mpfrver}/mpfr-%{mpfrver}.tar.xz
Provides: bundled(mpfr) = %{mpfrver}
# FLINT is bundled because it must be linked with the specially-built MPFR
-%global flintver 2.8.3
+%global flintver 2.8.4
Source102: http://www.flintlib.org/flint-%{flintver}.tar.gz
Provides: bundled(flint) = %{flintver}
@@ -89,7 +95,7 @@ Provides: bundled(factory) = %{factoryver}
# MATHICGB is bundled because it must be built with different threading options
%global mathicgbver 1.0
-%global mathicgbcommit 9ed59d9afe69253ea1d1ddeeaf5eb300d45ed9e1
+%global mathicgbcommit 6a9cabf106ceb02d27b3147da3a83822bee48923
Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz
Provides: bundled(mathicgb) = %{mathicgbver}
@@ -99,13 +105,13 @@ Source105: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode
# MEMTAILOR is bundled because it causes garbage collector crashes otherwise
%global memtailorver 1.0
-%global memtailorcommit 123afe02b7a458faa4be8ec3a85d6a362a5e7c89
+%global memtailorcommit 95dbac776c475f4b1c2b08a8e8c6def14c8aaf9a
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 68da8d452dcafeb07fc8749839c566662a2f9b03
+%global mathiccommit f52234d2357410f702d5be60c0a8471b5731496b
Source107: https://github.com/Macaulay2/mathic/tarball/%{mathiccommit}/mathic-%{mathicver}.tar.gz
Provides: bundled(mathic) = %{mathicver}
@@ -516,6 +522,10 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
diff --git a/sources b/sources
index 6aab3c6..7d22a03 100644
--- a/sources
+++ b/sources
@@ -1,11 +1,11 @@
SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d
-SHA512 (Macaulay2-1.19.tar.gz) = f72647ab923c36de44b861e15e4158c0ff4688be40795ad5def8954325f51ef07e79b43c2545e9e4c56b4f0efc6a59f6983a63416d288365e7e4fb08621301ca
+SHA512 (Macaulay2-1.19.1.tar.gz) = 504f233ed7e4f954f0e91212c7a533655f18e8488e7462834b2a256faa891872b35af890808bde6695678916b68c45b4d3d74ae6963ec639bdd4c76c4fa4d53e
SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5
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 (flint-2.8.3.tar.gz) = c3d35ac4c840d0985291f54c7a1cd3c54eb90b3016ae3e94e3051bf1e010f3a4b53b0f05cfa5df0c6f99f398e259b25ec3563515e04ec9f5f9187624b3206aa9
+SHA512 (flint-2.8.4.tar.gz) = 56dbe7b8a4d0d10f79a0d453692a37f74e809ff698440128459b4f4c08c2b8ead23085c92adc944e15e5950371daebfc31e167f24bd9d5ab385bf7018dc4582a
SHA512 (frobby_v0.9.0.tar.gz) = bc96ff20ec334932b5eaa8a3d15d0e36eab41eb85e8b74dbdc374dcaafc9873e44a8af16f6caae649aeea17cd6284caf244d4d345689ad43288f199c591a68a6
SHA512 (gfan0.6.2.tar.gz) = 08a9cc543967771af959a506b79db5b55e0e4942e4170dad8691db35ef7d381d878e1ea6534a3cacc0f5d30ec31564ec94cc20b46792d06f18a3a8a3c0aac91d
SHA512 (givaro-4.1.1.tar.gz) = baaf139f42176838c541143a5b69acf47a8f31c17020a85cf413ce18ade2c3048e009d15c2acf4d71041c0776cd42f5fedb1c183ce1cc0f85cb8672ceac00ee7
@@ -16,9 +16,9 @@ SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea
SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0
SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001
SHA512 (M2-emacs-01af405.tar.gz) = c3b59fa53a75682e9b3a719665169aecac97d341b2ac90a076373b235e1da337f8065b2874231db666ed0a2f885487824a31d090aa079f96f1c6e6ba58d24490
-SHA512 (mathic-1.0.tar.gz) = 4c1dffe5fd45dfa5df9c01477828bba38905ec0b4b30052c821f535a1a8de34139fc91b364fb4fa779299c1ffb1a8a91ac37383d3bcb383f53c33055c7165f41
-SHA512 (mathicgb-1.0.tar.gz) = 5f419a0ad59610eba18edf69012603e0026c6de7c457546f40122b6fdd8bfb46a25b691cbdcd7e83c7495f21cbf1412c7b6a042e18e64500dfa18b368b3f9a5e
-SHA512 (memtailor-1.0.tar.gz) = 54bbc2711bc463d3200de82fcdb7abe1da0bb6c2c3bf1f27b68d24ed2500e55daec1b3f3855e1a67e1fb14c8ab9c05d2b88b4daba7e99bf709939749d6a90032
+SHA512 (mathic-1.0.tar.gz) = 6e2e27c4b85ffde91436eacdce7486ee1e2cd74f0c26d5a31db056ed5ac92d0c6313add6aa84c803b172bc60c541805e3068da88261ae9e2d80bf9d916430081
+SHA512 (mathicgb-1.0.tar.gz) = b1a958cc858b88a354c6212394e23ce63969f3eee3db2fee60de45105e6708475b8ba9911910f84a7c9a59055db40f166070710ffe89e7d2017cd2259a43e1e6
+SHA512 (memtailor-1.0.tar.gz) = 50eded674dc33d3c55f5ec0f250586106f7e16995baa4e46f21684016066cb41e02ace7d82b38305029b947f474835598a972c39dcb0ead6679566b53549a0df
SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273
SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f
SHA512 (normaliz-3.7.2.tar.gz) = 044a1b5c7e877cdfceedbe6b283b982b66e58f0cc5b0ccf6a63a293044d1348290fde92531b4c4a0a58f5263bb7696a2511b5a1dff94222c9e56a2fe3fccb69b
From 673ab051de1d33c9bad211318a1272a3274b1d31 Mon Sep 17 00:00:00 2001
From: Thomas Rodgers
Date: Wed, 4 May 2022 11:40:13 +0200
Subject: [PATCH 14/57] Rebuilt for Boost 1.78
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index b184ccb..d6cb758 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -54,7 +54,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.19.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2 or GPLv3
URL: http://macaulay2.com/
@@ -522,6 +522,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
From dcbf68be2b7ce826f2ca691b64a26d9100f01f20 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Wed, 20 Jul 2022 18:46:48 +0000
Subject: [PATCH 15/57] Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index d6cb758..4a21c2d 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -54,7 +54,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.19.1
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2 or GPLv3
URL: http://macaulay2.com/
@@ -522,6 +522,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
From 320b6a93ad9ffc0d0585b18b11b6ece06ded2b53 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Fri, 5 Aug 2022 16:36:32 -0600
Subject: [PATCH 16/57] Version 1.20.
---
2536.patch | 29 +++++++++
Macaulay2-1.16-ulimit.patch | 27 +++-----
Macaulay2-1.17-default_make_targets.patch | 11 ++--
Macaulay2.spec | 66 +++++++++-----------
mathic-1.0.patch | 75 -----------------------
mathicgb-1.0.patch | 11 ----
sources | 6 +-
7 files changed, 74 insertions(+), 151 deletions(-)
create mode 100644 2536.patch
delete mode 100644 mathic-1.0.patch
diff --git a/2536.patch b/2536.patch
new file mode 100644
index 0000000..38506cf
--- /dev/null
+++ b/2536.patch
@@ -0,0 +1,29 @@
+From 3cb279aac40010572d2ea2367bca66203be2b861 Mon Sep 17 00:00:00 2001
+From: Jay Yang
+Date: Fri, 1 Jul 2022 00:09:40 -0400
+Subject: [PATCH] change Monoid::set_degrees to add the right number of entries
+ to the degree_of_var_ list even when the degree length is 0
+
+---
+ M2/Macaulay2/e/monoid.cpp | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/M2/Macaulay2/e/monoid.cpp b/M2/Macaulay2/e/monoid.cpp
+index fd53b942e3..0459ed4944 100644
+--- a/M2/Macaulay2/e/monoid.cpp
++++ b/M2/Macaulay2/e/monoid.cpp
+@@ -225,7 +225,13 @@ void Monoid::set_degrees()
+ }
+ else
+ {
+- for (int i = 0; i < nvars_; i++) heft_degree_of_var_->array[i] = 1;
++ for (int i = 0; i < nvars_; i++)
++ {
++ monomial m = degree_monoid_->make_one();
++ degree_monoid_->from_expvector(t, m);
++ degree_of_var_.push_back(m);
++ heft_degree_of_var_->array[i] = 1;
++ }
+ }
+ degree_of_var_.push_back(degree_monoid_->make_one());
+ }
diff --git a/Macaulay2-1.16-ulimit.patch b/Macaulay2-1.16-ulimit.patch
index 9d25e39..900bafe 100644
--- a/Macaulay2-1.16-ulimit.patch
+++ b/Macaulay2-1.16-ulimit.patch
@@ -1,16 +1,5 @@
---- M2/GNUmakefile.in.orig 2021-11-17 15:21:40.000000000 -0700
-+++ M2/GNUmakefile.in 2021-11-24 16:10:22.499027509 -0700
-@@ -136,7 +136,7 @@ build-in-$1: submodules/$1/Makefile
- $(MAKE) -C submodules/$1 all
- check-in-$1: run-configure-in-$1
- ifeq ($(no-check-$1),)
-- ulimit -v 1000000 && $(MAKE) -C submodules/$1 check
-+ ulimit -v 2000000 && $(MAKE) -C submodules/$1 check
- endif
-
- install-in-$1: build-in-$1; + $(MAKE) -C submodules/$1 install
---- M2/libraries/Makefile.library.in.orig 2021-11-17 15:21:40.000000000 -0700
-+++ M2/libraries/Makefile.library.in 2021-11-24 16:10:22.499027509 -0700
+--- 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
@@ -26,8 +15,8 @@
LIMIT := :
ifeq (@ULIMIT_T@,yes)
LIMIT += ; ulimit -t $(TLIMIT)
---- M2/Macaulay2/m2/basictests/Makefile.in.orig 2021-11-17 15:21:40.000000000 -0700
-+++ M2/Macaulay2/m2/basictests/Makefile.in 2021-11-24 16:10:22.499027509 -0700
+--- 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
@@ -22,17 +22,17 @@ $(TESTRESULTS) : @pre_exec_prefix@/bin/M
ARGS := --silent -q --stop --no-core -e 'srcdir = "@srcdir@/"'
@@ -53,8 +42,8 @@
LIMIT :=
ifeq (@ULIMIT_T@,yes)
---- M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in.orig 2021-11-17 15:21:40.000000000 -0700
-+++ M2/Macaulay2/tests/ComputationsBook/Makefile.chapter.in 2021-11-24 16:10:22.500027511 -0700
+--- 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
@@ -15,16 +15,16 @@ diff:
LIMIT :=
@@ -76,8 +65,8 @@
endif
---- M2/Macaulay2/tests/Makefile.test.in.orig 2021-11-17 15:21:40.000000000 -0700
-+++ M2/Macaulay2/tests/Makefile.test.in 2021-11-24 16:10:22.500027511 -0700
+--- 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
@@ -6,18 +6,18 @@ DEFERRED ?= no
DOTS ?= ../..
diff --git a/Macaulay2-1.17-default_make_targets.patch b/Macaulay2-1.17-default_make_targets.patch
index 96be906..fb6da94 100644
--- a/Macaulay2-1.17-default_make_targets.patch
+++ b/Macaulay2-1.17-default_make_targets.patch
@@ -1,11 +1,12 @@
---- M2/Macaulay2/Makefile.in.orig 2021-01-12 14:18:59.570080654 -0700
-+++ M2/Macaulay2/Makefile.in 2021-01-12 14:19:19.802046768 -0700
-@@ -3,7 +3,7 @@
+--- 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
+@@ -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
--SUBDIRS = util c d e system bin m2 man packages editors html-check-links tests
-+SUBDIRS = util c d e system bin m2 man packages editors
+-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
define do-in-subdirs
$(foreach d,$(SUBDIRS),
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 4a21c2d..c487f29 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -12,11 +12,11 @@
# memtailor and mathic, which sit underneath mathicgb, must also be bundled or
# we get random GC-related crashes for an as yet undiagnosed reason.
#
-# We have to use the static version of the libfplll and givaro library. They
-# have global objects whose constructors run before GC is initialized. If we
-# allow the shared libraries to be unloaded, which happens as a normal part of
-# Macaulay2's functioning, then GC tries to free objects it did not allocate,
-# which leads to a segfault.
+# We have to use the static versions of the libfplll and givaro libraries.
+# They have global objects whose constructors run before GC is initialized.
+# If we allow the shared libraries to be unloaded, which happens as a normal
+# part of Macaulay2's functioning, then GC tries to free objects it did not
+# allocate, which leads to a segfault.
#
# We have to bundle the linbox package. It has global constructors that cause
# the same problem as libfplll.
@@ -53,11 +53,11 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
-Version: 1.19.1
-Release: 3%{?dist}
+Version: 1.20
+Release: 1%{?dist}
License: GPLv2 or GPLv3
-URL: http://macaulay2.com/
+URL: https://macaulay2.com/
%if 0%{?snap:1}
Source0: %{name}-%{version}-%{snap}.tar.xz
%else
@@ -74,9 +74,11 @@ Source20: etags.sh
## BUNDLED code
# Normaliz must sometimes be bundled due to version differences
-%global normalizver 3.7.2
+%if ! %system_normaliz
+%global normalizver 3.9.2
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
@@ -95,7 +97,7 @@ Provides: bundled(factory) = %{factoryver}
# MATHICGB is bundled because it must be built with different threading options
%global mathicgbver 1.0
-%global mathicgbcommit 6a9cabf106ceb02d27b3147da3a83822bee48923
+%global mathicgbcommit 7c2bea4b6c7bd72a1b732663a9b01fa36dd9bf4f
Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz
Provides: bundled(mathicgb) = %{mathicgbver}
@@ -111,7 +113,7 @@ Provides: bundled(memtailor) = %{memtailorver}
# MATHIC is bundled because it causes garbage collector crashes otherwise
%global mathicver 1.0
-%global mathiccommit f52234d2357410f702d5be60c0a8471b5731496b
+%global mathiccommit 18ff8de1f5b5102ef291e450522c4930cf9eb7f2
Source107: https://github.com/Macaulay2/mathic/tarball/%{mathiccommit}/mathic-%{mathicver}.tar.gz
Provides: bundled(mathic) = %{mathicver}
@@ -127,8 +129,6 @@ Source200: linbox-1.6.3.patch
Source201: mpfr-4.1.0.patch
# Fix mathicgb build on big endian machines and with gcc 11
Source202: mathicgb-1.0.patch
-# Silence GCC warnings about mathic code
-Source203: mathic-1.0.patch
## FAKE library tarballs that convince Macaulay2 to use the system versions
Source300: frobby_v0.9.0.tar.gz
@@ -146,13 +146,13 @@ 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
+Patch0: %{name}-1.15-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
+Patch2: %{name}-1.17-default_make_targets.patch
# disable check for gftables
-Patch3: %{name}-1.18-no_gftables.patch
+Patch3: %{name}-1.18-no_gftables.patch
# adapt to libfplll 5.2.1
Patch4: %{name}-1.15-fplll.patch
# do not override the debug level
@@ -161,6 +161,8 @@ 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
+# Fix a crash when building documentation
+Patch8: https://github.com/Macaulay2/M2/pull/2536.patch
BuildRequires: 4ti2
BuildRequires: autoconf
@@ -210,7 +212,7 @@ BuildRequires: libatomic_ops-devel
BuildRequires: libfplll-static
BuildRequires: libfrobby-devel
BuildRequires: libnauty-devel
-BuildRequires: libnormaliz-devel >= 3.6.3
+BuildRequires: libnormaliz-devel >= 3.9.2
BuildRequires: libtool
BuildRequires: lrslib-devel
BuildRequires: lrslib-utils
@@ -297,7 +299,9 @@ tar -C Macaulay2/editors/emacs --strip-components=1 -xzf %{SOURCE1}
install -p -m755 %{SOURCE20} ./etags
## bundled code
+%if ! %system_normaliz
install -p -m644 %{SOURCE100} BUILD/tarfiles/
+%endif
install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE105} \
%{SOURCE108} BUILD/tarfiles/
sed -i 's/\(VERSION = \).*/\1%{mpfrver}/' libraries/mpfr/Makefile.in
@@ -309,7 +313,6 @@ tar -C submodules/mathicgb -xf %{SOURCE104} --strip-components=1
patch -d submodules/mathicgb -p0 < %{SOURCE202}
tar -C submodules/memtailor -xf %{SOURCE106} --strip-components=1
tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1
-patch -d submodules/mathic -p0 < %{SOURCE203}
## patches for bundled code
sed -e 's,--with-blas,&=%{_includedir}/flexiblas --with-ntl,' \
@@ -345,6 +348,7 @@ ln -s %{_datadir}/factory \
%patch5 -p1 -b .configure
%patch6 -p1 -b .rightarrow
%patch7 -p1 -b .lto
+%patch8 -p2 -b .crash2536
# repeatable builds: inject a node name
sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac
@@ -371,26 +375,13 @@ sed -e 's/BUILD_cddlib=yes/BUILD_cddlib=no/' \
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-memtailor.*//' GNUmakefile.in
+sed -i 's/git-checkout-in-\$1, git-checkout-warning-for-\$1//' GNUmakefile.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. When built with -O1 and LTO, the linker segfaults. Until we can
-# diagnose and fix these issues, we build with -O1 and without LTO on s390x.
-%define _lto_cflags %{nil}
-optflags=$(sed 's/-O2/-O/g' <<< "%{optflags}")
-%else
-optflags="%{optflags}"
-%endif
-
# Possible bug in Macaulay2 1.19: the memtailor, mathic, and mathicgb headers
# cannot be found. We work around this here. See if the problem has been fixed
# in later versions.
@@ -400,8 +391,8 @@ CPPFLAGS="-I$PWD/submodules/memtailor/src -I$PWD/submodules/mathic/src -I$PWD/su
mkdir -p BUILD/%{_target_platform}
pushd 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_cxxflags} -fsigned-char" \
LIBS="-lflexiblas" \
../../configure \
--build=%{_build} \
@@ -492,10 +483,6 @@ rm -fr %{buildroot}/builddir
%check
-CFLAGS="%{build_cflags}" \
-CXXFLAGS="%{build_cxxflags}" \
-LDFLAGS="%{build_ldflags}" \
-
# The test suite has grown to the point where it takes many hours to run.
# Just run the most basic tests.
make check -C BUILD/%{_target_platform}/Macaulay2/e
@@ -522,6 +509,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
diff --git a/mathic-1.0.patch b/mathic-1.0.patch
deleted file mode 100644
index d45f2a6..0000000
--- a/mathic-1.0.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- Makefile.am.orig 2021-09-30 19:42:32.000000000 -0600
-+++ Makefile.am 2021-10-07 09:21:40.078080233 -0600
-@@ -10,7 +10,7 @@ libmathic_la_CPPFLAGS = $(DEPS_CFLAGS)
- lib_LTLIBRARIES = libmathic.la
-
- # set the C++ compiler to include src/
--AM_CXXFLAGS=-I$(top_srcdir)/src/ -std=gnu++0x
-+AM_CXXFLAGS=-I$(top_srcdir)/src/ -std=gnu++14
-
- # libraries that are needed by this library
- libmathic_la_LIBADD= $(DEPS_LIBS)
-@@ -85,7 +85,7 @@ if with_gtest
- TESTS=unittest
- check_PROGRAMS=$(TESTS)
-
--unittest_CXXFLAGS = -I$(top_srcdir)/src/ -std=gnu++0x
-+unittest_CXXFLAGS = -I$(top_srcdir)/src/ -std=gnu++14
- unittest_LDADD = $(top_builddir)/libmathic.la $(DEPS_LIBS) -lmemtailor -lpthread
- unittest_CPPFLAGS = $(DEPS_CFLAGS)
-
---- src/mathic/error.cpp.orig 2021-09-30 19:42:32.000000000 -0600
-+++ src/mathic/error.cpp 2021-10-07 09:21:23.097049833 -0600
-@@ -2,15 +2,15 @@
- #include
-
- namespace mathic {
-- void reportError(const std::string& errorMsg) {
-+ void reportError [[noreturn]] (const std::string& errorMsg) {
- throw MathicException("ERROR: " + errorMsg);
- }
-
-- void reportInternalError(const std::string& errorMsg) {
-+ void reportInternalError [[noreturn]] (const std::string& errorMsg) {
- throw InternalMathicException("INTERNAL ERROR: " + errorMsg);
- }
-
-- void reportInternalError
-+ void reportInternalError [[noreturn]]
- (const std::string& errorMsg, const char* file, unsigned int lineNumber) {
-
- std::ostringstream err;
---- src/mathic/error.h.orig 2021-09-30 19:42:32.000000000 -0600
-+++ src/mathic/error.h 2021-10-07 09:21:23.098049835 -0600
-@@ -18,26 +18,19 @@ namespace mathic {
- InternalMathicException(const std::string& str): logic_error(str) {}
- };
-
-- // The do {...} while (0) is to collect everything into a single
-- // statement that still requires a semicolon after it. The throw is to
-- // prevent spurious compiler warnings about a missing return
-- // statement.
- #define MATHIC_INTERNAL_ERROR(msg) \
-- do { \
-- reportInternalError(msg, __FILE__, __LINE__); \
-- throw; \
-- } while (false)
-+ reportInternalError(msg, __FILE__, __LINE__)
- #define INTERNAL_ERROR_UNIMPLEMENTED() \
- INTERNAL_ERROR("Called function that has not been implemented.")
-
- // These methods throw exceptions.
-- void reportError(const std::string& errorMsg);
-- void reportInternalError(const std::string& errorMsg);
-- void reportInternalError
-+ void reportError [[noreturn]] (const std::string& errorMsg);
-+ void reportInternalError [[noreturn]] (const std::string& errorMsg);
-+ void reportInternalError [[noreturn]]
- (const std::string& errorMsg, const char* file, unsigned int lineNumber);
-
- template
-- void throwError(const std::string& errorMsg) {
-+ void throwError [[noreturn]] (const std::string& errorMsg) {
- throw Exception("ERROR: " + errorMsg + '\n');
- }
-
diff --git a/mathicgb-1.0.patch b/mathicgb-1.0.patch
index 1a0f8a3..fcb6271 100644
--- a/mathicgb-1.0.patch
+++ b/mathicgb-1.0.patch
@@ -1,14 +1,3 @@
---- src/mathicgb/MathicIO.hpp.orig 2021-09-30 19:41:54.000000000 -0600
-+++ src/mathicgb/MathicIO.hpp 2021-11-24 16:04:28.969499776 -0700
-@@ -300,7 +300,7 @@ auto MathicIO::readOrder(
- componentsAscendingDesired,
- schreyering
- );
-- return std::move(order);
-+ return order;
- }
-
- template
--- src/mathicgb/MonoMonoid.hpp.orig 2021-09-30 19:41:54.000000000 -0600
+++ src/mathicgb/MonoMonoid.hpp 2021-11-24 16:05:44.657612757 -0700
@@ -573,7 +573,8 @@ public:
diff --git a/sources b/sources
index 7d22a03..a71e341 100644
--- a/sources
+++ b/sources
@@ -1,5 +1,5 @@
SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d
-SHA512 (Macaulay2-1.19.1.tar.gz) = 504f233ed7e4f954f0e91212c7a533655f18e8488e7462834b2a256faa891872b35af890808bde6695678916b68c45b4d3d74ae6963ec639bdd4c76c4fa4d53e
+SHA512 (Macaulay2-1.20.tar.gz) = 188469fda279aeb62bd35b02440c0ba77f50cba927e5bf454afdbd9c340564c7c6acfa6f342193b2faef75d8140adfcb5a9862ef6399396f27a5e9fd4a34b658
SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5
SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f
SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818
@@ -16,8 +16,8 @@ SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea
SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0
SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001
SHA512 (M2-emacs-01af405.tar.gz) = c3b59fa53a75682e9b3a719665169aecac97d341b2ac90a076373b235e1da337f8065b2874231db666ed0a2f885487824a31d090aa079f96f1c6e6ba58d24490
-SHA512 (mathic-1.0.tar.gz) = 6e2e27c4b85ffde91436eacdce7486ee1e2cd74f0c26d5a31db056ed5ac92d0c6313add6aa84c803b172bc60c541805e3068da88261ae9e2d80bf9d916430081
-SHA512 (mathicgb-1.0.tar.gz) = b1a958cc858b88a354c6212394e23ce63969f3eee3db2fee60de45105e6708475b8ba9911910f84a7c9a59055db40f166070710ffe89e7d2017cd2259a43e1e6
+SHA512 (mathic-1.0.tar.gz) = e95c2397cdea3bbff1c8cd52273277183535f07443c222e38659861c25d392b09cbfb33c9cc2a482f8dc9c1b6bc1754e86934fe5a833f8f19ef0edf0cd2e7165
+SHA512 (mathicgb-1.0.tar.gz) = 8e69689f286b703d8018ca4f79054b4339054d0a5bba5095fd57393c2301c5c66afa9bcfe5ed693630f07bbe8a1774c7ea07f4e384d2a3a7cde4f613b7844b14
SHA512 (memtailor-1.0.tar.gz) = 50eded674dc33d3c55f5ec0f250586106f7e16995baa4e46f21684016066cb41e02ace7d82b38305029b947f474835598a972c39dcb0ead6679566b53549a0df
SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273
SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f
From 3e37e1a7c61a2bc8b4f1addfe58908b3ce1a4b64 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Mon, 8 Aug 2022 06:08:59 -0600
Subject: [PATCH 17/57] Restore s390x optimization reduction, apparently still
needed.
---
Macaulay2.spec | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index c487f29..4034e32 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -382,6 +382,19 @@ 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. When built with -O1 and LTO, the linker segfaults. Until we can
+# diagnose and fix these issues, we build with -O1 and without LTO on s390x.
+%define _lto_cflags %{nil}
+optflags=$(sed 's/-O2/-O/g' <<< "%{build_cflags}")
+%else
+optflags="%{build_cflags}"
+%endif
+
# Possible bug in Macaulay2 1.19: the memtailor, mathic, and mathicgb headers
# cannot be found. We work around this here. See if the problem has been fixed
# in later versions.
@@ -391,8 +404,8 @@ CPPFLAGS="-I$PWD/submodules/memtailor/src -I$PWD/submodules/mathic/src -I$PWD/su
mkdir -p BUILD/%{_target_platform}
pushd BUILD/%{_target_platform}
CPPFLAGS="$CPPFLAGS -I%{_includedir}/cddlib -I%{_includedir}/frobby" \
-CFLAGS="%{build_cflags} -fsigned-char" \
-CXXFLAGS="%{build_cxxflags} -fsigned-char" \
+CFLAGS="$optflags -fsigned-char" \
+CXXFLAGS="$optflags -fsigned-char" \
LIBS="-lflexiblas" \
../../configure \
--build=%{_build} \
From 9880d23979d1bd8727d94c7609e8bb8321259765 Mon Sep 17 00:00:00 2001
From: Rich Mattes
Date: Sun, 25 Sep 2022 14:42:42 -0400
Subject: [PATCH 18/57] Rebuild for tinyxml2-9.0.0
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 4034e32..1526886 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -54,7 +54,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.20
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2 or GPLv3
URL: https://macaulay2.com/
@@ -522,6 +522,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
From 5f575ce03652d285672f2a425aa36a0a14efc2f0 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Tue, 20 Dec 2022 15:38:58 -0700
Subject: [PATCH 19/57] Convert License tag to SPDX
---
Macaulay2.spec | 112 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 111 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 1526886..97e0a4f 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -56,7 +56,114 @@ Name: Macaulay2
Version: 1.20
Release: 2%{?dist}
-License: GPLv2 or GPLv3
+# GPL-2.0-only OR GPL-3.0-only:
+# - the project as a whole
+# - factory (bundled)
+# GPL-1.0-or-later:
+# - Macaulay2/packages/FormalGroupLaws.m2
+# - Macaulay2/packages/WeylGroups.m2
+# GPL-2.0-only:
+# - Macaulay2/packages/ModuleDeformations.m2
+# - 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
+# - Macaulay2/packages/BIBasis.m2
+# - Macaulay2/packages/Binomials.m2
+# - Macaulay2/packages/Chordal.m2
+# - Macaulay2/packages/Cremona.m2
+# - Macaulay2/packages/Cyclotomic.m2
+# - Macaulay2/packages/EdgeIdeals.m2
+# - Macaulay2/packages/FourierMotzkin.m2
+# - Macaulay2/packages/GKMVarieties.m2
+# - Macaulay2/packages/GradedLieAlgebras.m2
+# - Macaulay2/packages/GraphicalModels*
+# - Macaulay2/packages/Graphics.m2
+# - Macaulay2/packages/Graphs.m2
+# - Macaulay2/packages/GroebnerWalk.m2
+# - Macaulay2/packages/HyperplaneArrangements.m2
+# - Macaulay2/packages/InvariantRing*
+# - Macaulay2/packages/KustinMiller.m2
+# - Macaulay2/packages/LieTypes.m2
+# - Macaulay2/packages/MonomialAlgebras.m2
+# - Macaulay2/packages/MultiprojectiveVarieties.m2
+# - Macaulay2/packages/NAGtypes.m2
+# - Macaulay2/packages/Nauty*
+# - Macaulay2/packages/Normaliz.m2
+# - Macaulay2/packages/NumericalAlgebraicGeometry.m2
+# - Macaulay2/packages/PackageCitations.m2
+# - Macaulay2/packages/Posets.m2
+# - Macaulay2/packages/RationalPoints*
+# - Macaulay2/packages/ResLengthThree.m2
+# - Macaulay2/packages/ResolutionsOfStanleyReisnerRings.m2
+# - Macaulay2/packages/Resultants.m2
+# - Macaulay2/packages/RunExternalM2.m2
+# - Macaulay2/packages/SLPexpressions.m2
+# - Macaulay2/packages/SLnEquivariantMatrices.m2
+# - Macaulay2/packages/SimplicialDecomposability.m2
+# - Macaulay2/packages/SparseResultants.m2
+# - Macaulay2/packages/SpecialFanoFourfolds.m2
+# - Macaulay2/packages/StatGraphs.m2
+# - Macaulay2/packages/TriangularSets.m2
+# - Macaulay2/packages/VectorFields.m2
+# GPL-3.0-or-later:
+# - normaliz, when it is bundled
+# - Macaulay2/e/mpreal.h
+# - Macaulay2/packages/BettiCharacters.m2
+# - Macaulay2/packages/CodingTheory.m2
+# - Macaulay2/packages/FGLM.m2
+# - Macaulay2/packages/HighestWeights*
+# - Macaulay2/packages/Jets.m2
+# - Macaulay2/packages/LocalRings
+# - Macaulay2/packages/MonomialIntegerPrograms.m2
+# - Macaulay2/packages/MultiplierIdeals.m2
+# - Macaulay2/packages/NormalToricVarieties.m2
+# - Macaulay2/packages/NumericSolutions.m2
+# - Macaulay2/packages/OldPolyhedra.m2
+# - Macaulay2/packages/OldToricVectorBundles.m2
+# - Macaulay2/packages/PieriMaps.m2
+# - Macaulay2/packages/Polyhedra.m2
+# - Macaulay2/packages/PositivityToricBundles.m2
+# - Macaulay2/packages/SchurRings.m2
+# - Macaulay2/packages/SchurVeronese.m2
+# - Macaulay2/packages/Simplicial*
+# - Macaulay2/packages/SpectralSequences.m2
+# - Macaulay2/packages/TensorComplexes.m2
+# - Macaulay2/packages/ToricTopology.m2
+# - Macaulay2/packages/ToricVectorBundles.m2
+# - Macaulay2/packages/VersalDeformations.m2
+# 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
+# MIT AND OFL-1.1-RFN:
+# - Macaulay2/packages/Style
+# LicenseRef-Fedora-Public-Domain:
+# - Macaulay2/e/localring*
+# - Macaulay2/e/mutablecomplex*
+# - Macaulay2/e/NAG*
+# - Macaulay2/e/SLP*
+# - Macaulay2/packages/Depth.m2
+# - Macaulay2/packages/Divisor.m2
+# - Macaulay2/packages/FastMinors.m2
+# - Macaulay2/packages/LatticePolytopes.m2
+# - 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
URL: https://macaulay2.com/
%if 0%{?snap:1}
Source0: %{name}-%{version}-%{snap}.tar.xz
@@ -522,6 +629,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
From 2bd041957d7077765e32e3d887caf1471a576934 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Thu, 22 Dec 2022 19:02:18 -0700
Subject: [PATCH 20/57] Version 1.21
- Drop upstreamed patch for crash when building documentation
- Use rdns names for the desktop and metainfo files
---
2536.patch | 29 -------
Macaulay2.spec | 83 ++++++++-----------
...desktop => com.macaulay2.macaulay2.desktop | 0
...ml => com.macaulay2.macaulay2.metainfo.xml | 10 +--
mathicgb-1.0.patch | 22 -----
sources | 7 +-
6 files changed, 44 insertions(+), 107 deletions(-)
delete mode 100644 2536.patch
rename Macaulay2.desktop => com.macaulay2.macaulay2.desktop (100%)
rename Macaulay2.metainfo.xml => com.macaulay2.macaulay2.metainfo.xml (80%)
delete mode 100644 mathicgb-1.0.patch
diff --git a/2536.patch b/2536.patch
deleted file mode 100644
index 38506cf..0000000
--- a/2536.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 3cb279aac40010572d2ea2367bca66203be2b861 Mon Sep 17 00:00:00 2001
-From: Jay Yang
-Date: Fri, 1 Jul 2022 00:09:40 -0400
-Subject: [PATCH] change Monoid::set_degrees to add the right number of entries
- to the degree_of_var_ list even when the degree length is 0
-
----
- M2/Macaulay2/e/monoid.cpp | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/M2/Macaulay2/e/monoid.cpp b/M2/Macaulay2/e/monoid.cpp
-index fd53b942e3..0459ed4944 100644
---- a/M2/Macaulay2/e/monoid.cpp
-+++ b/M2/Macaulay2/e/monoid.cpp
-@@ -225,7 +225,13 @@ void Monoid::set_degrees()
- }
- else
- {
-- for (int i = 0; i < nvars_; i++) heft_degree_of_var_->array[i] = 1;
-+ for (int i = 0; i < nvars_; i++)
-+ {
-+ monomial m = degree_monoid_->make_one();
-+ degree_monoid_->from_expvector(t, m);
-+ degree_of_var_.push_back(m);
-+ heft_degree_of_var_->array[i] = 1;
-+ }
- }
- degree_of_var_.push_back(degree_monoid_->make_one());
- }
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 97e0a4f..a649457 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -23,7 +23,7 @@
%global m2url https://github.com/Macaulay2/M2
-%global emacscommit 01af405c5c92f90e4009ff580a1b1dcefe43a714
+%global emacscommit 86150290208bd9e468511b4b69a187ce870f303e
%global emacsurl https://github.com/Macaulay2/M2-emacs
%global emacsshort %(cut -b -7 <<< %{emacscommit})
@@ -37,8 +37,6 @@
# use system normaliz
%global system_normaliz 1
#endif
-# standardize on gmp instead of mpir (mostly for pari/sagemath)
-%global gmp 1
%global ISSUE %{?fedora:Fedora-%{fedora}}%{?rhel:RedHatEnterprise-%{rhel}}
%global M2_machine %{_target_cpu}-Linux-%{ISSUE}
@@ -53,8 +51,8 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
-Version: 1.20
-Release: 2%{?dist}
+Version: 1.21
+Release: 1%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -175,8 +173,8 @@ Source1: %{emacsurl}/tarball/%{emacscommit}/M2-emacs-%{emacsshort}.tar.gz
# Various sizes of the planets icon from macaulay2.com. See README.icons in
# the tar file for details on how these icons were created.
Source10: Macaulay2-icons.tar.xz
-Source11: Macaulay2.desktop
-Source12: Macaulay2.metainfo.xml
+Source11: com.macaulay2.macaulay2.desktop
+Source12: com.macaulay2.macaulay2.metainfo.xml
Source20: etags.sh
## BUNDLED code
@@ -204,7 +202,7 @@ Provides: bundled(factory) = %{factoryver}
# MATHICGB is bundled because it must be built with different threading options
%global mathicgbver 1.0
-%global mathicgbcommit 7c2bea4b6c7bd72a1b732663a9b01fa36dd9bf4f
+%global mathicgbcommit f3a05da1494843b5e4e7baa18e644cc6f32baeca
Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz
Provides: bundled(mathicgb) = %{mathicgbver}
@@ -234,8 +232,6 @@ Provides: bundled(linbox) = %{linboxver}
Source200: linbox-1.6.3.patch
# MPFR bug fixes from mpfr upstream.
Source201: mpfr-4.1.0.patch
-# Fix mathicgb build on big endian machines and with gcc 11
-Source202: mathicgb-1.0.patch
## FAKE library tarballs that convince Macaulay2 to use the system versions
Source300: frobby_v0.9.0.tar.gz
@@ -268,15 +264,13 @@ 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
-# Fix a crash when building documentation
-Patch8: https://github.com/Macaulay2/M2/pull/2536.patch
BuildRequires: 4ti2
+BuildRequires: appstream
BuildRequires: autoconf
BuildRequires: autoconf-archive
BuildRequires: bison
BuildRequires: boost-devel
-BuildRequires: cddlib-devel
BuildRequires: chrpath
BuildRequires: cohomCalg
BuildRequires: csdp-tools
@@ -289,11 +283,8 @@ BuildRequires: doxygen
BuildRequires: eigen3-static
# etags
BuildRequires: emacs
-BuildRequires: expat-devel
BuildRequires: factory-gftables
-BuildRequires: fflas-ffpack-devel
BuildRequires: flex
-BuildRequires: flexiblas-devel
BuildRequires: gawk
BuildRequires: gcc-c++
BuildRequires: gcc-gfortran
@@ -304,45 +295,45 @@ BuildRequires: gfan
BuildRequires: git-core
BuildRequires: givaro-static
BuildRequires: glpk-devel
-%if 0%{?gmp}
-BuildRequires: gmp-devel
-%else
-BuildRequires: mpir-devel
-%endif
-BuildRequires: gtest-devel
BuildRequires: iml-devel
BuildRequires: info
-BuildRequires: libappstream-glib
-BuildRequires: libgfan-devel
-BuildRequires: libtool
-BuildRequires: libatomic_ops-devel
BuildRequires: libfplll-static
BuildRequires: libfrobby-devel
-BuildRequires: libnauty-devel
+BuildRequires: libgfan-devel
BuildRequires: libnormaliz-devel >= 3.9.2
BuildRequires: libtool
BuildRequires: lrslib-devel
BuildRequires: lrslib-utils
-BuildRequires: m4ri-devel
-BuildRequires: m4rie-devel
BuildRequires: make
-BuildRequires: mariadb-devel
-BuildRequires: mpfi-devel
BuildRequires: mpsolve-devel
BuildRequires: nauty
BuildRequires: normaliz
BuildRequires: ntl-devel
-BuildRequires: pkgconfig(bdw-gc) >= 7.6.2
+BuildRequires: pari-devel
+BuildRequires: pkgconfig(atomic_ops)
+BuildRequires: pkgconfig(bdw-gc) >= 8.0.4
+BuildRequires: pkgconfig(cddlib)
+BuildRequires: pkgconfig(expat)
+BuildRequires: pkgconfig(fflas-ffpack)
+BuildRequires: pkgconfig(flexiblas)
+BuildRequires: pkgconfig(gmp)
+BuildRequires: pkgconfig(gtest)
+BuildRequires: pkgconfig(libffi)
BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(m4ri)
+BuildRequires: pkgconfig(m4rie)
+BuildRequires: pkgconfig(mariadb)
+BuildRequires: pkgconfig(mpfi)
+BuildRequires: pkgconfig(nauty)
BuildRequires: pkgconfig(ncurses)
+BuildRequires: pkgconfig(qd)
+BuildRequires: pkgconfig(readline)
+BuildRequires: pkgconfig(tbb)
+BuildRequires: pkgconfig(tinyxml2)
BuildRequires: polymake
BuildRequires: python3-devel
-BuildRequires: qd-devel
-BuildRequires: readline-devel
-BuildRequires: tbb-devel
BuildRequires: texinfo
BuildRequires: time
-BuildRequires: tinyxml2-devel
BuildRequires: TOPCOM
BuildRequires: transfig
BuildRequires: valgrind
@@ -417,7 +408,6 @@ sed -e 's/\(VERSION = \).*/\1%{linboxver}/' \
-e 's,--with-gmp.*,GIVARO_CFLAGS=-I$(LIBRARIESDIR) GIVARO_LIBS="%{_libdir}/libgivaro.a",' \
-i libraries/linbox/Makefile.in
tar -C submodules/mathicgb -xf %{SOURCE104} --strip-components=1
-patch -d submodules/mathicgb -p0 < %{SOURCE202}
tar -C submodules/memtailor -xf %{SOURCE106} --strip-components=1
tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1
@@ -455,7 +445,6 @@ ln -s %{_datadir}/factory \
%patch5 -p1 -b .configure
%patch6 -p1 -b .rightarrow
%patch7 -p1 -b .lto
-%patch8 -p2 -b .crash2536
# repeatable builds: inject a node name
sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac
@@ -525,11 +514,7 @@ LIBS="-lflexiblas" \
--disable-strip \
--enable-fplll \
--enable-linbox \
-%if 0%{?gmp}
--with-integer-package=gmp \
-%else
- --with-integer-package=mpir \
-%endif
--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:
@@ -583,9 +568,8 @@ desktop-file-install --vendor="" \
%{SOURCE11}
mkdir -p %{buildroot}%{_metainfodir}
-install -pm 644 %{SOURCE12} %{buildroot}%{_metainfodir}/%{name}.metainfo.xml
-appstream-util validate-relax --nonet \
- %{buildroot}%{_metainfodir}/%{name}.metainfo.xml
+install -pm 644 %{SOURCE12} %{buildroot}%{_metainfodir}
+appstreamcli validate --nonet %{buildroot}%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml
# Byte compile the Emacs files, and move the documentation
pushd %{buildroot}%{_emacs_sitelispdir}/macaulay2
@@ -619,9 +603,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%files common
%endif
%{_datadir}/Macaulay2/
-%{_datadir}/applications/*Macaulay2.desktop
+%{_datadir}/applications/com.macaulay2.macaulay2.desktop
%{_datadir}/icons/hicolor/*/*/*
-%{_metainfodir}/%{name}.metainfo.xml
+%{_metainfodir}/com.macaulay2.macaulay2.metainfo.xml
%{_docdir}/Macaulay2/
%{_infodir}/*.info*
%{_mandir}/man1/*
@@ -629,6 +613,11 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
diff --git a/Macaulay2.desktop b/com.macaulay2.macaulay2.desktop
similarity index 100%
rename from Macaulay2.desktop
rename to com.macaulay2.macaulay2.desktop
diff --git a/Macaulay2.metainfo.xml b/com.macaulay2.macaulay2.metainfo.xml
similarity index 80%
rename from Macaulay2.metainfo.xml
rename to com.macaulay2.macaulay2.metainfo.xml
index 5d7bd15..2ae837e 100644
--- a/Macaulay2.metainfo.xml
+++ b/com.macaulay2.macaulay2.metainfo.xml
@@ -1,8 +1,8 @@
- Macaulay2
- CC0-1.0
- GPL-2.0 or GPL-3.0
+ com.macaulay2.macaulay2
+ 0BSD
+ GPL-2.0-only OR GPL-3.0-only
Macaulay2
System for algebraic geometry and commutative algebra
@@ -12,7 +12,7 @@
and Michael E. Stillman.
- Macaulay2.desktop
+ com.macaulay2.macaulay2.desktop
https://faculty.math.illinois.edu/Macaulay2/Screenshots/texmacs.png
@@ -24,7 +24,7 @@
loganjerry@gmail.com
- http://macaulay2.com/
+ https://macaulay2.com/
https://github.com/Macaulay2/M2/issues
https://groups.google.com/g/macaulay2
diff --git a/mathicgb-1.0.patch b/mathicgb-1.0.patch
deleted file mode 100644
index fcb6271..0000000
--- a/mathicgb-1.0.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/mathicgb/MonoMonoid.hpp.orig 2021-09-30 19:41:54.000000000 -0600
-+++ src/mathicgb/MonoMonoid.hpp 2021-11-24 16:05:44.657612757 -0700
-@@ -573,7 +573,8 @@ public:
- // for unaligned access. Performance seems to be no worse than for using
- // 32 bit integers directly.
-
-- if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder))
-+ if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder) ||
-+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
- return isProductOf(a, b, ab);
-
- uint64 orOfXor = 0;
-@@ -602,7 +603,8 @@ public:
- ConstMonoRef a1b,
- ConstMonoRef a2b
- ) const {
-- if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder))
-+ if (sizeof(Exponent) != 4 || (!StoreHash && !StoreOrder) ||
-+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
- return (isProductOf(a1, b, a1b) && isProductOf(a2, b, a2b));
-
- uint64 orOfXor = 0;
diff --git a/sources b/sources
index a71e341..b8c7c11 100644
--- a/sources
+++ b/sources
@@ -1,5 +1,5 @@
SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d
-SHA512 (Macaulay2-1.20.tar.gz) = 188469fda279aeb62bd35b02440c0ba77f50cba927e5bf454afdbd9c340564c7c6acfa6f342193b2faef75d8140adfcb5a9862ef6399396f27a5e9fd4a34b658
+SHA512 (Macaulay2-1.21.tar.gz) = 79760d1b6362ba2b89966b5ebcdf3ae9f40579db2fa3fbdde146b178a6b802b1bca546d78f12c5a67d14d8b8a8fb70553fb0903d6b91490f366d114e54a5ce0e
SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5
SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f
SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818
@@ -15,11 +15,10 @@ SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf
SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29
SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0
SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001
-SHA512 (M2-emacs-01af405.tar.gz) = c3b59fa53a75682e9b3a719665169aecac97d341b2ac90a076373b235e1da337f8065b2874231db666ed0a2f885487824a31d090aa079f96f1c6e6ba58d24490
+SHA512 (M2-emacs-8615029.tar.gz) = 557343ae4e2200583533954336ccfa4e3907138cf953cd4d44eadc1b52865ef080ddec775450cec0da1e720765cba6d106b8c5216cf8a9668219f4a9efada7f5
SHA512 (mathic-1.0.tar.gz) = e95c2397cdea3bbff1c8cd52273277183535f07443c222e38659861c25d392b09cbfb33c9cc2a482f8dc9c1b6bc1754e86934fe5a833f8f19ef0edf0cd2e7165
-SHA512 (mathicgb-1.0.tar.gz) = 8e69689f286b703d8018ca4f79054b4339054d0a5bba5095fd57393c2301c5c66afa9bcfe5ed693630f07bbe8a1774c7ea07f4e384d2a3a7cde4f613b7844b14
+SHA512 (mathicgb-1.0.tar.gz) = e3b05385f67c42302fba22b9a7d391eb1fca5a56c0eec02ab3e37a28e1d4de6d734b803d5d5701acac8663bbe391afd6ffc40ab5c5e6f11e8fff22fd5f07a2ea
SHA512 (memtailor-1.0.tar.gz) = 50eded674dc33d3c55f5ec0f250586106f7e16995baa4e46f21684016066cb41e02ace7d82b38305029b947f474835598a972c39dcb0ead6679566b53549a0df
SHA512 (mpfr-4.1.0.tar.xz) = 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273
SHA512 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f
-SHA512 (normaliz-3.7.2.tar.gz) = 044a1b5c7e877cdfceedbe6b283b982b66e58f0cc5b0ccf6a63a293044d1348290fde92531b4c4a0a58f5263bb7696a2511b5a1dff94222c9e56a2fe3fccb69b
SHA512 (TOPCOM-0.17.8.tar.gz) = 8611e8bd36eda00646fb40794435f23e6af81ecbee93c40e8fe5f73905e673e6244cb0f8cc1fe5c29050e40c7d53a44c615c60cbbecc8452b3c85f1d8a816d7a
From 0a34ae3e3b2cd0b3c3807894a6fef431e06d1708 Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Thu, 12 Jan 2023 21:55:22 -0700
Subject: [PATCH 21/57] Rebuild for libfplll 5.4.4
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index a649457..ffa011b 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -52,7 +52,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.21
-Release: 1%{?dist}
+Release: 2%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -613,6 +613,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Thu Jan 12 2022 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
From c4f69993430c944985d3a3232f040d7be9bdd75d Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Wed, 18 Jan 2023 19:53:54 +0000
Subject: [PATCH 22/57] Rebuilt for
https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index ffa011b..199cdda 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -52,7 +52,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.21
-Release: 2%{?dist}
+Release: 3%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -613,6 +613,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* Wed Jan 18 2023 Fedora Release Engineering - 1.21-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
+
* Thu Jan 12 2022 Jerry James - 1.21-2
- Rebuild for libfplll 5.4.4
From 38e2779d1638f9a085997589dbbdb92254316ad4 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely
Date: Mon, 20 Feb 2023 22:07:26 +0000
Subject: [PATCH 23/57] Rebuilt for Boost 1.81
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 199cdda..7169b36 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -52,7 +52,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.21
-Release: 3%{?dist}
+Release: 4%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -613,6 +613,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
From 3ce3ab2bc5ea8d3e94de5483e4370d542f6066d7 Mon Sep 17 00:00:00 2001
From: Florian Weimer
Date: Sat, 15 Apr 2023 22:01:55 +0200
Subject: [PATCH 24/57] Port configure script to C99
Related to:
---
Macaulay2-configure-c99.patch | 18 ++++++++++++++++++
Macaulay2.spec | 7 ++++++-
2 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 Macaulay2-configure-c99.patch
diff --git a/Macaulay2-configure-c99.patch b/Macaulay2-configure-c99.patch
new file mode 100644
index 0000000..2cdc1c6
--- /dev/null
+++ b/Macaulay2-configure-c99.patch
@@ -0,0 +1,18 @@
+Avoid an implicit int, which was removed from the C99 revision of the
+C language. This prevents altering the outcome of the check with
+future compilers.
+
+Submitted upstream:
+
+diff -ur M2-release-1.21.orig/M2/configure.ac M2-release-1.21/M2/configure.ac
+--- M2-release-1.21.orig/M2/configure.ac 2023-04-15 19:52:33.823153026 +0200
++++ M2-release-1.21/M2/configure.ac 2023-04-15 20:00:57.701024623 +0200
+@@ -1719,7 +1719,7 @@
+ #ifdef HAVE_NETDB_H
+ #include
+ #endif
+- main() {
++ int main(void) {
+ struct addrinfo *addr;
+ return 0 != getaddrinfo("1.2.3.4", "80", 0, &addr) ? 99 : 0 ;
+ }
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 7169b36..5f72200 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -52,7 +52,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.21
-Release: 4%{?dist}
+Release: 5%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -264,6 +264,7 @@ 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
+Patch8: Macaulay2-configure-c99.patch
BuildRequires: 4ti2
BuildRequires: appstream
@@ -445,6 +446,7 @@ ln -s %{_datadir}/factory \
%patch5 -p1 -b .configure
%patch6 -p1 -b .rightarrow
%patch7 -p1 -b .lto
+%patch8 -p2 -b .configure-c99
# repeatable builds: inject a node name
sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac
@@ -613,6 +615,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
From 0b7c12049255fc9ca06f0ca97c12816c941c2d52 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Wed, 19 Jul 2023 11:14:58 +0000
Subject: [PATCH 25/57] Rebuilt for
https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
Macaulay2.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 5f72200..ef26d79 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -52,7 +52,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.21
-Release: 5%{?dist}
+Release: 6%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -615,6 +615,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
From 17aeaa02c07216881023b0faf7f3792c35b3d185 Mon Sep 17 00:00:00 2001
From: Michal Schorm
Date: Thu, 28 Sep 2023 12:23:08 +0200
Subject: [PATCH 26/57] Build against the 'mariadb-connector-c-devel' package
https://bugzilla.redhat.com/show_bug.cgi?id=2241091
---
Macaulay2.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Macaulay2.spec b/Macaulay2.spec
index ef26d79..40eea01 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -323,7 +323,7 @@ BuildRequires: pkgconfig(libffi)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(m4ri)
BuildRequires: pkgconfig(m4rie)
-BuildRequires: pkgconfig(mariadb)
+BuildRequires: pkgconfig(libmariadb)
BuildRequires: pkgconfig(mpfi)
BuildRequires: pkgconfig(nauty)
BuildRequires: pkgconfig(ncurses)
From d2d3d3bb3cf63e8a3855a6c675fdcf99943e193d Mon Sep 17 00:00:00 2001
From: Jerry James
Date: Thu, 26 Oct 2023 12:44:35 -0600
Subject: [PATCH 27/57] Version 1.22
Drop upstreamed Macaulay2-configure-c99.patch
---
Macaulay2-configure-c99.patch | 18 -------
Macaulay2.spec | 74 +++++++++++++++-------------
com.macaulay2.macaulay2.metainfo.xml | 2 +-
linbox-1.6.3.patch | 35 -------------
linbox-1.7.0.patch | 15 ++++++
sources | 12 ++---
6 files changed, 62 insertions(+), 94 deletions(-)
delete mode 100644 Macaulay2-configure-c99.patch
delete mode 100644 linbox-1.6.3.patch
create mode 100644 linbox-1.7.0.patch
diff --git a/Macaulay2-configure-c99.patch b/Macaulay2-configure-c99.patch
deleted file mode 100644
index 2cdc1c6..0000000
--- a/Macaulay2-configure-c99.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Avoid an implicit int, which was removed from the C99 revision of the
-C language. This prevents altering the outcome of the check with
-future compilers.
-
-Submitted upstream:
-
-diff -ur M2-release-1.21.orig/M2/configure.ac M2-release-1.21/M2/configure.ac
---- M2-release-1.21.orig/M2/configure.ac 2023-04-15 19:52:33.823153026 +0200
-+++ M2-release-1.21/M2/configure.ac 2023-04-15 20:00:57.701024623 +0200
-@@ -1719,7 +1719,7 @@
- #ifdef HAVE_NETDB_H
- #include
- #endif
-- main() {
-+ int main(void) {
- struct addrinfo *addr;
- return 0 != getaddrinfo("1.2.3.4", "80", 0, &addr) ? 99 : 0 ;
- }
diff --git a/Macaulay2.spec b/Macaulay2.spec
index 40eea01..a98c4cb 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -23,7 +23,7 @@
%global m2url https://github.com/Macaulay2/M2
-%global emacscommit 86150290208bd9e468511b4b69a187ce870f303e
+%global emacscommit 2bac85883e2edd479f606ef8eedbbf2869770200
%global emacsurl https://github.com/Macaulay2/M2-emacs
%global emacsshort %(cut -b -7 <<< %{emacscommit})
@@ -51,8 +51,8 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
-Version: 1.21
-Release: 6%{?dist}
+Version: 1.22
+Release: 1%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@@ -202,7 +202,7 @@ Provides: bundled(factory) = %{factoryver}
# MATHICGB is bundled because it must be built with different threading options
%global mathicgbver 1.0
-%global mathicgbcommit f3a05da1494843b5e4e7baa18e644cc6f32baeca
+%global mathicgbcommit de9cc70d7f6d72fe35fc832d7ab478f5debbc90f
Source104: https://github.com/Macaulay2/mathicgb/tarball/%{mathicgbcommit}/mathicgb-%{mathicgbver}.tar.gz
Provides: bundled(mathicgb) = %{mathicgbver}
@@ -212,24 +212,25 @@ Source105: https://faculty.math.illinois.edu/Macaulay2/Downloads/OtherSourceCode
# MEMTAILOR is bundled because it causes garbage collector crashes otherwise
%global memtailorver 1.0
-%global memtailorcommit 95dbac776c475f4b1c2b08a8e8c6def14c8aaf9a
+%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 18ff8de1f5b5102ef291e450522c4930cf9eb7f2
+%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.6.3
+%global linboxver 1.7.0
Source108: https://github.com/linbox-team/linbox/releases/download/v%{linboxver}/linbox-%{linboxver}.tar.gz
Provides: bundled(linbox) = %{linboxver}
## PATCHES FOR BUNDLED code
-# Work around an ambiguous overload on 32-bit platforms
-Source200: linbox-1.6.3.patch
+# Fix a buffer overflow
+# https://github.com/linbox-team/linbox/pull/307
+Source200: linbox-1.7.0.patch
# MPFR bug fixes from mpfr upstream.
Source201: mpfr-4.1.0.patch
@@ -264,7 +265,6 @@ 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
-Patch8: Macaulay2-configure-c99.patch
BuildRequires: 4ti2
BuildRequires: appstream
@@ -307,9 +307,11 @@ BuildRequires: lrslib-devel
BuildRequires: lrslib-utils
BuildRequires: make
BuildRequires: mpsolve-devel
+BuildRequires: msolve-devel
BuildRequires: nauty
BuildRequires: normaliz
BuildRequires: ntl-devel
+BuildRequires: ocl-icd-devel
BuildRequires: pari-devel
BuildRequires: pkgconfig(atomic_ops)
BuildRequires: pkgconfig(bdw-gc) >= 8.0.4
@@ -320,10 +322,10 @@ BuildRequires: pkgconfig(flexiblas)
BuildRequires: pkgconfig(gmp)
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(libffi)
+BuildRequires: pkgconfig(libmariadb)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(m4ri)
BuildRequires: pkgconfig(m4rie)
-BuildRequires: pkgconfig(libmariadb)
BuildRequires: pkgconfig(mpfi)
BuildRequires: pkgconfig(nauty)
BuildRequires: pkgconfig(ncurses)
@@ -331,13 +333,16 @@ BuildRequires: pkgconfig(qd)
BuildRequires: pkgconfig(readline)
BuildRequires: pkgconfig(tbb)
BuildRequires: pkgconfig(tinyxml2)
-BuildRequires: polymake
+# Polymake is currently uninstallable
+#BuildRequires: polymake
BuildRequires: python3-devel
BuildRequires: texinfo
BuildRequires: time
BuildRequires: TOPCOM
BuildRequires: transfig
+%ifarch %{valgrind_arches}
BuildRequires: valgrind
+%endif
Requires: 4ti2
Requires: cohomCalg
@@ -402,11 +407,11 @@ install -p -m755 %{SOURCE20} ./etags
install -p -m644 %{SOURCE100} BUILD/tarfiles/
%endif
install -p -m644 %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE105} \
- %{SOURCE108} BUILD/tarfiles/
+ BUILD/tarfiles/
+install -p -m644 %{SOURCE108} BUILD/tarfiles/v%{linboxver}.tar.gz
sed -i 's/\(VERSION = \).*/\1%{mpfrver}/' libraries/mpfr/Makefile.in
sed -e 's/\(VERSION = \).*/\1%{linboxver}/' \
- -e 's/^#\(PATCHFILE\)/\1/' \
- -e 's,--with-gmp.*,GIVARO_CFLAGS=-I$(LIBRARIESDIR) GIVARO_LIBS="%{_libdir}/libgivaro.a",' \
+ -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
@@ -414,7 +419,6 @@ tar -C submodules/mathic -xf %{SOURCE107} --strip-components=1
## patches for bundled code
sed -e 's,--with-blas,&=%{_includedir}/flexiblas --with-ntl,' \
- -e 's,2\.6\.0,%{flintver},' \
-i libraries/flint/Makefile.in
cp -p %{SOURCE200} libraries/linbox/patch-%{linboxver}
sed -e '/^TARFILE =/iPATCHFILE = @abs_srcdir@/patch-$(VERSION)' \
@@ -434,19 +438,18 @@ 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}
-%patch0 -p1 -b .optflags
-%patch1 -p1 -b .ulimit
-%patch2 -p1 -b .default_make_targets
-%patch3 -p1 -b .no_gftables
+%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
-%patch4 -p1 -b .fplll
-%patch5 -p1 -b .configure
-%patch6 -p1 -b .rightarrow
-%patch7 -p1 -b .lto
-%patch8 -p2 -b .configure-c99
+%patch -P4 -p1 -b .fplll
+%patch -P5 -p1 -b .configure
+%patch -P6 -p1 -b .rightarrow
+%patch -P7 -p1 -b .lto
# repeatable builds: inject a node name
sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac
@@ -475,6 +478,11 @@ 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 \
+ Macaulay2/tests/Makefile{,.test}.in libraries/Makefile.library.in
+sed -i 's/fgrep/grep -F/g' Macaulay2/util/linkexec-alternative
+
# (re)generate configure
autoreconf -fi .
@@ -485,19 +493,12 @@ autoreconf -fi .
# 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. When built with -O1 and LTO, the linker segfaults. Until we can
-# diagnose and fix these issues, we build with -O1 and without LTO on s390x.
-%define _lto_cflags %{nil}
+# segfaults.
optflags=$(sed 's/-O2/-O/g' <<< "%{build_cflags}")
%else
optflags="%{build_cflags}"
%endif
-# Possible bug in Macaulay2 1.19: the memtailor, mathic, and mathicgb headers
-# cannot be found. We work around this here. See if the problem has been fixed
-# in later versions.
-CPPFLAGS="-I$PWD/submodules/memtailor/src -I$PWD/submodules/mathic/src -I$PWD/submodules/mathicgb/src"
-
## configure macro currently broken, due to some odd prefix-checks. probably fixable -- Rex
mkdir -p BUILD/%{_target_platform}
pushd BUILD/%{_target_platform}
@@ -615,6 +616,11 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
+* 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
@@ -627,7 +633,7 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
* Wed Jan 18 2023 Fedora Release Engineering - 1.21-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
-* Thu Jan 12 2022 Jerry James - 1.21-2
+* Thu Jan 12 2023 Jerry James - 1.21-2
- Rebuild for libfplll 5.4.4
* Thu Dec 22 2022 Jerry James - 1.21-1
diff --git a/com.macaulay2.macaulay2.metainfo.xml b/com.macaulay2.macaulay2.metainfo.xml
index 2ae837e..0de35f5 100644
--- a/com.macaulay2.macaulay2.metainfo.xml
+++ b/com.macaulay2.macaulay2.metainfo.xml
@@ -23,7 +23,7 @@
Macaulay2 with Emacs
- loganjerry@gmail.com
+ Macaulay2-maintainers@fedoraproject.org
https://macaulay2.com/
https://github.com/Macaulay2/M2/issues
https://groups.google.com/g/macaulay2
diff --git a/linbox-1.6.3.patch b/linbox-1.6.3.patch
deleted file mode 100644
index f2481c0..0000000
--- a/linbox-1.6.3.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- linbox-1.6.3/configure.ac.orig 2019-06-07 07:22:08.000000000 -0600
-+++ linbox-1.6.3/configure.ac 2020-06-05 12:24:32.920910975 -0600
-@@ -65,9 +65,8 @@ AC_PROG_CXX
-
- AC_COMPILER_NAME
-
--STDFLAG=${CXXFLAGS}
-+STDFLAG=""
-
--CXXFLAGS=""
-
- # We need a C++11 compiler now - AB 2014-12-12
- # clang-3.8 does not support __float128 without explicitly passing it -std=c++11
-@@ -187,10 +186,6 @@ echo "----------------------------------
- echo " START LINBOX CONFIG "
- echo "-----------------------------------------------"
-
--# Checks which SIMD optimization flags to use and set SIMD_CFLAGS accordingly
--INSTR_SET
--AC_SUBST(SIMD_FLAGS)
--
- dnl gcc-4.9.2 bug See https://trac.sagemath.org/ticket/17635#comment:178
- AS_IF([ test "x$CCNAM" = "xgcc492" ],[CXXFLAGS="${CXXFLAGS} -fpermissive"],[])
-
---- linbox-1.6.3/linbox/algorithms/gauss/gauss-solve-gf2.inl.orig 2019-06-07 07:22:08.000000000 -0600
-+++ linbox-1.6.3/linbox/algorithms/gauss/gauss-solve-gf2.inl 2020-02-01 16:19:20.692143829 -0700
-@@ -72,7 +72,7 @@ namespace LinBox
-
- Vector1 w(F2, A.coldim());
-
-- for(typename Vector1::iterator it=w.begin()+(ptrdiff_t)Rank;it!=w.end();++it)
-+ for(typename Vector1::iterator it=w.begin()+(long)Rank;it!=w.end();++it)
- F2.assign(*it,F2.zero);
-
- return this->solve(x, w, Rank, Q, L, A, P, b);
diff --git a/linbox-1.7.0.patch b/linbox-1.7.0.patch
new file mode 100644
index 0000000..70edb8c
--- /dev/null
+++ b/linbox-1.7.0.patch
@@ -0,0 +1,15 @@
+--- 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
diff --git a/sources b/sources
index b8c7c11..4bf407c 100644
--- a/sources
+++ b/sources
@@ -1,5 +1,5 @@
SHA512 (Macaulay2-icons.tar.xz) = 069aa0ad70a0253583b00091c094da9b79d2a2f0f2d38aa97f543081f5df5fd3b5a9e1463febd6947c3151cf01844133174c7372f57e158c2d3faba6baed5d1d
-SHA512 (Macaulay2-1.21.tar.gz) = 79760d1b6362ba2b89966b5ebcdf3ae9f40579db2fa3fbdde146b178a6b802b1bca546d78f12c5a67d14d8b8a8fb70553fb0903d6b91490f366d114e54a5ce0e
+SHA512 (Macaulay2-1.22.tar.gz) = c66e29ea0cbc824dc2310d7ffca22858719526388ccd1914e11e37e231192e3c96310a4819ed951f9df59f50058dd7a7c041b792ecbf352110659ed1e02ebe49
SHA512 (4ti2-1.6.9.tar.gz) = f02b61ba04d7512e86d9574574669ec764d053fc5d01744dc6b521518d4165b41355ae12344923f1549b323406130c6562a4d9272b1b88de2ecc2c20d3d892d5
SHA512 (cddlib-094m.tar.gz) = d140d57391b1c963d68ca2e344fbda723a5077004bace322a18362fdc1fff8b50fdc4b598ca8cdf131158e07afc96c5d9aafd7abde082a9e241701e403310b9f
SHA512 (cohomCalg-0.32.tar.gz) = b76d8de00b13a8fe8881222178247c5e99c15075c46290830f6c3afffb9dfc18af0d57f738ac5a0d7c00044db81b4465d1e0563c95f7f656a2440be5765c6818
@@ -13,12 +13,12 @@ SHA512 (glpk-4.59.tar.gz) = ca05bd085880143acf4a440cf7efd2392d4dde89bed53a0e5726
SHA512 (gtest-1.10.0.tar.gz) = bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b065e165bc7477d762bce0997a427131866a89f1001e3f3315198204ffa5d643a9355f1f4d0d7b1a9
SHA512 (lapack-3.9.0.tgz) = afa4eb05f2b1dc2f9588ec58bd32f90b78c01185f328e71f2baf6adec6622f557c332f09e7eb46f71e5e3f2e852f25a640bde2bf9f4be7205cecf01cb07b6bc8
SHA512 (libfplll-5.2.0.tar.gz) = 67d1a8deb92d3f9245983b09b7593b19c5d43c8fe77cfea893ea9dfb744bcb77b7239d73e4f619450cc6960f4c48fb1c6ba46268208b0f31f855cf1af6bfaa29
-SHA512 (linbox-1.6.3.tar.gz) = 7585f51b46b65a90328b4ff82f7c74eb59510c912a0bb0ce49263f4c7c1e777c0f9961e4672fa36be6fb84035a019b8e212615c363fd62d632e37c327d6ed3c0
+SHA512 (linbox-1.7.0.tar.gz) = cb4e848186d1f6357f498d1e3bda6484b4c789c02440f9614a227a2ae206a31fb20b32be40bda74da3f2f8f981bbd58d80fc97c95499b5151bb06eafb867ef9e
SHA512 (lrslib-071a.tar.gz) = f33639c593769722a37262d6a90073076a4a8a7453ed81d948ebed6f0a5ee826b80c9211e5a601ca177b776c5388aa4e46efd55e8b219f1b6ce633232aa6b001
-SHA512 (M2-emacs-8615029.tar.gz) = 557343ae4e2200583533954336ccfa4e3907138cf953cd4d44eadc1b52865ef080ddec775450cec0da1e720765cba6d106b8c5216cf8a9668219f4a9efada7f5
-SHA512 (mathic-1.0.tar.gz) = e95c2397cdea3bbff1c8cd52273277183535f07443c222e38659861c25d392b09cbfb33c9cc2a482f8dc9c1b6bc1754e86934fe5a833f8f19ef0edf0cd2e7165
-SHA512 (mathicgb-1.0.tar.gz) = e3b05385f67c42302fba22b9a7d391eb1fca5a56c0eec02ab3e37a28e1d4de6d734b803d5d5701acac8663bbe391afd6ffc40ab5c5e6f11e8fff22fd5f07a2ea
-SHA512 (memtailor-1.0.tar.gz) = 50eded674dc33d3c55f5ec0f250586106f7e16995baa4e46f21684016066cb41e02ace7d82b38305029b947f474835598a972c39dcb0ead6679566b53549a0df
+SHA512 (M2-emacs-2bac858.tar.gz) = 3b44dab7e54e323a3b7f69fa8fe42890d91c9855680af4c10b771446701c268501fcf6362d0b1ba2da6f409f91ff589ad465c2c88ec852c86763d4e6a7a40ab9
+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 (mpsolve-3.2.1.tar.gz) = 8f0cb1be303767bf5a68c150df01c98f7f5e17bfaee685ea4cb9300c0dbf740069c774d647f141a4a1eb46fa54f23d9e75a800ce195cd522527c72e3c6aeed0f
SHA512 (TOPCOM-0.17.8.tar.gz) = 8611e8bd36eda00646fb40794435f23e6af81ecbee93c40e8fe5f73905e673e6244cb0f8cc1fe5c29050e40c7d53a44c615c60cbbecc8452b3c85f1d8a816d7a
From bbe0816b0e71bb34ee30623984e31d697a23e64c Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley"
Date: Thu, 9 Nov 2023 19:51:18 -0500
Subject: [PATCH 28/57] 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 29/57] 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 30/57] 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 31/57] 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 32/57] 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 33/57] 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 34/57] 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 35/57] 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 36/57] 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 37/57] 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 38/57] 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 39/57] 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 40/57] 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 41/57] 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 42/57] 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 43/57] 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 44/57] 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 45/57] 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 46/57] 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 47/57] 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 48/57] 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 49/57] 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 50/57] 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 51/57] 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 52/57] 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 53/57] 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