Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5
Date: Wed, 02 Feb 2022 22:03:34 +0100	[thread overview]
Message-ID: <20220202210334.jkwEtjclHfHAuse1SpIP04gr22j6Ae-6yAkz6O5KBY8@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-34030@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

There is an updated pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages sagemath
https://github.com/void-linux/void-packages/pull/34030

[WIP] New package: sagemath-9.5
This is WIP, so I can get feedback.

Supported architectures: x86_64, x86_64-musl, i686. We also try to make sure it works with musl-1.2.

The testsuite can be run normal (-Q) or long (-K). For CI it runs normal (~ 1/2 time) and it uses a fixed random seed 0 to avoid random failures. When running locally, the random seed is random so one may get occasional test failures that depend on a particular value of the random seed.

The package `sagemath-test` is a dummy package whose purpose is to run the testsuite with sage installed as a package and without the build directory. For this to make sense, the masterdir has to be clean (without traces of the sagemath build, this should be ok after running "pkg" or "pkg -Q").

A patch file from https://github.com/void-linux/void-packages/pull/34030.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sagemath-34030.patch --]
[-- Type: text/x-diff, Size: 61949 bytes --]

From 847945aac668024312a58754006d22de3bc18cbc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 31 Jan 2022 12:50:38 -0300
Subject: [PATCH] New package: sagemath-9.5

---
 srcpkgs/sagemath/files/timings2.json          | 397 ++++++++++++++++++
 .../patches/01-dont_link_ratpoints.patch      |  10 +
 ...2-fix_get_shared_lib_path--see_29644.patch |  13 +
 .../patches/03-doctest_have_program.patch     |  20 +
 .../patches/04-doctest_sage_getfile.patch     |  22 +
 .../patches/05-fix_sage_getfile.patch         |  16 +
 .../sagemath/patches/07-ignore_warning.patch  |  15 +
 .../08-dont_run_pytest--see_31924.patch       |  27 ++
 .../patches/09-doctest_numerical_fix.patch    |  14 +
 ...y_slow_doctest-polynomial_zmod_flint.patch |  14 +
 ...ry_slow_doctest-isogeny_small_degree.patch | 106 +++++
 ...fix_very_slow_doctest-function_field.patch |  97 +++++
 ...2ddd4e2dc92469c1590ebf0c40f8f69bf579.patch | 126 ++++++
 ...2adf01e9e2ce9f1e33779f0b1ac0d9d1989c.patch |  40 ++
 .../zzz-loadable_module_extension.patch       |  14 +
 .../patches/zzz-skip_doctest_no_threejs.patch |  13 +
 srcpkgs/sagemath/template                     | 129 ++++++
 17 files changed, 1073 insertions(+)
 create mode 100644 srcpkgs/sagemath/files/timings2.json
 create mode 100644 srcpkgs/sagemath/patches/01-dont_link_ratpoints.patch
 create mode 100644 srcpkgs/sagemath/patches/02-fix_get_shared_lib_path--see_29644.patch
 create mode 100644 srcpkgs/sagemath/patches/03-doctest_have_program.patch
 create mode 100644 srcpkgs/sagemath/patches/04-doctest_sage_getfile.patch
 create mode 100644 srcpkgs/sagemath/patches/05-fix_sage_getfile.patch
 create mode 100644 srcpkgs/sagemath/patches/07-ignore_warning.patch
 create mode 100644 srcpkgs/sagemath/patches/08-dont_run_pytest--see_31924.patch
 create mode 100644 srcpkgs/sagemath/patches/09-doctest_numerical_fix.patch
 create mode 100644 srcpkgs/sagemath/patches/10-fix_very_slow_doctest-polynomial_zmod_flint.patch
 create mode 100644 srcpkgs/sagemath/patches/11-fix_very_slow_doctest-isogeny_small_degree.patch
 create mode 100644 srcpkgs/sagemath/patches/12-fix_very_slow_doctest-function_field.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
 create mode 100644 srcpkgs/sagemath/patches/trac-33226-fix_doctests_giac-1.7.0-33ea2adf01e9e2ce9f1e33779f0b1ac0d9d1989c.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-loadable_module_extension.patch
 create mode 100644 srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
 create mode 100644 srcpkgs/sagemath/template

