mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-05 19:43:07 +02:00
sagemath: update to 10.7.
This commit is contained in:
parent
58d8f90a18
commit
625df4a38a
3 changed files with 55 additions and 4 deletions
51
srcpkgs/sagemath/patches/40594-Fix_segfault_in_libgap.patch
Normal file
51
srcpkgs/sagemath/patches/40594-Fix_segfault_in_libgap.patch
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
diff --git a/src/sage/libs/gap/element.pyx b/src/sage/libs/gap/element.pyx
|
||||||
|
index f52a73c2ded..2ef40fd0a69 100644
|
||||||
|
--- a/src/sage/libs/gap/element.pyx
|
||||||
|
+++ b/src/sage/libs/gap/element.pyx
|
||||||
|
@@ -2498,11 +2498,17 @@ cdef class GapElement_Function(GapElement):
|
||||||
|
cdef Obj result = NULL
|
||||||
|
cdef Obj arg_list
|
||||||
|
cdef int n = len(args)
|
||||||
|
- cdef volatile Obj v2
|
||||||
|
-
|
||||||
|
- if n > 0 and n <= 3:
|
||||||
|
- libgap = self.parent()
|
||||||
|
- a = [x if isinstance(x, GapElement) else libgap(x) for x in args]
|
||||||
|
+ cdef Obj a[3]
|
||||||
|
+
|
||||||
|
+ if n <= 3:
|
||||||
|
+ if not all(isinstance(x, GapElement) for x in args):
|
||||||
|
+ libgap = self.parent()
|
||||||
|
+ args = tuple(x if isinstance(x, GapElement) else libgap(x) for x in args)
|
||||||
|
+ for i in range(n):
|
||||||
|
+ x = args[i]
|
||||||
|
+ a[i] = (<GapElement>x).value
|
||||||
|
+ else:
|
||||||
|
+ arg_list = make_gap_list(args)
|
||||||
|
|
||||||
|
try:
|
||||||
|
sig_GAP_Enter()
|
||||||
|
@@ -2510,20 +2516,12 @@ cdef class GapElement_Function(GapElement):
|
||||||
|
if n == 0:
|
||||||
|
result = GAP_CallFunc0Args(self.value)
|
||||||
|
elif n == 1:
|
||||||
|
- result = GAP_CallFunc1Args(self.value,
|
||||||
|
- (<GapElement>a[0]).value)
|
||||||
|
+ result = GAP_CallFunc1Args(self.value, a[0])
|
||||||
|
elif n == 2:
|
||||||
|
- result = GAP_CallFunc2Args(self.value,
|
||||||
|
- (<GapElement>a[0]).value,
|
||||||
|
- (<GapElement>a[1]).value)
|
||||||
|
+ result = GAP_CallFunc2Args(self.value, a[0], a[1])
|
||||||
|
elif n == 3:
|
||||||
|
- v2 = (<GapElement>a[2]).value
|
||||||
|
- result = GAP_CallFunc3Args(self.value,
|
||||||
|
- (<GapElement>a[0]).value,
|
||||||
|
- (<GapElement>a[1]).value,
|
||||||
|
- v2)
|
||||||
|
+ result = GAP_CallFunc3Args(self.value, a[0], a[1], a[2])
|
||||||
|
else:
|
||||||
|
- arg_list = make_gap_list(args)
|
||||||
|
result = GAP_CallFuncList(self.value, arg_list)
|
||||||
|
sig_off()
|
||||||
|
finally:
|
|
@ -30,5 +30,5 @@ get_pr() {
|
||||||
# run from patches dir
|
# run from patches dir
|
||||||
cd $(dirname "$0")
|
cd $(dirname "$0")
|
||||||
|
|
||||||
#get_pr 39015 "sage cli"
|
# positive review
|
||||||
#get_pr 39616 "ipython 9.0"
|
get_pr 40594 "Fix segfault in libgap"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'sagemath'
|
# Template file for 'sagemath'
|
||||||
pkgname=sagemath
|
pkgname=sagemath
|
||||||
version=10.6
|
version=10.7
|
||||||
revision=1
|
revision=1
|
||||||
_pypi_version=${version/.beta/b}
|
_pypi_version=${version/.beta/b}
|
||||||
_pypi_version=${_pypi_version/.rc/rc}
|
_pypi_version=${_pypi_version/.rc/rc}
|
||||||
|
@ -36,7 +36,7 @@ license="GPL-2.0-or-later"
|
||||||
homepage="https://www.sagemath.org/"
|
homepage="https://www.sagemath.org/"
|
||||||
changelog="https://github.com/sagemath/sage/releases"
|
changelog="https://github.com/sagemath/sage/releases"
|
||||||
distfiles="${PYPI_SITE}/s/sagemath-standard/sagemath_standard-${_pypi_version}.tar.gz"
|
distfiles="${PYPI_SITE}/s/sagemath-standard/sagemath_standard-${_pypi_version}.tar.gz"
|
||||||
checksum=0405b9d9f52657969418fc47488ec0cb12fd62c538e50616b11fc9d5c507f9d2
|
checksum=f6ec41913a745b94e20ceae69c2c54a7c8e549b3dc8b4a01dbd874c772924149
|
||||||
nocross="due to ntl (eclib, singular), fflas-ffpack, givaro, linbox, sympow, maxima"
|
nocross="due to ntl (eclib, singular), fflas-ffpack, givaro, linbox, sympow, maxima"
|
||||||
|
|
||||||
# main repo `.../src/sage/` is `.../sage/` here
|
# main repo `.../src/sage/` is `.../sage/` here
|
||||||
|
|
Loading…
Add table
Reference in a new issue