[arch-commits] Commit in sage-mathematics/trunk (6 files)

Antonio Rojas arojas at archlinux.org
Tue Dec 23 22:06:58 UTC 2014


    Date: Tuesday, December 23, 2014 @ 23:06:58
  Author: arojas
Revision: 124420

First shot at compiling Sage against system libs

Added:
  sage-mathematics/trunk/PKGBUILD
    (from rev 124419, sage-mathematics/trunk/PKGBUILD.split)
Deleted:
  sage-mathematics/trunk/PKGBUILD
  sage-mathematics/trunk/PKGBUILD.split
  sage-mathematics/trunk/gf2x-sse2-i686.patch
  sage-mathematics/trunk/sage-mathematics.install
  sage-mathematics/trunk/sage.service

--------------------------+
 PKGBUILD                 |  254 ++++++++++++++++++++++-----------------------
 PKGBUILD.split           |  127 ----------------------
 gf2x-sse2-i686.patch     |   10 -
 sage-mathematics.install |   56 ---------
 sage.service             |    8 -
 5 files changed, 127 insertions(+), 328 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2014-12-23 21:31:43 UTC (rev 124419)
+++ PKGBUILD	2014-12-23 22:06:58 UTC (rev 124420)
@@ -1,127 +0,0 @@
-# $Id$
-# Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>
-# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
-# Contributor: Antonio Rojas <nqn1976 at gmail dot com>
-# Contributor: Thomas Dziedzic <gostrc at gmail dot com>
-# Contributor: Osman Ugus <ugus11 at yahoo dot com>
-# Contributor: Stefan Husmann <stefan-husmann at t-online dot de>
-# Special thanks to Nareto for moving the compile from the .install to the PKGBUILD
-
-pkgname=sage-mathematics
-pkgver=6.4.1
-pkgrel=1
-pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
-arch=('i686' 'x86_64')
-url="http://www.sagemath.org"
-license=('GPL')
-#depends=('desktop-file-utils' 'java-environment=7' 'libjpeg-turbo' 'libtiff' 'libxmu' 'sqlite' 'xz')
-depends=('libatomic_ops')
-makedepends=('desktop-file-utils' 'gcc-fortran' 'gendesk' 'python2')
-optdepends=('imagemagick: some plotting functionality benefits from it'
-            'texlive-core: some plotting functionality benefits from it, also to use SageTeX'
-            'openssh: to use the notebook in secure mode'
-            'ffmpeg: to show animations'
-            'cairo: R plots')
-source=("http://boxen.math.washington.edu/home/sagemath/sage-mirror/src/sage-${pkgver}.tar.gz"
-        "sage.service"
-        "gf2x-sse2-i686.patch")
-install="${pkgname}.install"
-md5sums=('9e64f198f791577555344b9aaa6768a9'
-         '985da1c1d1dcdc3ea9aa73035cb7996b'
-         'f9d7aba4f758f4605164eb84b9e1e3ba')
-changelog=ChangeLog
-
-prepare() {
-  # create *.desktop file
-  gendesk -f -n \
-          --pkgname="sage-notebook" \
-          --pkgdesc="Sage notebook" \
-          --name="Sage" \
-          --exec="/opt/sage/sage -notebook" \
-          --terminal=true \
-          --categories="Education;Science;Math" \
-          --custom="X-DCOP-ServiceType=
-X-KDE-SubstituteUID=false
-X-KDE-Username="
-
-  # create DOT_SAGE directory
-  rm -rf "${srcdir}/build"
-  mkdir "${srcdir}/build"
-
-  # disable building gf2x with sse2 for i686
-  if [ "${CARCH}" == "i686" ]; then
-    cp "${srcdir}/gf2x-sse2-i686.patch" "${srcdir}/sage-${pkgver}/build/pkgs/gf2x/patches/sse2.patch"
-  fi
-}
-
-build() {
-  cd "sage-${pkgver}"
-
-  # disable default makepkg flags (required by singular, libgap and zeromq)
-  unset CFLAGS
-  unset CXXFLAGS
-  unset CPPFLAGS
-  unset LDFLAGS
-  ## flags
-  # do not build own gcc
-  export SAGE_INSTALL_GCC='no'
-  # disable debug
-  export SAGE_DEBUG='no'
-  # enable fat binaries
-  export SAGE_FAT_BINARY='yes'
-  # can't write to root in a clean chroot
-  export DOT_SAGE="${srcdir}/build"
-  # singular is broken
-  export CPP='/usr/bin/cpp'
-
-  make
-}
-
-<< COMMENT
-check() {
-  cd "sage-${pkgver}"
-
-  make test
-  #make ptestlong
-}
-COMMENT
-
-package() {
-  cd "${srcdir}/sage-${pkgver}/"
-  # remove build logs
-  rm -f *.log
-  rm -rf "${srcdir}/sage-${pkgver}/"{logs,upstream}
-  # do NOT remove build directory!
-
-  # cp because make install is experimental and will corrupt the install
-  install -dm755 "${pkgdir}/opt/sage"
-  cp -r * "${pkgdir}/opt/sage/"
-
-  # move SageTeX files to more appropriate directory
-  install -dm755 "${pkgdir}/usr/share"
-  mv "${pkgdir}/opt/sage/local/share/texmf" "${pkgdir}/usr/share"
-
-  # according to FS#37090
-  # install scripts
-  install -dm755 "${pkgdir}/usr/bin"
-  ./sage -c "install_scripts('${pkgdir}/usr/bin', ignore_existing=True)"
-  # rename scripts to avoid conflicts
-  for ITEM in $(ls "${pkgdir}/usr/bin"); do
-    mv "${pkgdir}/usr/bin/${ITEM}" "${pkgdir}/usr/bin/sage-${ITEM}"
-  done
-  ln -s "/opt/sage/sage" "${pkgdir}/usr/bin/sage"
-
-  # FIXME fix bad mtime
-  cd "${pkgdir}/opt/sage/local/lib/python2.7"
-  find . -name '*.py' -exec sh -c "rm {}c 2> /dev/null && python2 -m compileall {}" \;
-
-  # install a systemd user unit
-  install -Dm644 "${srcdir}/sage.service" "${pkgdir}/usr/lib/systemd/user/sage.service"
-  # install *.desktop and icon files
-  install -Dm644 "${srcdir}/sage-notebook.desktop" \
-                 "${pkgdir}/usr/share/applications/sage-notebook.desktop"
-  install -Dm644 "${pkgdir}/opt/sage/local/lib/python2.7/site-packages/sagenb-0.11.1-py2.7.egg/sagenb/data/sage/images/icon48x48.png" \
-                 "${pkgdir}/usr/share/pixmaps/sage-notebook.png"
-}
-
-# vim :set ts=2 sw=2 et:

Copied: sage-mathematics/trunk/PKGBUILD (from rev 124419, sage-mathematics/trunk/PKGBUILD.split)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2014-12-23 22:06:58 UTC (rev 124420)
@@ -0,0 +1,127 @@
+# $Id: PKGBUILD 118896 2014-09-13 07:12:02Z arcanis $
+# Maintainer: Evgeniy Alekseev <arcanis.arch at gmail dot com>
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Thomas Dziedzic <gostrc at gmail dot com>
+# Contributor: Osman Ugus <ugus11 at yahoo dot com>
+# Contributor: Stefan Husmann <stefan-husmann at t-online dot de>
+# Special thanks to Nareto for moving the compile from the .install to the PKGBUILD
+
+pkgbase=sage-mathematics
+pkgname=('sage-mathematics' 'sage-mathematics-src')
+pkgver=6.4.1
+pkgrel=2
+pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
+arch=('i686' 'x86_64')
+url="http://www.sagemath.org"
+license=('GPL')
+makedepends=('ipython2' 'cython2' 'ppl' 'glpk' 'mpfi' 'polybori' 'singular' 'libcliquer' 'ecl' 'libgap' 'givaro' 'libmpc' 'lcalc' 'lrcalc'
+  'eclib' 'gmp-ecm' 'zn_poly' 'pynac' 'linbox' 'gsl' 'boost' 'scons' 'ratpoints' 'symmetrica' 'fflas-ffpack' 'gd' 'python2-jinja' 'python2-numpy')
+source=("https://github.com/sagemath/sage/archive/$pkgver.tar.gz" "http://www.sagemath.org/packages/upstream/pexpect/pexpect-2.0.tar.bz2" 
+'extensions.patch' 'c_lib.patch' 'env.patch' 'paths.patch' 'blas.patch' 'clean.patch' 'skip-check.patch' 'gap-hap.patch' 'pexpect-env.patch')
+md5sums=('e40736461992e62af3a84cf9a212c9d1'
+         'd9a3e113ed147dcee8f89962a8dccd43'
+         '43784811932f077c3c07b75825abda1b'
+         '5216dbb3d80cecc8ec4a36cc9706f8b5'
+         '0bb5d722e32359f9dc8516904316318f'
+         'df2f56fb5845a83808b6724f6965ec6e'
+         'eee444d32b8a818a67b1e0ce0850b8bb'
+         '46c212a3a6713b0f78c370c7186d0982'
+         '5947a420a0b1483f0cbc74c76895789b'
+         '631ee6b8b3e7d12bb7858cfd841af483'
+         'a83a3b1bc7fcb7cbf752a83a8311fc42')
+# changelog=ChangeLog
+
+prepare(){
+  cd sage-$pkgver
+
+# add optional packages manually (Fedora)  
+  patch -p0 -i $srcdir/extensions.patch
+# don't assume Sage is already available (Fedora)
+  patch -p0 -i $srcdir/c_lib.patch
+# find L.h header
+  sed -i 's|libLfunction|Lfunction|' src/module_list.py
+# don't try to link against libpng 1.2
+  sed -i 's|png12|png|' src/module_list.py
+# set env variables
+  patch -p0 -i $srcdir/env.patch
+# fix paths in python imports
+  patch -p0 -i $srcdir/paths.patch
+# fix linking to blas/cblas
+  patch -p0 -i $srcdir/blas.patch
+# don't try to remove installed files
+  patch -p0 -i $srcdir/clean.patch
+# skip checking build status
+  patch -p0 -i $srcdir/skip-check.patch
+# don't use is_package_installed function
+  patch -p0 -i $srcdir/gap-hap.patch
+
+# use python2
+  sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' src/bin/*
+  sed -i 's|exec python|exec python2|' src/bin/*
+  sed -i 's|cython %s %s|cython2 %s %s|' src/sage/misc/cython.py
+
+# fix env in pexpect
+  cd $srcdir/pexpect-2.0
+  patch -p1 -i $srcdir/pexpect-env.patch
+}
+
+
+build() {
+  cd sage-$pkgver/src
+
+  export SAGE_FAT_BINARY='yes'
+  export SAGE_LOCAL="/usr"
+  export SAGE_SRC="$PWD"
+
+  pushd c_lib
+    CXX=g++ UNAME=Linux SAGE64=auto scons
+  popd
+  
+  python2 setup.py build
+
+# build pexpect
+  pushd $srcdir/pexpect-2.0
+    python2 setup.py build
+  popd
+}
+
+
+package_sage-mathematics() {
+  depends=('ipython2' 'cython2' 'ppl' 'glpk' 'mpfi' 'palp' 'polybori' 'singular' 'libcliquer' 'maxima-ecl' 'gfan' 'sympow' 'tachyon' 'python2-rpy2' 
+  'python2-matplotlib' 'python2-scipy' 'python2-mpmath' 'python2-sympy' 'libgap' 'gap' 'genus2reduction' 'flintqs' 'givaro' 'libmpc' 'lcalc' 'lrcalc'
+  'eclib' 'gmp-ecm' 'zn_poly' 'python2-gd' 'pynac' 'linbox' 'gsl' 'rubiks' 'pari-galdata' 'pari-seadata-small' 'sage-data-combinatorial_designs' 
+  'sage-data-elliptic_curves' 'sage-data-graphs' 'sage-data-polytopes_db' 'sage-data-conway_polynomials') # python2-pexpect
+  optdepends=('jmol: 3D plots' 'sage-notebook: Web-based notebook interface' 'sage-mathematics-doc: Documentation and inline help'
+  'sage-mathematics-src: source files needed to build cython code'
+  'python2-pyzmq: ipython notebook' 'python2-tornado: ipython notebook' 'python2-jinja: ipython notebook')
+
+  cd sage-$pkgver/src
+
+  export SAGE_ROOT="/usr"
+  export SAGE_LOCAL="$SAGE_ROOT"
+  export SAGE_SRC="$PWD"
+
+  python2 setup.py install --root="$pkgdir" --optimize=1
+
+  mkdir -p "$pkgdir"/usr/{bin,lib}
+  cp c_lib/libcsage.so "$pkgdir"/usr/lib
+  cp bin/sage* "$pkgdir"/usr/bin
+
+  mkdir -p "$pkgdir"/usr/share/sage
+  cp -r ext "$pkgdir"/usr/share/sage
+
+# 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/
+}
+
+
+package_sage-mathematics-src() {
+  pkgdesc="Source files for sage-mathematics"
+  
+  mkdir -p "$pkgdir"/usr/share/sage/src
+  cp -r sage-$pkgver/src/sage "$pkgdir"/usr/share/sage/src
+}

Deleted: PKGBUILD.split
===================================================================
--- PKGBUILD.split	2014-12-23 21:31:43 UTC (rev 124419)
+++ PKGBUILD.split	2014-12-23 22:06:58 UTC (rev 124420)
@@ -1,127 +0,0 @@
-# $Id: PKGBUILD 118896 2014-09-13 07:12:02Z arcanis $
-# Maintainer: Evgeniy Alekseev <arcanis.arch at gmail dot com>
-# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
-# Contributor: Antonio Rojas <arojas at archlinux.org>
-# Contributor: Thomas Dziedzic <gostrc at gmail dot com>
-# Contributor: Osman Ugus <ugus11 at yahoo dot com>
-# Contributor: Stefan Husmann <stefan-husmann at t-online dot de>
-# Special thanks to Nareto for moving the compile from the .install to the PKGBUILD
-
-pkgbase=sage-mathematics
-pkgname=('sage-mathematics' 'sage-mathematics-src')
-pkgver=6.4.1
-pkgrel=2
-pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
-arch=('i686' 'x86_64')
-url="http://www.sagemath.org"
-license=('GPL')
-makedepends=('ipython2' 'cython2' 'ppl' 'glpk' 'mpfi' 'polybori' 'singular' 'libcliquer' 'ecl' 'libgap' 'givaro' 'libmpc' 'lcalc' 'lrcalc'
-  'eclib' 'gmp-ecm' 'zn_poly' 'pynac' 'linbox' 'gsl' 'boost' 'scons' 'ratpoints' 'symmetrica' 'fflas-ffpack' 'gd' 'python2-jinja' 'python2-numpy')
-source=("https://github.com/sagemath/sage/archive/$pkgver.tar.gz" "http://www.sagemath.org/packages/upstream/pexpect/pexpect-2.0.tar.bz2" 
-'extensions.patch' 'c_lib.patch' 'env.patch' 'paths.patch' 'blas.patch' 'clean.patch' 'skip-check.patch' 'gap-hap.patch' 'pexpect-env.patch')
-md5sums=('e40736461992e62af3a84cf9a212c9d1'
-         'd9a3e113ed147dcee8f89962a8dccd43'
-         '43784811932f077c3c07b75825abda1b'
-         '5216dbb3d80cecc8ec4a36cc9706f8b5'
-         '0bb5d722e32359f9dc8516904316318f'
-         'df2f56fb5845a83808b6724f6965ec6e'
-         'eee444d32b8a818a67b1e0ce0850b8bb'
-         '46c212a3a6713b0f78c370c7186d0982'
-         '5947a420a0b1483f0cbc74c76895789b'
-         '631ee6b8b3e7d12bb7858cfd841af483'
-         'a83a3b1bc7fcb7cbf752a83a8311fc42')
-# changelog=ChangeLog
-
-prepare(){
-  cd sage-$pkgver
-
-# add optional packages manually (Fedora)  
-  patch -p0 -i $srcdir/extensions.patch
-# don't assume Sage is already available (Fedora)
-  patch -p0 -i $srcdir/c_lib.patch
-# find L.h header
-  sed -i 's|libLfunction|Lfunction|' src/module_list.py
-# don't try to link against libpng 1.2
-  sed -i 's|png12|png|' src/module_list.py
-# set env variables
-  patch -p0 -i $srcdir/env.patch
-# fix paths in python imports
-  patch -p0 -i $srcdir/paths.patch
-# fix linking to blas/cblas
-  patch -p0 -i $srcdir/blas.patch
-# don't try to remove installed files
-  patch -p0 -i $srcdir/clean.patch
-# skip checking build status
-  patch -p0 -i $srcdir/skip-check.patch
-# don't use is_package_installed function
-  patch -p0 -i $srcdir/gap-hap.patch
-
-# use python2
-  sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' src/bin/*
-  sed -i 's|exec python|exec python2|' src/bin/*
-  sed -i 's|cython %s %s|cython2 %s %s|' src/sage/misc/cython.py
-
-# fix env in pexpect
-  cd $srcdir/pexpect-2.0
-  patch -p1 -i $srcdir/pexpect-env.patch
-}
-
-
-build() {
-  cd sage-$pkgver/src
-
-  export SAGE_FAT_BINARY='yes'
-  export SAGE_LOCAL="/usr"
-  export SAGE_SRC="$PWD"
-
-  pushd c_lib
-    CXX=g++ UNAME=Linux SAGE64=auto scons
-  popd
-  
-  python2 setup.py build
-
-# build pexpect
-  pushd $srcdir/pexpect-2.0
-    python2 setup.py build
-  popd
-}
-
-
-package_sage-mathematics() {
-  depends=('ipython2' 'cython2' 'ppl' 'glpk' 'mpfi' 'palp' 'polybori' 'singular' 'libcliquer' 'maxima-ecl' 'gfan' 'sympow' 'tachyon' 'python2-rpy2' 
-  'python2-matplotlib' 'python2-scipy' 'python2-mpmath' 'python2-sympy' 'libgap' 'gap' 'genus2reduction' 'flintqs' 'givaro' 'libmpc' 'lcalc' 'lrcalc'
-  'eclib' 'gmp-ecm' 'zn_poly' 'python2-gd' 'pynac' 'linbox' 'gsl' 'rubiks' 'pari-galdata' 'pari-seadata-small' 'sage-data-combinatorial_designs' 
-  'sage-data-elliptic_curves' 'sage-data-graphs' 'sage-data-polytopes_db' 'sage-data-conway_polynomials') # python2-pexpect
-  optdepends=('jmol: 3D plots' 'sage-notebook: Web-based notebook interface' 'sage-mathematics-doc: Documentation and inline help'
-  'sage-mathematics-src: source files needed to build cython code'
-  'python2-pyzmq: ipython notebook' 'python2-tornado: ipython notebook' 'python2-jinja: ipython notebook')
-
-  cd sage-$pkgver/src
-
-  export SAGE_ROOT="/usr"
-  export SAGE_LOCAL="$SAGE_ROOT"
-  export SAGE_SRC="$PWD"
-
-  python2 setup.py install --root="$pkgdir" --optimize=1
-
-  mkdir -p "$pkgdir"/usr/{bin,lib}
-  cp c_lib/libcsage.so "$pkgdir"/usr/lib
-  cp bin/sage* "$pkgdir"/usr/bin
-
-  mkdir -p "$pkgdir"/usr/share/sage
-  cp -r ext "$pkgdir"/usr/share/sage
-
-# 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/
-}
-
-
-package_sage-mathematics-src() {
-  pkgdesc="Source files for sage-mathematics"
-  
-  mkdir -p "$pkgdir"/usr/share/sage/src
-  cp -r sage-$pkgver/src/sage "$pkgdir"/usr/share/sage/src
-}

Deleted: gf2x-sse2-i686.patch
===================================================================
--- gf2x-sse2-i686.patch	2014-12-23 21:31:43 UTC (rev 124419)
+++ gf2x-sse2-i686.patch	2014-12-23 22:06:58 UTC (rev 124420)
@@ -1,10 +0,0 @@
---- a/configure	2012-06-01 00:54:00.000000000 +0400
-+++ b/configure	2014-05-11 19:02:27.035606966 +0400
-@@ -1184,6 +1184,7 @@
-   esac
- done
-
-+enable_sse2="no"
- if test -n "$ac_prev"; then
-   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-   as_fn_error $? "missing argument to $ac_option"

Deleted: sage-mathematics.install
===================================================================
--- sage-mathematics.install	2014-12-23 21:31:43 UTC (rev 124419)
+++ sage-mathematics.install	2014-12-23 22:06:58 UTC (rev 124420)
@@ -1,56 +0,0 @@
-post_install() {
-  cd /opt/sage
-  update-desktop-database -q
-
-  # add sagemath user for the daemon
-  useradd -r -c 'Sage daemon' -d /opt/sage -s /bin/false sagemath
-
-  # Update LaTeX db to point to SageTeX
-  if [ -f /usr/bin/texhash ]; then
-    /usr/bin/texhash /usr/share/texmf
-  else
-    echo 'Warning: could not find /usr/bin/texhash'
-    echo 'SageTeX has been installed but you need to run:'
-    echo '# texhash /usr/share/texmf'
-    echo 'So that LaTeX will be able to find it.'
-  fi
-
-echo '
- ___                       
-/ (_)        o            |
-\__   _  _      __        |
-/    / |/ |  | /  \_|   | |
-\___/  |  |_/|/\__/  \_/|/o
-            /|         /|  
-            \|         \|  
- ________________________________ 
-< sage-mathematics, I mean, MOO! >
- -------------------------------- 
-        \   ^__^
-         \  (oo)\_______
-            (__)\       )\/\
-                ||----w |
-                ||     ||
-'
-
-}
-
-post_upgrade() {
-  post_install $1
-  echo "There is now a user session unit included to run a sage notebook as your user."
-  echo "The wiki includes a guide on starting systemd user sessions"
-}
-
-post_remove() {
-  # Update LaTeX db to remove SageTeX entries
-  update-desktop-database -q
-  if [ -f /usr/bin/texhash ]; then
-    /usr/bin/texhash /usr/share/texmf
-  fi
-
-  # remove the sagemath daemon user
-  userdel sagemath
-
-  # clean up left overs
-  rm -rf /opt/sage
-}

Deleted: sage.service
===================================================================
--- sage.service	2014-12-23 21:31:43 UTC (rev 124419)
+++ sage.service	2014-12-23 22:06:58 UTC (rev 124420)
@@ -1,8 +0,0 @@
-[Unit]
-Description=A free open-source mathematics software system
-
-[Service]
-ExecStart=/opt/sage/sage -n
-
-[Install]
-WantedBy=default.target



More information about the arch-commits mailing list