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

Evgeniy Alekseev arcanis at nymeria.archlinux.org
Tue Dec 24 07:10:28 UTC 2013


    Date: Tuesday, December 24, 2013 @ 08:10:27
  Author: arcanis
Revision: 102921

upgpkg: sage-mathematics 6.0-1

Added:
  sage-mathematics/trunk/fix-pil.patch
Modified:
  sage-mathematics/trunk/PKGBUILD
  sage-mathematics/trunk/sage-mathematics.install
Deleted:
  sage-mathematics/trunk/fix-atlas.patch

--------------------------+
 PKGBUILD                 |   60 +++++++++++++++++++++++++++++----------------
 fix-atlas.patch          |   10 -------
 fix-pil.patch            |   12 +++++++++
 sage-mathematics.install |    4 ---
 4 files changed, 51 insertions(+), 35 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-12-24 04:22:49 UTC (rev 102920)
+++ PKGBUILD	2013-12-24 07:10:27 UTC (rev 102921)
@@ -8,7 +8,7 @@
 # Special thanks to Nareto for moving the compile from the .install to the PKGBUILD
 
 pkgname=sage-mathematics
-pkgver=5.13
+pkgver=6.0
 pkgrel=1
 pkgdesc="SAGE: Open Source Mathematics Software, a viable free alternative to Magma, Maple, Mathematica, and Matlab"
 arch=('i686' 'x86_64')
@@ -15,7 +15,8 @@
 url="http://www.sagemath.org"
 license=('GPL')
 #depends=('desktop-file-utils' 'java-environment=7' 'libjpeg-turbo' 'libtiff' 'libxmu' 'sqlite' 'xz')
-makedepends=('gcc-fortran' 'freetype2' 'gendesk' 'desktop-file-utils')
+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'
@@ -22,19 +23,19 @@
             'ffmpeg: to show animations'
             'cairo: R plots')
 source=("http://sage.math.washington.edu/home/release/sage-${pkgver}/sage-${pkgver}.tar"
-        'fix-atlas.patch'
-        'sage.service')
+        "fix-pil.patch"
+        "sage.service")
 install="${pkgname}.install"
