sagemath/sagemath-libgap.patch
2017-04-18 16:03:03 -04:00

35 lines
1.4 KiB
Diff

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 2017-04-11 09:59:37.166270228 -0400
+++ src/sage/libs/gap/test/main.c 2017-04-11 09:59:39.063270300 -0400
@@ -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 2017-04-11 09:59:20.424269587 -0400
+++ src/sage/libs/gap/util.pyx 2017-04-11 09:59:39.065270300 -0400
@@ -158,17 +158,9 @@ 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'
"""
- import os.path
- if os.path.exists(GAP_ROOT_DIR):
- return GAP_ROOT_DIR
- print('The gap-4.5.5.spkg (or later) seems to be not installed!')
- gap_sh = open(os.path.join(SAGE_LOCAL, 'bin', 'gap')).read().splitlines()
- gapdir = filter(lambda dir:dir.strip().startswith('GAP_DIR'), gap_sh)[0]
- gapdir = gapdir.split('"')[1]
- gapdir = gapdir.replace('$SAGE_LOCAL', SAGE_LOCAL)
- return gapdir
+ return '/usr/lib/gap'
cdef initialize():