[sagemath] 04/05: Import Debian patches for libgap-sage support

Jerome Benoit calculus-guest at moszumanska.debian.org
Mon Aug 8 00:26:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

calculus-guest pushed a commit to branch master
in repository sagemath.

commit ed2d430ec2487aee6ab5520795f316fc4b847a96
Author: Jerome Benoit <calculus at rezozer.net>
Date:   Mon Aug 8 01:23:46 2016 +0100

    Import Debian patches for libgap-sage support
---
 debian/patches/debian-libgap-sage.patch        |  27 ++++
 debian/patches/fixsage-libgap-systemwide.patch | 169 +++++++++++++++++++++++++
 debian/patches/series                          |   2 +
 3 files changed, 198 insertions(+)

diff --git a/debian/patches/debian-libgap-sage.patch b/debian/patches/debian-libgap-sage.patch
new file mode 100644
index 0000000..ac091e6
--- /dev/null
+++ b/debian/patches/debian-libgap-sage.patch
@@ -0,0 +1,27 @@
+--- a/sage/src/sage/libs/gap/test/Makefile
++++ b/sage/src/sage/libs/gap/test/Makefile
+@@ -1,6 +1,8 @@
++LIBGAP_CFLAGS = $(shell pkg-config libgap-sage --cflags)
++LIBGAP_LDFLAGS = $(shell pkg-config libgap-sage --libs-only-L)
++LIBGAP_LDLIBS = $(shell pkg-config libgap-sage --libs-only-l)
+ 
+-
+-GAPDIR="$(SAGE_LOCAL)/gap/latest"
++GAPDIR="/usr/share/gap"
+ 
+ # VALGRIND=valgrind --leak-check=full
+ # VALGRIND=valgrind --db-attach=yes
+@@ -12,11 +14,11 @@
+ 	LD_LIBRARY_PATH=$(SAGE_LOCAL)/lib $(VALGRIND) ./main
+ 
+ main: main.o Makefile
+-	gcc -L$(SAGE_LOCAL)/lib -o main main.o -lgap -lcsage -lntl -lstdc++ -lpari -lpython2.7 -lm -lgmp
++	gcc $(LIBGAP_LDFLAGS) -L$(SAGE_LOCAL)/lib -o main main.o $(LIBGAP_LDLIBS) -lcsage -lntl -lstdc++ -lpari -lpython2.7 -lm -lgmp
+ 
+ main.o: main.c
+ 	echo $(GAPDIR)
+-	gcc -std=gnu99 -DGAPDIR="\"$(GAPDIR)\"" -I$(SAGE_LOCAL)/include -I$(SAGE_LOCAL)/include/python2.6 -c -g $^
++	gcc -std=gnu99 -DGAPDIR="\"$(GAPDIR)\"" $(LIBGAP_CFLAGS) -I$(SAGE_LOCAL)/include -I$(SAGE_LOCAL)/include/python2.6 -c -g $^
+ 
+ clean:
+ 	rm main.o main *~
diff --git a/debian/patches/fixsage-libgap-systemwide.patch b/debian/patches/fixsage-libgap-systemwide.patch
new file mode 100644
index 0000000..3cbb983
--- /dev/null
+++ b/debian/patches/fixsage-libgap-systemwide.patch
@@ -0,0 +1,169 @@
+--- a/sage/src/sage/libs/gap/gap_includes.pxd
++++ b/sage/src/sage/libs/gap/gap_includes.pxd
+@@ -9,12 +9,12 @@
+ ###############################################################################
+ 
+ 
+-cdef extern from "gap/system.h":
++cdef extern from <gap/system.h>:
+     ctypedef char libGAP_Char
+     ctypedef int libGAP_Int
+     ctypedef unsigned char libGAP_UChar
+ 
+-cdef extern from "gap/libgap.h":
++cdef extern from <gap/libgap.h>:
+     void libgap_initialize(int argc, char** argv)
+     ctypedef void(*libgap_gasman_callback_ptr)()
+     void libgap_set_gasman_callback(libgap_gasman_callback_ptr callback)
+@@ -30,11 +30,11 @@
+     void libgap_enter()
+     void libgap_exit()
+ 
+-cdef extern from "gap/code.h":
++cdef extern from <gap/code.h>:
+     ctypedef unsigned int libGAP_Stat
+     ctypedef libGAP_Stat* libGAP_PtrBody
+ 
+-cdef extern from "gap/gap.h":
++cdef extern from <gap/gap.h>:
+     ctypedef unsigned int libGAP_UInt
+     ctypedef void* libGAP_ExecStatus
+     void libGAP_ViewObjHandler(void*)
+@@ -52,7 +52,7 @@
+     cdef libGAP_ExecStatus libGAP_STATUS_ERROR
+     cdef libGAP_ExecStatus libGAP_STATUS_QQUIT
+ 
+-cdef extern from "gap/objects.h":
++cdef extern from <gap/objects.h>:
+     ctypedef void* libGAP_Obj
+     libGAP_Obj libGAP_SHALLOW_COPY_OBJ(libGAP_Obj obj)
+     bint libGAP_IS_INTOBJ(libGAP_Obj obj)
+@@ -130,13 +130,13 @@
+     cdef int libGAP_TESTING
+     cdef int libGAP_LAST_TESTING_TNUM
+ 
+-cdef extern from "gap/read.h":
++cdef extern from <gap/read.h>:
+     void* libGAP_ReadEvalCommand(libGAP_Obj context, libGAP_UInt *dualSemicolon)
+     void* libGAP_ReadEvalFile()
+     void* libGAP_ReadEvalResult
+     bint libGAP_READ_ERROR()
+ 
+-cdef extern from "gap/scanner.h":
++cdef extern from <gap/scanner.h>:
+     void libGAP_ClearError()
+     libGAP_UInt libGAP_NrError
+     libGAP_UInt libGAP_Symbol
+@@ -212,12 +212,12 @@
+     int libGAP_S_SEMICOLON
+     int libGAP_S_EOF
+ 
+-cdef extern from "gap/gvars.h":
++cdef extern from <gap/gvars.h>:
+     libGAP_UInt libGAP_GVarName(char* name)
+     void libGAP_AssGVar(libGAP_UInt gvar, libGAP_Obj val)
+     libGAP_Obj libGAP_VAL_GVAR(libGAP_UInt gvar)
+ 
+-cdef extern from "gap/string.h":
++cdef extern from <gap/string.h>:
+     char* libGAP_CSTR_STRING(libGAP_Obj list)
+     int libGAP_GET_LEN_STRING(libGAP_Obj list)
+     bint libGAP_IS_STRING(libGAP_Obj obj)
+@@ -225,7 +225,7 @@
+     bint libGAP_ConvString(libGAP_Obj obj)
+     void libGAP_C_NEW_STRING(libGAP_Obj new_gap_string, int length, char* c_string)
+ 
+-cdef extern from "gap/gasman.h":
++cdef extern from <gap/gasman.h>:
+     void libGAP_InitGlobalBag(libGAP_Obj* addr, char* cookie)
+     libGAP_Obj libGAP_NewBag(libGAP_UInt type, libGAP_UInt size)
+     void libGAP_CHANGED_BAG(libGAP_Obj bag)
+@@ -257,7 +257,7 @@
+ cdef extern libGAP_Obj* libGAP_StopBags
+ cdef extern libGAP_Obj* libGAP_EndBags
+ 
+-cdef extern from "gap/ariths.h":
++cdef extern from <gap/ariths.h>:
+     libGAP_Obj libGAP_SUM (libGAP_Obj, libGAP_Obj)
+     libGAP_Obj libGAP_DIFF(libGAP_Obj, libGAP_Obj)
+     libGAP_Obj libGAP_PROD(libGAP_Obj, libGAP_Obj)
+@@ -278,30 +278,30 @@
+     bint libGAP_EQ(libGAP_Obj opL, libGAP_Obj opR)
+     bint libGAP_LT(libGAP_Obj opL, libGAP_Obj opR)
+ 
+-cdef extern from "gap/calls.h":
++cdef extern from <gap/calls.h>:
+     bint libGAP_IS_FUNC(libGAP_Obj)
+ 
+-cdef extern from "gap/plist.h":
++cdef extern from <gap/plist.h>:
+     libGAP_Obj libGAP_NEW_PLIST(int type, int len)
+     bint libGAP_IS_PLIST(libGAP_Obj lst)
+     int libGAP_LEN_PLIST(libGAP_Obj lst)
+     libGAP_Obj libGAP_ELM_PLIST(libGAP_Obj lst, int pos)
+ 
+-cdef extern from "gap/lists.h":
++cdef extern from <gap/lists.h>:
+     void libGAP_UNB_LIST(libGAP_Obj list, int pos)
+ 
+-cdef extern from "gap/listfunc.h":
++cdef extern from <gap/listfunc.h>:
+     void libGAP_AddList(libGAP_Obj list, libGAP_Obj obj)
+     void libGAP_AddPlist(libGAP_Obj list, libGAP_Obj obj)
+ 
+-cdef extern from "gap/records.h":
++cdef extern from <gap/records.h>:
+     char* libGAP_NAME_RNAM(libGAP_UInt rnam)
+     libGAP_UInt libGAP_RNamIntg(int i)
+     bint libGAP_IS_REC(libGAP_Obj obj)
+     libGAP_Obj libGAP_ELM_REC(libGAP_Obj rec, libGAP_UInt rnam)
+     libGAP_UInt libGAP_RNamName(libGAP_Char* name)
+ 
+-cdef extern from "gap/precord.h":
++cdef extern from <gap/precord.h>:
+     libGAP_Obj libGAP_NEW_PREC(int len)
+     int libGAP_LEN_PREC(libGAP_Obj rec)
+     int libGAP_GET_RNAM_PREC(libGAP_Obj rec, int i)
+@@ -311,14 +311,14 @@
+     bint libGAP_IsbPRec(libGAP_Obj rec, libGAP_UInt rnam)
+     libGAP_Obj libGAP_ElmPRec(libGAP_Obj rec, libGAP_UInt rnam)
+ 
+-cdef extern from "gap/cyclotom.h":
++cdef extern from <gap/cyclotom.h>:
+     pass
+ 
+-cdef extern from "gap/bool.h":
++cdef extern from <gap/bool.h>:
+     cdef libGAP_Obj libGAP_True
+     cdef libGAP_Obj libGAP_False
+ 
+-cdef extern from "gap/vars.h":
++cdef extern from <gap/vars.h>:
+      cdef int libGAP_T_LVARS
+      libGAP_Obj libGAP_BottomLVars
+ 
+--- a/sage/src/sage/libs/gap/test/main.c
++++ b/sage/src/sage/libs/gap/test/main.c
+@@ -1,14 +1,14 @@
+ #include <unistd.h>
+ #include <stdio.h>
+-#include "gap/libgap.h"
++#include <gap/libgap.h>
+ 
+-#include "gap/config.h"
+-#include "gap/system.h"
+-#include "gap/objects.h"
+-#include "gap/gasman.h"
+-#include "gap/code.h"
+-#include "gap/vars.h"
+-#include "gap/read.h"
++#include <gap/config.h>
++#include <gap/system.h>
++#include <gap/objects.h>
++#include <gap/gasman.h>
++#include <gap/code.h>
++#include <gap/vars.h>
++#include <gap/read.h>
+ 
+ extern char **environ;
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 4cb6be5..c4f08a3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,6 +6,7 @@ silence_ecl_opt_signals.patch
 sagedoc_avoid_exception.patch
 fixsage-mpfi.patch
 fixsage-sphinx.patch
+fixsage-libgap-systemwide.patch
 
 # due to us using a different version of a dependency than what Sage uses
 # we'll probably drop these when importing the next version of Sage
@@ -19,6 +20,7 @@ version-ipython-5.patch
 debian-paths.patch
 debian-maxima.patch
 debian-singular.patch
+debian-libgap-sage.patch
 debian-rubiks.patch
 debian-pari.patch
 debian-nauty.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git



More information about the debian-science-commits mailing list