mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 11:45:56 -04:00
Update to sagemath 8.6.
Also: - Install an SVG icon instead of a fixed size (128x128) icon. - Require hicolor-icon-theme since we install an icon. - Drop obsolete Obsolete.
This commit is contained in:
parent
62dc22fafb
commit
b6408b9313
5 changed files with 117 additions and 68 deletions
|
@ -1,53 +1,51 @@
|
|||
diff -up src/sage/env.py.orig src/sage/env.py
|
||||
--- src/sage/env.py.orig 2018-12-22 16:37:08.000000000 -0700
|
||||
+++ src/sage/env.py 2019-01-04 11:08:22.825475344 -0700
|
||||
--- src/sage/env.py.orig 2019-01-14 17:16:02.000000000 -0700
|
||||
+++ src/sage/env.py 2019-02-07 16:11:38.887417503 -0700
|
||||
@@ -164,7 +164,7 @@ _add_variable_or_fallback('CONWAY_POLYNO
|
||||
_add_variable_or_fallback('GRAPHS_DATA_DIR', opj('$SAGE_SHARE','graphs'))
|
||||
_add_variable_or_fallback('ELLCURVE_DATA_DIR',opj('$SAGE_SHARE','ellcurves'))
|
||||
_add_variable_or_fallback('POLYTOPE_DATA_DIR',opj('$SAGE_SHARE','reflexive_polytopes'))
|
||||
-_add_variable_or_fallback('GAP_ROOT_DIR', opj('$SAGE_LOCAL','gap','latest'))
|
||||
-_add_variable_or_fallback('GAP_ROOT_DIR', opj('$SAGE_SHARE','gap'))
|
||||
+_add_variable_or_fallback('GAP_ROOT_DIR', opj('/usr','lib','gap'))
|
||||
_add_variable_or_fallback('THEBE_DIR', opj('$SAGE_SHARE','thebe'))
|
||||
_add_variable_or_fallback('COMBINATORIAL_DESIGN_DATA_DIR', opj('$SAGE_SHARE', 'combinatorial_designs'))
|
||||
_add_variable_or_fallback('CREMONA_MINI_DATA_DIR', opj('$SAGE_SHARE', 'cremona'))
|
||||
diff -up src/sage/libs/gap/test/main.c.orig src/sage/libs/gap/test/main.c
|
||||
--- src/sage/libs/gap/test/main.c.orig 2018-12-22 16:37:08.000000000 -0700
|
||||
+++ src/sage/libs/gap/test/main.c 2019-01-04 11:08:22.842475024 -0700
|
||||
@@ -22,7 +22,7 @@ void eval(char* cmd) {
|
||||
libgap_start_interaction(cmd);
|
||||
|
||||
libgap_enter();
|
||||
- libGAP_ReadEvalCommand(libGAP_BottomLVars);
|
||||
+ libGAP_ReadEvalCommand(libGAP_BottomLVars, NULL);
|
||||
libGAP_ViewObjHandler(libGAP_ReadEvalResult);
|
||||
char* out = libgap_get_output();
|
||||
libgap_exit();
|
||||
diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx
|
||||
--- src/sage/libs/gap/util.pyx.orig 2018-12-22 16:37:08.000000000 -0700
|
||||
+++ src/sage/libs/gap/util.pyx 2019-01-04 11:08:22.843475005 -0700
|
||||
@@ -27,6 +27,8 @@ from sage.cpython.string cimport str_to_
|
||||
from sage.interfaces.gap_workspace import prepare_workspace_dir
|
||||
from sage.env import SAGE_LOCAL, GAP_ROOT_DIR
|
||||
--- src/sage/libs/gap/util.pyx.orig 2019-01-14 17:16:03.000000000 -0700
|
||||
+++ src/sage/libs/gap/util.pyx 2019-02-07 16:13:52.658939819 -0700
|
||||
@@ -18,6 +18,7 @@ import os
|
||||
import signal
|
||||
import warnings
|
||||
|
||||
+import re
|
||||
+
|
||||
+from posix.dlfcn cimport dlopen, dlclose, RTLD_NOW, RTLD_GLOBAL
|
||||
from libc.string cimport strcpy, strlen
|
||||
|
||||
############################################################################
|
||||
### Hooking into the GAP memory management #################################
|
||||
@@ -185,7 +187,7 @@ def gap_root():
|
||||
from cpython.exc cimport PyErr_SetObject, PyErr_Occurred, PyErr_Fetch
|
||||
@@ -181,7 +182,7 @@ def gap_root():
|
||||
|
||||
sage: from sage.libs.gap.util import gap_root
|
||||
sage: gap_root() # random output
|
||||
- '/home/vbraun/opt/sage-5.3.rc0/local/gap/latest'
|
||||
+ '/usr/lib/gap'
|
||||
"""
|
||||
try:
|
||||
if os.path.exists(GAP_ROOT_DIR):
|
||||
@@ -251,6 +253,7 @@ cdef initialize():
|
||||
libgap_initialize(argc, argv)
|
||||
gap_error_msg = char_to_str(libgap_get_output())
|
||||
libgap_finish_interaction()
|
||||
+ gap_error_msg = re.sub(r'#I.*\n?', '', gap_error_msg, flags=re.MULTILINE)
|
||||
if gap_error_msg:
|
||||
raise RuntimeError('libGAP initialization failed\n' + gap_error_msg)
|
||||
if os.path.exists(sage.env.GAP_ROOT_DIR):
|
||||
return sage.env.GAP_ROOT_DIR
|
||||
@@ -259,6 +260,18 @@ cdef initialize():
|
||||
global _gap_is_initialized, environ
|
||||
if _gap_is_initialized: return
|
||||
|
||||
+ # Hack to ensure that all symbols provided by libgap are loaded into the
|
||||
+ # global symbol table
|
||||
+ # Note: we could use RTLD_NOLOAD and avoid the subsequent dlclose() but
|
||||
+ # this isn't portable
|
||||
+ cdef void* handle
|
||||
+ handle = dlopen("libgap.so", RTLD_NOW | RTLD_GLOBAL)
|
||||
+ if handle == NULL:
|
||||
+ raise RuntimeError(
|
||||
+ "Could not dlopen() libgap.so even though it should already "
|
||||
+ "be loaded!")
|
||||
+ dlclose(handle)
|
||||
+
|
||||
# Define argv and environ variables, which we will pass in to
|
||||
# initialize GAP. Note that we must pass define the memory pool
|
||||
# size!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue