[arch-commits] Commit in sagemath/trunk (3 files)

Antonio Rojas arojas at archlinux.org
Mon Apr 9 18:11:10 UTC 2018


    Date: Monday, April 9, 2018 @ 18:11:09
  Author: arojas
Revision: 315453

ntl 11 rebuild, backport cython 0.28 build fixes

Added:
  sagemath/trunk/sagemath-cython-0.28c.patch
  sagemath/trunk/sagemath-lcalc-c++11.patch
Modified:
  sagemath/trunk/PKGBUILD

-----------------------------+
 PKGBUILD                    |   24 ++++++++++++++---
 sagemath-cython-0.28c.patch |   59 ++++++++++++++++++++++++++++++++++++++++++
 sagemath-lcalc-c++11.patch  |   10 +++++++
 3 files changed, 89 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-04-09 17:47:24 UTC (rev 315452)
+++ PKGBUILD	2018-04-09 18:11:09 UTC (rev 315453)
@@ -9,7 +9,7 @@
 pkgbase=sagemath
 pkgname=(sagemath sagemath-jupyter)
 pkgver=8.1
-pkgrel=11
+pkgrel=12
 pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
 arch=(x86_64)
 url="http://www.sagemath.org"
@@ -39,8 +39,12 @@
         r-no-readline.patch fes02.patch sagemath-threejs.patch pari-stackwarn.patch
         sagemath-detect-igraph.patch sagemath-networkx2.patch sagemath-linbox-1.5.patch sagemath-pynac-0.7.14.patch
         sagemath-matplotlib2.patch sagemath-scipy-1.0.patch sagemath-lrs.patch sagemath-ipython-prompt.patch
