Files
ports/multilib/python3-32/spkgbuild
2019-03-28 17:29:38 +08:00

37 lines
960 B
Plaintext

# description : Next generation of the python high-level scripting language
# depends : libffi-32 python3
name=python3-32
version=3.7.3
release=1
source=(https://www.python.org/ftp/python/$version/Python-$version.tar.xz)
md5sum=(93df27aec0cd18d6d42173e601ffbbfd)
build() {
cd Python-$version
export CC="gcc -m32"
export CXX="g++ -m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
CXX="/usr/bin/g++" \
./configure --prefix=/usr \
--libdir=/usr/lib32 \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--without-ensurepip
make
make DESTDIR=$PKG install
chmod -v 755 $PKG/usr/lib32/libpython${version::3}m.so
chmod -v 755 $PKG/usr/lib32/libpython3.so
mv $PKG/usr/include/python3.7m/pyconfig.h $PKG/
rm -r $PKG/usr/{bin,include,lib,share/man}
install -d $PKG/usr/include/python3.7m
mv $PKG/pyconfig.h $PKG/usr/include/python3.7m/pyconfig-32.h
}