diff --git a/srcpkgs/sagemath/files/timings2.json b/srcpkgs/sagemath/files/timings2.json
new file mode 100644
index 000000000000..01b2fcc9e0bf
--- /dev/null
+++ b/srcpkgs/sagemath/files/timings2.json
@@ -0,0 +1,397 @@
+{
+  "doc.ca.intro.index": {"walltime": 8},
+  "doc.en.constructions.calculus": {"walltime": 64},
+  "doc.en.constructions.plotting": {"walltime": 32},
+  "doc.en.prep.Advanced-2DPlotting": {"walltime": 16},
+  "doc.en.prep.Calculus": {"walltime": 8},
+  "doc.en.prep.Symbolics-and-Basic-Plotting": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.birds_other": {"walltime": 8},
+  "doc.en.thematic_tutorials.explicit_methods_in_number_theory.elliptic_curves": {"walltime": 8},
+  "doc.en.thematic_tutorials.geometry.polyhedra_tutorial": {"walltime": 16},
+  "doc.en.thematic_tutorials.sandpile": {"walltime": 16},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_advanced": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_cartesian": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_change": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_curvilinear": {"walltime": 32},
+  "doc.en.thematic_tutorials.vector_calculus.vector_calc_plane": {"walltime": 16},
+  "doc.ja.tutorial.tour_plotting": {"walltime": 8},
+  "sage.algebras.cluster_algebra": {"walltime": 8},
+  "sage.algebras.commutative_dga": {"walltime": 16},
+  "sage.algebras.hecke_algebras.ariki_koike_algebra": {"walltime": 8},
+  "sage.algebras.iwahori_hecke_algebra": {"walltime": 8},
+  "sage.algebras.lie_algebras.classical_lie_algebra": {"walltime": 128},
+  "sage.algebras.lie_algebras.nilpotent_lie_algebra": {"walltime": 16},
+  "sage.algebras.quantum_clifford": {"walltime": 16},
+  "sage.algebras.quantum_groups.fock_space": {"walltime": 8},
+  "sage.algebras.quatalg.quaternion_algebra": {"walltime": 8},
+  "sage.algebras.steenrod.steenrod_algebra": {"walltime": 64},
+  "sage.algebras.steenrod.steenrod_algebra_bases": {"walltime": 8},
+  "sage.algebras.yangian": {"walltime": 8},
+  "sage.arith.misc": {"walltime": 32},
+  "sage.calculus.calculus": {"walltime": 16},
+  "sage.calculus.desolvers": {"walltime": 8},
+  "sage.calculus.functional": {"walltime": 8},
+  "sage.calculus.riemann": {"walltime": 64},
+  "sage.calculus.tests": {"walltime": 16},
+  "sage.calculus.transforms.dwt": {"walltime": 16},
+  "sage.calculus.transforms.fft": {"walltime": 8},
+  "sage.categories.coxeter_groups": {"walltime": 8},
+  "sage.categories.finite_monoids": {"walltime": 16},
+  "sage.categories.lie_conformal_algebras": {"walltime": 8},
+  "sage.categories.loop_crystals": {"walltime": 8},
+  "sage.categories.pushout": {"walltime": 8},
+  "sage.categories.super_hopf_algebras_with_basis": {"walltime": 32},
+  "sage.categories.super_lie_conformal_algebras": {"walltime": 8},
+  "sage.coding.ag_code": {"walltime": 64},
+  "sage.coding.ag_code_decoders": {"walltime": 128},
+  "sage.coding.binary_code": {"walltime": 8},
+  "sage.coding.linear_code": {"walltime": 16},
+  "sage.combinat.backtrack": {"walltime": 32},
+  "sage.combinat.chas.wqsym": {"walltime": 32},
+  "sage.combinat.cluster_algebra_quiver.cluster_seed": {"walltime": 64},
+  "sage.combinat.cluster_algebra_quiver.quiver": {"walltime": 128},
+  "sage.combinat.crystals.affine_factorization": {"walltime": 16},
+  "sage.combinat.crystals.alcove_path": {"walltime": 32},
+  "sage.combinat.crystals.highest_weight_crystals": {"walltime": 8},
+  "sage.combinat.crystals.kirillov_reshetikhin": {"walltime": 16},
+  "sage.combinat.crystals.letters": {"walltime": 8},
+  "sage.combinat.crystals.littelmann_path": {"walltime": 16},
+  "sage.combinat.crystals.mv_polytopes": {"walltime": 16},
+  "sage.combinat.crystals.pbw_crystal": {"walltime": 16},
+  "sage.combinat.crystals.star_crystal": {"walltime": 8},
+  "sage.combinat.designs.bibd": {"walltime": 8},
+  "sage.combinat.designs.database": {"walltime": 16},
+  "sage.combinat.designs.difference_family": {"walltime": 8},
+  "sage.combinat.designs.gen_quadrangles_with_spread": {"walltime": 128},
+  "sage.combinat.designs.orthogonal_arrays_build_recursive": {"walltime": 16},
+  "sage.combinat.designs.orthogonal_arrays_find_recursive": {"walltime": 8},
+  "sage.combinat.diagram_algebras": {"walltime": 64},
+  "sage.combinat.fqsym": {"walltime": 32},
+  "sage.combinat.free_prelie_algebra": {"walltime": 8},
+  "sage.combinat.fully_commutative_elements": {"walltime": 8},
+  "sage.combinat.grossman_larson_algebras": {"walltime": 8},
+  "sage.combinat.interval_posets": {"walltime": 8},
+  "sage.combinat.k_regular_sequence": {"walltime": 8},
+  "sage.combinat.k_tableau": {"walltime": 16},
+  "sage.combinat.matrices.hadamard_matrix": {"walltime": 8},
+  "sage.combinat.multiset_partition_into_sets_ordered": {"walltime": 8},
+  "sage.combinat.ncsf_qsym.ncsf": {"walltime": 16},
+  "sage.combinat.ncsf_qsym.qsym": {"walltime": 16},
+  "sage.combinat.partition": {"walltime": 16},
+  "sage.combinat.partition_kleshchev": {"walltime": 16},
+  "sage.combinat.partition_tuple": {"walltime": 8},
+  "sage.combinat.posets.moebius_algebra": {"walltime": 16},
+  "sage.combinat.posets.posets": {"walltime": 8},
+  "sage.combinat.rigged_configurations.kr_tableaux": {"walltime": 32},
+  "sage.combinat.rigged_configurations.rigged_configurations": {"walltime": 16},
+  "sage.combinat.rigged_configurations.tensor_product_kr_tableaux": {"walltime": 16},
+  "sage.combinat.root_system.associahedron": {"walltime": 8},
+  "sage.combinat.root_system.branching_rules": {"walltime": 8},
+  "sage.combinat.root_system.fusion_ring": {"walltime": 8},
+  "sage.combinat.root_system.integrable_representations": {"walltime": 16},
+  "sage.combinat.root_system.non_symmetric_macdonald_polynomials": {"walltime": 16},
+  "sage.combinat.root_system.pieri_factors": {"walltime": 8},
+  "sage.combinat.root_system.plot": {"walltime": 32},
+  "sage.combinat.root_system.root_lattice_realization_algebras": {"walltime": 16},
+  "sage.combinat.root_system.root_lattice_realizations": {"walltime": 16},
+  "sage.combinat.root_system.root_system": {"walltime": 8},
+  "sage.combinat.root_system.weyl_group": {"walltime": 8},
+  "sage.combinat.rsk": {"walltime": 32},
+  "sage.combinat.sf.classical": {"walltime": 16},
+  "sage.combinat.sf.jack": {"walltime": 16},
+  "sage.combinat.sf.k_dual": {"walltime": 16},
+  "sage.combinat.sf.llt": {"walltime": 16},
+  "sage.combinat.sf.macdonald": {"walltime": 64},
+  "sage.combinat.sf.new_kschur": {"walltime": 8},
+  "sage.combinat.sf.sfa": {"walltime": 32},
+  "sage.combinat.shifted_primed_tableau": {"walltime": 16},
+  "sage.combinat.skew_tableau": {"walltime": 8},
+  "sage.combinat.symmetric_group_algebra": {"walltime": 16},
+  "sage.combinat.tableau": {"walltime": 32},
+  "sage.combinat.tableau_tuple": {"walltime": 32},
+  "sage.combinat.tiling": {"walltime": 256},
+  "sage.combinat.tutorial": {"walltime": 16},
+  "sage.combinat.words.paths": {"walltime": 64},
+  "sage.crypto.block_cipher.des": {"walltime": 16},
+  "sage.crypto.mq.sr": {"walltime": 64},
+  "sage.crypto.sbox": {"walltime": 16},
+  "sage.crypto.sboxes": {"walltime": 8},
+  "sage.doctest.forker": {"walltime": 16},
+  "sage.doctest.sources": {"walltime": 64},
+  "sage.doctest.test": {"walltime": 128},
+  "sage.dynamics.arithmetic_dynamics.projective_ds": {"walltime": 64},
+  "sage.dynamics.arithmetic_dynamics.wehlerK3": {"walltime": 8},
+  "sage.dynamics.cellular_automata.glca": {"walltime": 8},
+  "sage.dynamics.cellular_automata.solitons": {"walltime": 8},
+  "sage.dynamics.complex_dynamics.mandel_julia": {"walltime": 16},
+  "sage.functions.bessel": {"walltime": 16},
+  "sage.functions.exp_integral": {"walltime": 8},
+  "sage.functions.hypergeometric": {"walltime": 8},
+  "sage.functions.other": {"walltime": 16},
+  "sage.functions.piecewise": {"walltime": 8},
+  "sage.games.quantumino": {"walltime": 8},
+  "sage.geometry.cone": {"walltime": 32},
+  "sage.geometry.fan": {"walltime": 8},
+  "sage.geometry.hyperbolic_space.hyperbolic_geodesic": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.arrangement": {"walltime": 16},
+  "sage.geometry.hyperplane_arrangement.library": {"walltime": 8},
+  "sage.geometry.hyperplane_arrangement.plot": {"walltime": 8},
+  "sage.geometry.lattice_polytope": {"walltime": 16},
+  "sage.geometry.polyhedral_complex": {"walltime": 8},
+  "sage.geometry.polyhedron.base": {"walltime": 32},
+  "sage.geometry.polyhedron.library": {"walltime": 32},
+  "sage.geometry.polyhedron.plot": {"walltime": 8},
+  "sage.geometry.riemannian_manifolds.parametrized_surface3d": {"walltime": 16},
+  "sage.geometry.triangulation.base": {"walltime": 32},
+  "sage.geometry.triangulation.point_configuration": {"walltime": 16},
+  "sage.graphs.chrompoly": {"walltime": 8},
+  "sage.graphs.connectivity": {"walltime": 16},
+  "sage.graphs.generators.basic": {"walltime": 16},
+  "sage.graphs.generators.classical_geometries": {"walltime": 32},
+  "sage.graphs.generators.distance_regular": {"walltime": 256},
+  "sage.graphs.generators.families": {"walltime": 32},
+  "sage.graphs.generators.smallgraphs": {"walltime": 16},
+  "sage.graphs.generic_graph": {"walltime": 32},
+  "sage.graphs.genus": {"walltime": 16},
+  "sage.graphs.graph": {"walltime": 16},
+  "sage.graphs.graph_generators": {"walltime": 8},
+  "sage.graphs.graph_list": {"walltime": 8},
+  "sage.graphs.graph_plot": {"walltime": 8},
+  "sage.graphs.strongly_regular_db": {"walltime": 16},
+  "sage.groups.cubic_braid": {"walltime": 16},
+  "sage.groups.fqf_orthogonal": {"walltime": 16},
+  "sage.groups.libgap_mixin": {"walltime": 8},
+  "sage.groups.libgap_morphism": {"walltime": 8},
+  "sage.groups.lie_gps.nilpotent_lie_group": {"walltime": 16},
+  "sage.groups.matrix_gps.finitely_generated": {"walltime": 8},
+  "sage.groups.matrix_gps.heisenberg": {"walltime": 32},
+  "sage.groups.matrix_gps.linear": {"walltime": 8},
+  "sage.groups.perm_gps.cubegroup": {"walltime": 16},
+  "sage.groups.perm_gps.partn_ref.refinement_graphs": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup": {"walltime": 8},
+  "sage.groups.perm_gps.permgroup_named": {"walltime": 8},
+  "sage.homology.hochschild_complex": {"walltime": 8},
+  "sage.homology.homology_vector_space_with_basis": {"walltime": 8},
+  "sage.interacts.test_jupyter": {"walltime": 16},
+  "sage.interfaces.ecm": {"walltime": 8},
+  "sage.interfaces.expect": {"walltime": 8},
+  "sage.interfaces.gap": {"walltime": 16},
+  "sage.interfaces.maxima": {"walltime": 8},
+  "sage.interfaces.maxima_abstract": {"walltime": 64},
+  "sage.interfaces.psage": {"walltime": 8},
+  "sage.interfaces.sage0": {"walltime": 8},
+  "sage.lfunctions.zero_sums": {"walltime": 8},
+  "sage.libs.eclib.interface": {"walltime": 16},
+  "sage.libs.eclib.mwrank": {"walltime": 16},
+  "sage.libs.gap.test_long": {"walltime": 32},
+  "sage.libs.giac": {"walltime": 32},
+  "sage.manifolds.catalog": {"walltime": 8},
+  "sage.manifolds.chart": {"walltime": 32},
+  "sage.manifolds.chart_func": {"walltime": 8},
+  "sage.manifolds.continuous_map": {"walltime": 8},
+  "sage.manifolds.differentiable.affine_connection": {"walltime": 128},
+  "sage.manifolds.differentiable.automorphismfield": {"walltime": 32},
+  "sage.manifolds.differentiable.automorphismfield_group": {"walltime": 8},
+  "sage.manifolds.differentiable.bundle_connection": {"walltime": 8},
+  "sage.manifolds.differentiable.characteristic_cohomology_class": {"walltime": 256},
+  "sage.manifolds.differentiable.curve": {"walltime": 16},
+  "sage.manifolds.differentiable.degenerate": {"walltime": 32},
+  "sage.manifolds.differentiable.degenerate_submanifold": {"walltime": 256},
+  "sage.manifolds.differentiable.diff_form": {"walltime": 64},
+  "sage.manifolds.differentiable.diff_map": {"walltime": 8},
+  "sage.manifolds.differentiable.examples.euclidean": {"walltime": 32},
+  "sage.manifolds.differentiable.examples.sphere": {"walltime": 32},
+  "sage.manifolds.differentiable.integrated_curve": {"walltime": 32},
+  "sage.manifolds.differentiable.levi_civita_connection": {"walltime": 32},
+  "sage.manifolds.differentiable.manifold": {"walltime": 16},
+  "sage.manifolds.differentiable.manifold_homset": {"walltime": 16},
+  "sage.manifolds.differentiable.metric": {"walltime": 64},
+  "sage.manifolds.differentiable.mixed_form": {"walltime": 16},
+  "sage.manifolds.differentiable.mixed_form_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.multivectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.pseudo_riemannian": {"walltime": 16},
+  "sage.manifolds.differentiable.pseudo_riemannian_submanifold": {"walltime": 128},
+  "sage.manifolds.differentiable.scalarfield": {"walltime": 16},
+  "sage.manifolds.differentiable.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.differentiable.tangent_vector": {"walltime": 16},
+  "sage.manifolds.differentiable.tensorfield": {"walltime": 128},
+  "sage.manifolds.differentiable.tensorfield_paral": {"walltime": 16},
+  "sage.manifolds.differentiable.vector_bundle": {"walltime": 16},
+  "sage.manifolds.differentiable.vectorfield": {"walltime": 64},
+  "sage.manifolds.differentiable.vectorframe": {"walltime": 8},
+  "sage.manifolds.point": {"walltime": 16},
+  "sage.manifolds.scalarfield": {"walltime": 16},
+  "sage.manifolds.scalarfield_algebra": {"walltime": 8},
+  "sage.manifolds.section": {"walltime": 32},
+  "sage.manifolds.trivialization": {"walltime": 8},
+  "sage.manifolds.vector_bundle": {"walltime": 8},
+  "sage.matrix.benchmark": {"walltime": 8},
+  "sage.matrix.matrix2": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense": {"walltime": 16},
+  "sage.matrix.matrix_integer_dense_hnf": {"walltime": 32},
+  "sage.matrix.matrix_mod2_dense": {"walltime": 8},
+  "sage.matrix.matrix_rational_dense": {"walltime": 8},
+  "sage.matrix.special": {"walltime": 8},
+  "sage.matroids.catalog": {"walltime": 64},
+  "sage.misc.cachefunc": {"walltime": 16},
+  "sage.misc.cython": {"walltime": 8},
+  "sage.misc.functional": {"walltime": 8},
+  "sage.misc.randstate": {"walltime": 16},
+  "sage.misc.sagedoc": {"walltime": 64},
+  "sage.misc.sageinspect": {"walltime": 32},
+  "sage.modular.abvar.abvar": {"walltime": 16},
+  "sage.modular.abvar.homspace": {"walltime": 8},
+  "sage.modular.abvar.lseries": {"walltime": 8},
+  "sage.modular.arithgroup.arithgroup_perm": {"walltime": 8},
+  "sage.modular.arithgroup.tests": {"walltime": 8},
+  "sage.modular.btquotients.pautomorphicform": {"walltime": 32},
+  "sage.modular.hypergeometric_motive": {"walltime": 16},
+  "sage.modular.local_comp.local_comp": {"walltime": 32},
+  "sage.modular.local_comp.type_space": {"walltime": 16},
+  "sage.modular.modform.ambient_R": {"walltime": 16},
+  "sage.modular.modform.constructor": {"walltime": 8},
+  "sage.modular.modform.cuspidal_submodule": {"walltime": 16},
+  "sage.modular.modform.element": {"walltime": 64},
+  "sage.modular.modform.ring": {"walltime": 64},
+  "sage.modular.modform.space": {"walltime": 8},
+  "sage.modular.modform_hecketriangle.abstract_space": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.graded_ring_element": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.hecke_triangle_group_element": {"walltime": 32},
+  "sage.modular.modform_hecketriangle.readme": {"walltime": 16},
+  "sage.modular.modform_hecketriangle.space": {"walltime": 8},
+  "sage.modular.modsym.ambient": {"walltime": 16},
+  "sage.modular.modsym.space": {"walltime": 8},
+  "sage.modular.pollack_stevens.modsym": {"walltime": 64},
+  "sage.modular.pollack_stevens.padic_lseries": {"walltime": 32},
+  "sage.modules.finite_submodule_iter": {"walltime": 16},
+  "sage.modules.free_module": {"walltime": 16},
+  "sage.modules.free_module_element": {"walltime": 8},
+  "sage.modules.free_module_integer": {"walltime": 32},
+  "sage.modules.free_quadratic_module_integer_symmetric": {"walltime": 8},
+  "sage.modules.torsion_quadratic_module": {"walltime": 16},
+  "sage.parallel.map_reduce": {"walltime": 8},
+  "sage.plot.animate": {"walltime": 128},
+  "sage.plot.arrow": {"walltime": 8},
+  "sage.plot.circle": {"walltime": 8},
+  "sage.plot.complex_plot": {"walltime": 8},
+  "sage.plot.contour_plot": {"walltime": 32},
+  "sage.plot.density_plot": {"walltime": 8},
+  "sage.plot.graphics": {"walltime": 32},
+  "sage.plot.line": {"walltime": 8},
+  "sage.plot.matrix_plot": {"walltime": 16},
+  "sage.plot.multigraphics": {"walltime": 16},
+  "sage.plot.plot": {"walltime": 64},
+  "sage.plot.plot3d.base": {"walltime": 8},
+  "sage.plot.plot3d.implicit_plot3d": {"walltime": 16},
+  "sage.plot.plot3d.implicit_surface": {"walltime": 8},
+  "sage.plot.plot3d.parametric_plot3d": {"walltime": 8},
+  "sage.plot.plot3d.parametric_surface": {"walltime": 8},
+  "sage.plot.plot3d.plot3d": {"walltime": 16},
+  "sage.plot.plot3d.tachyon": {"walltime": 8},
+  "sage.plot.plot3d.transform": {"walltime": 32},
+  "sage.plot.point": {"walltime": 8},
+  "sage.plot.polygon": {"walltime": 8},
+  "sage.plot.streamline_plot": {"walltime": 8},
+  "sage.quadratic_forms.genera.genus": {"walltime": 16},
+  "sage.quadratic_forms.quadratic_form__automorphisms": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__local_representation_conditions": {"walltime": 64},
+  "sage.quadratic_forms.quadratic_form__neighbors": {"walltime": 8},
+  "sage.quadratic_forms.quadratic_form__siegel_product": {"walltime": 8},
+  "sage.repl.ipython_extension": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotic_expansion_generators": {"walltime": 64},
+  "sage.rings.asymptotic.asymptotic_ring": {"walltime": 8},
+  "sage.rings.asymptotic.asymptotics_multivariate_generating_functions": {"walltime": 32},
+  "sage.rings.asymptotic.term_monoid": {"walltime": 8},
+  "sage.rings.continued_fraction": {"walltime": 8},
+  "sage.rings.finite_rings.finite_field_base": {"walltime": 8},
+  "sage.rings.function_field.function_field": {"walltime": 128},
+  "sage.rings.function_field.function_field_valuation": {"walltime": 64},
+  "sage.rings.function_field.ideal": {"walltime": 8},
+  "sage.rings.function_field.place": {"walltime": 8},
+  "sage.rings.integer": {"walltime": 128},
+  "sage.rings.invariants.invariant_theory": {"walltime": 8},
+  "sage.rings.number_field.bdd_height": {"walltime": 8},
+  "sage.rings.number_field.number_field": {"walltime": 64},
+  "sage.rings.number_field.number_field_element": {"walltime": 16},
+  "sage.rings.number_field.splitting_field": {"walltime": 8},
+  "sage.rings.number_field.totallyreal": {"walltime": 16},
+  "sage.rings.number_field.totallyreal_rel": {"walltime": 8},
+  "sage.rings.padics.padic_base_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_extension_leaves": {"walltime": 64},
+  "sage.rings.padics.padic_generic_element": {"walltime": 16},
+  "sage.rings.padics.padic_lattice_element": {"walltime": 32},
+  "sage.rings.padics.relative_extension_leaves": {"walltime": 32},
+  "sage.rings.polynomial.multi_polynomial_ideal": {"walltime": 8},
+  "sage.rings.polynomial.multi_polynomial_sequence": {"walltime": 8},
+  "sage.rings.polynomial.ore_function_element": {"walltime": 8},
+  "sage.rings.polynomial.polynomial_element": {"walltime": 16},
+  "sage.rings.polynomial.polynomial_rational_flint": {"walltime": 8},
+  "sage.rings.qqbar": {"walltime": 16},
+  "sage.rings.tests": {"walltime": 16},
+  "sage.rings.valuation.augmented_valuation": {"walltime": 32},
+  "sage.rings.valuation.mapped_valuation": {"walltime": 64},
+  "sage.rings.valuation.valuation": {"walltime": 8},
+  "sage.sandpiles.sandpile": {"walltime": 16},
+  "sage.schemes.curves.affine_curve": {"walltime": 16},
+  "sage.schemes.curves.closed_point": {"walltime": 8},
+  "sage.schemes.curves.projective_curve": {"walltime": 32},
+  "sage.schemes.cyclic_covers.cycliccover_finite_field": {"walltime": 64},
+  "sage.schemes.elliptic_curves.BSD": {"walltime": 8},
+  "sage.schemes.elliptic_curves.Qcurves": {"walltime": 8},
+  "sage.schemes.elliptic_curves.constructor": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_curve_isogeny": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_egros": {"walltime": 32},
+  "sage.schemes.elliptic_curves.ell_finite_field": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_generic": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_modular_symbols": {"walltime": 16},
+  "sage.schemes.elliptic_curves.ell_number_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.ell_point": {"walltime": 8},
+  "sage.schemes.elliptic_curves.ell_rational_field": {"walltime": 128},
+  "sage.schemes.elliptic_curves.gal_reps_number_field": {"walltime": 32},
+  "sage.schemes.elliptic_curves.gp_simon": {"walltime": 16},
+  "sage.schemes.elliptic_curves.heegner": {"walltime": 32},
+  "sage.schemes.elliptic_curves.height": {"walltime": 64},
+  "sage.schemes.elliptic_curves.isogeny_class": {"walltime": 32},
+  "sage.schemes.elliptic_curves.isogeny_small_degree": {"walltime": 64},
+  "sage.schemes.elliptic_curves.kraus": {"walltime": 16},
+  "sage.schemes.elliptic_curves.mod_sym_num": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padic_lseries": {"walltime": 8},
+  "sage.schemes.elliptic_curves.padics": {"walltime": 16},
+  "sage.schemes.elliptic_curves.saturation": {"walltime": 16},
+  "sage.schemes.elliptic_curves.sha_tate": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field": {"walltime": 64},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_generic": {"walltime": 8},
+  "sage.schemes.hyperelliptic_curves.hyperelliptic_padic_field": {"walltime": 32},
+  "sage.schemes.hyperelliptic_curves.monsky_washnitzer": {"walltime": 8},
+  "sage.schemes.projective.projective_rational_point": {"walltime": 8},
+  "sage.schemes.riemann_surfaces.riemann_surface": {"walltime": 64},
+  "sage.schemes.toric.chow_group": {"walltime": 8},
+  "sage.schemes.toric.sheaf.klyachko": {"walltime": 8},
+  "sage.stats.distributions.discrete_gaussian_integer": {"walltime": 8},
+  "sage.stats.time_series": {"walltime": 8},
+  "sage.structure.coerce_dict": {"walltime": 32},
+  "sage.structure.element": {"walltime": 16},
+  "sage.structure.sage_object": {"walltime": 8},
+  "sage.symbolic.expression": {"walltime": 32},
+  "sage.symbolic.integration.integral": {"walltime": 32},
+  "sage.symbolic.random_tests": {"walltime": 32},
+  "sage.symbolic.relation": {"walltime": 8},
+  "sage.tests.book_schilling_zabrocki_kschur_primer": {"walltime": 32},
+  "sage.tests.book_stein_ent": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.combinat_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.float_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphique_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.graphtheory_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.integration_doctest": {"walltime": 32},
+  "sage.tests.books.computational-mathematics-with-sagemath.mpoly_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.nonlinear_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.recequadiff_doctest": {"walltime": 8},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.graphique_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.numbertheory_doctest": {"walltime": 16},
+  "sage.tests.books.computational-mathematics-with-sagemath.sol.polynomes_doctest": {"walltime": 16},
+  "sage.tests.cmdline": {"walltime": 64},
+  "sage.tests.gosper-sum": {"walltime": 16},
+  "sage.tests.parigp": {"walltime": 8},
+  "sage.topology.simplicial_complex": {"walltime": 8},
+  "sage.topology.simplicial_complex_examples": {"walltime": 16}
+}
diff --git a/srcpkgs/sagemath/patches/01-dont_link_ratpoints.patch b/srcpkgs/sagemath/patches/01-dont_link_ratpoints.patch
new file mode 100644
index 000000000000..e5c3f5776aa2
--- /dev/null
+++ b/srcpkgs/sagemath/patches/01-dont_link_ratpoints.patch
@@ -0,0 +1,10 @@
+ - do not link ratpoints where it's not used
+
+--- a/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
++++ b/src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
+@@ -1,5 +1,3 @@
+-# distutils: libraries = ratpoints
+-
+ r"""
+ Descent on elliptic curves over `\QQ` with a 2-isogeny
+ """
diff --git a/srcpkgs/sagemath/patches/02-fix_get_shared_lib_path--see_29644.patch b/srcpkgs/sagemath/patches/02-fix_get_shared_lib_path--see_29644.patch
new file mode 100644
index 000000000000..d3672b094c1c
--- /dev/null
+++ b/srcpkgs/sagemath/patches/02-fix_get_shared_lib_path--see_29644.patch
@@ -0,0 +1,13 @@
+ - fix _get_shared_lib_path() so we don't need to configure GAP_SO
+
+--- a/src/sage/env.py
++++ b/src/sage/env.py
+@@ -293,7 +293,7 @@ def _get_shared_lib_path(*libnames: str) -> Optional[str]:
+             if sys.platform == 'darwin':
+                 ext = 'dylib'
+             else:
+-                ext = 'so'
++                ext = 'so*'
+ 
+             if SAGE_LOCAL:
+                 search_directories.append(Path(SAGE_LOCAL) / 'lib')
diff --git a/srcpkgs/sagemath/patches/03-doctest_have_program.patch b/srcpkgs/sagemath/patches/03-doctest_have_program.patch
new file mode 100644
index 000000000000..27ba3776470c
--- /dev/null
+++ b/srcpkgs/sagemath/patches/03-doctest_have_program.patch
@@ -0,0 +1,20 @@
+ - we don't know `SAGE_VENV/bin` contains `sage`, but `sys.argv[0]` should
+   be the full path to `sage-ipython` and the same directory should have `sage`
+
+--- a/src/sage/misc/sage_ostools.pyx
++++ b/src/sage/misc/sage_ostools.pyx
+@@ -32,12 +32,11 @@ def have_program(program, path=None):
+         True
+         sage: have_program('there_is_not_a_program_with_this_name')
+         False
+-        sage: from sage.env import SAGE_VENV
+-        sage: have_program('sage', os.path.join(SAGE_VENV, 'bin'))
++        sage: have_program('sage', os.path.dirname(sys.argv[0]))
+         True
+         sage: have_program('sage', '/there_is_not_a_path_with_this_name')
+         False
+-        sage: have_program('there_is_not_a_program_with_this_name', os.path.join(SAGE_VENV, 'bin'))
++        sage: have_program('there_is_not_a_program_with_this_name', "/bin")
+         False
+     """
+     if path is None:
diff --git a/srcpkgs/sagemath/patches/04-doctest_sage_getfile.patch b/srcpkgs/sagemath/patches/04-doctest_sage_getfile.patch
new file mode 100644
index 000000000000..95bce107f854
--- /dev/null
+++ b/srcpkgs/sagemath/patches/04-doctest_sage_getfile.patch
@@ -0,0 +1,22 @@
+ - add one doctest for coverage
+
+--- a/src/sage/misc/sageinspect.py
++++ b/src/sage/misc/sageinspect.py
+@@ -1341,10 +1342,12 @@ def sage_getfile(obj):
+     EXAMPLES::
+ 
+         sage: from sage.misc.sageinspect import sage_getfile
+-        sage: sage_getfile(sage.rings.rational)[-23:]
+-        'sage/rings/rational.pyx'
+-        sage: sage_getfile(Sq)[-42:]
+-        'sage/algebras/steenrod/steenrod_algebra.py'
++        sage: sage_getfile(sage.rings.rational)
++        '...sage/rings/rational.pyx'
++        sage: sage_getfile(Sq)
++        '...sage/algebras/steenrod/steenrod_algebra.py'
++        sage: sage_getfile(x)
++        '...sage/symbolic/expression.pyx'
+ 
+     The following tests against some bugs fixed in :trac:`9976`::
+ 
+
diff --git a/srcpkgs/sagemath/patches/05-fix_sage_getfile.patch b/srcpkgs/sagemath/patches/05-fix_sage_getfile.patch
new file mode 100644
index 000000000000..56c58078f319
--- /dev/null
+++ b/srcpkgs/sagemath/patches/05-fix_sage_getfile.patch
@@ -0,0 +1,16 @@
+ - fix sage_getfile() by checking all possible EXTENSION_SUFFIXES
+
+--- a/src/sage/misc/sageinspect.py
++++ b/src/sage/misc/sageinspect.py
+@@ -1400,8 +1403,9 @@ def sage_getfile(obj):
+         sourcefile = inspect.getabsfile(obj)
+     except TypeError: # this happens for Python builtins
+         return ''
+-    if sourcefile.endswith(loadable_module_extension()):
+-        return sourcefile[:-len(loadable_module_extension())]+os.path.extsep+'pyx'
++    for suffix in import_machinery.EXTENSION_SUFFIXES:
++        if sourcefile.endswith(suffix):
++            return sourcefile[:-len(suffix)]+os.path.extsep+'pyx'
+     return sourcefile
+ 
+ 
diff --git a/srcpkgs/sagemath/patches/07-ignore_warning.patch b/srcpkgs/sagemath/patches/07-ignore_warning.patch
new file mode 100644
index 000000000000..69668678a40b
--- /dev/null
+++ b/srcpkgs/sagemath/patches/07-ignore_warning.patch
@@ -0,0 +1,15 @@
+ - this ignores a warning caused by old notebook
+
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -100,6 +100,9 @@ warnings.filterwarnings('ignore', category=DeprecationWarning,
+                         message='The distutils(.sysconfig module| package) is deprecated',
+                         module='Cython|distutils|numpy|sage.env|sage.features')
+ 
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++                        message=r"invalid escape sequence '\\s'")
++
+ ################ end setup warnings ###############################
+ 
+ 
+
diff --git a/srcpkgs/sagemath/patches/08-dont_run_pytest--see_31924.patch b/srcpkgs/sagemath/patches/08-dont_run_pytest--see_31924.patch
new file mode 100644
index 000000000000..06bd2ccae6fb
--- /dev/null
+++ b/srcpkgs/sagemath/patches/08-dont_run_pytest--see_31924.patch
@@ -0,0 +1,27 @@
+ - using pytest is broken, see #31924
+
+--- a/src/bin/sage-runtests
++++ b/src/bin/sage-runtests
+@@ -154,21 +154,4 @@ if __name__ == "__main__":
+     DC = DocTestController(args, args.filenames)
+     err = DC.run()
+ 
+-    try:
+-        exit_code_pytest = 0
+-        import pytest
+-        pytest_options = ["--import-mode", "importlib"]
+-        if args.verbose:
+-            pytest_options.append("-v")
+-        exit_code_pytest = pytest.main(pytest_options + args.filenames)
+-        if exit_code_pytest == 5:
+-            # Exit code 5 means there were no test files, pass in this case
+-            exit_code_pytest = 0
+-
+-    except ModuleNotFoundError:
+-        print("Pytest is not installed, skip checking tests that rely on it.")
+-
+-    if err == 0:
+-        sys.exit(exit_code_pytest)
+-    else:
+-        sys.exit(err)
++    sys.exit(err)
diff --git a/srcpkgs/sagemath/patches/09-doctest_numerical_fix.patch b/srcpkgs/sagemath/patches/09-doctest_numerical_fix.patch
new file mode 100644
index 000000000000..8780c8a97efa
--- /dev/null
+++ b/srcpkgs/sagemath/patches/09-doctest_numerical_fix.patch
@@ -0,0 +1,14 @@
+ - This fixes a doctest failure due to a small numerical issue when running
+   maxima-sbcl on 32 bit
+
+--- a/src/sage/interfaces/maxima_abstract.py
++++ b/src/sage/interfaces/maxima_abstract.py
+@@ -1525,7 +1525,7 @@ class MaximaAbstractElement(ExtraTabCompletion, InterfaceElement):
+         EXAMPLES::
+ 
+             sage: maxima('exp(-sqrt(x))').nintegral('x',0,1)
+-            (0.5284822353142306, 4.1633141378838...e-11, 231, 0)
++            (0.5284822353142306, 4.163...e-11, 231, 0)
+ 
+         Note that GP also does numerical integration, and can do so to very
+         high precision very quickly::
diff --git a/srcpkgs/sagemath/patches/10-fix_very_slow_doctest-polynomial_zmod_flint.patch b/srcpkgs/sagemath/patches/10-fix_very_slow_doctest-polynomial_zmod_flint.patch
new file mode 100644
index 000000000000..bae8387cf94a
--- /dev/null
+++ b/srcpkgs/sagemath/patches/10-fix_very_slow_doctest-polynomial_zmod_flint.patch
@@ -0,0 +1,14 @@
+--- a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx
++++ b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx
+@@ -237,8 +237,9 @@ cdef class Polynomial_zmod_flint(Polynomial_template):
+ 
+             sage: a = ZZ['x'](range(100000))
+             sage: R = Integers(3)['x']
+-            sage: R(a)  # long time (7s on sage.math, 2013)
+-            2*x^99998 + ... + x
++            sage: p = R(a)
++            sage: p.truncate(10)  # testing the whole poly is VERY SLOW
++            2*x^8 + x^7 + 2*x^5 + x^4 + 2*x^2 + x
+         """
+         sig_on()
+         fmpz_poly_get_nmod_poly(&self.x, x)
diff --git a/srcpkgs/sagemath/patches/11-fix_very_slow_doctest-isogeny_small_degree.patch b/srcpkgs/sagemath/patches/11-fix_very_slow_doctest-isogeny_small_degree.patch
new file mode 100644
index 000000000000..f3da5bbb555e
--- /dev/null
+++ b/srcpkgs/sagemath/patches/11-fix_very_slow_doctest-isogeny_small_degree.patch
@@ -0,0 +1,106 @@
+diff --git a/src/sage/schemes/elliptic_curves/isogeny_small_degree.py b/src/sage/schemes/elliptic_curves/isogeny_small_degree.py
+index 43727346269..9d3ccd475cd 100644
+--- a/src/sage/schemes/elliptic_curves/isogeny_small_degree.py
++++ b/src/sage/schemes/elliptic_curves/isogeny_small_degree.py
+@@ -186,7 +186,7 @@ def Psi(l, use_stored=True):
+         sage: assert Psi(3, use_stored=True) == Psi(3, use_stored=False)
+         sage: assert Psi(5, use_stored=True) == Psi(5, use_stored=False)
+         sage: assert Psi(7, use_stored=True) == Psi(7, use_stored=False)
+-        sage: assert Psi(13, use_stored=True) == Psi(13, use_stored=False) # not tested (very long time)
++        sage: assert Psi(13, use_stored=True) == Psi(13, use_stored=False)  # long time (2s)
+     """
+     if l not in [2, 3, 5, 7, 13]:
+         raise ValueError("Genus zero primes are 2, 3, 5, 7 or 13.")
+@@ -1207,7 +1207,7 @@ def isogenies_13_0(E, minimal_models=True):
+         sage: K.<a> = NumberField(f)
+         sage: E = EllipticCurve(j=K(0)); E.ainvs()
+         (0, 0, 0, 0, 1)
+-        sage: [phi.codomain().ainvs() for phi in isogenies_13_0(E)]
++        sage: [phi.codomain().ainvs() for phi in isogenies_13_0(E)]  # long time (4s)
+         [(0,
+           0,
+           20360599/165164973653422080*a^11 - 3643073/41291243413355520*a^10 - 101/8789110986240*a^9 + 5557619461/573489491852160*a^8 - 82824971/11947697746920*a^7 - 19487/21127670640*a^6 - 475752603733/29409717530880*a^5 + 87205112531/7352429382720*a^4 + 8349/521670880*a^3 + 5858744881/12764634345*a^2 - 1858703809/2836585410*a + 58759402/48906645,
+@@ -1325,7 +1325,7 @@ def isogenies_13_1728(E, minimal_models=True):
+         sage: f = x^12 + 1092*x^10 - 432432*x^8 + 6641024*x^6 - 282896640*x^4 - 149879808*x^2 - 349360128
+         sage: K.<a> = NumberField(f)
+         sage: E = EllipticCurve(K, [1,0])
+-        sage: [phi.codomain().ainvs() for phi in isogenies_13_1728(E)]
++        sage: [phi.codomain().ainvs() for phi in isogenies_13_1728(E)]  # long time (3s)
+         [(0,
+         0,
+         0,
+@@ -1550,8 +1550,11 @@ def Psi2(l):
+         sage: from sage.schemes.elliptic_curves.isogeny_small_degree import Psi2
+         sage: Psi2(11)
+         x^5 - 55*x^4*u + 994*x^3*u^2 - 8774*x^2*u^3 + 41453*x*u^4 - 928945/11*u^5 + 33*x^4 + 276*x^3*u - 7794*x^2*u^2 + 4452*x*u^3 + 1319331/11*u^4 + 216*x^3*v - 4536*x^2*u*v + 31752*x*u^2*v - 842616/11*u^3*v + 162*x^3 + 38718*x^2*u - 610578*x*u^2 + 33434694/11*u^3 - 4536*x^2*v + 73872*x*u*v - 2745576/11*u^2*v - 16470*x^2 + 580068*x*u - 67821354/11*u^2 - 185976*x*v + 14143896/11*u*v + 7533*x - 20437029/11*u - 12389112/11*v + 19964151/11
+-        sage: Psi2(71)  # long time (1 second)
+-        -2209380711722505179506258739515288584116147237393815266468076436521/71*u^210 + ... - 14790739586438315394567393301990769678157425619440464678252277649/71
++        sage: f = Psi2(71)
++        sage: f.coefficient([0, 210, 0])
++        -2209380711722505179506258739515288584116147237393815266468076436521/71
++        sage: f.coefficient([0, 0, 0])
++        -14790739586438315394567393301990769678157425619440464678252277649/71
+ 
+     TESTS::
+ 
+@@ -1665,17 +1668,17 @@ def isogenies_prime_degree_genus_plus_0(E, l=None, minimal_models=True):
+         sage: K = QuadraticField(5,'a')
+         sage: a = K.gen()
+         sage: E = EllipticCurve_from_j(184068066743177379840*a - 411588709724712960000)
+-        sage: isogenies_prime_degree_genus_plus_0(E, 47) # long time (4.3s)
++        sage: isogenies_prime_degree_genus_plus_0(E, 47)  # long time (2s)
+         [Isogeny of degree 47 from Elliptic Curve defined by y^2 = x^3 + (454562028554080355857852049849975895490560*a-1016431595837124114668689286176511361024000)*x + (-249456798429896080881440540950393713303830363999480904280965120*a+557802358738710443451273320227578156598454035482869042774016000) over Number Field in a with defining polynomial x^2 - 5 with a = 2.236067977499790? to Elliptic Curve defined by y^2 = x^3 + (39533118442361013730577638493616965245992960*a-88398740199669828340617478832005245173760000)*x + (214030321479466610282320528611562368963830105830555363061803253760*a-478586348074220699687616322532666163722004497458452316582576128000) over Number Field in a with defining polynomial x^2 - 5 with a = 2.236067977499790?]
+ 
+         sage: K = QuadraticField(-66827,'a')
+         sage: a = K.gen()
+         sage: E = EllipticCurve_from_j(-98669236224000*a + 4401720074240000)
+-        sage: isogenies_prime_degree_genus_plus_0(E, 59)   # long time (25s, 2012)
++        sage: isogenies_prime_degree_genus_plus_0(E, 59)   # long time (5s)
+         [Isogeny of degree 59 from Elliptic Curve defined by y^2 = x^3 + (2605886146782144762297974784000*a+1893681048912773634944634716160000)*x + (-116918454256410782232296183198067568744071168000*a+17012043538294664027185882358514011304812871680000) over Number Field in a with defining polynomial x^2 + 66827 with a = 258.5091874576221?*I to Elliptic Curve defined by y^2 = x^3 + (-19387084027159786821400775098368000*a-4882059104868154225052787156713472000)*x + (-25659862010101415428713331477227179429538847260672000*a-2596038148441293485938798119003462972840818381946880000) over Number Field in a with defining polynomial x^2 + 66827 with a = 258.5091874576221?*I]
+ 
+         sage: E = EllipticCurve_from_j(GF(13)(5))
+-        sage: isogenies_prime_degree_genus_plus_0(E, 71) # long time
++        sage: isogenies_prime_degree_genus_plus_0(E, 71)
+         [Isogeny of degree 71 from Elliptic Curve defined by y^2 = x^3 + x + 4 over Finite Field of size 13 to Elliptic Curve defined by y^2 = x^3 + 10*x + 7 over Finite Field of size 13, Isogeny of degree 71 from Elliptic Curve defined by y^2 = x^3 + x + 4 over Finite Field of size 13 to Elliptic Curve defined by y^2 = x^3 + 10*x + 7 over Finite Field of size 13]
+ 
+         sage: E = EllipticCurve(GF(13),[0,1,1,1,0])
+@@ -2117,11 +2120,11 @@ def isogenies_prime_degree_general(E, l, minimal_models=True):
+         sage: isogenies_prime_degree_general(E, 19)
+         [Isogeny of degree 19 from Elliptic Curve defined by y^2 + y = x^3 - 1862*x - 30956 over Rational Field to Elliptic Curve defined by y^2 + y = x^3 - 672182*x + 212325489 over Rational Field]
+         sage: E = EllipticCurve([0, -1, 0, -6288, 211072])
+-        sage: isogenies_prime_degree_general(E, 37)  # long time (10s)
++        sage: isogenies_prime_degree_general(E, 37)  # long time (2s)
+         [Isogeny of degree 37 from Elliptic Curve defined by y^2 = x^3 - x^2 - 6288*x + 211072 over Rational Field to Elliptic Curve defined by y^2 = x^3 - x^2 - 163137088*x - 801950801728 over Rational Field]
+ 
+         sage: E = EllipticCurve([-3440, 77658])
+-        sage: isogenies_prime_degree_general(E, 43)  # long time (16s)
++        sage: isogenies_prime_degree_general(E, 43)  # long time (2s)
+         [Isogeny of degree 43 from Elliptic Curve defined by y^2 = x^3 - 3440*x + 77658 over Rational Field to Elliptic Curve defined by y^2 = x^3 - 6360560*x - 6174354606 over Rational Field]
+ 
+     Isogenies of degree equal to the characteristic are computed (but
+@@ -2175,7 +2178,7 @@ def isogenies_prime_degree_general(E, l, minimal_models=True):
+ 
+         sage: K.<i> = QuadraticField(-1)
+         sage: E = EllipticCurve(K,[0,0,0,1,0])
+-        sage: [phi.codomain().ainvs() for phi in E.isogenies_prime_degree(37)] # long time
++        sage: [phi.codomain().ainvs() for phi in E.isogenies_prime_degree(37)]  # long time (6s)
+         [(0, 0, 0, -840*i + 1081, 0), (0, 0, 0, 840*i + 1081, 0)]
+     """
+     if not l.is_prime():
+@@ -2329,14 +2332,14 @@ def isogenies_prime_degree(E, l, minimal_models=True):
+         sage: E = EllipticCurve(GF(101), [-3440, 77658])
+         sage: E.isogenies_prime_degree(71) # fast
+         []
+-        sage: E.isogenies_prime_degree(73) # slower (2s)
++        sage: E.isogenies_prime_degree(73)  # long time (2s)
+         []
+ 
+     Test that :trac:`32269` is fixed::
+ 
+         sage: K = QuadraticField(-11)
+         sage: E = EllipticCurve(K, [0,1,0,-117,-541])
+-        sage: E.isogenies_prime_degree(37)
++        sage: E.isogenies_prime_degree(37)  # long time (9s)
+         [Isogeny of degree 37 from Elliptic Curve defined by y^2 = x^3 + x^2 + (-117)*x + (-541) over Number Field in a with defining polynomial x^2 + 11 with a = 3.316624790355400?*I to Elliptic Curve defined by y^2 = x^3 + x^2 + (30800*a+123963)*x + (3931312*a-21805005) over Number Field in a with defining polynomial x^2 + 11 with a = 3.316624790355400?*I,
+          Isogeny of degree 37 from Elliptic Curve defined by y^2 = x^3 + x^2 + (-117)*x + (-541) over Number Field in a with defining polynomial x^2 + 11 with a = 3.316624790355400?*I to Elliptic Curve defined by y^2 = x^3 + x^2 + (-30800*a+123963)*x + (-3931312*a-21805005) over Number Field in a with defining polynomial x^2 + 11 with a = 3.316624790355400?*I]
+ 
diff --git a/srcpkgs/sagemath/patches/12-fix_very_slow_doctest-function_field.patch b/srcpkgs/sagemath/patches/12-fix_very_slow_doctest-function_field.patch
new file mode 100644
index 000000000000..3b7b1ea843df
--- /dev/null
+++ b/srcpkgs/sagemath/patches/12-fix_very_slow_doctest-function_field.patch
@@ -0,0 +1,97 @@
+--- a/src/sage/rings/function_field/function_field.py
++++ b/src/sage/rings/function_field/function_field.py
+@@ -111,22 +111,21 @@ Function fields over the algebraic field are supported::
+     sage: m = L.completion(pl, prec=5)
+     sage: m(x)
+     I + s + O(s^5)
+-    sage: m(y)
++    sage: m(y)                             # long time (4s)
+     -2*s + (-4 - I)*s^2 + (-15 - 4*I)*s^3 + (-75 - 23*I)*s^4 + (-413 - 154*I)*s^5 + O(s^6)
+-    sage: m(y)^2 + m(y) + m(x) + 1/m(x)
++    sage: m(y)^2 + m(y) + m(x) + 1/m(x)    # long time (8s)
+     O(s^5)
+ 
+ TESTS::
+ 
+     sage: TestSuite(J).run()
+-    sage: TestSuite(K).run(max_runs=1024) # long time (5s)
+-    sage: TestSuite(L).run(max_runs=64)   # long time (10s)
+-    sage: TestSuite(M).run(max_runs=32)   # long time (30s)
+-    sage: TestSuite(N).run(max_runs=64, skip = '_test_derivation')  # long time (8s)
+-    sage: TestSuite(O).run(max_runs=128, skip = '_test_derivation') # long time (8s)
+-
++    sage: TestSuite(K).run(max_runs=256)   # long time (10s)
++    sage: TestSuite(L).run(max_runs=8)     # long time (25s)
++    sage: TestSuite(M).run(max_runs=8)     # long time (35s)
++    sage: TestSuite(N).run(max_runs=8, skip = '_test_derivation')    # long time (15s)
++    sage: TestSuite(O).run()
+     sage: TestSuite(R).run()
+-    sage: TestSuite(S).run() # long time (3s)
++    sage: TestSuite(S).run()               # long time (4s)
+ 
+ Global function fields
+ ----------------------
+@@ -287,7 +286,7 @@ class FunctionField(Field):
+         TESTS::
+ 
+             sage: K.<x> = FunctionField(QQ)
+-            sage: TestSuite(K).run()
++            sage: TestSuite(K).run()               # long time (3s)
+         """
+         Field.__init__(self, base_field, names=names, category=category)
+ 
+@@ -729,7 +728,7 @@ class FunctionField(Field):
+         EXAMPLES::
+ 
+             sage: K.<x> = FunctionField(QQ)
+-            sage: TestSuite(K).run() # indirect doctest
++            sage: TestSuite(K).run()    # indirect doctest, long time (3s)
+         """
+         tester = self._tester(**options)
+         S = tester.some_elements()
+@@ -1209,7 +1208,7 @@ class FunctionField_polymod(FunctionField):
+             sage: K.<x> = FunctionField(QQ); R.<y> = K[]
+             sage: L = K.extension(y^5 - x^3 - 3*x + x*y); L
+             Function field in y defined by y^5 + x*y - x^3 - 3*x
+-            sage: TestSuite(L).run()  # long time
++            sage: TestSuite(L).run(max_runs=512)   # long time (15s)
+ 
+         We can set the variable name, which doesn't have to be y::
+ 
+@@ -2888,7 +2887,8 @@ class FunctionField_simple(FunctionField_polymod):
+             sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
+             sage: O = K.maximal_order()
+             sage: pls = [O.ideal(x-QQbar(sqrt(c))).place() for c in [-2, -1, 0, 1, 2]]
+-            sage: all(q.place_below() == p for p in pls for q in F.places_above(p))
++            sage: all(q.place_below() == p         # long time (4s)
++            ....:     for p in pls for q in F.places_above(p))
+             True
+         """
+         R = self.base_field()
+@@ -3091,7 +3091,7 @@ class FunctionField_global(FunctionField_simple):
+ 
+         sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[]
+         sage: L.<y> = K.extension((1 - x)*Y^7 - x^3)
+-        sage: L.gaps()
++        sage: L.gaps()                         # long time (6s)
+         [1, 2, 3]
+ 
+     or may define a trivial extension::
+@@ -3111,7 +3111,7 @@ class FunctionField_global(FunctionField_simple):
+ 
+             sage: K.<x> = FunctionField(GF(5)); _.<Y> = K[]
+             sage: L.<y> = K.extension(Y^3 - (x^3 - 1)/(x^3 - 2))
+-            sage: TestSuite(L).run()
++            sage: TestSuite(L).run()               # long time (7s)
+         """
+         FunctionField_polymod.__init__(self, polynomial, names)
+ 
+@@ -3807,7 +3807,7 @@ class RationalFunctionField(FunctionField):
+ 
+             sage: K.<t> = FunctionField(CC); K
+             Rational function field in t over Complex Field with 53 bits of precision
+-            sage: TestSuite(K).run()
++            sage: TestSuite(K).run()               # long time (5s)
+ 
+             sage: FunctionField(QQ[I], 'alpha')
+             Rational function field in alpha over Number Field in I with defining polynomial x^2 + 1 with I = 1*I
diff --git a/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
new file mode 100644
index 000000000000..b861af7ec982
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33189-fix_doctests_for_arb_2.22-53532ddd4e2dc92469c1590ebf0c40f8f69bf579.patch
@@ -0,0 +1,126 @@
+From 24cc94b1988a90f3bd22a2368ec30c086283af13 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 11:55:04 +0100
+Subject: Add abs tol to some arb tests
+
+---
+ src/sage/functions/error.py    |  2 +-
+ src/sage/rings/complex_arb.pyx |  6 +++---
+ src/sage/rings/real_arb.pyx    | 10 +++++-----
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/sage/functions/error.py b/src/sage/functions/error.py
+index f48d04f..06f0b24 100644
+--- a/src/sage/functions/error.py
++++ b/src/sage/functions/error.py
+@@ -267,7 +267,7 @@ class Function_erf(BuiltinFunction):
+ 
+         Check that real ball evaluation is fixed :trac:`28061`::
+ 
+-            sage: RealBallField(128)(erf(5))
++            sage: RealBallField(128)(erf(5)) # abs tol 1e-38
+             [0.99999999999846254020557196514981165651 +/- 7.33e-39]
+         """
+         R = parent or s_parent(x)
+diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx
+index f986970..93ff565 100644
+--- a/src/sage/rings/complex_arb.pyx
++++ b/src/sage/rings/complex_arb.pyx
+@@ -3974,8 +3974,8 @@ cdef class ComplexBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: CBF(20).erfc()
+-            [5.39586561160790e-176 +/- ...e-191]
++            sage: CBF(20).erfc() # abs tol 1e-190
++            [5.39586561160790e-176 +/- 6.73e-191]
+             sage: CBF(100, 100).erfc()
+             [0.00065234366376858 +/- ...e-18] + [-0.00393572636292141 +/- ...e-18]*I
+         """
+@@ -4280,7 +4280,7 @@ cdef class ComplexBall(RingElement):
+ 
+         TESTS:
+ 
+-            sage: CBF(Shi(I))
++            sage: CBF(Shi(I)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]*I
+         """
+         cdef ComplexBall result = self._new()
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 4a81784..292bfea 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3506,7 +3506,7 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1/2).erf()
++            sage: RBF(1/2).erf() # abs tol 1e-16
+             [0.520499877813047 +/- 6.10e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3556,12 +3556,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Si()
++            sage: RBF(1).Si() # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Si(1))
++            sage: RBF(Si(1)) # abs tol 1e-15
+             [0.946083070367183 +/- 9.22e-16]
+         """
+         cdef RealBall res = self._new()
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-16
++            sage: RBF(1).Ci()  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-16
++            sage: RBF(Ci(1))  # abs tol 1e-15
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
+
+From 53532ddd4e2dc92469c1590ebf0c40f8f69bf579 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Sun, 16 Jan 2022 14:16:53 +0100
+Subject: Decrease abs tol
+
+---
+ src/sage/rings/real_arb.pyx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
+index 292bfea..eb30f7f 100644
+--- a/src/sage/rings/real_arb.pyx
++++ b/src/sage/rings/real_arb.pyx
+@@ -3578,12 +3578,12 @@ cdef class RealBall(RingElement):
+ 
+         EXAMPLES::
+ 
+-            sage: RBF(1).Ci()  # abs tol 1e-15
++            sage: RBF(1).Ci()  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+ 
+         TESTS::
+ 
+-            sage: RBF(Ci(1))  # abs tol 1e-15
++            sage: RBF(Ci(1))  # abs tol 5e-16
+             [0.337403922900968 +/- 3.25e-16]
+         """
+         cdef RealBall res = self._new()
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/trac-33226-fix_doctests_giac-1.7.0-33ea2adf01e9e2ce9f1e33779f0b1ac0d9d1989c.patch b/srcpkgs/sagemath/patches/trac-33226-fix_doctests_giac-1.7.0-33ea2adf01e9e2ce9f1e33779f0b1ac0d9d1989c.patch
new file mode 100644
index 000000000000..d4e8f8be60e3
--- /dev/null
+++ b/srcpkgs/sagemath/patches/trac-33226-fix_doctests_giac-1.7.0-33ea2adf01e9e2ce9f1e33779f0b1ac0d9d1989c.patch
@@ -0,0 +1,40 @@
+From 33ea2adf01e9e2ce9f1e33779f0b1ac0d9d1989c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Mon, 24 Jan 2022 09:03:29 -0500
+Subject: Trac #33226: update doctests for giac-1.7.0.45.
+
+We have two failing doctests with giac-1.7.0.45: one is a trivial
+tolerance issue, but the other is a symbolic integration result for
+which giac is no longer willing to return a symbolic answer. We add
+"abs tol" to the numeric test, and drop the symbolic one entirely.
+---
+ src/sage/functions/min_max.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/sage/functions/min_max.py b/src/sage/functions/min_max.py
+index fc18373..9b7d6d9 100644
+--- a/src/sage/functions/min_max.py
++++ b/src/sage/functions/min_max.py
+@@ -228,15 +228,15 @@ class MaxSymbolic(MinMax_base):
+             ...
+             TypeError: cannot evaluate symbolic expression numerically
+ 
+-        ::
++        We can usually integrate these expressions, but can't
++        guarantee a symbolic answer in closed form::
+ 
+             sage: f = max_symbolic(sin(x), cos(x))
+             sage: r = integral(f, x, 0, 1)
+             ...
+-            sage: r
+-            sqrt(2) - cos(1)
+-            sage: r.n()
++            sage: r.n()  # abs tol 1e-8
+             0.873911256504955
++
+         """
+         return max_symbolic(args)
+ 
+-- 
+cgit v1.0-1-gd88e
+
diff --git a/srcpkgs/sagemath/patches/zzz-loadable_module_extension.patch b/srcpkgs/sagemath/patches/zzz-loadable_module_extension.patch
new file mode 100644
index 000000000000..f3eb0aad2cca
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-loadable_module_extension.patch
@@ -0,0 +1,14 @@
+ - this is not a proper fix... should fix sage_getfile() instead
+
+--- a/src/sage/misc/sageinspect.py
++++ b/src/sage/misc/sageinspect.py
+@@ -187,7 +187,8 @@ def loadable_module_extension():
+         True
+     """
+     # Return the full platform-specific extension module suffix
+-    return import_machinery.EXTENSION_SUFFIXES[0]
++    # PATCHED for void linux, we use the shortest extension (.so)
++    return import_machinery.EXTENSION_SUFFIXES[-1]
+ 
+ 
+ def isclassinstance(obj):
diff --git a/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
new file mode 100644
index 000000000000..5cb62f56e902
--- /dev/null
+++ b/srcpkgs/sagemath/patches/zzz-skip_doctest_no_threejs.patch
@@ -0,0 +1,13 @@
+ - we don't have threejs in void
+
+--- a/src/sage/repl/ipython_kernel/install.py
++++ b/src/sage/repl/ipython_kernel/install.py
+@@ -124,7 +124,7 @@ class SageKernelSpec(object):
+             sage: spec = SageKernelSpec(prefix=tmp_dir())
+             sage: spec.use_local_threejs()
+             sage: threejs = os.path.join(spec.nbextensions_dir, 'threejs-sage')
+-            sage: os.path.isdir(threejs)
++            sage: os.path.isdir(threejs)    # optional - threejs
+             True
+         """
+         src = THREEJS_DIR
diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template
new file mode 100644
index 000000000000..710a9e80c052
--- /dev/null
+++ b/srcpkgs/sagemath/template
@@ -0,0 +1,129 @@
+# Template file for 'sagemath'
+pkgname=sagemath
+version=9.5
+revision=1
+wrksrc=sage-$version
+build_wrksrc=pkgs/sagemath-standard
+build_style=python3-module
+_bindir=/usr/lib/sagemath/bin
+make_install_args="--install-scripts=$_bindir"
+hostmakedepends="m4 pkg-config python3-Cython python3-Jinja2 python3-pkgconfig
+ python3-setuptools"
+makedepends="arb-devel boost-devel brial-devel cliquer-devel ecl eclib-devel
+ ecm-devel fflas-ffpack flintlib-devel gap-devel gd-devel giac-devel glpk-devel
+ gsl-devel iml-devel lcalc-devel libbraiding-devel libhomfly-devel libmpc-devel
+ libpng-devel linbox-devel lrcalc-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 zn_poly"
+depends="FlintQS eclib-devel fflas-ffpack flintlib-devel gcc-fortran gd-devel
+ gfan giac 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-ipython_ipykernel python3-jupyter_ipywidgets python3-matplotlib
+ python3-memory_allocator python3-networkx python3-pip python3-pkgconfig
+ python3-pplpy python3-primecountpy python3-requests python3-scipy
+ python3-sympy python3-traitlets sage-data-combinatorial_designs
+ sage-data-conway_polynomials sage-data-elliptic_curves sage-data-graphs
+ sage-data-polytopes_db sympow tachyon"
+checkdepends="$depends"
+short_desc="Open source mathematics software"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="http://sagemath.org/"
+distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz"
+checksum=8d70a3b26080802c5b2e33dda4c23795d494d8216a0c2ecfcd608ebab0e64ff6
+
+post_patch() {
+	# these are unused and nothing else uses ratpoints
+	rm sage/libs/ratpoints.{pyx,pxd}
+
+	# git tree needs bootstrapping
+	pushd $wrksrc/build/pkgs/sagelib
+	PATH=../../bin:$PATH BOOTSTRAP_QUIET=no ./bootstrap
+	popd
+}
+
+do_configure() {
+	# set variables in sage.env since we do not install sage_conf
+	cat >> sage/env.py <<-EOF
+	CONWAY_POLYNOMIALS_DATA_DIR = "/usr/share/sagemath/conway_polynomials"
+	GRAPHS_DATA_DIR = "/usr/share/sagemath/graphs"
+	ELLCURVE_DATA_DIR = "/usr/share/sagemath/ellcurves"
+	POLYTOPE_DATA_DIR = "/usr/share/sagemath/reflexive_polytopes"
+	COMBINATORIAL_DESIGN_DATA_DIR = "/usr/share/sagemath/combinatorial_designs"
+	CREMONA_MINI_DATA_DIR = "/usr/share/sagemath/cremona"
+	CREMONA_LARGE_DATA_DIR = "/usr/share/sagemath/cremona"
+	EOF
+
+	# don't install sage-venv-config: it is used to set SAGE_VENV=/usr and
+	# then sage-env prepends "$SAGE_VENV/bin" to PATH which is undesired
+	vsed -e '/sage-venv-config/d' -i $wrksrc/src/setup.cfg
+}
+
+pre_build() {
+	export PYTHONPATH=../sage-setup
+	export SAGE_NUM_THREADS="$XBPS_MAKEJOBS"
+}
+
+post_build() {
+	_scripts=$(cd build/scripts* && pwd)
+	cat >> $_scripts/sage-env-config <<-'EOF'
+	PATH=$(dirname $SELF):$PATH
+	EOF
+}
+
+pre_install() {
+	export PYTHONPATH=../sage-setup
+	export SAGE_NUM_THREADS="$XBPS_MAKEJOBS"
+}
+
+post_install() {
+	# fix jupyter kernel spec
+	vsed -i -e 's|"/usr/bin/sage", "--python"|"/usr/bin/python"|' \
+		${DESTDIR}/usr/share/jupyter/kernels/sagemath/kernel.json
+	# replace broken symlinks by good copies (sagemath logo images)
+	for file in $(ls sage/ext_data/notebook-ipython); do
+		rm ${DESTDIR}/usr/share/jupyter/kernels/sagemath/$file
+		cp -a sage/ext_data/notebook-ipython/$file \
+			${DESTDIR}/usr/share/jupyter/kernels/sagemath
+	done
+	# we don't have docs here
+	rm ${DESTDIR}/usr/share/jupyter/kernels/sagemath/doc
+	# we don't have threejs in void
+	rm ${DESTDIR}/usr/share/jupyter/nbextensions/threejs-sage
+
+	# symlink main binary
+	vmkdir usr/bin
+	ln -s $_bindir/sage ${DESTDIR}/usr/bin/sage-${version}
+	ln -s sage-${version} ${DESTDIR}/usr/bin/sage
+}
+
+do_check() {
+	_scripts=$(cd build/scripts* && pwd)
+	export PYTHONPATH=$(cd build/lib* && pwd)
+
+	# get out of $build_wrksrc, otherwise python picks the wrong sage module
+	cd $(mktemp -dp build)
+
+	if [ -f ${XBPS_DISTDIR}/sagemath-check ] ; then
+		_sed='s|#.*||;/^\s*$/d;s|[^ ]*/sage/|'$PYTHONPATH'/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 60.0"
+	else
+		_test_args+=" --warn-long 30.0"
+	fi
+	if [ "$XBPS_BUILD_ENVIRONMENT" = "void-packages-ci" ]; then
+		# for CI use a predictable random seed
+		_test_args+=" --random-seed=0"
+	fi
+	$_scripts/sage -tp ${XBPS_MAKEJOBS} ${_test_args} ${_test_files}
+}

  parent reply	other threads:[~2022-02-02 21:03 UTC|newest]

