summaryrefslogtreecommitdiff
path: root/libre/sagemath
diff options
context:
space:
mode:
Diffstat (limited to 'libre/sagemath')
-rw-r--r--libre/sagemath/PKGBUILD15
-rw-r--r--libre/sagemath/pynac-0.7.1.patch42
-rw-r--r--libre/sagemath/sagemath-cython0.25.patch114
3 files changed, 165 insertions, 6 deletions
diff --git a/libre/sagemath/PKGBUILD b/libre/sagemath/PKGBUILD
index bd758902e..e720ec07f 100644
--- a/libre/sagemath/PKGBUILD
+++ b/libre/sagemath/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 196368 2016-11-20 12:14:08Z arojas $
+# $Id: PKGBUILD 196873 2016-11-25 20:11:55Z arojas $
# Maintainer (Arch): Evgeniy Alekseev <arcanis.arch at gmail dot com>
# Maintainer (Arch): Antonio Rojas <arojas@archlinux.org>
# Contributor (Arch): Daniel Wallace <danielwallace at gtmanfred dot com>
@@ -11,12 +11,12 @@
pkgname=sagemath
pkgver=7.4
-pkgrel=8.parabola1
+pkgrel=11.parabola1
pkgdesc="Free Mathematics Software, free software replacement of Magma, Maple, Mathematica, and Matlab, without nonfree nauty support"
arch=(i686 x86_64 armv7h)
url="http://www.sagemath.org"
license=(GPL)
-depends=(ipython2 ppl palp brial singular cliquer maxima-ecl gfan sympow tachyon python2-rpy2 python2-fpylll
+depends=(ipython2 ppl palp brial cliquer maxima-ecl gfan sympow tachyon python2-rpy2 python2-fpylll
python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-future libgap flintqs lcalc lrcalc arb
eclib gmp-ecm zn_poly gd python2-cvxopt pynac linbox rubiks pari-galdata pari-seadata-small planarity rankwidth
sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials)
@@ -38,7 +38,7 @@ provides=(sage-mathematics)
source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
env.patch skip-check.patch cython-sys-path.patch is-package-installed.patch package.patch disable-fes.patch
jupyter-path.patch test-optional.patch python-2.7.11.patch ecm-7.patch increase-rtol.patch sagemath-singular4.patch
- sagemath-cython0.25.patch)
+ sagemath-cython0.25.patch pynac-0.7.1.patch)
md5sums=('8311ee35a309dbc668b5148795211254'
'784ba3fca83f24ed0bbf62e01fa4e967'
'6cafcb381437d4751fd55b25d5090987'
@@ -52,7 +52,8 @@ md5sums=('8311ee35a309dbc668b5148795211254'
'0c9a57d35de80c2cd418ebec912efbbb'
'39d3fded716d2a7ae0ab03e0896b7497'
'4bd7305e8b69add8356f9751470cf587'
- '0ba2b4266f14b19319ece3996be70511')
+ 'e76faa070a490de97818762ba340d9dc'
+ '32da930dcb7c4718acf0188e090c07b9')
prepare(){
cd sage-$pkgver
@@ -92,11 +93,13 @@ prepare(){
patch -p1 -i ../sagemath-singular4.patch
# fix build with cython 0.25
patch -p1 -i ../sagemath-cython0.25.patch
+# port to pynac 0.7.1
+ patch -p1 -i ../pynac-0.7.1.patch
# use python2
sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|exec python|exec python2|' -i src/bin/*
sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
- sed -e 's|exec ipython|exec ipython2|' -e 's|cygdb|cygdb2|' -i src/bin/sage
+ sed -e 's|exec ipython|exec ipython2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage
sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython
sed -e 's|python -c|python2 -c|' -i src/generate_py_source.mk
sed -e 's|bin/python|bin/python2|g' -i src/bin/sage-env
diff --git a/libre/sagemath/pynac-0.7.1.patch b/libre/sagemath/pynac-0.7.1.patch
new file mode 100644
index 000000000..d0b1e2aee
--- /dev/null
+++ b/libre/sagemath/pynac-0.7.1.patch
@@ -0,0 +1,42 @@
+--- sage-7.4/src/sage/symbolic/constants_c.pyx.orig 2016-11-25 09:34:32.665044510 +0000
++++ sage-7.4/src/sage/symbolic/constants_c.pyx 2016-11-25 09:38:13.777888000 +0000
+@@ -60,6 +60,8 @@
+ self.pointer = <GConstant *>&g_Catalan
+ elif self._name == "euler_gamma":
+ self.pointer = <GConstant *>&g_Euler
++ elif self._name == "NaN":
++ self.pointer = <GConstant *>&g_NaN
+ else:
+ GConstant_construct(&self.object, name, texname, domain)
+ self.pointer = &self.object
+--- sage-7.4/src/sage/symbolic/ginac.pxd.orig 2016-11-25 09:34:06.145103155 +0000
++++ sage-7.4/src/sage/symbolic/ginac.pxd 2016-11-25 09:37:14.294686607 +0000
+@@ -216,6 +216,7 @@
+ GEx g_Pi "Pi"
+ GEx g_Catalan "Catalan"
+ GEx g_Euler "Euler"
++ GEx g_NaN "NaN"
+
+ GConstant* GConstant_construct(void *mem, char* name, char* texname, unsigned domain)
+ bint is_a_constant "is_a<constant>" (GEx e)
+@@ -293,13 +294,13 @@
+ void g_list_symbols "list_symbols" (GEx e, GExSet s)
+
+ # more is_a tests
+- bint is_a_add "is_a<add>" (GEx e)
+- bint is_a_mul "is_a<mul>" (GEx e)
+- bint is_a_power "is_a<power>" (GEx e)
+- bint is_a_fderivative "is_a<fderivative>" (GEx e)
+- bint is_a_function "is_a<function>" (GEx e)
+- bint is_exactly_a_function "is_exactly_a<function>" (GEx e)
+- bint is_a_ncmul "is_a<ncmul>" (GEx e)
++ bint is_a_add "is_a<GiNaC::add>" (GEx e)
++ bint is_a_mul "is_a<GiNaC::mul>" (GEx e)
++ bint is_a_power "is_a<GiNaC::power>" (GEx e)
++ bint is_a_fderivative "is_a<GiNaC::fderivative>" (GEx e)
++ bint is_a_function "is_a<GiNaC::function>" (GEx e)
++ bint is_exactly_a_function "is_exactly_a<GiNaC::function>" (GEx e)
++ bint is_a_ncmul "is_a<GiNaC::ncmul>" (GEx e)
+
+ # Arithmetic
+ int ginac_error()
diff --git a/libre/sagemath/sagemath-cython0.25.patch b/libre/sagemath/sagemath-cython0.25.patch
index b6bcfa5ef..6c88fc0b5 100644
--- a/libre/sagemath/sagemath-cython0.25.patch
+++ b/libre/sagemath/sagemath-cython0.25.patch
@@ -1,3 +1,117 @@
+From 77eb8e2a40d97d49df24793736a8d9feef485322 Mon Sep 17 00:00:00 2001
+From: Jeroen Demeyer <jdemeyer@cage.ugent.be>
+Date: Tue, 13 Sep 2016 14:47:46 +0200
+Subject: [PATCH 1/2] Move old_style_globals to individual modules
+
+---
+ src/sage/calculus/var.pyx | 2 ++
+ src/sage/ext/interactive_constructors_c.pyx | 1 +
+ src/sage/misc/citation.pyx | 5 ++++-
+ src/sage/misc/fpickle.pyx | 1 +
+ src/sage/misc/reset.pyx | 5 ++++-
+ src/sage/misc/sage_timeit_class.pyx | 4 ++--
+ src/sage/structure/category_object.pyx | 1 +
+ src/sage/structure/sage_object.pyx | 1 +
+ src/setup.py | 4 ----
+ 9 files changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/src/sage/calculus/var.pyx b/src/sage/calculus/var.pyx
+index b11b111..0a18f68 100644
+--- a/src/sage/calculus/var.pyx
++++ b/src/sage/calculus/var.pyx
+@@ -1,6 +1,8 @@
++# cython: old_style_globals=True
+ """
+ Symbolic variables
+ """
++
+ from sage.symbolic.function_factory import function as new_function
+ from sage.symbolic.ring import SR
+
+diff --git a/src/sage/ext/interactive_constructors_c.pyx b/src/sage/ext/interactive_constructors_c.pyx
+index 321e368..a9b9bea 100644
+--- a/src/sage/ext/interactive_constructors_c.pyx
++++ b/src/sage/ext/interactive_constructors_c.pyx
+@@ -1,3 +1,4 @@
++# cython: old_style_globals=True
+ r"""
+ Constructors that automatically inject variables into the global module scope
+ """
+diff --git a/src/sage/misc/citation.pyx b/src/sage/misc/citation.pyx
+index 77454aa..2053074 100644
+--- a/src/sage/misc/citation.pyx
++++ b/src/sage/misc/citation.pyx
+@@ -1,4 +1,7 @@
+-"Dependency usage tracking for citations"
++# cython: old_style_globals=True
++"""
++Dependency usage tracking for citations
++"""
+
+ from sage.misc.all import tmp_filename
+ from sage.env import SAGE_ROOT
+diff --git a/src/sage/misc/fpickle.pyx b/src/sage/misc/fpickle.pyx
+index 79520b1..c6d0d74 100644
+--- a/src/sage/misc/fpickle.pyx
++++ b/src/sage/misc/fpickle.pyx
+@@ -1,3 +1,4 @@
++# cython: old_style_globals=True
+ """
+ Function pickling
+
+diff --git a/src/sage/misc/reset.pyx b/src/sage/misc/reset.pyx
+index bd6bc78..bd7c94b 100644
+--- a/src/sage/misc/reset.pyx
++++ b/src/sage/misc/reset.pyx
+@@ -1,4 +1,7 @@
+-"Interpreter reset"
++# cython: old_style_globals=True
++"""
++Interpreter reset
++"""
+
+ import sys
+
+diff --git a/src/sage/misc/sage_timeit_class.pyx b/src/sage/misc/sage_timeit_class.pyx
+index 4c369f8..82f421f 100644
+--- a/src/sage/misc/sage_timeit_class.pyx
++++ b/src/sage/misc/sage_timeit_class.pyx
+@@ -1,3 +1,5 @@
++# This is here in Cython so we can access the interpreter globals
++# cython: old_style_globals=True
+ """
+ The ``timeit`` command
+
+@@ -5,8 +7,6 @@ This uses the function :func:`~sage.misc.sage_timeit.sage_timeit`.
+ """
+ from __future__ import absolute_import
+
+-# This is here in Cython so we can get the interpreter globals
+-
+ from . import sage_timeit
+
+
+diff --git a/src/sage/structure/category_object.pyx b/src/sage/structure/category_object.pyx
+index d9ef9c5..97930d3 100644
+--- a/src/sage/structure/category_object.pyx
++++ b/src/sage/structure/category_object.pyx
+@@ -1,3 +1,4 @@
++# cython: old_style_globals=True
+ r"""
+ Base class for objects of a category
+
+diff --git a/src/sage/structure/sage_object.pyx b/src/sage/structure/sage_object.pyx
+index c931a64..4caf4ae 100644
+--- a/src/sage/structure/sage_object.pyx
++++ b/src/sage/structure/sage_object.pyx
+@@ -1,4 +1,5 @@
+ # -*- encoding: utf-8 -*-
++# cython: old_style_globals=True
+ r"""
+ Abstract base class for Sage objects
+ """
+diff --git a/src/setup.py b/src/setup.py
+index c26639d..f094700 100755
--- a/src/setup.py 2016-11-05 19:34:44.701025334 +0000
+++ b/src/setup.py 2016-11-05 19:46:00.706210289 +0000
@@ -562,16 +562,6 @@