-md5sums=('b549c5ac6b292a2837d92ccf3740c451'
-         '527a621b19dd93941cd018d2c1559f96'
+md5sums=('da1bacf90fc291e736aaa71431e8874e'
+         'de54cb818d74c070a524fc3fd5208b2c'
          '985da1c1d1dcdc3ea9aa73035cb7996b')
 
 prepare() {
   # create *.desktop file
   gendesk -n \
-          --pkgname="SAGE-notebook" \
-          --pkgdesc="SAGE notebook" \
-          --name="SAGE" \
+          --pkgname="sage-notebook" \
+          --pkgdesc="sage notebook" \
+          --name="sage" \
           --exec="/opt/sage/sage -notebook" \
           --terminal=true \
           --categories="Science;Math" \
@@ -43,21 +44,30 @@
 X-KDE-SubstituteUID=false
 X-KDE-Username="
   
-  # fix ATLAS build http://sourceforge.net/p/math-atlas/discussion/75123/thread/dc45bb67/
-  cd "sage-${pkgver}/spkg/standard"
-  tar xjf atlas-3.10.1.p7.spkg
-  rm atlas-3.10.1.p7.spkg
-  cd atlas-3.10.1.p7
-  patch -p0 -i "${srcdir}/fix-atlas.patch"
-  cd ..
-  tar cjf atlas-3.10.1.p7.spkg atlas-3.10.1.p7
-  rm -r atlas-3.10.1.p7
-  
   # create DOT_SAGE directory
   if [[ -d ${srcdir}/build ]]; then
     rm -rf "${srcdir}/build"
   fi
   mkdir "${srcdir}/build"
+  
+  # according to FS#34769
+  # NOTE: there is an error in pil build (freetype/fterrors.h not found)
+  cd "${srcdir}/sage-${pkgver}/upstream/"
+  tar xjfv pil-1.1.6.tar.bz2
+  rm -r pil-1.1.6.tar.bz2
+  patch -p0 -i "${srcdir}/fix-pil.patch"
+  tar cjvf pil-1.1.6.tar.bz2 pil-1.1.6
+  rm -rf pil-1.1.6
+  # fix checksums
+  SUMS=$(md5sum pil-1.1.6.tar.bz2 | awk '{print $1}')
+  sed "s/md5=[0-9a-f]\{32\}/md5=${SUMS}/" -i "${srcdir}/sage-${pkgver}/build/pkgs/pil/checksums.ini"
+  SUMS=$(sha1sum pil-1.1.6.tar.bz2 | awk '{print $1}')
+  sed "s/sha1=[0-9a-f]\{40\}/sha1=${SUMS}/" -i "${srcdir}/sage-${pkgver}/build/pkgs/pil/checksums.ini"
+  SUMS=$(cksum pil-1.1.6.tar.bz2 | awk '{print $1}')
+  sed "s/cksum=[0-9a-f]\{10\}/cksum=${SUMS}/" -i "${srcdir}/sage-${pkgver}/build/pkgs/pil/checksums.ini"
+  # disable freetype build
+  rm -rf freetype-*
+  sed -i -e 's/FREETYPE/#FREETYPE/' "${srcdir}/sage-${pkgver}/build/install"
 }
 
 build() {
@@ -127,12 +137,20 @@
   rm -f "${pkgdir}/opt/sage/spkg/base/*spkg"
   rm -f "${pkgdir}/opt/sage/spkg/standard/*spkg"
   
+  # according to FS#37090
+  # install scripts
+  ./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
+  
   # 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" \
+  install -Dm644 "${srcdir}/sage-notebook.desktop" \
                  "${pkgdir}/usr/share/applications/SAGE-notebook.desktop"
-  install -Dm644 "${pkgdir}/opt/sage/devel/sagenb-main/sagenb/data/sage/images/icon128x128.png" \
+  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"
 }
 

Deleted: fix-atlas.patch
===================================================================
--- fix-atlas.patch	2013-12-24 04:22:49 UTC (rev 102920)
+++ fix-atlas.patch	2013-12-24 07:10:27 UTC (rev 102921)
@@ -1,10 +0,0 @@
---- spkg-install	2013-08-30 21:57:13.000000000 +0200
-+++ spkg-install.new	2013-10-11 23:40:10.772191176 +0200
-@@ -296,6 +296,7 @@
-     cmd += ' --prefix=' + conf['SAGE_LOCAL']
-     cmd += ' --with-netlib-lapack-tarfile=' + LAPACK_TARFILE 
-     cmd += ' --cc="' + CC + '"'
-+    cmd += ' -D c -DWALL'
- 
-     ## -Si latune 1: enable lapack tuning 
-     ## typically adds 3-4 hours of install time

Added: fix-pil.patch
===================================================================
--- fix-pil.patch	                        (rev 0)
+++ fix-pil.patch	2013-12-24 07:10:27 UTC (rev 102921)
@@ -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 */

Modified: sage-mathematics.install
===================================================================
--- sage-mathematics.install	2013-12-24 04:22:49 UTC (rev 102920)
+++ sage-mathematics.install	2013-12-24 07:10:27 UTC (rev 102921)
@@ -2,10 +2,6 @@
   cd /opt/sage
   update-desktop-database -q
 
-  # set HOME because when sage updates its sage_root (after being moved) it will write files to ~/.sage with root ownership
-  # the files it writes to ~/.sage can be safely ignored
-  HOME=/tmp ./sage -c
-
   # add sagemath user for the daemon
   useradd -r -c 'Sage daemon' -d /opt/sage -s /bin/false sagemath
 




More information about the arch-commits mailing list