aboutsummaryrefslogtreecommitdiffstats
path: root/main/python
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-06-04 12:50:48 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-06-04 12:55:59 +0000
commit7816089f20b107fb4f6620903bfd745956038467 (patch)
treefbb0fe5d3fc7b895bbf1e362f3943e7c07ed5675 /main/python
parent3fd9b5d2c14b7134f73218248596790fa2c287b2 (diff)
downloadaports-7816089f20b107fb4f6620903bfd745956038467.tar.bz2
aports-7816089f20b107fb4f6620903bfd745956038467.tar.xz
main/python: fix ctypes.util.find_library() and set CFLAGS
ref #2012
Diffstat (limited to 'main/python')
-rw-r--r--main/python/APKBUILD19
-rw-r--r--main/python/find_library.patch11
2 files changed, 25 insertions, 5 deletions
diff --git a/main/python/APKBUILD b/main/python/APKBUILD
index 6f9841387a..70e88ebc90 100644
--- a/main/python/APKBUILD
+++ b/main/python/APKBUILD
@@ -2,7 +2,7 @@
pkgname=python
pkgver=2.7.5
_verbase=${pkgver%.*}
-pkgrel=0
+pkgrel=1
pkgdesc="A high-level scripting language"
url="http://www.python.org"
arch="all"
@@ -15,6 +15,7 @@ depends=""
makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev
gdbm-dev sqlite-dev libffi-dev readline-dev"
source="http://www.$pkgname.org/ftp/$pkgname/$pkgver/Python-$pkgver.tar.bz2
+ find_library.patch
"
prepare() {
@@ -24,16 +25,21 @@ prepare() {
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1
esac
done
+
+ # Make sure we use system libs
+ rm -r Modules/expat Modules/_ctypes/libffi* Modules/zlib || return 1
}
build() {
cd "$srcdir/Python-$pkgver"
+ export OPT="$CFLAGS"
./configure --prefix=/usr \
--enable-shared \
--with-threads \
--enable-ipv6 \
--with-system-ffi \
--with-system-expat \
+ --with-system-zlib \
--enable-unicode=ucs4 \
|| return 1
make || return 1
@@ -41,7 +47,7 @@ build() {
package() {
cd "$srcdir/Python-$pkgver"
- make -j1 DESTDIR="$pkgdir" install
+ make -j1 DESTDIR="$pkgdir" install || return 1
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
rm "$pkgdir/usr/bin/2to3" || return 1
}
@@ -75,6 +81,9 @@ gdbm() {
_mv_files $(find usr/lib -name '*gdbm*')
}
-md5sums="6334b666b7ff2038c761d7b27ba699c1 Python-2.7.5.tar.bz2"
-sha256sums="3b477554864e616a041ee4d7cef9849751770bc7c39adaf78a94ea145c488059 Python-2.7.5.tar.bz2"
-sha512sums="e0080a380cc280575efb8ec065f99a1ab6f0ac0528c9bb5688414b1d6bb3f42645d8257557764049cefe40f40a0cd7afca1094099ecbf15b7a97757e3dd45492 Python-2.7.5.tar.bz2"
+md5sums="6334b666b7ff2038c761d7b27ba699c1 Python-2.7.5.tar.bz2
+22e32fddd3a973172f2fd570f8c5c416 find_library.patch"
+sha256sums="3b477554864e616a041ee4d7cef9849751770bc7c39adaf78a94ea145c488059 Python-2.7.5.tar.bz2
+452f9dc842316bcacfd7d6547ac5c1faaa286568cc782db1c0099464bc913946 find_library.patch"
+sha512sums="e0080a380cc280575efb8ec065f99a1ab6f0ac0528c9bb5688414b1d6bb3f42645d8257557764049cefe40f40a0cd7afca1094099ecbf15b7a97757e3dd45492 Python-2.7.5.tar.bz2
+a1ea61266bb56358158de4036f5be0ad579b44ae616fe0f8d5cef59610886daed73979308c26e56f944435167a6bb8cc6278e6f97f9a72b5f5786d3c31668fc2 find_library.patch"
diff --git a/main/python/find_library.patch b/main/python/find_library.patch
new file mode 100644
index 0000000000..b2a7d4fbd7
--- /dev/null
+++ b/main/python/find_library.patch
@@ -0,0 +1,11 @@
+--- ./Lib/ctypes/util.py.orig 2013-05-27 14:59:31.253297476 +0000
++++ ./Lib/ctypes/util.py 2013-05-27 14:59:55.730215183 +0000
+@@ -198,7 +198,7 @@
+ abi_type = mach_map.get(machine, 'libc6')
+
+ # XXX assuming GLIBC's ldconfig (with option -p)
+- expr = r'\s+(lib%s\.[^\s]+)\s+\(%s' % (re.escape(name), abi_type)
++ expr = r'\s+(lib%s\.[^\s]+)\s+\(' % (re.escape(name))
+ f = os.popen('/sbin/ldconfig -p 2>/dev/null')
+ try:
+ data = f.read()