[arch-commits] Commit in sage-mathematics/trunk (PKGBUILD python-readline.patch)

Evgeniy Alekseev arcanis at nymeria.archlinux.org
Wed Mar 19 23:35:43 UTC 2014


    Date: Thursday, March 20, 2014 @ 00:35:43
  Author: arcanis
Revision: 107814

upgpkg: sage-mathematics 6.1.1-2
fixed FS#39533, FS#39362, FS#38985

Added:
  sage-mathematics/trunk/python-readline.patch
Modified:
  sage-mathematics/trunk/PKGBUILD

-----------------------+
 PKGBUILD              |   31 +++++++++++++++++++++++++------
 python-readline.patch |   28 ++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-03-19 21:41:00 UTC (rev 107813)
+++ PKGBUILD	2014-03-19 23:35:43 UTC (rev 107814)
@@ -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 @@
             '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 @@
           --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 @@
   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() {

Added: python-readline.patch
===================================================================
--- python-readline.patch	                        (rev 0)
+++ python-readline.patch	2014-03-19 23:35:43 UTC (rev 107814)
@@ -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 =




More information about the arch-commits mailing list