[sagemath] 01/01: Update Debian build, still breaking though

Ximin Luo infinity0 at debian.org
Mon Mar 7 20:49:46 UTC 2016


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

infinity0 pushed a commit to branch master
in repository sagemath.

commit 758ab1f4fbe397e99f7b0f8398e063f1adc79ead
Author: Ximin Luo <infinity0 at debian.org>
Date:   Mon Mar 7 21:48:06 2016 +0100

    Update Debian build, still breaking though
    
    - use system librw
    - use system cddlib properly
    - *don't* use system singular paths and be consistent about this
      - don't patch upstream singular include paths away from SAGE_LOCAL
    - update build-deps
---
 debian/control                      |  4 ++-
 debian/patches/rw-spkg.patch        |  4 +++
 debian/patches/series               |  3 ++
 debian/patches/singular_build.patch | 58 ++++++++++++++++++++++++++++++++
 debian/patches/unbreak.patch        | 67 ++++++-------------------------------
 debian/pruner/configure.ac          |  4 +--
 6 files changed, 80 insertions(+), 60 deletions(-)

diff --git a/debian/control b/debian/control
index 43ab066..0285b12 100644
--- a/debian/control
+++ b/debian/control
@@ -26,7 +26,7 @@ Build-Depends:
  libatlas-base-dev,
  libblas-dev,
  libboost-dev (>= 1.55),
- libcdd-dev (>= 094g-4),
+ libcdd-dev (>= 094h-1),
  libcliquer-dev,
  libec-dev (>= 0.0.2012.02.01),
  libecm-dev,
@@ -63,6 +63,7 @@ Build-Depends:
  libpynac-dev (>= 0.2.6),
  libratpoints-dev,
  libreadline-dev,
+ librw-dev,
  libsqlite3-dev,
  libsymmetrica-dev,
  libtachyon-dev,
@@ -71,6 +72,7 @@ Build-Depends:
  maxima-doc,
  maxima-share,
  palp (>= 2.1-2),
+ pari-doc,
  pari-galdata,
  pari-seadata,
  python2.7-dev,
diff --git a/debian/patches/rw-spkg.patch b/debian/patches/rw-spkg.patch
new file mode 100644
index 0000000..ed227d7
--- /dev/null
+++ b/debian/patches/rw-spkg.patch
@@ -0,0 +1,4 @@
+--- /dev/null
++++ b/sage/build/pkgs/rw/package-version.txt
+@@ -0,0 +1 @@
++0.7
diff --git a/debian/patches/series b/debian/patches/series
index 0cc0ac3..5e3cc33 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,8 @@ unbreak.patch
 trac_17872.patch
 maxima.patch
 remove_singular_warning.patch
+# TODO: not yet using Debian/system singular; uncomment when we do
+#singular_build.patch
 singular_doc.patch
 python_security.patch
 silent_debian_bug_780186.patch
@@ -12,3 +14,4 @@ rubiks_executables_renames.patch
 python_installs_in_userdir.patch
 pari.patch
 spkg_ipython_fix.patch