Thread overview: 250+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 14:12 [PR PATCH] [WIP] New package: sagemath-9.5.beta5 tornaria
2021-11-11 16:08 ` dkwo
2021-11-12  7:27 ` fosslinux
2021-11-12 20:16 ` dkwo
2021-11-12 20:22 ` dkwo
2021-11-12 20:28 ` dkwo
2021-11-12 20:37 ` dkwo
2021-11-12 22:06 ` fosslinux
2021-11-12 22:12 ` [PR REVIEW] " Duncaen
2021-11-13  1:27 ` tornaria
2021-11-13  1:30 ` tornaria
2021-11-13  1:33 ` tornaria
2021-11-13  3:14 ` [PR PATCH] [Updated] " tornaria
2021-11-13  3:18 ` tornaria
2021-11-13  8:59 ` dkwo
2021-11-13  9:02 ` dkwo
2021-11-13  9:28 ` dkwo
2021-11-13  9:36 ` dkwo
2021-11-13 10:22 ` dkwo
2021-11-13 10:48 ` dkwo
2021-11-13 10:50 ` [PR PATCH] [Updated] " tornaria
2021-11-13 10:59 ` tornaria
2021-11-13 11:05 ` tornaria
2021-11-13 11:42 ` tornaria
2021-11-13 12:30 ` dkwo
2021-11-13 13:48 ` dkwo
2021-11-13 13:50 ` dkwo
2021-11-13 13:53 ` leahneukirchen
2021-11-13 14:20 ` leahneukirchen
2021-11-13 14:22 ` leahneukirchen
2021-11-13 14:55 ` leahneukirchen
2021-11-13 14:58 ` leahneukirchen
2021-11-13 15:00 ` dkwo
2021-11-13 15:07 ` leahneukirchen
2021-11-13 15:11 ` leahneukirchen
2021-11-13 15:28 ` dkwo
2021-11-13 15:34 ` leahneukirchen
2021-11-14  4:42 ` ericonr
2021-11-14  4:43 ` ericonr
2021-11-14 14:27 ` leahneukirchen
2021-11-14 15:20 ` tornaria
2021-11-14 16:31 ` leahneukirchen
2021-11-14 21:28 ` [PR PATCH] [Updated] " tornaria
2021-11-14 21:47 ` tornaria
2021-11-15 15:58 ` leahneukirchen
2021-11-15 16:16 ` tornaria
2021-11-17  9:20 ` dkwo
2021-11-20 22:12 ` [PR PATCH] [Updated] " tornaria
2021-11-21  9:37 ` dkwo
2021-11-21 14:00 ` tornaria
2021-11-21 19:44 ` dkwo
2021-11-22 12:51 ` tornaria
2021-11-22 13:17 ` [WIP] New package: sagemath-9.5.beta7 dkwo
2021-11-22 14:30 ` [PR PATCH] [Updated] " tornaria
2021-11-22 14:35 ` tornaria
2021-11-22 14:55 ` tornaria
2021-11-22 15:22 ` tornaria
2021-11-22 15:30 ` dkwo
2021-11-22 15:30 ` dkwo
2021-11-22 15:41 ` dkwo
2021-11-22 16:30 ` dkwo
2021-11-22 16:35 ` tornaria
2021-11-22 17:09 ` dkwo
2021-11-22 17:28 ` tornaria
2021-11-22 17:52 ` dkwo
2021-11-22 23:41 ` tornaria
2021-11-23  3:22 ` [PR PATCH] [Updated] " tornaria
2021-11-23  3:25 ` tornaria
2021-11-23  9:22 ` dkwo
2021-11-23 12:16 ` tornaria
2021-11-24 19:28 ` tornaria
2021-11-25 22:41 ` tornaria
2021-11-26  3:04 ` [PR PATCH] [Updated] " tornaria
2021-11-26  3:12 ` tornaria
2021-11-26  9:30 ` dkwo
2021-11-26  9:31 ` dkwo
2021-11-26  9:33 ` dkwo
2021-11-26 13:10 ` tornaria
2021-11-27 14:08 ` dkwo
2021-11-28 12:32 ` tornaria
2021-11-28 13:42 ` tornaria
2021-11-28 13:52 ` tornaria
2021-11-28 23:21 ` [PR PATCH] [Updated] " tornaria
2021-11-28 23:27 ` tornaria
2021-11-28 23:32 ` tornaria
2021-12-02 16:38 ` dkwo
2021-12-02 16:44 ` leahneukirchen
2021-12-02 17:04 ` dkwo
2021-12-02 17:12 ` leahneukirchen
2021-12-04 15:37 ` [PR PATCH] [Updated] " tornaria
2021-12-04 15:38 ` tornaria
2021-12-04 15:47 ` tornaria
2021-12-05 10:22 ` dkwo
2021-12-10 21:28 ` dkwo
2021-12-10 21:31 ` dkwo
2021-12-11  2:29 ` ericonr
2021-12-11 17:58 ` dkwo
2021-12-13  3:13 ` [PR PATCH] [Updated] " tornaria
2021-12-13  9:25 ` dkwo
2021-12-13 13:17 ` tornaria
2021-12-13 13:28 ` dkwo
2021-12-13 15:25 ` dkwo
2021-12-13 17:10 ` tornaria
2021-12-13 17:48 ` tornaria
2021-12-13 20:34 ` dkwo
2021-12-13 21:00 ` dkwo
2021-12-13 21:13 ` dkwo
2021-12-14 17:36 ` ericonr
2021-12-15 10:41 ` dkwo
2021-12-15 14:57 ` tornaria
2021-12-15 14:59 ` tornaria
2021-12-15 15:04 ` dkwo
2021-12-15 15:19 ` dkwo
2021-12-16 23:11 ` tornaria
2021-12-17 20:08 ` dkwo
2021-12-20  2:23 ` tornaria
2021-12-20  2:35 ` [PR PATCH] [Updated] " tornaria
2021-12-23 17:18 ` [WIP] New package: sagemath-9.5.beta8 dkwo
2021-12-23 17:47 ` dkwo
2021-12-23 18:28 ` tornaria
2021-12-23 19:20 ` dkwo
2021-12-23 19:39 ` tornaria
2021-12-23 19:50 ` tornaria
2021-12-23 20:41 ` dkwo
2021-12-23 22:08 ` tornaria
2021-12-24  9:08 ` dkwo
2021-12-24 11:36 ` tornaria
2021-12-24 11:53 ` dkwo
2021-12-24 12:15 ` tornaria
2021-12-24 16:10 ` tornaria
2021-12-24 16:35 ` tornaria
2021-12-24 17:39 ` tornaria
2021-12-25  8:44 ` dkwo
2021-12-25 13:33 ` tornaria
2021-12-25 15:29 ` tornaria
2021-12-25 15:59 ` ericonr
2021-12-25 15:59 ` ericonr
2021-12-25 16:21 ` tornaria
2021-12-26  2:11 ` ericonr
2021-12-26  9:28 ` dkwo
2021-12-26 10:33 ` dkwo
2021-12-26 10:34 ` dkwo
2021-12-26 10:36 ` dkwo
2021-12-27  0:08 ` [PR PATCH] [Updated] " tornaria
2021-12-27  4:12 ` tornaria
2021-12-27 16:28 ` dkwo
2021-12-27 16:29 ` dkwo
2021-12-27 16:37 ` tornaria
2021-12-27 17:15 ` tornaria
2021-12-27 21:52 ` ericonr
2021-12-27 23:21 ` [PR PATCH] [Updated] " tornaria
2021-12-28 15:50 ` [WIP] New package: sagemath-9.5.beta9 dkwo
2021-12-28 17:37 ` tornaria
2021-12-28 18:31 ` dkwo
2021-12-28 18:55 ` dkwo
2021-12-28 21:23 ` tornaria
2021-12-28 22:08 ` tornaria
2021-12-28 22:12 ` tornaria
2021-12-28 22:15 ` tornaria
2021-12-28 23:22 ` tornaria
2021-12-29 12:37 ` dkwo
2022-01-03 20:02 ` [PR PATCH] [Updated] " tornaria
2022-01-03 20:50 ` tornaria
2022-01-04 17:52 ` dkwo
2022-01-04 17:57 ` dkwo
2022-01-04 18:14 ` tornaria
2022-01-04 18:14 ` [PR PATCH] [Closed]: " tornaria
2022-01-04 18:17 ` tornaria
2022-01-04 18:17 ` tornaria
2022-01-04 18:28 ` tornaria
2022-01-04 18:48 ` tornaria
2022-01-05  9:56 ` dkwo
2022-01-07 10:55 ` dkwo
2022-01-07 10:57 ` dkwo
2022-01-07 10:59 ` dkwo
2022-01-07 15:04 ` tornaria
2022-01-07 15:13 ` tornaria
2022-01-08 16:51 ` [PR PATCH] [Updated] " tornaria
2022-01-10  3:22 ` tornaria
2022-01-11 13:00 ` [WIP] New package: sagemath-9.5.rc0 dkwo
2022-01-11 13:39 ` tornaria
2022-01-11 14:39 ` tornaria
2022-01-12 23:43 ` [PR PATCH] [Updated] " tornaria
2022-01-12 23:47 ` tornaria
2022-01-13  2:34 ` tornaria
2022-01-13 18:50 ` [PR PATCH] [Updated] " tornaria
2022-01-13 19:11 ` tornaria
2022-01-14 14:34 ` [PR PATCH] [Updated] " tornaria
2022-01-14 14:36 ` tornaria
2022-01-14 14:48 ` tornaria
2022-01-14 15:21 ` [PR PATCH] [Updated] [WIP] New package: sagemath-9.5.rc1 tornaria
2022-01-14 15:24 ` tornaria
2022-01-14 15:27 ` leahneukirchen
2022-01-14 15:31 ` tornaria
2022-01-14 16:35 ` leahneukirchen
2022-01-14 16:57 ` tornaria
2022-01-14 17:04 ` leahneukirchen
2022-01-14 17:39 ` leahneukirchen
2022-01-15  2:13 ` [PR PATCH] [Updated] " tornaria
2022-01-15  4:48 ` tornaria
2022-01-15 13:35 ` tornaria
2022-01-15 13:57 ` tornaria
2022-01-15 17:55 ` dkwo
2022-01-15 18:23 ` tornaria
2022-01-15 18:24 ` tornaria
2022-01-15 18:27 ` [PR PATCH] [Updated] " tornaria
2022-01-15 18:31 ` tornaria
2022-01-17  5:10 ` [PR PATCH] [Updated] " tornaria
2022-01-17  5:17 ` [WIP] New package: sagemath-9.5.rc2 tornaria
2022-01-17  5:31 ` tornaria
2022-01-17  5:54 ` [PR PATCH] [Updated] " tornaria
2022-01-17  5:55 ` tornaria
2022-01-17  9:37 ` dkwo
2022-01-17 10:42 ` tornaria
2022-01-17 10:50 ` dkwo
2022-01-17 13:07 ` [PR PATCH] [Updated] " tornaria
2022-01-17 16:20 ` dkwo
2022-01-17 17:05 ` dkwo
2022-01-17 17:17 ` tornaria
2022-01-17 17:24 ` dkwo
2022-01-18  1:46 ` [PR PATCH] [Updated] " tornaria
2022-01-18  1:47 ` tornaria
2022-01-18  9:05 ` dkwo
2022-01-18  9:56 ` [PR PATCH] [Updated] " tornaria
2022-01-18 21:55 ` tornaria
2022-01-19 11:01 ` tornaria
2022-01-19 11:09 ` tornaria
2022-01-19 13:37 ` tornaria
2022-01-19 16:51 ` [PR PATCH] [Updated] " tornaria
2022-01-19 17:08 ` tornaria
2022-01-19 17:22 ` dkwo
2022-01-20 13:17 ` [WIP] New package: sagemath-9.5.rc3 dkwo
2022-01-20 15:41 ` tornaria
2022-01-20 15:53 ` dkwo
2022-01-20 16:04 ` dkwo
2022-01-20 16:04 ` dkwo
2022-01-25 20:37 ` [PR PATCH] [Updated] " tornaria
2022-01-25 21:27 ` [WIP] New package: sagemath-9.5.rc4 leahneukirchen
2022-01-25 23:19 ` tornaria
2022-01-26 13:07 ` [PR PATCH] [Updated] " tornaria
2022-01-30 22:13 ` tornaria
2022-01-30 22:41 ` [WIP] New package: sagemath-9.5 tornaria
2022-01-31  9:01 ` dkwo
2022-01-31  9:40 ` dkwo
2022-02-02 21:03 ` tornaria [this message]
2022-02-02 21:41 ` tornaria
2022-02-03  0:31 ` tornaria
2022-02-03  2:48 ` tornaria
2022-02-03 13:31 ` [PR PATCH] [Merged]: " leahneukirchen
2022-02-03 15:41 ` Vindaar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220202210334.jkwEtjclHfHAuse1SpIP04gr22j6Ae-6yAkz6O5KBY8@z \
    --to=tornaria@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    --subject='Re: [PR PATCH] [Updated] [WIP] New package: sagemath-9.5' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).