diff options
author | sibel <lesibel@free.fr> | 2010-12-26 20:00:15 +0100 |
---|---|---|
committer | sibel <lesibel@free.fr> | 2010-12-26 20:00:15 +0100 |
commit | 353030bef0a1b50692962ef8b71e03a115d9db73 (patch) | |
tree | 7f189695bdb2ece94d96d824d10c3ce3a1c7cd11 /extra/python2/Pkgfile | |
parent | 72200026156f774235b578e7b997839314678277 (diff) | |
download | nutyx-extra-353030bef0a1b50692962ef8b71e03a115d9db73.tar.gz nutyx-extra-353030bef0a1b50692962ef8b71e03a115d9db73.tar.bz2 nutyx-extra-353030bef0a1b50692962ef8b71e03a115d9db73.tar.xz nutyx-extra-353030bef0a1b50692962ef8b71e03a115d9db73.zip |
python2#2.7.1-3, maj port
Diffstat (limited to 'extra/python2/Pkgfile')
-rwxr-xr-x | extra/python2/Pkgfile | 56 |
1 files changed, 46 insertions, 10 deletions
diff --git a/extra/python2/Pkgfile b/extra/python2/Pkgfile index 879e000c5..699bc5c93 100755 --- a/extra/python2/Pkgfile +++ b/extra/python2/Pkgfile @@ -6,22 +6,58 @@ name=python2 version=2.7.1 -release=1 -source=( http://www.python.org/ftp/python/$version/Python-$version.tar.bz2) +release=3 +_pybasever=2.7 + +source=( http://www.python.org/ftp/python/$version/Python-$version.tar.bz2 + python-2.7-db51.diff) build() { cd Python-$version - sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" \ - setup.py - ./configure --prefix=/usr \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --enable-shared + + patch -Np1 -i ../python-2.7-db51.diff + sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py + rm -r Modules/expat + rm -r Modules/zlib + rm -r Modules/_ctypes/{darwin,libffi}* + +# sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" \ +# setup.py + + export OPT="${CFLAGS}" + ./configure --prefix=/usr --enable-shared --with-threads --enable-ipv6 \ + --enable-unicode=ucs4 --with-system-expat --with-system-ffi + make make DESTDIR=$PKG install + + ln -sf python${_pybasever} $PKG/usr/bin/python2 + ln -sf python${_pybasever}-config $PKG/usr/bin/python2-config + + ln -sf ../../libpython${_pybasever}.so \ + $PKG/usr/lib/python${_pybasever}/config/libpython${_pybasever}.so + + mv $PKG/usr/bin/smtpd.py $pkgdir/usr/lib/python${_pybasever}/ + + # some useful "stuff" + install -dm755 $PKG/usr/lib/python${_pybasever}/Tools/{i18n,scripts} + install -m755 Tools/i18n/{msgfmt,pygettext}.py \ + $PKG/usr/lib/python${_pybasever}/Tools/i18n/ + install -m755 Tools/scripts/{README,*py} \ + $PKG/usr/lib/python${_pybasever}/Tools/scripts/ + + # fix conflicts with python + mv $PKG/usr/bin/idle{,2} + mv $PKG/usr/bin/pydoc{,2} + + # clean up #!s + find $PKG/usr/lib/python2.7/ -name '*.py' | \ + xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" + + # clean-up reference to build directory + sed -i "s#$SRC/Python-$version:##" \ + $PKG/usr/lib/python${_pybasever}/config/Makefile - rm $PKG/usr/bin/idle - rm $PKG/usr/bin/pydoc rm $PKG/usr/bin/python rm $PKG/usr/bin/python-config |