summaryrefslogtreecommitdiff
path: root/libre/sagemath/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/sagemath/PKGBUILD')
-rw-r--r--libre/sagemath/PKGBUILD45
1 files changed, 23 insertions, 22 deletions
diff --git a/libre/sagemath/PKGBUILD b/libre/sagemath/PKGBUILD
index ce369c9e8..ec9b1d19c 100644
--- a/libre/sagemath/PKGBUILD
+++ b/libre/sagemath/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 143765 2015-10-12 11:53:35Z arojas $
+# $Id: PKGBUILD 144931 2015-10-24 18:28:03Z 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,7 +11,7 @@
pkgname=sagemath
pkgver=6.9
-pkgrel=2.parabola1
+pkgrel=3.parabola1
pkgdesc="Free Mathematics Software, free software replacement of Magma, Maple, Mathematica, and Matlab, without nonfree nauty recommendation"
arch=(i686 x86_64)
url="http://www.sagemath.org"
@@ -32,22 +32,27 @@ conflicts=(sage-mathematics)
replaces=(sage-mathematics)
provides=(sage-mathematics)
source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
-# "http://www.sagemath.org/packages/upstream/pexpect/pexpect-2.0.tar.bz2"
-"http://mirrors.mit.edu/sage/spkg/upstream/pexpect/pexpect-2.0.tar.bz2" 'kernel.json'
-'anal.h' 'package.patch' 'env.patch' 'paths.patch' 'clean.patch' 'skip-check.patch'
-'pexpect-env.patch' 'pexpect-del.patch' 'disable-fes.patch')
+ "http://mirrors.mit.edu/sage/spkg/upstream/pexpect/pexpect-2.0.tar.bz2"
+ 'anal.h' 'package.patch' 'env.patch' 'paths.patch' 'clean.patch' 'skip-check.patch'
+ 'pexpect-env.patch' 'pexpect-del.patch' 'disable-fes.patch' 'jupyter-path.patch'
+ pari-sage-2.8.1813.patch::"http://git.sagemath.org/sage.git/patch/?id=c1f5aa26e"
+ jupyter-kernel.patch::"http://git.sagemath.org/sage.git/patch/?id=4f06d3df"
+ relative-links.patch::"http://git.sagemath.org/sage.git/patch/src/sage/repl/ipython_kernel/kernel.py?id=52a717a7")
md5sums=('847ad447eaef17b2bc81bb4fae69c190'
'd9a3e113ed147dcee8f89962a8dccd43'
- '4cee4f96bcd877587e7efc40c20adba7'
'a906a180d198186a39820b0a2f9a9c63'
'9ba81f717ffd4e20b8b2f2a318307488'
- '5ebdb6e6ac541f040a39f8d3fd9c8ee1'
+ 'e1b1d0d2e6b187309ae2b74489356b9a'
'fd8e3e07f5b7318e6a7200a3c64f5bc2'
'23e972753be1e5d0f761a7f82a95cebf'
'5947a420a0b1483f0cbc74c76895789b'
'a83a3b1bc7fcb7cbf752a83a8311fc42'
'f333939ea6c41377b66407c81016cee4'
- '4eb23a3c7363258bc9ba764d6e5512ba')
+ '4eb23a3c7363258bc9ba764d6e5512ba'
+ '16b529194c6105c3364127bd8f1efa83'
+ '01229c3dabbb5fe13348d8c8c31da710'
+ 'f91e760a251fe1042fa9f2aad68b6b02'
+ 'fe3c5ef5b30a19c632d7fad0ee58c7c4')
prepare(){
cd sage-$pkgver
@@ -74,14 +79,19 @@ prepare(){
-i src/sage/databases/cremona.py
# find bliss headers
sed -e 's|graph.hh|bliss/graph.hh|' -i src/sage/graphs/bliss.pyx
-# fix opening docs from Jupyter notebook
- sed -e "s|SageKernelSpec.identifier()|'SageMath'|g" -i src/sage/repl/ipython_kernel/kernel.py
# Upstream patches
# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
# patch -p0 -i "$srcdir"/fes02.patch
# disable fes module, fails to compile
patch -p0 -i ../disable-fes.patch
+# port to pari-sage 2.8.1813
+ patch -p1 -i ../pari-sage-2.8.1813.patch
+# install jupyter kernel
+ patch -p1 -i ../relative-links.patch
+ patch -p1 -i ../jupyter-kernel.patch
+# set jupyter path
+ patch -p0 -i ../jupyter-path.patch
# use python2
sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|exec python|exec python2|' -i src/bin/*
@@ -129,6 +139,7 @@ package() {
export SAGE_ROOT="/usr"
export SAGE_LOCAL="$SAGE_ROOT"
export SAGE_SRC="$PWD"
+ export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
@@ -146,21 +157,11 @@ package() {
cp -r ext "$pkgdir"/usr/share/sage
# Create SAGE_SRC, needed for the notebook
- mkdir "$pkgdir"/usr/share/sage/src
+ mkdir "$pkgdir"/usr/share/sage/source
# Install Sage's own pexpect
cd "$srcdir"/pexpect-2.0
python2 setup.py install --root="$pkgdir" --optimize=1
mkdir -p "$pkgdir"/usr/lib/sage/site-packages/
mv "$pkgdir"/usr/lib/python2.7/site-packages/pexpect* "$pkgdir"/usr/lib/sage/site-packages/
-
-# Install Jupyter kernel
- install -Dm644 "$srcdir"/kernel.json "$pkgdir"/usr/share/jupyter/kernels/sagemath/kernel.json
- cd "$pkgdir"/usr/share/jupyter/kernels/sagemath
- ln -s /usr/share/doc/sage/output/html/en doc
- ln -s /usr/share/sage/ext/notebook-ipython/logo.svg .
- ln -s /usr/share/sage/ext/notebook-ipython/logo-64x64.png .
-
- mkdir "$pkgdir"/usr/share/jupyter/nbextensions
- ln -s /usr/share/{jsmol,mathjax} "$pkgdir"/usr/share/jupyter/nbextensions
}