diff --git a/srcpkgs/python/depends b/srcpkgs/python/depends index 1ea9976a2b9..22b4c90fbda 100644 --- a/srcpkgs/python/depends +++ b/srcpkgs/python/depends @@ -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" diff --git a/srcpkgs/python/patches/linux2.patch b/srcpkgs/python/patches/linux2.patch new file mode 100644 index 00000000000..670510fdec2 --- /dev/null +++ b/srcpkgs/python/patches/linux2.patch @@ -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";; diff --git a/srcpkgs/python/python-devel.template b/srcpkgs/python/python-devel.template index 40d437747f1..e03f1cccd62 100644 --- a/srcpkgs/python/python-devel.template +++ b/srcpkgs/python/python-devel.template @@ -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 } diff --git a/srcpkgs/python/template b/srcpkgs/python/template index ed460532c47..f262fe801d1 100644 --- a/srcpkgs/python/template +++ b/srcpkgs/python/template @@ -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 " 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 }