[arch-commits] Commit in sage-mathematics/repos (10 files)
Evgeniy Alekseev
arcanis at nymeria.archlinux.org
Sat Feb 1 21:22:09 UTC 2014
Date: Saturday, February 1, 2014 @ 22:22:08
Author: arcanis
Revision: 105154
archrelease: copy trunk to community-staging-i686, community-staging-x86_64
Added:
sage-mathematics/repos/community-staging-i686/
sage-mathematics/repos/community-staging-i686/PKGBUILD
(from rev 105153, sage-mathematics/trunk/PKGBUILD)
sage-mathematics/repos/community-staging-i686/fix-pil.patch
(from rev 105153, sage-mathematics/trunk/fix-pil.patch)
sage-mathematics/repos/community-staging-i686/sage-mathematics.install
(from rev 105153, sage-mathematics/trunk/sage-mathematics.install)
sage-mathematics/repos/community-staging-i686/sage.service
(from rev 105153, sage-mathematics/trunk/sage.service)
sage-mathematics/repos/community-staging-x86_64/
sage-mathematics/repos/community-staging-x86_64/PKGBUILD
(from rev 105153, sage-mathematics/trunk/PKGBUILD)
sage-mathematics/repos/community-staging-x86_64/fix-pil.patch
(from rev 105153, sage-mathematics/trunk/fix-pil.patch)
sage-mathematics/repos/community-staging-x86_64/sage-mathematics.install
(from rev 105153, sage-mathematics/trunk/sage-mathematics.install)
sage-mathematics/repos/community-staging-x86_64/sage.service
(from rev 105153, sage-mathematics/trunk/sage.service)
---------------------------------------------------+
community-staging-i686/PKGBUILD | 134 ++++++++++++++++++++
community-staging-i686/fix-pil.patch | 12 +
community-staging-i686/sage-mathematics.install | 56 ++++++++
community-staging-i686/sage.service | 8 +
community-staging-x86_64/PKGBUILD | 134 ++++++++++++++++++++
community-staging-x86_64/fix-pil.patch | 12 +
community-staging-x86_64/sage-mathematics.install | 56 ++++++++
community-staging-x86_64/sage.service | 8 +
8 files changed, 420 insertions(+)
Copied: sage-mathematics/repos/community-staging-i686/PKGBUILD (from rev 105153, sage-mathematics/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD (rev 0)
+++ community-staging-i686/PKGBUILD 2014-02-01 21:22:08 UTC (rev 105154)
@@ -0,0 +1,134 @@
+# $Id$
+# Maintainer: Evgeniy Alekseev <arcanis.arch at gmail dot com>
+# 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.1
+pkgrel=1
+pkgdesc="SAGE: Open Source Mathematics Software, a viable 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=('freetype2>=2.3.5')
+makedepends=('gcc-fortran' 'gendesk' 'desktop-file-utils')
+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://sage.math.washington.edu/home/release/sage-${pkgver}/sage-${pkgver}.tar"
+ "fix-pil.patch"
+ "sage.service")
+install="${pkgname}.install"
+md5sums=('75130374fcdb9395955db81f1ed28422'
+ 'de54cb818d74c070a524fc3fd5208b2c'
+ '985da1c1d1dcdc3ea9aa73035cb7996b')
+
+prepare() {
+ # create *.desktop file
+ gendesk -n \
+ --pkgname="sage-notebook" \
+ --pkgdesc="sage notebook" \
+ --name="sage" \
+ --exec="/opt/sage/sage -notebook" \
+ --terminal=true \
+ --categories="Science;Math" \
+ --custom="StartupNotify=true
+X-DCOP-ServiceType=
+X-KDE-SubstituteUID=false
+X-KDE-Username="
+
+ # create DOT_SAGE directory
+ if [[ -d ${srcdir}/build ]]; then
+ rm -rf "${srcdir}/build"
+ fi
+ mkdir "${srcdir}/build"
+
+ # according to FS#34769
+ rm -rf freetype-*
+ sed -i -e 's/FREETYPE/#FREETYPE/' "${srcdir}/sage-${pkgver}/build/install"
+}
+
+build() {
+ cd "sage-${pkgver}"
+
+ # fix "missing sage.all error" during build
+ unset CFLAGS
+ unset CXXFLAGS
+ # fix build errors
+ unset LDFLAGS
+
+ export MAKE="make -j$(nproc)"
+
+ # use archlinux's fortran rather then the one that ships with sage to compile sage's fortran
+ export FC=/usr/bin/gfortran
+
+ # disable building with debugging support
+ export SAGE_DEBUG='no'
+
+ # enable fat binaries (disables processor specific optimizations)
+ # comment out if you're only building it for yourself
+ 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'
+
+ # only build sage, no documents
+ #make build
+ make
+}
+
+<< COMMENT
+check() {
+ cd "sage-${pkgver}"
+
+ make test
+
+ # uncomment if we want to run all the tests (warning: very long)
+ #make ptestlong
+}
+COMMENT
+
+package() {
+ cd "${srcdir}/sage-${pkgver}/"
+ # remove build logs
+ rm -f *.log
+ rm -rf spkg/{base,build,logs,standarts}
+
+ # cp because make install is experimental and will corrupt the install
+ install -d "${pkgdir}/opt/sage"
+ cp -r * "${pkgdir}/opt/sage/"
+
+ # move SageTeX files to more appropriate directory
+ install -d "${pkgdir}/usr/share"
+ mv "${pkgdir}/opt/sage/local/share/texmf" "${pkgdir}/usr/share"
+
+ # according to FS#37090
+ # install scripts
+ install -d "${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"
+
+ # 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.10.7.2-py2.7.egg/sagenb/data/sage/images/icon128x128.png" \
+ "${pkgdir}/usr/share/pixmaps/SAGE-notebook.png"
+}
+
+# vim :set ts=2 sw=2 et:
Copied: sage-mathematics/repos/community-staging-i686/fix-pil.patch (from rev 105153, sage-mathematics/trunk/fix-pil.patch)
===================================================================
--- community-staging-i686/fix-pil.patch (rev 0)
+++ community-staging-i686/fix-pil.patch 2014-02-01 21:22:08 UTC (rev 105154)
@@ -0,0 +1,12 @@
+diff -ruN pil-1.1.6.orig/_imagingft.c pil-1.1.6/_imagingft.c
+--- pil-1.1.6.orig/_imagingft.c 2013-12-23 17:45:39.991183855 +0400
++++ pil-1.1.6/_imagingft.c 2013-12-23 17:49:06.297861197 +0400
+@@ -65,7 +65,7 @@
+ const char* message;
+ } ft_errors[] =
+
+-#include <freetype/fterrors.h>
++#include <freetype2/fterrors.h>
+
+ /* -------------------------------------------------------------------- */
+ /* font objects */
Copied: sage-mathematics/repos/community-staging-i686/sage-mathematics.install (from rev 105153, sage-mathematics/trunk/sage-mathematics.install)
===================================================================
--- community-staging-i686/sage-mathematics.install (rev 0)
+++ community-staging-i686/sage-mathematics.install 2014-02-01 21:22:08 UTC (rev 105154)
@@ -0,0 +1,56 @@
+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
+}
Copied: sage-mathematics/repos/community-staging-i686/sage.service (from rev 105153, sage-mathematics/trunk/sage.service)
===================================================================
--- community-staging-i686/sage.service (rev 0)
+++ community-staging-i686/sage.service 2014-02-01 21:22:08 UTC (rev 105154)
@@ -0,0 +1,8 @@
+[Unit]
+Description=A free open-source mathematics software system
+
+[Service]
+ExecStart=/opt/sage/sage -n
+
+[Install]
+WantedBy=default.target
Copied: sage-mathematics/repos/community-staging-x86_64/PKGBUILD (from rev 105153, sage-mathematics/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2014-02-01 21:22:08 UTC (rev 105154)
@@ -0,0 +1,134 @@
+# $Id$
+# Maintainer: Evgeniy Alekseev <arcanis.arch at gmail dot com>
+# 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.1
+pkgrel=1
+pkgdesc="SAGE: Open Source Mathematics Software, a viable 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=('freetype2>=2.3.5')
+makedepends=('gcc-fortran' 'gendesk' 'desktop-file-utils')
+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://sage.math.washington.edu/home/release/sage-${pkgver}/sage-${pkgver}.tar"
+ "fix-pil.patch"
+ "sage.service")
+install="${pkgname}.install"
+md5sums=('75130374fcdb9395955db81f1ed28422'
+ 'de54cb818d74c070a524fc3fd5208b2c'
+ '985da1c1d1dcdc3ea9aa73035cb7996b')
+
+prepare() {
+ # create *.desktop file
+ gendesk -n \
+ --pkgname="sage-notebook" \
+ --pkgdesc="sage notebook" \
+ --name="sage" \
+ --exec="/opt/sage/sage -notebook" \
+ --terminal=true \
+ --categories="Science;Math" \
+ --custom="StartupNotify=true
+X-DCOP-ServiceType=
+X-KDE-SubstituteUID=false
+X-KDE-Username="
+
+ # create DOT_SAGE directory
+ if [[ -d ${srcdir}/build ]]; then
+ rm -rf "${srcdir}/build"
+ fi
+ mkdir "${srcdir}/build"
+
+ # according to FS#34769
+ rm -rf freetype-*
+ sed -i -e 's/FREETYPE/#FREETYPE/' "${srcdir}/sage-${pkgver}/build/install"
+}
+
+build() {
+ cd "sage-${pkgver}"
+
+ # fix "missing sage.all error" during build
+ unset CFLAGS
+ unset CXXFLAGS
+ # fix build errors
+ unset LDFLAGS
+
+ export MAKE="make -j$(nproc)"
+
+ # use archlinux's fortran rather then the one that ships with sage to compile sage's fortran
+ export FC=/usr/bin/gfortran
+
+ # disable building with debugging support
+ export SAGE_DEBUG='no'
+
+ # enable fat binaries (disables processor specific optimizations)
+ # comment out if you're only building it for yourself
+ 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'
+
+ # only build sage, no documents
+ #make build
+ make
+}
+
+<< COMMENT
+check() {
+ cd "sage-${pkgver}"
+
+ make test
+
+ # uncomment if we want to run all the tests (warning: very long)
+ #make ptestlong
+}
+COMMENT
+
+package() {
+ cd "${srcdir}/sage-${pkgver}/"
+ # remove build logs
+ rm -f *.log
+ rm -rf spkg/{base,build,logs,standarts}
+
+ # cp because make install is experimental and will corrupt the install
+ install -d "${pkgdir}/opt/sage"
+ cp -r * "${pkgdir}/opt/sage/"
+
+ # move SageTeX files to more appropriate directory
+ install -d "${pkgdir}/usr/share"
+ mv "${pkgdir}/opt/sage/local/share/texmf" "${pkgdir}/usr/share"
+
+ # according to FS#37090
+ # install scripts
+ install -d "${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"
+
+ # 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.10.7.2-py2.7.egg/sagenb/data/sage/images/icon128x128.png" \
+ "${pkgdir}/usr/share/pixmaps/SAGE-notebook.png"
+}
+
+# vim :set ts=2 sw=2 et:
Copied: sage-mathematics/repos/community-staging-x86_64/fix-pil.patch (from rev 105153, sage-mathematics/trunk/fix-pil.patch)
===================================================================
--- community-staging-x86_64/fix-pil.patch (rev 0)
+++ community-staging-x86_64/fix-pil.patch 2014-02-01 21:22:08 UTC (rev 105154)
@@ -0,0 +1,12 @@
+diff -ruN pil-1.1.6.orig/_imagingft.c pil-1.1.6/_imagingft.c
+--- pil-1.1.6.orig/_imagingft.c 2013-12-23 17:45:39.991183855 +0400
++++ pil-1.1.6/_imagingft.c 2013-12-23 17:49:06.297861197 +0400
+@@ -65,7 +65,7 @@
+ const char* message;
+ } ft_errors[] =
+
+-#include <freetype/fterrors.h>
++#include <freetype2/fterrors.h>
+
+ /* -------------------------------------------------------------------- */
+ /* font objects */
Copied: sage-mathematics/repos/community-staging-x86_64/sage-mathematics.install (from rev 105153, sage-mathematics/trunk/sage-mathematics.install)
===================================================================
--- community-staging-x86_64/sage-mathematics.install (rev 0)
+++ community-staging-x86_64/sage-mathematics.install 2014-02-01 21:22:08 UTC (rev 105154)
@@ -0,0 +1,56 @@
+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
+}
Copied: sage-mathematics/repos/community-staging-x86_64/sage.service (from rev 105153, sage-mathematics/trunk/sage.service)
===================================================================
--- community-staging-x86_64/sage.service (rev 0)
+++ community-staging-x86_64/sage.service 2014-02-01 21:22:08 UTC (rev 105154)
@@ -0,0 +1,8 @@
+[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