From 0fc1a24bb0e451b7e38a19567a34917d42ac85e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Thu, 11 Nov 2021 09:39:20 -0300 Subject: [PATCH 1/7] hooks: option to skip 03-rewrite-python-shebang --- common/hooks/pre-pkg/03-rewrite-python-shebang.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh index 07162ad2c69b..c0f2198e44cf 100644 --- a/common/hooks/pre-pkg/03-rewrite-python-shebang.sh +++ b/common/hooks/pre-pkg/03-rewrite-python-shebang.sh @@ -4,6 +4,10 @@ hook() { local pyver= shebang= off= + if [ -n "$_no_python_shebang" ]; then + return 0 + fi + if [ -d ${PKGDESTDIR}/usr/lib/python* ]; then pyver="$(find ${PKGDESTDIR}/usr/lib/python* -prune -type d | grep -o '[[:digit:]]\.[[:digit:]]\+$')" fi From 39ee86e12aae3feb374fe263d8c977d14f6c19c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Thu, 11 Nov 2021 10:36:03 -0300 Subject: [PATCH 2/7] New package: sage-9.5.beta5 --- srcpkgs/sage/template | 74 +++++++++++++++++++++++++++++++++++++++++++ srcpkgs/sage/update | 3 ++ 2 files changed, 77 insertions(+) create mode 100644 srcpkgs/sage/template create mode 100644 srcpkgs/sage/update diff --git a/srcpkgs/sage/template b/srcpkgs/sage/template new file mode 100644 index 000000000000..2ef437238cb5 --- /dev/null +++ b/srcpkgs/sage/template @@ -0,0 +1,74 @@ +# Template file for 'sage' +pkgname=sage +version=9.5.beta5 +revision=1 +build_style=configure +configure_args=--prefix=/usr/lib/sage-${version} +make_check_target=ptest +short_desc="Open source mathematics software" +maintainer="Gonzalo Tornaría " +license="GPL-3.0-or-later" +homepage="http://sagemath.org/" +distfiles="http://mirrors.mit.edu/sage/src/sage-$version.tar.gz" +checksum=3b78ee848450d6881902bf68f4f3af17e1647e72c51e5fcdcb412c938ecbce57 + +case ${version} in + # url for devel is different + *.beta*|*.rc*) + distfiles=${distfiles/sage\/src/sage\/devel} + ;; +esac + +# first we try to build native; we'll worry about cross later +# besides, some dependencies are nocross +nocross=yes + +# for now, to make install faster +nostrip=yes + +# don't rewrite python shebang as sage uses its own python (for now) +_no_python_shebang=yes + +do_install() { + vcopy /usr/lib/sage-${version} usr/lib/ + vmkdir usr/bin + ln -s /usr/lib/sage-${version}/bin/sage ${DESTDIR}/usr/bin/ +} + +### copied from sage-deps, to keep in sync + +# hard dependencies +makedepends+=" gcc make m4 perl binutils git tar libgomp-devel" + +# recommended dependencies +makedepends+=" gcc-fortran openssl-devel" + +# bootstrap dependencies +makedepends+=" automake gettext gettext-devel" + +# other host dependencies +makedepends+=" cmake curl git ninja pandoc patch pkg-config python3 tox" + +# already in void +makedepends+=" + CoinMP-devel R arb-devel boost-devel bzip2-devel ecl eclib-devel + ecm-devel flintlib-devel freetype-devel gc-devel gd-devel giac-devel + glpk-devel gmp-devel gmpxx-devel gp2c graphviz gsl-devel isl-devel + libatomic_ops-devel libcurl-devel libffi-devel libmpc-devel + libpng-devel libxml2-devel mpfr-devel ncurses-devel openblas-devel + pari-devel pari-elldata-small pari-galdata pari-galpol-small + pari-seadata pcre-devel perl-File-Slurp perl-JSON perl-Term-ReadKey + perl-Term-ReadLine-Gnu perl-XML-LibXML perl-XML-LibXSLT + perl-XML-Writer ppl-devel python3-devel readline-devel sqlite-devel + zeromq-devel zlib-devel + FlintQS SuiteSparse-devel cddlib-devel fflas-ffpack fplll-devel gf2x-devel + givaro-devel igraph-devel iml-devel lcalc-devel linbox-devel + m4ri-devel m4rie-devel mpfi-devel ntl-devel perl-SVG rankwidth-devel + singular sympow zn_poly symmetrica-devel planarity-devel qhull libqhull-devel +" + +# TODO: standard +# brial cliquer gfan libbraiding libhomfly lrcalc nauty palp tachyon + +# TODO: optional +# 4ti2 coxeter3 libnauty libsemigroups lrslib perl_mongodb diff --git a/srcpkgs/sage/update b/srcpkgs/sage/update new file mode 100644 index 000000000000..f797813dcde6 --- /dev/null +++ b/srcpkgs/sage/update @@ -0,0 +1,3 @@ +# for now, check both stable and devel releases +site="http://mirrors.mit.edu/sage/src/ +http://mirrors.mit.edu/sage/devel/" From 338692887c7186b776b192af8dcc536849cceb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sat, 13 Nov 2021 00:08:27 -0300 Subject: [PATCH 3/7] sagemath: update to sage-9.5.beta6 Also: - rename pkg from sage to sagemath - now it will build sage in-place at /usr/lib/sage-$version - the resulting pkg contains a lot of useless stuff that comes with the distribution; we'll have to clean up. E.g. SAGE_ROOT/upstream is definitely unnecessary (1.2G); possibly SAGE_ROOT/pkgs or at least SAGE_ROOT/pkgs/sagemath-standard/build (2.6G). --- srcpkgs/{sage => sagemath}/template | 46 +++++++++++++++++++++-------- srcpkgs/{sage => sagemath}/update | 1 + 2 files changed, 35 insertions(+), 12 deletions(-) rename srcpkgs/{sage => sagemath}/template (67%) rename srcpkgs/{sage => sagemath}/update (90%) diff --git a/srcpkgs/sage/template b/srcpkgs/sagemath/template similarity index 67% rename from srcpkgs/sage/template rename to srcpkgs/sagemath/template index 2ef437238cb5..fa5189ad259e 100644 --- a/srcpkgs/sage/template +++ b/srcpkgs/sagemath/template @@ -1,41 +1,63 @@ -# Template file for 'sage' -pkgname=sage -version=9.5.beta5 +# Template file for 'sagemath' +pkgname=sagemath +version=9.5.beta6 revision=1 +wrksrc=sage-$version build_style=configure -configure_args=--prefix=/usr/lib/sage-${version} +configure_args="--enable-build-as-root" make_check_target=ptest +# for now skip building docs +make_build_target=build short_desc="Open source mathematics software" maintainer="Gonzalo Tornaría " license="GPL-3.0-or-later" homepage="http://sagemath.org/" distfiles="http://mirrors.mit.edu/sage/src/sage-$version.tar.gz" -checksum=3b78ee848450d6881902bf68f4f3af17e1647e72c51e5fcdcb412c938ecbce57 +checksum=7bae8cbb4db73147bd698261497102524bfadeb71ca66b1c68e96827bd5a8975 + +# path where sage will be installed +_SAGE_ROOT=/usr/lib/sage-${version} case ${version} in # url for devel is different - *.beta*|*.rc*) - distfiles=${distfiles/sage\/src/sage\/devel} - ;; + *.beta*|*.rc*) distfiles=${distfiles/sage\/src/sage\/devel} ;; esac -# first we try to build native; we'll worry about cross later -# besides, some dependencies are nocross +# for now, skip check in ci, since we still have a few tests failing +make_check=ci-skip + +# for now, just build native; we'll worry about cross later +# besides, some dependencies are nocross (e.g. ntl) nocross=yes # for now, to make install faster nostrip=yes +# don't shlib_provide anything +noshlibprovides=yes + # don't rewrite python shebang as sage uses its own python (for now) _no_python_shebang=yes +post_extract() { + # sage wants to be built in place so let $wrksrc be a symlink + mv -T $wrksrc $_SAGE_ROOT + ln -sfT $_SAGE_ROOT $wrksrc +} + +do_clean() { + # undo post_extract() + rm $wrksrc + mv $_SAGE_ROOT $wrksrc +} + do_install() { vcopy /usr/lib/sage-${version} usr/lib/ vmkdir usr/bin - ln -s /usr/lib/sage-${version}/bin/sage ${DESTDIR}/usr/bin/ + ln -s $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/ } -### copied from sage-deps, to keep in sync +### copied from sage-deps, to be kept in sync # hard dependencies makedepends+=" gcc make m4 perl binutils git tar libgomp-devel" diff --git a/srcpkgs/sage/update b/srcpkgs/sagemath/update similarity index 90% rename from srcpkgs/sage/update rename to srcpkgs/sagemath/update index f797813dcde6..c33aba4e6df2 100644 --- a/srcpkgs/sage/update +++ b/srcpkgs/sagemath/update @@ -1,3 +1,4 @@ +pkgname=sage # for now, check both stable and devel releases site="http://mirrors.mit.edu/sage/src/ http://mirrors.mit.edu/sage/devel/" From 21b053172d023a556f022f632af48b5efedefb81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sat, 13 Nov 2021 07:40:55 -0300 Subject: [PATCH 4/7] sagemath: revbump for changes - include patch fixing build of pyzmq on musl - add gengetopts and texinfo to makedepends - first attempt at cleanup: remove upstream sources and build artifacts --- srcpkgs/sagemath/patches/fix-pyzmq-musl.patch | 15 +++++++++++++++ srcpkgs/sagemath/template | 9 +++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/sagemath/patches/fix-pyzmq-musl.patch diff --git a/srcpkgs/sagemath/patches/fix-pyzmq-musl.patch b/srcpkgs/sagemath/patches/fix-pyzmq-musl.patch new file mode 100644 index 000000000000..9190830d835e --- /dev/null +++ b/srcpkgs/sagemath/patches/fix-pyzmq-musl.patch @@ -0,0 +1,15 @@ +diff --git a/build/pkgs/pyzmq/spkg-install.in b/build/pkgs/pyzmq/spkg-install.in +index 0ce404ee5a..b7260c6d27 100644 +--- a/build/pkgs/pyzmq/spkg-install.in ++++ b/build/pkgs/pyzmq/spkg-install.in +@@ -1,6 +1,9 @@ + # Since we use environment vars we have to generate setup.cfg + +-echo "[build_ext]" > src/setup.cfg ++echo "[global]" > src/setup.cfg ++echo "skip_check_zmq = True" >> src/setup.cfg ++ ++echo "[build_ext]" >> src/setup.cfg + + # (I tried putting quotes around $SAGE_LOCAL to allow for spaces in + # the path---which is never used but is a good habit to support---but diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template index fa5189ad259e..56166cd44272 100644 --- a/srcpkgs/sagemath/template +++ b/srcpkgs/sagemath/template @@ -1,7 +1,7 @@ # Template file for 'sagemath' pkgname=sagemath version=9.5.beta6 -revision=1 +revision=2 wrksrc=sage-$version build_style=configure configure_args="--enable-build-as-root" @@ -52,7 +52,11 @@ do_clean() { } do_install() { - vcopy /usr/lib/sage-${version} usr/lib/ + vcopy $_SAGE_ROOT usr/lib/ + # cleanup: upstream sources and build artifacts + rm -rf ${DESTDIR}/$_SAGE_ROOT/upstream + rm -rf ${DESTDIR}/$_SAGE_ROOT/pkgs/*/build + # symlink main binary vmkdir usr/bin ln -s $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/ } @@ -87,6 +91,7 @@ makedepends+=" givaro-devel igraph-devel iml-devel lcalc-devel linbox-devel m4ri-devel m4rie-devel mpfi-devel ntl-devel perl-SVG rankwidth-devel singular sympow zn_poly symmetrica-devel planarity-devel qhull libqhull-devel + gengetopt texinfo " # TODO: standard From d131943a21b36a2c35b65566cf8ef82652b7574c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 14 Nov 2021 18:23:29 -0300 Subject: [PATCH 5/7] sagemath: revbump to 9.5.beta6_3 for changes - add depends needed for runtime and for testing - add python_version=3 - disable skipping 03-rewrite-python-shebang as it seems to be harmless after adding python_version=3 - fix cleaning up of $wrksrc and $_SAGE_ROOT - use sage-${version}_${revision} for the binary symlink; this way it won't override whatever sage is installed in the system so I can test on a live system. --- srcpkgs/sagemath/template | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template index 56166cd44272..cfe97e039974 100644 --- a/srcpkgs/sagemath/template +++ b/srcpkgs/sagemath/template @@ -1,19 +1,24 @@ # Template file for 'sagemath' pkgname=sagemath version=9.5.beta6 -revision=2 +revision=3 wrksrc=sage-$version build_style=configure configure_args="--enable-build-as-root" make_check_target=ptest # for now skip building docs make_build_target=build +depends="giac git FlintQS zn_poly sympow + pari-elldata-small pari-galdata pari-galpol-small pari-seadata-small + flintlib-devel gsl-devel ntl-devel eclib-devel pari-devel mpfr-devel + m4ri-devel gd-devel libpng-devel fflas-ffpack pkg-config gcc-fortran" short_desc="Open source mathematics software" maintainer="Gonzalo Tornaría " license="GPL-3.0-or-later" homepage="http://sagemath.org/" distfiles="http://mirrors.mit.edu/sage/src/sage-$version.tar.gz" checksum=7bae8cbb4db73147bd698261497102524bfadeb71ca66b1c68e96827bd5a8975 +python_version=3 # path where sage will be installed _SAGE_ROOT=/usr/lib/sage-${version} @@ -37,7 +42,8 @@ nostrip=yes noshlibprovides=yes # don't rewrite python shebang as sage uses its own python (for now) -_no_python_shebang=yes +# after python_version=3, this seems harmless... strange... +#_no_python_shebang=yes post_extract() { # sage wants to be built in place so let $wrksrc be a symlink @@ -46,9 +52,12 @@ post_extract() { } do_clean() { - # undo post_extract() - rm $wrksrc - mv $_SAGE_ROOT $wrksrc + rm -rf $wrksrc $_SAGE_ROOT +} + +post_build() { + # install pytest for more tests + ./sage -i pytest } do_install() { @@ -58,7 +67,9 @@ do_install() { rm -rf ${DESTDIR}/$_SAGE_ROOT/pkgs/*/build # symlink main binary vmkdir usr/bin - ln -s $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/ + # for now use sage-${version}_${revision} so it doesn't override + # other sage installed in the system + ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}_${revision} } ### copied from sage-deps, to be kept in sync From 0b68044a2f53c384e07956484b673b8a5ef876b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sat, 20 Nov 2021 19:01:21 -0300 Subject: [PATCH 6/7] sagemath: update to 9.5.beta7. --- srcpkgs/sagemath/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template index cfe97e039974..3f9a3e9e077f 100644 --- a/srcpkgs/sagemath/template +++ b/srcpkgs/sagemath/template @@ -1,7 +1,7 @@ # Template file for 'sagemath' pkgname=sagemath -version=9.5.beta6 -revision=3 +version=9.5.beta7 +revision=1 wrksrc=sage-$version build_style=configure configure_args="--enable-build-as-root" @@ -17,7 +17,7 @@ maintainer="Gonzalo Tornaría " license="GPL-3.0-or-later" homepage="http://sagemath.org/" distfiles="http://mirrors.mit.edu/sage/src/sage-$version.tar.gz" -checksum=7bae8cbb4db73147bd698261497102524bfadeb71ca66b1c68e96827bd5a8975 +checksum=b81e1fe22d1b990bf1230260241ead016470da1f2f7b260f562d50f74c2904c7 python_version=3 # path where sage will be installed From 7dcff791d4a6eccd8584ea713f56346f84661fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 22 Nov 2021 10:23:03 -0300 Subject: [PATCH 7/7] sagemath: add more dependencies Also: - add patches so more doctests pass - add do_check() to skip building docs - use https for distfiles --- ...08fd9d56d022ed28592f93f07ec8dce530ef.patch | 49 ++++++ ...b99e0270f80cf03b80418372f45274f46051.patch | 163 ++++++++++++++++++ ...a86908daf60b25e66e6a189c51ada7e0a732.patch | 25 +++ .../patches/skip-optional-dochtml.patch | 13 ++ srcpkgs/sagemath/template | 15 +- 5 files changed, 260 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/sagemath/patches/17e308fd9d56d022ed28592f93f07ec8dce530ef.patch create mode 100644 srcpkgs/sagemath/patches/2ee7b99e0270f80cf03b80418372f45274f46051.patch create mode 100644 srcpkgs/sagemath/patches/f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch create mode 100644 srcpkgs/sagemath/patches/skip-optional-dochtml.patch diff --git a/srcpkgs/sagemath/patches/17e308fd9d56d022ed28592f93f07ec8dce530ef.patch b/srcpkgs/sagemath/patches/17e308fd9d56d022ed28592f93f07ec8dce530ef.patch new file mode 100644 index 000000000000..e295bb91af5b --- /dev/null +++ b/srcpkgs/sagemath/patches/17e308fd9d56d022ed28592f93f07ec8dce530ef.patch @@ -0,0 +1,49 @@ +From 17e308fd9d56d022ed28592f93f07ec8dce530ef Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky +Date: Mon, 15 Nov 2021 23:37:15 -0500 +Subject: Trac #32880: use GAP instead of Singular to test + _get_shared_lib_path(). + +We still have a doctest for _get_shared_lib_path() that tries to find +the path to libSingular; however, we no longer actually need it to +find libSingular because the path to libSingular is contained in +LIBSINGULAR_PATH. + +Since _get_shared_lib_path() is a bit fragile, this commit replaces +that test case with one for libgap, which is still always installed +via SPKG and for which we still need _get_shared_lib_path() to be able +to find the path. +--- + src/sage/env.py | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) + +diff --git a/src/sage/env.py b/src/sage/env.py +index 40ace13..3bd4826 100644 +--- a/src/sage/env.py ++++ b/src/sage/env.py +@@ -267,20 +267,12 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]: + + EXAMPLES:: + +- sage: import sys +- sage: from fnmatch import fnmatch + sage: from sage.env import _get_shared_lib_path +- sage: lib_filename = _get_shared_lib_path("Singular", "singular-Singular") +- sage: if sys.platform == 'cygwin': +- ....: pattern = "*/cygSingular-*.dll" +- ....: elif sys.platform == 'darwin': +- ....: pattern = "*/libSingular-*.dylib" +- ....: else: +- ....: pattern = "*/lib*Singular-*.so" +- sage: fnmatch(str(lib_filename), pattern) ++ sage: "gap" in _get_shared_lib_path("gap") + True + sage: _get_shared_lib_path("an_absurd_lib") is None + True ++ + """ + + for libname in libnames: +-- +cgit v1.0-1-gd88e + diff --git a/srcpkgs/sagemath/patches/2ee7b99e0270f80cf03b80418372f45274f46051.patch b/srcpkgs/sagemath/patches/2ee7b99e0270f80cf03b80418372f45274f46051.patch new file mode 100644 index 000000000000..32e641edb3aa --- /dev/null +++ b/srcpkgs/sagemath/patches/2ee7b99e0270f80cf03b80418372f45274f46051.patch @@ -0,0 +1,163 @@ +From 2ee7b99e0270f80cf03b80418372f45274f46051 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Samuel=20Leli=C3=A8vre?= +Date: Sat, 20 Nov 2021 13:34:16 +0100 +Subject: 32905: abs tol for some CBF and RBF doctests + +--- + src/sage/functions/gamma.py | 2 +- + src/sage/rings/complex_arb.pyx | 6 +++--- + src/sage/rings/real_arb.pyx | 24 ++++++++++++------------ + src/sage/symbolic/function.pyx | 2 +- + 4 files changed, 17 insertions(+), 17 deletions(-) + +diff --git a/src/sage/functions/gamma.py b/src/sage/functions/gamma.py +index 3a4deef..307deb1 100644 +--- a/src/sage/functions/gamma.py ++++ b/src/sage/functions/gamma.py +@@ -1049,7 +1049,7 @@ class Function_beta(GinacFunction): + r""" + TESTS:: + +- sage: RBF(beta(sin(3),sqrt(RBF(2).add_error(1e-8)/3))) ++ sage: RBF(beta(sin(3),sqrt(RBF(2).add_error(1e-8)/3))) # abs tol 6e-7 + [7.407662 +/- 6.17e-7] + """ + return [x, y] +diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx +index ce9b1b1..7e10ec9 100644 +--- a/src/sage/rings/complex_arb.pyx ++++ b/src/sage/rings/complex_arb.pyx +@@ -4189,7 +4189,7 @@ cdef class ComplexBall(RingElement): + + TESTS: + +- sage: CBF(Ei(I)) ++ sage: CBF(Ei(I)) # abs tol 1e-16 + [0.337403922900968 +/- 3.76e-16] + [2.51687939716208 +/- 2.01e-15]*I + """ + cdef ComplexBall result = self._new() +@@ -4239,7 +4239,7 @@ cdef class ComplexBall(RingElement): + + TESTS: + +- sage: CBF(Ci(I)) ++ sage: CBF(Ci(I)) # abs tol 1e-17 + [0.837866940980208 +/- 4.72e-16] + [1.570796326794897 +/- 5.54e-16]*I + """ + cdef ComplexBall result = self._new() +@@ -4291,7 +4291,7 @@ cdef class ComplexBall(RingElement): + + TESTS: + +- sage: CBF(Chi(I)) ++ sage: CBF(Chi(I)) # abs tol 1e-16 + [0.337403922900968 +/- 3.25e-16] + [1.570796326794897 +/- 5.54e-16]*I + """ + cdef ComplexBall result = self._new() +diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx +index 80a840e..49caa63 100644 +--- a/src/sage/rings/real_arb.pyx ++++ b/src/sage/rings/real_arb.pyx +@@ -3489,12 +3489,12 @@ cdef class RealBall(RingElement): + + EXAMPLES:: + +- sage: RBF(1).Ei() ++ sage: RBF(1).Ei() # abs tol 5e-16 + [1.89511781635594 +/- 4.94e-15] + + TESTS:: + +- sage: RBF(Ei(1)) ++ sage: RBF(Ei(1)) # abs tol 5e-16 + [1.89511781635594 +/- 4.94e-15] + """ + cdef RealBall res = self._new() +@@ -3531,12 +3531,12 @@ cdef class RealBall(RingElement): + + EXAMPLES:: + +- sage: RBF(1).Ci() ++ sage: RBF(1).Ci() # abs tol 1e-16 + [0.337403922900968 +/- 3.25e-16] + + TESTS:: + +- sage: RBF(Ci(1)) ++ sage: RBF(Ci(1)) # abs tol 1e-16 + [0.337403922900968 +/- 3.25e-16] + """ + cdef RealBall res = self._new() +@@ -3575,12 +3575,12 @@ cdef class RealBall(RingElement): + + EXAMPLES:: + +- sage: RBF(1).Chi() ++ sage: RBF(1).Chi() # abs tol 1e-17 + [0.837866940980208 +/- 4.72e-16] + + TESTS:: + +- sage: RBF(Chi(1)) ++ sage: RBF(Chi(1)) # abs tol 1e-17 + [0.837866940980208 +/- 4.72e-16] + """ + cdef RealBall res = self._new() +@@ -3597,7 +3597,7 @@ cdef class RealBall(RingElement): + + EXAMPLES:: + +- sage: RBF(3).li() ++ sage: RBF(3).li() # abs tol 1e-15 + [2.16358859466719 +/- 4.72e-15] + + TESTS:: +@@ -3621,7 +3621,7 @@ cdef class RealBall(RingElement): + + EXAMPLES:: + +- sage: RBF(3).Li() ++ sage: RBF(3).Li() # abs tol 1e-15 + [1.11842481454970 +/- 7.61e-15] + """ + cdef RealBall res = self._new() +@@ -3648,9 +3648,9 @@ cdef class RealBall(RingElement): + + EXAMPLES:: + +- sage: RBF(sin(3)).beta(RBF(2/3).sqrt()) ++ sage: RBF(sin(3)).beta(RBF(2/3).sqrt()) # abs tol 1e-13 + [7.407661629415 +/- 1.07e-13] +- sage: RealBallField(100)(7/2).beta(1) ++ sage: RealBallField(100)(7/2).beta(1) # abs tol 1e-30 + [0.28571428571428571428571428571 +/- 5.23e-30] + sage: RealBallField(100)(7/2).beta(1, 1/2) + [0.025253813613805268728601584361 +/- 2.53e-31] +@@ -3685,9 +3685,9 @@ cdef class RealBall(RingElement): + + sage: RBF(1/2).gamma() + [1.772453850905516 +/- ...e-16] +- sage: RBF(gamma(3/2, RBF(2).sqrt())) ++ sage: RBF(gamma(3/2, RBF(2).sqrt())) # abs tol 2e-17 + [0.37118875695353 +/- 3.00e-15] +- sage: RBF(3/2).gamma_inc(RBF(2).sqrt()) ++ sage: RBF(3/2).gamma_inc(RBF(2).sqrt()) # abs tol 2e-17 + [0.37118875695353 +/- 3.00e-15] + + .. SEEALSO:: +diff --git a/src/sage/symbolic/function.pyx b/src/sage/symbolic/function.pyx +index 89cdce5..480a601 100644 +--- a/src/sage/symbolic/function.pyx ++++ b/src/sage/symbolic/function.pyx +@@ -626,7 +626,7 @@ cdef class Function(SageObject): + sage: b = RBF(3/2, 1e-10) + sage: airy_ai(b) + airy_ai([1.500000000 +/- 1.01e-10]) +- sage: gamma(b, 1) ++ sage: gamma(b, 1) # abs tol 4.5e-9 + [0.50728223 +/- 4.67e-9] + sage: hurwitz_zeta(b, b) + hurwitz_zeta([1.500000000 +/- 1.01e-10], [1.500000000 +/- 1.01e-10]) +-- +cgit v1.0-1-gd88e + diff --git a/srcpkgs/sagemath/patches/f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch b/srcpkgs/sagemath/patches/f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch new file mode 100644 index 000000000000..ec0467757ee7 --- /dev/null +++ b/srcpkgs/sagemath/patches/f5f7a86908daf60b25e66e6a189c51ada7e0a732.patch @@ -0,0 +1,25 @@ +From f5f7a86908daf60b25e66e6a189c51ada7e0a732 Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Sat, 30 Oct 2021 10:21:52 +0200 +Subject: Fix test failure caused by new warning + +--- + src/sage/lfunctions/pari.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/sage/lfunctions/pari.py b/src/sage/lfunctions/pari.py +index 0aaf91c..33d5266 100644 +--- a/src/sage/lfunctions/pari.py ++++ b/src/sage/lfunctions/pari.py +@@ -316,7 +316,7 @@ def lfun_number_field(K): + sage: L(3) + 1.15202784126080 + sage: L(0) +- 0.000000000000000 ++ ...0.000000000000000 + """ + return pari.lfuncreate(K) + +-- +cgit v1.0-1-gd88e + diff --git a/srcpkgs/sagemath/patches/skip-optional-dochtml.patch b/srcpkgs/sagemath/patches/skip-optional-dochtml.patch new file mode 100644 index 000000000000..e49b18a52fbc --- /dev/null +++ b/srcpkgs/sagemath/patches/skip-optional-dochtml.patch @@ -0,0 +1,13 @@ +diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests +index 288c889bd1..b9a4d3038a 100755 +--- a/src/bin/sage-runtests ++++ b/src/bin/sage-runtests +@@ -15,7 +15,7 @@ os.environ['SAGE_STARTUP_FILE'] = os.path.join(DOT_SAGE, 'init-doctests.sage') + + def _get_optional_defaults(): + """Return the default value for the --optional flag.""" +- optional = ['sage', 'dochtml', 'optional'] ++ optional = ['sage', 'optional'] + + # This should be good-enough to determine if we are in a sage source + # repository working tree diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template index 3f9a3e9e077f..d4130be12a7a 100644 --- a/srcpkgs/sagemath/template +++ b/srcpkgs/sagemath/template @@ -16,7 +16,7 @@ short_desc="Open source mathematics software" maintainer="Gonzalo Tornaría " license="GPL-3.0-or-later" homepage="http://sagemath.org/" -distfiles="http://mirrors.mit.edu/sage/src/sage-$version.tar.gz" +distfiles="https://mirrors.mit.edu/sage/src/sage-$version.tar.gz" checksum=b81e1fe22d1b990bf1230260241ead016470da1f2f7b260f562d50f74c2904c7 python_version=3 @@ -47,6 +47,7 @@ noshlibprovides=yes post_extract() { # sage wants to be built in place so let $wrksrc be a symlink + rm -rf $_SAGE_ROOT mv -T $wrksrc $_SAGE_ROOT ln -sfT $_SAGE_ROOT $wrksrc } @@ -72,6 +73,11 @@ do_install() { ln -sfT $_SAGE_ROOT/sage ${DESTDIR}/usr/bin/sage-${version}_${revision} } +do_check() { + # since make check will build the docs, run test like this instead + ./sage -tp ${XBPS_MAKEJOBS} --all +} + ### copied from sage-deps, to be kept in sync # hard dependencies @@ -103,10 +109,9 @@ makedepends+=" m4ri-devel m4rie-devel mpfi-devel ntl-devel perl-SVG rankwidth-devel singular sympow zn_poly symmetrica-devel planarity-devel qhull libqhull-devel gengetopt texinfo + brial-devel cliquer-devel gfan libbraiding-devel libhomfly-devel + lrcalc-devel nauty-devel palp tachyon " -# TODO: standard -# brial cliquer gfan libbraiding libhomfly lrcalc nauty palp tachyon - # TODO: optional -# 4ti2 coxeter3 libnauty libsemigroups lrslib perl_mongodb +# 4ti2 coxeter3 libsemigroups lrslib pdf2svg perl_mongodb polymake