Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sagemath: update to 9.7 #39876

Closed
wants to merge 12 commits into from
19 changes: 9 additions & 10 deletions common/shlibs
Expand Up @@ -4011,18 +4011,17 @@ libsimavrparts.so.1 simavr-1.6_2
libsword-1.8.1.so libsword-1.8.1_6
libgivaro.so.9 givaro-4.1.1_1
liblinbox.so.0 linbox-1.6.3_1
libpari-gmp.so.7 pari-2.13.0_1
libpari-gmp-tls.so.7 pari-2.13.2_1
libpari-gmp-tls.so.8 pari-2.15.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libplanarity.so.0 planarity-3.0.1.1_1
libgap.so.0 gap-4.11.1_1
libgap.so.8 gap-4.12.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libxcvt.so.0 libxcvt-0.1.1_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
libflint.so.16 flintlib-2.8.0_1
libflint.so.17 flintlib-2.9.0_1
libarb.so.2 arb-2.20.0_1
libec.so.8 eclib-20210625_1
libec.so.10 eclib-20220621_1
libsymmetrica.so.2 symmetrica-3.0.1_1
libLfunction.so.1 lcalc-2.0.4_1
liblrcalc.so.2 lrcalc-2.1_1
Expand Down Expand Up @@ -4062,11 +4061,11 @@ libumfpack.so.5 SuiteSparse-5.10.1_1
libecl.so.21.2 ecl-21.2.1_1
libecm.so.1 ecm-7.0.4_3
libcliquer.so.1 cliquer-1.22_1
libSingular-4.3.0.so singular-4.3.0_1
libfactory-4.3.0.so singular-4.3.0_1
libpolys-4.3.0.so singular-4.3.0_1
libomalloc-0.9.6.so singular-4.3.0_1
libsingular_resources-4.3.0.so singular-4.3.0_1
libSingular-4.3.1.so singular-4.3.1p2_1
libfactory-4.3.1.so singular-4.3.1p2_1
libpolys-4.3.1.so singular-4.3.1p2_1
libomalloc-0.9.6.so singular-4.3.1p2_1
libsingular_resources-4.3.1.so singular-4.3.1p2_1
libbrial.so.3 brial-1.2.10_1
libbrial_groebner.so.3 brial-1.2.10_1
libm4ri-0.0.20200125.so m4ri-20200125_1
Expand Down
6 changes: 2 additions & 4 deletions srcpkgs/arb/template
@@ -1,6 +1,6 @@
# Template file for 'arb'
pkgname=arb
version=2.22.1
version=2.23.0
revision=1
build_style=configure
configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
Expand All @@ -11,9 +11,7 @@ license="LGPL-2.1-or-later"
homepage="https://arblib.org"
changelog="https://raw.githubusercontent.com/fredrik-johansson/arb/master/doc/source/history.rst"
distfiles="https://github.com/fredrik-johansson/arb/archive/${version}.tar.gz"
checksum=1ef85518eee04885e8a90196498bc75e4e2410621d4184f2bc01d46b7080a243

CFLAGS="-D_GNU_SOURCE" # needed for cpu_set_t
checksum=977d41bde46f5442511d5165c705cec32c03e852c84d7d1836135d412ce702bb

