[arch-commits] Commit in python2/trunk (PKGBUILD gdbm-magic-values.patch linux2.patch)

Stéphane Gaudreault stephane at archlinux.org
Mon Nov 21 12:35:56 EST 2011


    Date: Monday, November 21, 2011 @ 12:35:56
  Author: stephane
Revision: 143038

upgpkg: python2 2.7.2-4

revert last changes, re-enable gdbm

Added:
  python2/trunk/gdbm-magic-values.patch
  python2/trunk/linux2.patch
Modified:
  python2/trunk/PKGBUILD

-------------------------+
 PKGBUILD                |   24 +++++++++++++++++-------
 gdbm-magic-values.patch |   13 +++++++++++++
 linux2.patch            |   23 +++++++++++++++++++++++
 3 files changed, 53 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-11-21 17:31:39 UTC (rev 143037)
+++ PKGBUILD	2011-11-21 17:35:56 UTC (rev 143038)
@@ -5,7 +5,7 @@
 
 pkgname=python2
 pkgver=2.7.2
-pkgrel=3
+pkgrel=4
 _pybasever=2.7
 pkgdesc="A high-level scripting language"
 arch=('i686' 'x86_64')
@@ -16,8 +16,12 @@
 optdepends=('tk: for IDLE')
 conflicts=('python<3')
 options=('!makeflags')
-source=(http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz)
-sha1sums=('56700044141402dc35e7a0a24aa7ffda1a8c1a53')
+source=(http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz
+        linux2.patch
+        gdbm-magic-values.patch)
+sha1sums=('56700044141402dc35e7a0a24aa7ffda1a8c1a53'
+          '937c06190899a491d662c7918658313e7640070e'
+          '0f4cd9508c9ace620a829a688a9285e0480b5fb5')
 
 build() {
   cd "${srcdir}/Python-${pkgver}"
@@ -32,6 +36,14 @@
   # 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
@@ -40,11 +52,9 @@
 
   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 sure sys.platform is set to linux2, even on kernel 3.X
-  # cf http://bugs.python.org/issue12326
-  # Here we simply run make with a different MACHDEP variable. It requires no patching.
   make MACHDEP=linux2
 }
 

Added: gdbm-magic-values.patch
===================================================================
--- gdbm-magic-values.patch	                        (rev 0)
+++ gdbm-magic-values.patch	2011-11-21 17:35:56 UTC (rev 143038)
@@ -0,0 +1,13 @@
+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

Added: linux2.patch
===================================================================
--- linux2.patch	                        (rev 0)
+++ linux2.patch	2011-11-21 17:35:56 UTC (rev 143038)
@@ -0,0 +1,23 @@
+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";;



More information about the arch-commits mailing list