X-Git-Url: http://gitweb/?a=blobdiff_plain;ds=sidebyside;f=python%2FPkgfile;h=c2b5ce91909cf6b875b49c53d9420aadfa0bf977;hb=3eb9dd4947b6f2049968891f00addf135e5fc421;hp=3405475b5e18f9b593ef65475190f926a433cf3c;hpb=90a859d94f319703d9a172bb2be152f43bdb4819;p=ports%2Fopt-arm.git diff --git a/python/Pkgfile b/python/Pkgfile index 3405475..c2b5ce9 100644 --- a/python/Pkgfile +++ b/python/Pkgfile @@ -1,44 +1,49 @@ # Description: Python interpreter, version 2.7 # URL: http://www.python.org # Maintainer: Juergen Daubert, jue at crux dot nu -# Depends on: db gdbm openssl bzip2 zlib sqlite3 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu +# Depends on: db gdbm openssl bzip2 zlib sqlite3 name=python -version=2.7.5 -release=1 +version=2.7.18 +release=2 source=(http://www.python.org/ftp/$name/$version/Python-$version.tar.xz \ pyconfig.h) build () { cd Python-$version - # set OPT to the python default without -O3 - # our CFLAGS are used as well - OPT="-Wall -Wstrict-prototypes -fwrapv" \ + # remove 2to3, we use the one from python3 + rm -r Lib/lib2to3 + + export CFLAGS="-O2 -pipe -mfloat-abi=hard" + export CXXFLAGS="$CFLAGS" + + # remove tests + rm -r Lib/{bsddb,ctypes,email,lib-tk,sqlite3,unittest}/test + rm -r Lib/{{distutils,json}/tests,idlelib/idle_test,test} + ./configure --prefix=/usr \ - --mandir=/usr/man \ --enable-shared \ --with-threads \ - --enable-ipv6 + --enable-ipv6 make make -j1 DESTDIR=$PKG install # fix issue with man-page symlink - ln -sf python2.7.1 $PKG/usr/man/man1/python.1 + ln -sf python2.7.1 $PKG/usr/share/man/man1/python.1 ln -sf python2.7 $PKG/usr/bin/python ln -s python2.7 $PKG/usr/lib/python ln -s python2.7 $PKG/usr/include/python ln -s /usr/lib/libpython2.7.so $PKG/usr/lib/python2.7/config/libpython2.7.so - rm -r $PKG/usr/lib/python/{bsddb,ctypes,email,sqlite3}/test - rm -r $PKG/usr/lib/python/{distutils,json,lib2to3}/tests - rm $PKG/usr/lib/python/{distutils,site-packages,test/data}/README + rm $PKG/usr/bin/2to3 + rm $PKG/usr/lib/python/{distutils,site-packages}/README rm $PKG/usr/lib/python/idlelib/{ChangeLog,{NEWS,README,TODO}.txt} rm $PKG/usr/lib/python/ctypes/macholib/README.ctypes mv $PKG/usr/include/python2.7/pyconfig{,-32}.h - cp $SRC/pyconfig.h $PKG/usr/include/python2.7/ + install -m 0644 $SRC/pyconfig.h $PKG/usr/include/python2.7/ }