CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
python: updated release
[ports/opt-arm.git] / python / Pkgfile
... / ...
CommitLineData
1# Description: Python interpreter, version 2.7
2# URL: http://www.python.org
3# Maintainer: Juergen Daubert, jue at crux dot nu
4# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
5# Depends on: db gdbm openssl bzip2 zlib sqlite3
6
7name=python
8version=2.7.14
9release=2
10source=(http://www.python.org/ftp/$name/$version/Python-$version.tar.xz \
11 CVE-2018-1000030.patch
12 pyconfig.h)
13
14build () {
15 cd Python-$version
16
17 export CFLAGS="-O2 -pipe -mfloat-abi=hard"
18 export CXXFLAGS="$CFLAGS"
19
20 # fix for CVE-2018-1000030
21 # see https://bugs.python.org/issue31530
22 patch -p1 -i $SRC/CVE-2018-1000030.patch
23
24
25 # set OPT to the python default without -O3
26 # our CFLAGS are used as well
27 OPT="-Wall -Wstrict-prototypes -fwrapv" \
28 ./configure --prefix=/usr \
29 --enable-shared \
30 --with-threads \
31 --enable-ipv6
32
33 make
34 make -j1 DESTDIR=$PKG install
35
36 # fix issue with man-page symlink
37 ln -sf python2.7.1 $PKG/usr/share/man/man1/python.1
38
39 ln -sf python2.7 $PKG/usr/bin/python
40 ln -s python2.7 $PKG/usr/lib/python
41 ln -s python2.7 $PKG/usr/include/python
42 ln -s /usr/lib/libpython2.7.so $PKG/usr/lib/python2.7/config/libpython2.7.so
43
44 rm -r $PKG/usr/lib/python/{bsddb,ctypes,email,sqlite3}/test
45 rm -r $PKG/usr/lib/python/{distutils,json,lib2to3}/tests
46 rm $PKG/usr/lib/python/{distutils,site-packages,test/data}/README
47 rm $PKG/usr/lib/python/idlelib/{ChangeLog,{NEWS,README,TODO}.txt}
48 rm $PKG/usr/lib/python/ctypes/macholib/README.ctypes
49
50 mv $PKG/usr/include/python2.7/pyconfig{,-32}.h
51 install -m 0644 $SRC/pyconfig.h $PKG/usr/include/python2.7/
52}