-        sagemath-singular-4.1.1.patch
-        sagemath-cython-source.patch::"https://github.com/sagemath/sage/commit/fccaf230.patch")
+        sagemath-singular-4.1.1.patch sagemath-lcalc-c++11.patch
+        sagemath-cython-source.patch::"https://github.com/sagemath/sage/commit/fccaf230.patch"
+        sagemath-cython-0.28a.patch::"https://github.com/sagemath/sage/commit/348432f7.patch"
+        sagemath-cython-0.28b.patch::"https://github.com/sagemath/sage/commit/609a04de.patch"
+        sagemath-cython-0.28c.patch
+        sagemath-cython-0.28d.patch::"https://github.com/sagemath/sage/commit/c331d9bb.patch")
 sha256sums=('a42b55c2c8ac244535dc9b87171b7d4dd7e1d498099518ab253354fbe2eaaa7b'
             '9593f49ac3f73bc7106f661bdaa484d22c12b889964986f5a99b75a605a2359b'
             'c41ae665499c6cd775d40bbe178f8786830b0931ee26bf11ee02f7d83bcc8107'
@@ -61,7 +65,12 @@
             'c0f65534a845ba802de6196229159fe67fcc3f72f0cb1ce57d4ae5c9fe10282c'
             '937a0081e7aea56bda645ef5f0d34b8e356acd62a7dd128a35163f46e7836131'
             'cc679321c2968d5e74b0ec060979c74019df2995857906bdd1397695b1f24c5c'
-            '447a616937e5c43da5f72aeb186fb649e2b3756f7683967380c66b9b1448875e')
+            '5114c912f821900e5bfae1e2cfeb7984de946d0b23e1182b0bf15be1d803dfd0'
+            '447a616937e5c43da5f72aeb186fb649e2b3756f7683967380c66b9b1448875e'
+            '8b88c72495c47c400a63cd2c6b3998cd6de649f653b6f5acbd506e2fc158f062'
+            '6deaa988737f670f27f174c838501248004d9ce029c29d3e643a93cd1c500894'
+            '7cfca93a35bc0ad4608286fae477195c7bee94787a3655021e55055d0adfe224'
+            'a46f60c3df77f95e9b0e65573a281d6f9980b218a9dbea1417fa51ea7af2558d')
 
 prepare(){
   cd sage-$pkgver
@@ -100,6 +109,8 @@
   patch -p1 -i ../sagemath-ipython-prompt.patch
 # fix build with Singular 4.1.1
   patch -p1 -i ../sagemath-singular-4.1.1.patch
+# don't force c++98 for lcalc (fixes build with NTL 11)
+  patch -p1 -i ../sagemath-lcalc-c++11.patch
 
 # Upstream patches  
 # fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
@@ -112,6 +123,11 @@
   patch -p1 -i ../sagemath-matplotlib2.patch
 # install cython source files https://trac.sagemath.org/24690
   patch -p1 -i ../sagemath-cython-source.patch
+# fix build with cython 0.28
+  patch -p1 -i ../sagemath-cython-0.28a.patch
+  patch -p1 -i ../sagemath-cython-0.28b.patch
+  patch -p1 -i ../sagemath-cython-0.28c.patch
+  patch -p1 -i ../sagemath-cython-0.28d.patch
 
 # use python2
   sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|\<exec python\>|exec python2|' -i src/bin/*

Added: sagemath-cython-0.28c.patch
===================================================================
--- sagemath-cython-0.28c.patch	                        (rev 0)
+++ sagemath-cython-0.28c.patch	2018-04-09 18:11:09 UTC (rev 315453)
@@ -0,0 +1,59 @@
+From e9efe88316733178b9330b21eee2c207f01132fd Mon Sep 17 00:00:00 2001
+From: Jeroen Demeyer <jdemeyer at cage.ugent.be>
+Date: Tue, 6 Mar 2018 12:43:46 +0100
+Subject: [PATCH 2/2] Use late includes
+
+---
+ src/sage_setup/autogen/interpreters/generator.py | 26 ------------------------
+ src/setup.py                                     |  1 +
+ 2 files changed, 1 insertion(+), 26 deletions(-)
+
+diff --git a/src/sage_setup/autogen/interpreters/generator.py b/src/sage_setup/autogen/interpreters/generator.py
+index feefd9ee2f3..d1db4557784 100644
+--- a/src/sage_setup/autogen/interpreters/generator.py
++++ b/src/sage_setup/autogen/interpreters/generator.py
+@@ -277,32 +277,6 @@ def write_interpreter(self, write):
+             /* {{ warn }} */
+             #include <Python.h>
+ 
+-            /* Some interpreter files (for example interp_el.c) need access
+-             * to functions defined in the Cython wrapper. This is done by
+-             * including a file wrapper_X.h which is auto-generated by
+-             * Cython. It contains declarations for functions declared in
+-             * wrapper_X.pyx as cdef public. Including wrapper_X.h allows
+-             * interp_X.c to call those functions.
+-             *
+-             * The file interp_X.c is in turn included by wrapper_X.c,
+-             * which is the compilation of wrapper_X.pyx.
+-             *
+-             * Now, for some reason, Cython puts include guards in wrapper_X.h
+-             * and it also defines those guards in the wrapper_X.c file.
+-             * This way, including the wrapper_X.h file from the wrapper_X.c file
+-             * (indirectly through interp_X.c) has no effect. But we really want
+-             * that header file to be included, so we #undef those include guards.
+-             * This way, the functions will be declared twice (once in wrapper_X.h
+-             * and once in wrapper_X.c) but that is legal in C.
+-             *
+-             * See https://trac.sagemath.org/ticket/21459 for why this hack is
+-             * needed. If Cython merges https://github.com/cython/cython/pull/1650
+-             * this hack could be replaced by using a late include for
+-             * cdef extern from "sage/ext/interpreters/interp_{{ s.name }}.c"
+-             */
+-            #undef __PYX_HAVE__sage__ext__interpreters__wrapper_{{ s.name }}
+-            #undef __PYX_HAVE_API__sage__ext__interpreters__wrapper_{{ s.name }}
+-
+             {% print(s.c_header) %}
+ 
+             {{ myself.func_header() }} {
+diff --git a/src/setup.py b/src/setup.py
+index 5abd6dc5939..b706310a1de 100755
+--- a/src/setup.py
++++ b/src/setup.py
+@@ -284,6 +284,7 @@ def finalize_options(self):
+             cdivision=True,
+             embedsignature=True,
+             fast_getattr=True,
++            preliminary_late_includes_cy28=True,
+             profile=self.profile,
+         )
+         self.compile_time_env = dict(

Added: sagemath-lcalc-c++11.patch
===================================================================
--- sagemath-lcalc-c++11.patch	                        (rev 0)
+++ sagemath-lcalc-c++11.patch	2018-04-09 18:11:09 UTC (rev 315453)
@@ -0,0 +1,10 @@
+--- a/src/sage/libs/lcalc/lcalc_Lfunction.pxd
++++ b/src/sage/libs/lcalc/lcalc_Lfunction.pxd
+@@ -1,6 +1,5 @@
+ # Lcalc requires GNU extensions, it does not strictly conform to any
+ # C++ standard: https://trac.sagemath.org/ticket/23341
+-# distutils: extra_compile_args = -std=gnu++98
+ 
+ cdef extern from "lcalc_sage.h":
+     ctypedef struct doublevec "std::vector<double>":
+



More information about the arch-commits mailing list