summaryrefslogtreecommitdiff
path: root/community/sage-mathematics
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-03-21 03:22:19 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-03-21 03:22:19 +0000
commitd0f33415f254cb2fee06fd89f9cfed4535322f37 (patch)
tree66c13d72eac4f0110772b4675231c891334137bc /community/sage-mathematics
parent7e108c74958ec076a3734822f61f145d0d69547f (diff)
Fri Mar 21 03:19:28 UTC 2014
Diffstat (limited to 'community/sage-mathematics')
-rw-r--r--community/sage-mathematics/PKGBUILD33
-rw-r--r--community/sage-mathematics/python-readline.patch28
2 files changed, 54 insertions, 7 deletions
diff --git a/community/sage-mathematics/PKGBUILD b/community/sage-mathematics/PKGBUILD
index 1ec59806e..38c4f7591 100644
--- a/community/sage-mathematics/PKGBUILD
+++ b/community/sage-mathematics/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 105532 2014-02-09 18:40:24Z arcanis $
+# $Id: PKGBUILD 107816 2014-03-19 23:42:17Z arcanis $
# 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>
@@ -9,13 +9,13 @@
pkgname=sage-mathematics
pkgver=6.1.1
-pkgrel=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')
#depends=('desktop-file-utils' 'java-environment=7' 'libjpeg-turbo' 'libtiff' 'libxmu' 'sqlite' 'xz')
-depends=('freetype2>=2.3.5')
+depends=('libatomic_ops')
makedepends=('desktop-file-utils' 'gcc-fortran' 'gendesk')
optdepends=('imagemagick: some plotting functionality benefits from it'
'texlive-core: some plotting functionality benefits from it, also to use SageTeX'
@@ -23,10 +23,12 @@ optdepends=('imagemagick: some plotting functionality benefits from it'
'ffmpeg: to show animations'
'cairo: R plots')
source=("http://sage.math.washington.edu/home/release/sage-${pkgver}/sage-${pkgver}.tar"
- "sage.service")
+ "sage.service"
+ "python-readline.patch")
install="${pkgname}.install"
md5sums=('800c59f7cfa32c012f358ae240cdb2e6'
- '985da1c1d1dcdc3ea9aa73035cb7996b')
+ '985da1c1d1dcdc3ea9aa73035cb7996b'
+ 'dbfb66f38fb4d516d1078b73fd1d54a2')
prepare() {
# create *.desktop file
@@ -36,7 +38,7 @@ prepare() {
--name="Sage" \
--exec="/opt/sage/sage -notebook" \
--terminal=true \
- --categories="Science;Math" \
+ --categories="Education;Science;Math" \
--custom="X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username="
@@ -48,7 +50,24 @@ X-KDE-Username="
mkdir "${srcdir}/build"
# according to FS#34769
- sed -i -e 's/FREETYPE/#FREETYPE/' "${srcdir}/sage-${pkgver}/build/install"
+ sed -e 's/FREETYPE/#FREETYPE/' -i "${srcdir}/sage-${pkgver}/build/install"
+ # according to FS#39533
+ ## patching python
+ cd "${srcdir}/sage-${pkgver}/upstream"
+ tar xjf python-2.7.5.tar.bz2
+ rm -rf python-2.7.5.tar.bz2
+ patch -p0 -i "${srcdir}/python-readline.patch"
+ tar cjf python-2.7.5.tar.bz2 python-2.7.5
+ rm -rf python-2.7.5
+ ## fix checksums
+ SUMS=$(md5sum python-2.7.5.tar.bz2 | awk '{print $1}')
+ sed "s/md5=[0-9a-f]\{32\}/md5=${SUMS}/" -i "${srcdir}/sage-${pkgver}/build/pkgs/python/checksums.ini"
+ SUMS=$(sha1sum python-2.7.5.tar.bz2 | awk '{print $1}')
+ sed "s/sha1=[0-9a-f]\{40\}/sha1=${SUMS}/" -i "${srcdir}/sage-${pkgver}/build/pkgs/python/checksums.ini"
+ SUMS=$(cksum python-2.7.5.tar.bz2 | awk '{print $1}')
+ sed "s/cksum=[0-9a-f]\{10\}/cksum=${SUMS}/" -i "${srcdir}/sage-${pkgver}/build/pkgs/python/checksums.ini"
+ ## disable readline build
+ sed -e 's/READLINE/#READLINE/' -i "${srcdir}/sage-${pkgver}/build/install"
}
build() {
diff --git a/community/sage-mathematics/python-readline.patch b/community/sage-mathematics/python-readline.patch
new file mode 100644
index 000000000..ce4ff75d5
--- /dev/null
+++ b/community/sage-mathematics/python-readline.patch
@@ -0,0 +1,28 @@
+diff -ruN python-2.7.5.orig/Modules/readline.c python-2.7.5/Modules/readline.c
+--- python-2.7.5.orig/Modules/readline.c 2013-05-12 07:32:51.000000000 +0400
++++ python-2.7.5/Modules/readline.c 2014-03-19 16:06:05.663684577 +0400
+@@ -850,7 +850,7 @@
+ * before calling the normal completer */
+
+ static char **
+-flex_complete(char *text, int start, int end)
++flex_complete(const char *text, int start, int end)
+ {
+ #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
+ rl_completion_append_character ='\0';
+@@ -898,12 +898,12 @@
+ rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
+ rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
+ /* Set our hook functions */
+- rl_startup_hook = (Function *)on_startup_hook;
++ rl_startup_hook = on_startup_hook;
+ #ifdef HAVE_RL_PRE_INPUT_HOOK
+- rl_pre_input_hook = (Function *)on_pre_input_hook;
++ rl_pre_input_hook = on_pre_input_hook;
+ #endif
+ /* Set our completion function */
+- rl_attempted_completion_function = (CPPFunction *)flex_complete;
++ rl_attempted_completion_function = flex_complete;
+ /* Set Python word break characters */
+ completer_word_break_characters =
+ rl_completer_word_break_characters =