Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions srcpkgs/sagemath/patches/40594-Fix_segfault_in_libgap.patch

This file was deleted.

This file was deleted.

32 changes: 0 additions & 32 deletions srcpkgs/sagemath/patches/41141-Fix_ipython_9.7.0.patch

This file was deleted.

33 changes: 0 additions & 33 deletions srcpkgs/sagemath/patches/sphinx.patch

This file was deleted.

93 changes: 39 additions & 54 deletions srcpkgs/sagemath/template
Original file line number Diff line number Diff line change
@@ -1,49 +1,64 @@
# Template file for 'sagemath'
pkgname=sagemath
version=10.7
revision=4
version=10.8
revision=1
_pypi_version=${version/.beta/b}
_pypi_version=${_pypi_version/.rc/rc}
build_style=python3-pep517
hostmakedepends="pkg-config python3-Cython python3-Jinja2
python3-pkgconfig python3-setuptools python3-wheel
python3-gmpy2 python3-memory_allocator python3-numpy ecl
python3-cypari2 python3-cysignals python3-devel"
make_build_args="-C setup-args=-Dbuild-docs=false"
hostmakedepends="pkg-config
python3-Jinja2 python3-pkgconfig python3-setuptools
python3-wheel python3-meson-python"
makedepends="boost-headers brial-devel cliquer-devel ecl eclib-devel
ecm-devel fflas-ffpack flintlib-devel gap-devel gd-devel glpk-devel
gsl-devel iml-devel lcalc-devel libbraiding-devel libhomfly-devel libmpc-devel
libpng-devel linbox-devel m4ri-devel m4rie-devel mpfi-devel
mpfr-devel ntl-devel openblas-devel pari-devel planarity-devel python3-cypari2
python3-cysignals python3-devel python3-gmpy2 python3-memory_allocator
python3-numpy rankwidth-devel singular symmetrica-devel"
depends="eclib-devel fflas-ffpack flintlib-devel gcc-fortran meson gd-devel
gfan gsl-devel gzip libpng-devel linbox-devel m4ri-devel maxima-ecl
mpfr-devel nauty ntl-devel palp pari-devel pari-elldata-small pari-galdata
pari-galpol-small pari-seadata-small pkg-config python3-Cython python3-cypari2
python3-cysignals python3-devel python3-fpylll python3-ipython python3-lrcalc
mpfr-devel ntl-devel openblas-devel pari-devel planarity-devel
singular symmetrica-devel rankwidth-devel
maxima-ecl nauty gfan
gcc-fortran palp pari-elldata-small pari-galdata
pari-galpol-small pari-seadata-small
sage-data-combinatorial_designs
sage-data-combinatorial_designs
sage-data-elliptic_curves
sage-data-graphs
sage-data-polytopes_db
sympow tachyon threejs-sage
python3-cypari2 python3-cysignals python3-devel python3-gmpy2
python3-memory_allocator python3-numpy python3-Cython
python3-fpylll python3-ipython python3-lrcalc
python3-ipython_ipykernel python3-jupyter_ipywidgets python3-matplotlib
python3-memory_allocator python3-networkx python3-pip python3-pkgconfig
python3-networkx python3-pip
python3-pplpy python3-primecountpy python3-requests python3-scipy
python3-sympy python3-traitlets sage-data-combinatorial_designs
python3-conway-polynomials sage-data-elliptic_curves sage-data-graphs
sage-data-polytopes_db sympow tachyon threejs-sage
python3-six python3-gmpy2 python3-numpy python3-pexpect python3-Sphinx
python3-Pillow python3-mpmath python3-jupyter_client python3-ptyprocess"
checkdepends="$depends python3-pytest pythran python3-Sphinx gdb"
python3-sympy python3-traitlets
python3-conway-polynomials
python3-six python3-pexpect python3-Sphinx
python3-Pillow python3-mpmath python3-jupyter_client python3-ptyprocess
python3-platformdirs python3-pytest"
depends="gzip
python3-Cython python3-Pillow python3-Sphinx python3-conway-polynomials
python3-cypari2 python3-cysignals python3-fpylll python3-gmpy2
python3-ipython python3-ipython_ipykernel python3-jupyter_client
python3-jupyter_ipywidgets python3-matplotlib python3-memory_allocator
python3-mpmath python3-networkx python3-numpy python3-pexpect
python3-pkgconfig python3-platformdirs python3-pplpy python3-primecountpy
python3-ptyprocess python3-requests python3-scipy python3-six
python3-sympy python3-traitlets"
checkdepends="${depends} python3-pytest pythran python3-Sphinx gdb"
short_desc="Open source mathematics software"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://www.sagemath.org/"
changelog="https://github.com/sagemath/sage/releases"
distfiles="${PYPI_SITE}/s/sagemath-standard/sagemath_standard-${_pypi_version}.tar.gz"
checksum=f6ec41913a745b94e20ceae69c2c54a7c8e549b3dc8b4a01dbd874c772924149
distfiles="${PYPI_SITE}/s/sagemath/sagemath-${_pypi_version}.tar.gz"
checksum=864c21a84bfad05f586ccdc45bf685552cd87a236bf56bc30163de474569f82c
nocross="due to ntl (eclib, singular), fflas-ffpack, givaro, linbox, sympow, maxima"

# main repo `.../src/sage/` is `.../sage/` here
patch_args=-Np2

# parallel build
export SAGE_NUM_THREADS="$XBPS_MAKEJOBS"
export SAGE_NUM_THREADS="${XBPS_MAKEJOBS}"

post_install() {
# move scripts to /usr/libexec
Expand All @@ -57,33 +72,3 @@ post_install() {
vmkdir usr/bin
ln -s /usr/libexec/sagemath/sage ${DESTDIR}/usr/bin
}

do_check() {
local testdir="${wrksrc}/.xbps-testdir/$(date +%s)"
python3 -m installer -d "${testdir}" dist/*.whl

# this makes for nicer (shorter) relative paths in output
cd ${testdir}/${py3_sitelib}

if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
_sed='s|#.*||;/^\s*$/d;s|^\s*\([^ ]*/\)\?sage/|sage/|g' \
_test_files=$(sed -e "$_sed" ${XBPS_DISTDIR}/sagemath-check)
fi
if [ -z "$_test_files" ]; then
_test_files=--all
fi
cp ${FILESDIR}/timings2.json .
_test_args="--stats_path=timings2.json"
if [ "$XBPS_CHECK_PKGS" = full ]; then
_test_args+=" --long --warn-long 30.0"
else
_test_args+=" --warn-long 10.0"
fi
if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
# for CI use a predictable random seed
_test_args+=" --random-seed=0"
fi

PATH="${testdir}/usr/bin:${PATH}" PYTHONPATH="${testdir}/${py3_sitelib}" \
sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
}
Loading