how-lix-os-pkgs/python3-dynamic/default/conf.sh

38 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
# force system libs because "with-system-ffi" is apparently ignored(!) on linux.
#rm -fr Modules/_ctypes/darwin* Modules/_ctypes/libffi*
autoreconf -fi
LD_LIBRARY_PATH="/lib" \
CONFIG_LDFLAGS="-L/lib -lffi -lbz2 -lexpat" \
LDFLAGS="$LDFLAGS -L/lib -lffi -lbz2 -lexpat" \
CPPFLAGS="$CPPFLAGS -I/include" \
CFLAGS="$CFLAGS -lffi -I/include -fno-semantic-interposition" \
./configure \
--enable-ipv6 \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
--with-computed-gotos \
--with-system-ffi \
--with-system-expat \
--with-openssl="/etc/ssl/ca-bundle.crt" \
--without-ensurepip \
--disable-shared \
--enable-static \
--build="$(uname -m)-lix-linux-musl" \
--host="$(uname -m)-lix-linux-musl" \
--prefix=/usr
## explanation
#
# --disable-shared: don't build anything with dynamic linking.
#
# --enable-static: use static linking instead.
#
# --build: make sure the build string gets set correctly.
#
# --host: make sure the host string gets set correctly.
#
# --prefix: python3 breaks in weird ways if this is left empty.