python: add patch to detect Linux 3.x as linux2 in sys.platform.

This commit is contained in:
Juan RP 2011-09-19 10:10:37 +02:00
parent 040eaa74a6
commit 56efac8fb9
4 changed files with 50 additions and 18 deletions

View file

@ -1,2 +1,3 @@
abi_depends=">=2.7<3.0"
api_depends="${abi_depends}"
# Require this version for Linux 3.x sys.platform fix.
api_depends=">=2.7.2_1<3.0"

View file

@ -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";;

View file

@ -5,6 +5,8 @@ long_desc="${long_desc}
This package contains files for development, headers, static libs, etc."
revision=1
Add_dependency run libffi-devel
Add_dependency run zlib-devel
Add_dependency run readline-devel
@ -19,14 +21,7 @@ Add_dependency run python
do_install()
{
install -d ${DESTDIR}/usr/{lib,bin}
install -d ${DESTDIR}/usr/include/python2.7
mv ${SRCPKGDESTDIR}/usr/bin/python*-config ${DESTDIR}/usr/bin
mv ${SRCPKGDESTDIR}/usr/lib/pkgconfig ${DESTDIR}/usr/lib
mv ${SRCPKGDESTDIR}/usr/include/python2.7/* \
${DESTDIR}/usr/include/python2.7
mv ${DESTDIR}/usr/include/python2.7/pyconfig.h \
${SRCPKGDESTDIR}/usr/include/python2.7
vmove "usr/bin/python*-config" usr/bin
vmove usr/lib/pkgconfig usr/lib
vmove usr/include/python2.7 usr/include
}

View file

@ -1,12 +1,11 @@
# Template build file for 'python'.
pkgname=python
version=2.7.2
revision=1
patch_args="-Np1"
wrksrc="Python-$version"
distfiles="http://www.python.org/ftp/python/$version/Python-$version.tar.bz2"
configure_args="--with-threads --enable-ipv6 --with-signal-module
--enable-shared --with-system-ffi --enable-unicode=ucs4 --with-system-expat
--with-wctype-functions"
build_style=gnu_configure
build_style=custom-install
short_desc="Interpreted, interactive, object-oriented programming language"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.python.org"
@ -50,13 +49,27 @@ Add_dependency build db-devel
Add_dependency build ncurses-devel
Add_dependency build sqlite-devel
pre_configure()
do_configure()
{
export OPT="${XBPS_CFLAGS} -fwrapv"
# Enable built-in SQLite3 module to load extensions (Arch fix FS#22122)
sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
export OPT="${XBPS_CFLAGS}"
./configure ${CONFIGURE_SHARED_ARGS} --with-threads \
--enable-ipv6 --with-signal-module --enable-shared \
--with-system-ffi --enable-unicode=ucs4 --with-system-expat \
--with-wctype-functions
}
post_install()
do_build()
{
make ${makejobs}
}
do_install()
{
make DESTDIR=${DESTDIR} install
chmod 755 ${DESTDIR}/usr/lib/libpython*.so*
install -Dm644 LICENSE ${DESTDIR}/usr/share/licenses/python/LICENSE
}