compat-32/python-32/Pkgfile

44 lines
1.4 KiB
Plaintext
Raw Normal View History

# Description: Python interpreter, version 2.7
# URL: http://www.python.org
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
2019-08-27 13:48:19 +02:00
# Depends on: bzip2-32 db-32 gdbm-32 openssl-32 python sqlite3-32 zlib-32
2018-07-04 12:59:06 +02:00
# Optional: libtirpc-32
name=python-32
2020-05-02 08:34:41 +02:00
version=2.7.18
2014-12-23 12:56:23 +01:00
release=1
2017-09-22 10:53:12 +02:00
source=(https://www.python.org/ftp/python/$version/Python-$version.tar.xz)
2015-06-14 07:27:50 +02:00
build() {
cd Python-$version
2018-07-04 12:59:06 +02:00
[ -e '/usr/lib/pkgconfig/libtirpc.pc' ] && [ ! -e '/usr/lib32/pkgconfig/libtirpc.pc' ] && printf "\e[031mlibtirpc is detected on your system, please run:
prt-get depinst libtirpc-32
before continuing with python-32.\033[0m\n" &&
exit 1
2013-04-10 13:35:49 +02:00
# set OPT to the python default without -O3
# our CFLAGS are used as well
OPT="-Wall -Wstrict-prototypes -fwrapv" \
./configure --prefix=/usr \
--libdir=/usr/lib32 \
--enable-shared \
--with-threads \
2013-04-10 13:35:49 +02:00
--enable-ipv6
2013-04-10 13:35:49 +02:00
make
make -j1 DESTDIR=$PKG install
ln -sf python2.7 $PKG/usr/bin/python
ln -s python2.7 $PKG/usr/lib32/python
ln -s python2.7 $PKG/usr/include/python
ln -s /usr/lib32/libpython2.7.so $PKG/usr/lib32/python2.7/config/libpython2.7.so
2013-04-10 13:35:49 +02:00
mv $PKG/usr/include/python2.7/pyconfig.h $PKG/
2016-07-13 04:32:44 +02:00
rm -r $PKG/usr/{bin,include,lib,share/man}
2013-04-10 13:35:49 +02:00
install -d $PKG/usr/include/python2.7
mv $PKG/pyconfig.h $PKG/usr/include/python2.7/pyconfig-32.h
install -d $PKG/usr/lib32/python2.7/site-packages
}