summaryrefslogtreecommitdiff
path: root/libre/sagemath/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/sagemath/PKGBUILD')
-rw-r--r--libre/sagemath/PKGBUILD24
1 files changed, 19 insertions, 5 deletions
diff --git a/libre/sagemath/PKGBUILD b/libre/sagemath/PKGBUILD
index 199bb1d0a..872ceceb7 100644
--- a/libre/sagemath/PKGBUILD
+++ b/libre/sagemath/PKGBUILD
@@ -11,7 +11,7 @@
pkgname=sagemath
pkgver=6.8
-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"
@@ -21,7 +21,7 @@ depends=(ipython2 ppl mpfi palp polybori singular libcliquer maxima-ecl gfan sym
eclib gmp-ecm zn_poly gd python2-cvxopt pynac linbox gsl 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)
optdepends=('cython2: to compile cython code' 'jmol: 3D plots' 'sage-notebook: Browser-based (flask) notebook interface'
- 'sagemath-doc: Documentation and inline help' 'ipython2-notebook: IPython notebook interface' 'mathjax: IPython notebook interface'
+ 'sagemath-doc: Documentation and inline help' 'ipython2-notebook: Jupyter notebook interface' 'mathjax: Jupyter notebook interface'
'coin-or-cbc: COIN backend for numerical computations'
'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
'modular_decomposition: modular decomposition of graphs'
@@ -34,11 +34,12 @@ 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"
+"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' 'cython-0.23.patch')
+'pexpect-env.patch' 'pexpect-del.patch' 'disable-fes.patch' 'cython-0.23.patch' 'ipython-4.patch')
md5sums=('943780ef4460e38f28fefe95e3138981'
'd9a3e113ed147dcee8f89962a8dccd43'
+ '4cee4f96bcd877587e7efc40c20adba7'
'a906a180d198186a39820b0a2f9a9c63'
'f72e544032b1a3f952b7ddafc3a49d63'
'843a6cc3b17a1850604593813321418e'
@@ -48,7 +49,8 @@ md5sums=('943780ef4460e38f28fefe95e3138981'
'a83a3b1bc7fcb7cbf752a83a8311fc42'
'f333939ea6c41377b66407c81016cee4'
'4eb23a3c7363258bc9ba764d6e5512ba'
- '1b8dfa047115180aa0afbeaf19d97762')
+ '1b8dfa047115180aa0afbeaf19d97762'
+ '41aa997ad9f00afdc3357b37fc70f0e6')
prepare(){
cd sage-$pkgver
@@ -79,6 +81,8 @@ prepare(){
sed -e "s|os.path.join(SAGE_ROOT, 'sage')|'/usr/bin/sage'|" -i src/sage/repl/ipython_kernel/install.py
# find bliss headers
sed -e 's|graph.hh|bliss/graph.hh|' -i src/sage/graphs/bliss.pyx
+# fix IPython 4 compatibility
+ patch -p0 -i ../ipython-4.patch
# Upstream patches
# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
@@ -158,4 +162,14 @@ package() {
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
}