+rw-spkg.patch
diff --git a/debian/patches/singular_build.patch b/debian/patches/singular_build.patch
new file mode 100644
index 0000000..8cb7361
--- /dev/null
+++ b/debian/patches/singular_build.patch
@@ -0,0 +1,58 @@
+--- a/sage/src/bin/sage
++++ b/sage/src/bin/sage
+@@ -395,7 +395,7 @@
+ 
+ if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
+     shift
+-    exec singular "$@"
++    exec Singular "$@"
+ fi
+ 
+ if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then
+--- a/sage/src/sage/interfaces/singular.py
++++ b/sage/src/sage/interfaces/singular.py
+@@ -2148,7 +2148,7 @@
+     nodes.clear()
+     node_names.clear()
+ 
+-    singular_docdir = os.environ["SAGE_LOCAL"]+"/share/singular/"
++    singular_docdir = "/usr/share/singular-3-1-6/info/"
+ 
+     new_node = re.compile("File: singular\.hlp,  Node: ([^,]*),.*")
+     new_lookup = re.compile("\* ([^:]*):*([^.]*)\..*")
+--- a/sage/src/sage/libs/singular/singular.pyx
++++ b/sage/src/sage/libs/singular/singular.pyx
+@@ -712,15 +712,13 @@
+ 
+     cdef void *handle = NULL
+ 
+-    for extension in ["so", "dylib", "dll"]:
+-        lib = os.environ['SAGE_LOCAL']+"/lib/libsingular."+extension
+-        if os.path.exists(lib):
+-            handle = dlopen(lib, RTLD_GLOBAL|RTLD_LAZY)
+-            if not handle:
+-                err = dlerror()
+-                if err:
+-                    print err
+-            break
++    lib = "/usr/lib/libsingular.so"
++    if os.path.exists(lib):
++        handle = dlopen(lib, RTLD_GLOBAL|RTLD_LAZY)
++        if not handle:
++            err = dlerror()
++            if err:
++                print err
+ 
+     if handle == NULL:
+         raise ImportError, "cannot load libSINGULAR library"
+--- a/sage/src/sage/misc/cython.py
++++ b/sage/src/sage/misc/cython.py
+@@ -336,7 +336,7 @@
+ 
+         sage: code = [
+         ... "#clang C++",
+-        ... "#cinclude %s/include/singular %s/include/factory"%(SAGE_LOCAL, SAGE_LOCAL),
++        ... "#cinclude /usr/include/singular /usr/include/factory",
+         ... "#clib m readline singular givaro ntl gmpxx gmp",
+         ... "from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomial_libsingular",
+         ... "from sage.libs.singular.polynomial cimport singular_polynomial_pow",
diff --git a/debian/patches/unbreak.patch b/debian/patches/unbreak.patch
index 385bd15..c5395e4 100644
--- a/debian/patches/unbreak.patch
+++ b/debian/patches/unbreak.patch
@@ -38,15 +38,6 @@
  
      # Display the startup banner
      if [ "$SAGE_BANNER" != "no" ]; then
-@@ -395,7 +395,7 @@
- 
- if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
-     shift
--    exec singular "$@"
-+    exec Singular "$@"
- fi
- 
- if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then
 --- a/sage/src/bin/sage-env
 +++ b/sage/src/bin/sage-env
 @@ -247,8 +247,8 @@
@@ -202,17 +193,6 @@
  
  first_try = True
  
---- a/sage/src/sage/interfaces/singular.py
-+++ b/sage/src/sage/interfaces/singular.py
-@@ -2148,7 +2148,7 @@
-     nodes.clear()
-     node_names.clear()
- 
--    singular_docdir = os.environ["SAGE_LOCAL"]+"/share/singular/"
-+    singular_docdir = "/usr/share/singular-3-1-6/info/"
- 
-     new_node = re.compile("File: singular\.hlp,  Node: ([^,]*),.*")
-     new_lookup = re.compile("\* ([^:]*):*([^.]*)\..*")
 --- a/sage/src/sage/libs/gap/util.pyx
 +++ b/sage/src/sage/libs/gap/util.pyx
 @@ -156,7 +156,7 @@
@@ -224,31 +204,6 @@
      if os.path.exists(gapdir):
          return gapdir
      print 'The gap-4.5.5.spkg (or later) seems to be not installed!'
---- a/sage/src/sage/libs/singular/singular.pyx
-+++ b/sage/src/sage/libs/singular/singular.pyx
-@@ -712,15 +712,13 @@
- 
-     cdef void *handle = NULL
- 
--    for extension in ["so", "dylib", "dll"]:
--        lib = os.environ['SAGE_LOCAL']+"/lib/libsingular."+extension
--        if os.path.exists(lib):
--            handle = dlopen(lib, RTLD_GLOBAL|RTLD_LAZY)
--            if not handle:
--                err = dlerror()
--                if err:
--                    print err
--            break
-+    lib = "/usr/lib/libsingular.so"
-+    if os.path.exists(lib):
-+        handle = dlopen(lib, RTLD_GLOBAL|RTLD_LAZY)
-+        if not handle:
-+            err = dlerror()
-+            if err:
-+                print err
- 
-     if handle == NULL:
-         raise ImportError, "cannot load libSINGULAR library"
 --- a/sage/src/sage/misc/cython.py
 +++ b/sage/src/sage/misc/cython.py
 @@ -68,9 +68,9 @@
@@ -264,15 +219,6 @@
                  os.path.join(SAGE_SRC,'sage','ext'), \
                  os.path.join(SAGE_SRC), \
                  os.path.join(SAGE_SRC,'sage','gsl')]
-@@ -336,7 +336,7 @@
- 
-         sage: code = [
-         ... "#clang C++",
--        ... "#cinclude %s/include/singular %s/include/factory"%(SAGE_LOCAL, SAGE_LOCAL),
-+        ... "#cinclude /usr/include/singular /usr/include/factory",
-         ... "#clib m readline singular givaro ntl gmpxx gmp",
-         ... "from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomial_libsingular",
-         ... "from sage.libs.singular.polynomial cimport singular_polynomial_pow",
 @@ -435,7 +435,7 @@
      file_list = []
      for fname in additional_source_files:
@@ -359,7 +305,16 @@
      for path in libgap.eval('GAP_ROOT_PATHS').sage():
 --- a/sage/src/setup.py
 +++ b/sage/src/setup.py
-@@ -139,9 +139,9 @@
+@@ -38,6 +38,8 @@
+ # search for dependencies and add to gcc -I<path>
+ import numpy
+ include_dirs = [SAGE_INC,
++                os.path.join(SAGE_INC, 'factory'),
++                os.path.join(SAGE_INC, 'singular'),
+                 SAGE_SRC,
+                 os.path.join(SAGE_SRC, 'c_lib', 'include'),
+                 os.path.join(SAGE_SRC, 'sage', 'ext'),
+@@ -139,9 +141,9 @@
  # (that are likely to change on an upgrade) here:
  # [At least at the moment. Make sure the headers aren't copied with "-p",
  # or explicitly touch them in the respective spkg's spkg-install.]
@@ -372,7 +327,7 @@
                }
  
  # In the loop below, don't append to any list, since many of these
-@@ -167,7 +167,7 @@
+@@ -167,7 +169,7 @@
  
      m.extra_compile_args = m.extra_compile_args + extra_compile_args
      m.extra_link_args = m.extra_link_args + extra_link_args
diff --git a/debian/pruner/configure.ac b/debian/pruner/configure.ac
index a8b094f..c8f8eef 100644
--- a/debian/pruner/configure.ac
+++ b/debian/pruner/configure.ac
@@ -28,9 +28,7 @@ AC_CHECK_PROG(HAS_BZIP2, bzip2, "True", "False")
 AC_SUBST(HAS_BZIP2)
 
 AC_CHECK_PROG(HAS_CDDLIB, cdd_both_reps, "True", "False")
-if test "x${HAS_CDDLIB}" = "xTrue"; then
-  AC_CHECK_HEADER(cdd/setoper.h, HAS_CDDLIB="True", HAS_CDDLIB="False")
-fi
+AC_CHECK_HEADER(cdd/setoper.h, HAS_CDDLIB="True", HAS_CDDLIB="False")
 AC_SUBST(HAS_CDDLIB)
 
 # FIXME(cephes): we shouldn't need it

-- 
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