From 079a1c74633eb49cb86f747fa0d6dcee8259dfe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Tue, 13 Dec 2011 17:51:38 -0300 Subject: libre/python2-libre-2.7.2-4 --- libre/python2-libre/PKGBUILD | 45 ++++++++++++++--------------- libre/python2-libre/SRCBUILD | 36 +++++++++++++++++++++++ libre/python2-libre/gdbm-magic-values.patch | 14 +++++++++ libre/python2-libre/linux2.patch | 24 +++++++++++++++ 4 files changed, 96 insertions(+), 23 deletions(-) create mode 100644 libre/python2-libre/SRCBUILD create mode 100644 libre/python2-libre/gdbm-magic-values.patch create mode 100644 libre/python2-libre/linux2.patch diff --git a/libre/python2-libre/PKGBUILD b/libre/python2-libre/PKGBUILD index 78550b63f..c4f09188d 100644 --- a/libre/python2-libre/PKGBUILD +++ b/libre/python2-libre/PKGBUILD @@ -6,7 +6,7 @@ _pkgname=python2 pkgname=python2-libre pkgver=2.7.2 -pkgrel=2 +pkgrel=4 _pybasever=2.7 pkgdesc="A high-level scripting language" arch=('i686' 'x86_64') @@ -17,30 +17,15 @@ makedepends=('tk') optdepends=('tk: for IDLE') conflicts=('python<3') options=('!makeflags') -source=(http://repo.parabolagnulinux.org/other/Python-${pkgver}.tar.xz +source=(http://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}-${pkgrel}-any.src.tar.xz doc_license_change.patch - WDAS.patch) -md5sums=('5f8a18361784411b16dbb1cdcd6f6664' - '1e6595f85a1da7f42b69456119924d50' - '3f8c0e310a0be0bd8b319d6c46bbd427') + WDAS.patch + linux2.patch + gdbm-magic-values.patch) provides=("$_pkgname=$pkgver") conflicts=("$_pkgname") replaces=("$_pkgname") -mksource() { - [ ! -d "Python-${pkgver}" ] && \ - wget -O - http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz |\ - tar -xJf - - - cd "Python-${pkgver}" -# http://bugs.python.org/issue12417 - patch -Np1 -i ../WDAS.patch || return 1 - patch -Np0 -i ../doc_license_change.patch || return 1 - - cd .. - tar -cJf Python-${pkgver}.tar.xz "Python-${pkgver}" -} - build() { cd "${srcdir}/Python-${pkgver}" @@ -54,6 +39,14 @@ build() { # FS#23997 sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python2|" Lib/cgi.py + # Make sure sys.platform is set to linux2, even on kernel 3.X + # cf http://bugs.python.org/issue12326 + patch -Np1 -i ../linux2.patch + + # gdbm has new magic that whichdb does not recognize + # http://bugs.python.org/issue13007 + patch -Np1 -i ../gdbm-magic-values.patch + # Ensure that we are using the system copy of various libraries (expat, zlib and libffi), # rather than copies shipped in the tarball rm -r Modules/expat @@ -62,9 +55,10 @@ build() { export OPT="${CFLAGS}" ./configure --prefix=/usr --enable-shared --with-threads --enable-ipv6 \ - --enable-unicode=ucs4 --with-system-expat --with-system-ffi + --enable-unicode=ucs4 --with-system-expat --with-system-ffi \ + --with-dbmliborder=gdbm:ndbm - make + make MACHDEP=linux2 } package() { @@ -101,5 +95,10 @@ package() { "${pkgdir}/usr/lib/python${_pybasever}/config/Makefile" # license - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } +md5sums=('456d053a5d418adc913a4971e95fe918' + '1e6595f85a1da7f42b69456119924d50' + '3f8c0e310a0be0bd8b319d6c46bbd427' + '74c04694573e0d331e2a99d7b9179460' + '2874e9d93f4f46c1460605a5c7751372') diff --git a/libre/python2-libre/SRCBUILD b/libre/python2-libre/SRCBUILD new file mode 100644 index 000000000..f021d6624 --- /dev/null +++ b/libre/python2-libre/SRCBUILD @@ -0,0 +1,36 @@ +# $Id: PKGBUILD 123066 2011-05-07 23:01:49Z stephane $ +# Maintainer: AndyRTR +# Maintainer (Parabola): xihh + +pkgname=python2-libre +pkgver=2.7.2 +pkgrel=4 +pkgdesc="A high-level scripting language" +arch=('any') +license=('PSF') +url="http://www.python.org/" +source=(http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz + doc_license_change.patch + WDAS.patch) +md5sums=('75c87a80c6ddb0b785a57ea3583e04fa' + '1e6595f85a1da7f42b69456119924d50' + '3f8c0e310a0be0bd8b319d6c46bbd427') +options=(!strip docs libtool emptydirs !zipman !purge) + +build() { + cd "${srcdir}/Python-${pkgver}" + + export PKGEXT=.src.tar.xz + + patch -Np1 -i ../WDAS.patch + patch -Np0 -i ../doc_license_change.patch + +} + +package() { + export PKGEXT=.src.tar.xz + export PKGDEST=${startdir} + + mv "${srcdir}/Python-${pkgver}" ${pkgdir} + +} diff --git a/libre/python2-libre/gdbm-magic-values.patch b/libre/python2-libre/gdbm-magic-values.patch new file mode 100644 index 000000000..5613ae35c --- /dev/null +++ b/libre/python2-libre/gdbm-magic-values.patch @@ -0,0 +1,14 @@ +diff -up Python-2.7.2/Lib/whichdb.py.gdbm-1.9-magic Python-2.7.2/Lib/whichdb.py +--- Python-2.7.2/Lib/whichdb.py.gdbm-1.9-magic 2011-06-11 11:46:26.000000000 -0400 ++++ Python-2.7.2/Lib/whichdb.py 2011-09-30 15:45:21.778872290 -0400 +@@ -91,7 +91,7 @@ def whichdb(filename): + return "" + + # Check for GNU dbm +- if magic == 0x13579ace: ++ if magic in (0x13579ace, 0x13579acd, 0x13579acf): + return "gdbm" + + # Check for old Berkeley db hash file format v2 +diff -up Python-2.7.2/Misc/NEWS.gdbm-1.9-magic Python-2.7.2/Misc/NEWS + diff --git a/libre/python2-libre/linux2.patch b/libre/python2-libre/linux2.patch new file mode 100644 index 000000000..74ae2aa12 --- /dev/null +++ b/libre/python2-libre/linux2.patch @@ -0,0 +1,24 @@ +http://hg.python.org/cpython/rev/c816479f6aaf/ +diff --git a/configure b/configure +--- a/configure ++++ b/configure +@@ -2995,6 +2995,7 @@ then + MACHDEP="$ac_md_system$ac_md_release" + + case $MACHDEP in ++ linux*) MACHDEP="linux2";; + cygwin*) MACHDEP="cygwin";; + darwin*) MACHDEP="darwin";; + atheos*) MACHDEP="atheos";; +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -293,6 +293,7 @@ then + MACHDEP="$ac_md_system$ac_md_release" + + case $MACHDEP in ++ linux*) MACHDEP="linux2";; + cygwin*) MACHDEP="cygwin";; + darwin*) MACHDEP="darwin";; + atheos*) MACHDEP="atheos";; + -- cgit v1.2.3-2-g168b