X-Git-Url: http://gitweb/?a=blobdiff_plain;f=python%2FPkgfile;h=00013b34e452d03828b889658a0569cec7d4abd4;hb=173983124044954d2edb63801b6560ba849d54ad;hp=0103aa80b686a4319c51f38a7957d60b255f50f5;hpb=cb93fd1d4baeb5dde95886eb242f734bee30e12c;p=ports%2Fopt-arm.git diff --git a/python/Pkgfile b/python/Pkgfile index 0103aa8..00013b3 100644 --- a/python/Pkgfile +++ b/python/Pkgfile @@ -5,33 +5,48 @@ # Depends on: db gdbm openssl bzip2 zlib sqlite3 name=python -version=2.7.2 +version=2.7.14 release=2 source=(http://www.python.org/ftp/$name/$version/Python-$version.tar.xz \ - $name-gdbm.patch) + CVE-2018-1000030.patch + pyconfig.h) build () { - cd Python-$version + cd Python-$version - patch -p1 -i $SRC/$name-gdbm.patch + export CFLAGS="-O2 -pipe -mfloat-abi=hard" + export CXXFLAGS="$CFLAGS" - ./configure --prefix=/usr \ - --mandir=/usr/man \ - --enable-shared \ - --with-threads \ - --enable-ipv6 + # fix for CVE-2018-1000030 + # see https://bugs.python.org/issue31530 + patch -p1 -i $SRC/CVE-2018-1000030.patch + - make EXTRA_CFLAGS="$CFLAGS" - make -j1 DESTDIR=$PKG install + # set OPT to the python default without -O3 + # our CFLAGS are used as well + OPT="-Wall -Wstrict-prototypes -fwrapv" \ + ./configure --prefix=/usr \ + --enable-shared \ + --with-threads \ + --enable-ipv6 - 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 + make + make -j1 DESTDIR=$PKG install - 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/lib/python/idlelib/{ChangeLog,{NEWS,README,TODO}.txt} - rm $PKG/usr/lib/python/ctypes/macholib/README.ctypes + # fix issue with man-page symlink + 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/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 + install -m 0644 $SRC/pyconfig.h $PKG/usr/include/python2.7/ }