arb-devel_package() {
depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
Expand Down
6 changes: 3 additions & 3 deletions srcpkgs/eclib/template
@@ -1,7 +1,7 @@
# Template file for 'eclib'
pkgname=eclib
version=20210625
revision=2
version=20221012
revision=1
build_style=gnu-configure
configure_args="--with-flint --with-boost"
hostmakedepends="automake autoconf-archive libtool"
Expand All @@ -11,7 +11,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://github.com/JohnCremona/eclib"
distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
checksum=00333fd36afd237c9e6e410c7ab98536ddcd7fdc430e6837fe293247b835c572
checksum=bd6f0191876c1426ca57db851ce06ef79ea1755f01e81dd747358d1b76b5e932

pre_configure() {
autoreconf -fi
Expand Down
5 changes: 2 additions & 3 deletions srcpkgs/flintlib/template
@@ -1,6 +1,6 @@
# Template file for 'flintlib'
pkgname=flintlib
version=2.8.5
version=2.9.0
revision=1
wrksrc="flint-${version}"
build_style=configure
Expand All @@ -14,11 +14,10 @@ license="LGPL-2.1-or-later"
homepage="https://flintlib.org"
changelog="https://raw.githubusercontent.com/wbhart/flint2/trunk/NEWS"
distfiles="https://flintlib.org/flint-${version}.tar.gz"
checksum=5911fedff911100f15781f35e3a4fa934fe60e4aea02a8c10cc8918101c1eed8
checksum=2fc090d51033c93208e6c10d406397a53c983ae5343b958eb25f72a57a4ce76a

build_options="ntl openblas"
desc_option_ntl="enable NTL support"
build_options_default=""

if [ -z "$CROSS_BUILD" ]; then
build_options_default+=" ntl"
Expand Down
11 changes: 11 additions & 0 deletions srcpkgs/gap/patches/atlasrep-dont_use_network_by_default.patch
@@ -0,0 +1,11 @@
--- a/pkg/atlasrep/gap/userpref.g 2022-09-06 17:41:17.000000000 -0300
+++ b/pkg/atlasrep/gap/userpref.g 2022-10-29 07:46:48.580833277 -0300
@@ -46,7 +46,7 @@
this information depends on the value of the preference at the time \
when the AtlasRep package and its data extensions get loaded."
],
- default:= true,
+ default:= false,
values:= [ true, false ],
multi:= false,
package:= "AtlasRep",
42 changes: 29 additions & 13 deletions srcpkgs/gap/template
@@ -1,17 +1,17 @@
# Template file for 'gap'
pkgname=gap
version=4.11.1
version=4.12.1
revision=1
build_style=gnu-configure
make_install_target="install-bin install-gaproot install-headers install-libgap"
makedepends="gmp-devel zlib-devel readline-devel"
checkdepends="perl"
short_desc="Groups, Algorithms, Programming - computational discrete algebra"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="http://www.gap-system.org/"
homepage="https://www.gap-system.org/"
changelog="https://raw.githubusercontent.com/gap-system/gap/master/CHANGES.md"
distfiles="https://github.com/gap-system/gap/releases/download/v${version}/gap-${version}.tar.gz"
checksum=6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304
checksum=f9ebef11ee31b210ce36e3c70960742b4e253282bbd5270adc9324273c92b016

if [ "$XBPS_CHECK_PKGS" = full ]; then
# not sure about this -- takes about 25 minutes
Expand All @@ -21,20 +21,36 @@ fi
_GAPROOT=/usr/share/gap/

# minimal required packages
_GAPPKGS="GAPDoc primgrp SmallGrp transgrp"
_GAPPKGS="autodoc gapdoc primgrp smallgrp transgrp"

# other expected packages
_GAPPKGS+=" atlasrep autpgrp alnuth crisp ctbllib FactInt fga irredsol laguna
polenta polycyclic resclasses sophus tomlib"
_GAPPKGS+=" atlasrep autpgrp alnuth crisp ctbllib factint fga irredsol laguna
polenta polycyclic radiroot resclasses sophus tomlib utils"

post_install() {
vmkdir ${_GAPROOT}/pkg
post_extract() {
# keep around only the packages that we want to install
mkdir pkg.install
for p in ${_GAPPKGS}; do
[ -d pkg/$p ] || p="$p-*"
vcopy "pkg/$p" ${_GAPROOT}/pkg
mv "pkg/$p" pkg.install
done
# not handled by make install-headers
vcopy gen/config.h /usr/include/gap
mv pkg pkg.orig
mv pkg.install pkg
}

post_install() {
vmkdir ${_GAPROOT}
vcopy pkg ${_GAPROOT}
}

pre_check() {
msg_normal "Check that loading packages works\n"
for p in ${_GAPPKGS}; do
cat <<-EOF
if LoadPackage("$p") <> true then
Error("loading package '$p'");
fi;
EOF
done | ./gap --quitonbreak -b -q -r
}

gap-devel_package() {
Expand Down
10 changes: 10 additions & 0 deletions srcpkgs/giac/patches/giac-pari-2.15-test.patch
@@ -0,0 +1,10 @@
Fix a failing test due to thread stack overflow

--- a/check/chk_fhan4 2018-03-13 15:27:11.000000000 -0300
+++ b/check/chk_fhan4 2022-10-14 18:51:12.604731890 -0300
@@ -1,4 +1,5 @@
#! /bin/sh
unset LANG
+export PARI_SIZE=2048000
../src/icas TP04-sol.cas > TP04.tst
diff TP04.tst TP04-sol.cas.out1
20 changes: 20 additions & 0 deletions srcpkgs/giac/patches/giac-pari-2.15.patch
@@ -0,0 +1,20 @@
ANYARG patch

diff --git a/src/pari.cc b/src/pari.cc
index 76ce8e1..50d08ab 100644
--- a/src/pari.cc
+++ b/src/pari.cc
@@ -40,6 +40,13 @@ using namespace std;

#ifdef HAVE_LIBPARI

+// Anyarg disappeared from PARI 2.15.0
+#ifdef __cplusplus
+# define ANYARG ...
+#else
+# define ANYARG
+#endif
+
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
4 changes: 2 additions & 2 deletions srcpkgs/giac/template
@@ -1,6 +1,6 @@
# Template file for 'giac'
pkgname=giac
version=1.9.0.7
version=1.9.0.27
revision=1
wrksrc="giac-${version%.*}"
build_style=gnu-configure
Expand All @@ -14,7 +14,7 @@ license="GPL-3.0-or-later"
homepage="https://www-fourier.ujf-grenoble.fr/~parisse/giac.html"
changelog="https://www-fourier.ujf-grenoble.fr/~parisse/install_en#new"
distfiles="https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version%.*}-${version##*.}.tar.gz"
checksum=72016988b7180e9b630ecabecc60969213e7b61418c2598c91acbaec139fd740
checksum=c5d222fbff5db2a0a560b4e106ce88dd13d109ecb21570a939b8b3b87521d5e0

# need more than 4*65536 stack, see try_parse() in gen.cc line 11812
LDFLAGS="-Wl,-z,stack-size=2097152"
Expand Down
4 changes: 2 additions & 2 deletions srcpkgs/gp2c/template
@@ -1,6 +1,6 @@
# Template file for 'gp2c'
pkgname=gp2c
version=0.0.12pl1
version=0.0.13
revision=1
build_style=gnu-configure
hostmakedepends="perl"
Expand All @@ -12,4 +12,4 @@ license="GPL-2.0-or-later"
homepage="http://pari.math.u-bordeaux.fr/"
changelog="http://pari.math.u-bordeaux.fr/cgi-bin/gitweb.cgi?p=gp2c.git;a=blob_plain;f=ChangeLog;hb=HEAD"
distfiles="${homepage}pub/pari/GP2C/${pkgname}-${version}.tar.gz"
checksum=79a8c46f7ad3331e4d8ae6af6b496c4742fd73a73b996b3ca7ead61452ca6e8d
checksum=261374eca73ebd76c112a9593dca28b64812aa762561fda5a4b2c2cd79a69d36
2 changes: 1 addition & 1 deletion srcpkgs/lcalc/template
@@ -1,7 +1,7 @@
# Template file for 'lcalc'
pkgname=lcalc
version=2.0.5
revision=1
revision=2
build_style=gnu-configure
configure_args="--with-pari"
hostmakedepends="automake libtool pkg-config gengetopt"
Expand Down
@@ -0,0 +1,54 @@
See: https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2419
--

commit 9c4bcd3f497f30f757c8eecadc9b45b33754a540
Author: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
Date: Tue Oct 4 10:30:43 2022 +0200

6- conversion to float of t_QUAD with t_FRAC components [#2419]

diff --git a/src/basemath/gen2.c b/src/basemath/gen2.c
index 3ef74a7023..d810270b99 100644
--- a/src/basemath/gen2.c
+++ b/src/basemath/gen2.c
@@ -2429,8 +2429,8 @@ quadtofp(GEN x, long prec)
else
{ /* if (b) x ~ (u + z) / 2 and quadnorm(x) ~ (u^2 - z^2) / 4
* else x ~ u + z and quadnorm(x) ~ u^2 - z^2 */
- long s = signe(u);
- if (s == -signe(v)) /* conjugate expression avoids cancellation */
+ long s = gsigne(u);
+ if (s == -gsigne(v)) /* conjugate expression avoids cancellation */
{
z = gdiv(quadnorm(x), gsub(u, z));
if (b) shiftr_inplace(z, 1);
diff --git a/src/test/32/quad b/src/test/32/quad
index 2b43d87a4a..1f1042d143 100644
--- a/src/test/32/quad
+++ b/src/test/32/quad
@@ -43,6 +43,7 @@ w
-4294967297
4294967297
-4294967297
+2.2847006554165615148712535010323047844
*** at top-level: floor(w8)
*** ^---------
*** floor: incorrect type in gfloor (t_QUAD).
@@ -55,4 +56,4 @@ w
*** at top-level: floor(Mod(0,3)*quadgen(5))
*** ^--------------------------
*** floor: incorrect type in gfloor (t_QUAD).
-Total time spent: 2
+Total time spent: 1
diff --git a/src/test/in/quad b/src/test/in/quad
index c8cd5a586f..82cd5e992d 100644
--- a/src/test/in/quad
+++ b/src/test/in/quad
@@ -47,6 +47,7 @@ ceil(2*w)
ceil(-2*w)
round(2*w)
round(-2*w)
+quadgen(5) + 2/3 + 0.\\ #2419

\\ Errors keep at end of file
floor(w8)
48 changes: 48 additions & 0 deletions srcpkgs/pari/patches/float32.patch
@@ -0,0 +1,48 @@
Author: Gonzalo Tornaría <tornaria@cmat.edu.uy>
Date: Fri Oct 14 17:00:46 2022 -0300

Revert "x86 (32bit): force -mpc64 on compilers that supports it."

This reverts commit ca61b6391cf95ac8af15669236e2ec5839d2ad91.


This causes problems with floating point precision on i686:
```
$ cat exp40.c
#include <math.h>
#include <stdio.h>
int main() {
volatile int a=40; /* do not optimize away the call to exp(a) */
printf("%f\n", exp(a));
}
$ cc -Wall exp40.c -lm && ./a.out
235385266837020000.000000
$ cc -Wall exp40.c -lm -mpc64 && ./a.out
235385266837020448.000000
```

Note that when pari is built using -mpc64, just *linking* with -lpari
causes the problem!!!
```
$ cc -Wall exp40.c -lm -lpari && ./a.out
235385266837020448.000000
```

diff --git a/config/get_cc b/config/get_cc
index 3cfaa88bb7..2d61d3871f 100644
--- a/config/get_cc
+++ b/config/get_cc
@@ -110,13 +110,6 @@ if test -n "$__gnuc__"; then
# Specific optimisations for some architectures
case "$arch" in
sparcv8*) cflags=-mv8;;
- i?86)
- cmd="$CC $CFLAGS $extraflag -mpc64 -fno-strict-aliasing -o $exe gnu.c"
- . log_cmd
- if test -s $exe; then
- cflags="-mpc64"
- fi
- . cleanup_exe;;
esac
# problems on some architectures
case "$osname" in
12 changes: 9 additions & 3 deletions srcpkgs/pari/template
@@ -1,6 +1,6 @@
# Template file for 'pari'
pkgname=pari
version=2.13.4
version=2.15.0
revision=1
build_style=configure
build_helper=qemu
Expand All @@ -11,14 +11,15 @@ make_check_target=statest-all
make_install_target="install install-lib-sta install-lib-dyn"
hostmakedepends="perl texlive"
makedepends="gmp-devel readline-devel $(vopt_if x11 libX11-devel)"
checkdepends="pari-elldata-small pari-galdata pari-galpol-small pari-seadata-small"
checkdepends="pari-elldata-small pari-galdata pari-galpol-small
pari-seadata-small pari-nflistdata"
short_desc="Fast computations library in number theory"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://pari.math.u-bordeaux.fr"
changelog="https://pari.math.u-bordeaux.fr/cgi-bin/gitweb.cgi?p=pari.git;a=blob_plain;f=CHANGES;hb=refs/heads/pari-${version%.*}"
distfiles="https://pari.math.u-bordeaux.fr/pub/pari/unix/${pkgname}-${version}.tar.gz"
checksum=bcde9eceae1592814381c1697cdb7063567b6504201b1be47bb58920f3bce185
checksum=e474851e0d16d4e4f9a0d9612c746a2ae7c9a1ec185d04c440b1c74a85755685

build_options="x11 pthreads"
build_options_default="x11 pthreads"
Expand All @@ -27,6 +28,11 @@ desc_option_pthreads="Enable support for pthreads"
# reduce speed losses due to pthreads
CFLAGS="-flto -fno-semantic-interposition"

case $XBPS_TARGET_MACHINE in
# avoid numerical noise caused by extended-precision of registers
i686*) CFLAGS+=" -ffloat-store" ;;
esac

post_patch() {
# sse2 is not available on all i686
# and it's available on all x86_64
Expand Down