mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 11:45:56 -04:00
Initial import (#877651).
This commit is contained in:
parent
257b1142ac
commit
86f823b2b0
41 changed files with 13000 additions and 0 deletions
41
sagemath-pari.patch
Normal file
41
sagemath-pari.patch
Normal file
|
@ -0,0 +1,41 @@
|
|||
diff -up sage-5.8/spkg/build/sage-5.8/sage/interfaces/gp.py.orig sage-5.8/spkg/build/sage-5.8/sage/interfaces/gp.py
|
||||
--- sage-5.8/spkg/build/sage-5.8/sage/interfaces/gp.py.orig 2013-03-19 16:16:17.815716650 -0300
|
||||
+++ sage-5.8/spkg/build/sage-5.8/sage/interfaces/gp.py 2013-03-19 16:16:27.031717003 -0300
|
||||
@@ -980,8 +980,8 @@ def is_GpElement(x):
|
||||
from sage.misc.all import DOT_SAGE, SAGE_ROOT
|
||||
import os
|
||||
|
||||
-# Set GPRC environment variable to $SAGE_ROOT/local/etc/gprc.expect
|
||||
-os.environ["GPRC"] = '%s/local/etc/gprc.expect'%SAGE_ROOT
|
||||
+# Set GPRC environment variable to $SAGE_ROOT/data/extcode/pari/gprc.expect
|
||||
+os.environ["GPRC"] = '%s/data/extcode/pari/gprc.expect'%SAGE_ROOT
|
||||
|
||||
# An instance
|
||||
gp = Gp(logfile=DOT_SAGE+'/gp-expect.log') # useful for debugging!
|
||||
diff -up sage-5.8/spkg/build/sage-5.8/sage/libs/pari/gen.pyx.orig sage-5.8/spkg/build/sage-5.8/sage/libs/pari/gen.pyx
|
||||
--- sage-5.8/spkg/build/sage-5.8/sage/libs/pari/gen.pyx.orig 2013-03-19 16:16:10.607716374 -0300
|
||||
+++ sage-5.8/spkg/build/sage-5.8/sage/libs/pari/gen.pyx 2013-03-19 16:16:27.035717003 -0300
|
||||
@@ -182,6 +182,10 @@ include '../../ext/stdsage.pxi'
|
||||
cdef extern from "mpz_pylong.h":
|
||||
cdef int mpz_set_pylong(mpz_t dst, src) except -1
|
||||
|
||||
+cdef extern from "gmp.h":
|
||||
+ cdef void mp_get_memory_functions(void**, void**, void**)
|
||||
+ cdef void mp_set_memory_functions(void*, void*, void*)
|
||||
+
|
||||
# Make sure we don't use mpz_t_offset before initializing it by
|
||||
# putting in a value that's likely to provoke a segmentation fault,
|
||||
# rather than silently corrupting memory.
|
||||
@@ -9175,7 +9179,12 @@ cdef class PariInstance(sage.structure.p
|
||||
|
||||
# The size here doesn't really matter, because we will allocate
|
||||
# our own stack anyway. We ask PARI not to set up signal handlers.
|
||||
+ cdef void *_gmp_malloc
|
||||
+ cdef void *_gmp_realloc
|
||||
+ cdef void *_gmp_free
|
||||
+ mp_get_memory_functions(&_gmp_malloc, &_gmp_realloc, &_gmp_free)
|
||||
pari_init_opts(10000, maxprime, INIT_JMPm | INIT_DFTm)
|
||||
+ mp_set_memory_functions(_gmp_malloc, _gmp_realloc, _gmp_free)
|
||||
num_primes = maxprime
|
||||
|
||||
# NOTE: sig_on() can only come AFTER pari_init_opts()!
|
Loading…
Add table
Add a link
Reference in a new issue