[sagemath] 01/01: Dynamically get the multiarch path for Singular

Ximin Luo infinity0 at debian.org
Wed Oct 12 00:25:43 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 8296b496ed74ff13efb1374861699112dbb4f66c
Author: Ximin Luo <infinity0 at debian.org>
Date:   Wed Oct 12 02:22:22 2016 +0200

    Dynamically get the multiarch path for Singular
---
 debian/patches/debian-singular.patch | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/debian/patches/debian-singular.patch b/debian/patches/debian-singular.patch
index 12e3eb5..1274b92 100644
--- a/debian/patches/debian-singular.patch
+++ b/debian/patches/debian-singular.patch
@@ -1,7 +1,9 @@
 Description: Additional changes to work with the Debian package of singular
- This patch needs some more work, at least the hardcoded multiarch path
- of libsingular...
-
+Author: Tobias Hansen <thansen at debian.org>
+Author: Ximin Luo <infinity0 at debian.org>
+Forwarded: not-needed
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/sage/src/bin/sage
 +++ b/sage/src/bin/sage
 @@ -467,7 +467,7 @@
@@ -26,24 +28,35 @@ Description: Additional changes to work with the Debian package of singular
      new_lookup = re.compile("\* ([^:]*):*([^.]*)\..*")
 --- a/sage/src/sage/libs/singular/singular.pyx
 +++ b/sage/src/sage/libs/singular/singular.pyx
-@@ -771,7 +771,7 @@
+@@ -24,6 +24,7 @@
+     long INT_MIN
+ 
+ import os
++import sysconfig
+ 
+ from libc.stdint cimport int64_t
+ from sage.libs.singular.decl cimport *
+@@ -771,7 +772,7 @@
          extension = "so"
  
      # library name changed from libsingular to libSingular btw 3.x and 4.x
 -    lib = os.environ['SAGE_LOCAL']+"/lib/libSingular."+extension
-+    lib = "/usr/lib/x86_64-linux-gnu/libsingular-Singular.so"
++    lib = "/usr/lib/%s/libsingular-Singular.so" % sysconfig.get_config_var('MULTIARCH')
  
      if not os.path.exists(lib):
          raise ImportError("cannot locate Singular library ({})".format(lib))
 --- a/sage/src/sage/misc/cython.py
 +++ b/sage/src/sage/misc/cython.py
-@@ -306,8 +306,8 @@
+@@ -304,10 +304,10 @@
+     Before :trac:`12975`, it would have beeen needed to write ``#clang c++``,
+     but upper case ``C++`` has resulted in an error::
  
-         sage: code = [
+-        sage: code = [
++        sage: import sysconfig; code = [
          ... "#clang C++",
 -        ... "#cinclude %s/include/singular %s/include/factory"%(SAGE_LOCAL, SAGE_LOCAL),
 -        ... "#clib m readline Singular givaro ntl gmpxx gmp",
-+        ... "#cinclude /usr/include/singular /usr/include/singular/singular /usr/include/x86_64-linux-gnu/singular /usr/include/x86_64-linux-gnu/singular/singular",
++        ... "#cinclude /usr/include/singular /usr/include/singular/singular /usr/include/{0}/singular /usr/include/{0}/singular/singular".format(sysconfig.get_config_var('MULTIARCH')),
 +        ... "#clib m readline singular-Singular givaro ntl gmpxx gmp",
          ... "from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomial_libsingular",
          ... "from sage.libs.singular.polynomial cimport singular_polynomial_pow",

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