Files
ports/core/python2/spkgbuild
2020-05-03 23:38:23 +08:00

36 lines
795 B
Plaintext

# description : Next generation of the python high-level scripting language
# depends : libffi openssl sqlite
name=python2
version=2.7.17
release=3
source="https://www.python.org/ftp/python/$version/Python-$version.tar.xz
pyconfig.h"
build() {
cd Python-$version
sed -i '/#SSL/,+3 s/^#//' Modules/Setup.dist
./configure --prefix=/usr \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--enable-unicode=ucs4
make
make DESTDIR=$PKG install
# conflict with python3
rm $PKG/usr/bin/2to3
chmod -v 755 $PKG/usr/lib/libpython2.7.so.1.0
case $XHOST in
*-musl) continue;;
*)
mv $PKG/usr/include/python2.7/pyconfig{,-64}.h
install -m 0644 $SRC/pyconfig.h $PKG/usr/include/python2.7/
;;
esac
}