wxPython4: fix cross build.

The PYTHON_CONFIG path was using /bin/python3-config, but the cross
toolchains currently lack usrmerge. Since the canonical location is
/usr/bin anyway, switching to /usr/bin is 100% correct.

Since we are here, also clean up how CFLAGS are being set.
This commit is contained in:
Érico Rolim 2021-02-19 21:45:00 -03:00 committed by Érico Nogueira Rolim
parent 7f53018731
commit 0d23658eff
1 changed files with 2 additions and 5 deletions

View File

@ -16,24 +16,21 @@ license="custom:wxWindows"
homepage="http://www.wxpython.org/"
distfiles="${PYPI_SITE}/w/wxPython/wxPython-${version}.tar.gz"
checksum=3be608bfdede3063678cc703453850ab0a018b82bafd5ee057302250b18f0233
# FIXME
nocross="https://build.voidlinux.org/builders/armv7l-musl_builder/builds/31785/steps/shell_3/logs/stdio"
if [ "$CROSS_BUILD" ]; then
CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/python${py3_ver}"
CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include"
fi
pre_build() {
chmod -R go+rX $wrksrc
if [ "$CROSS_BUILD" ]; then
PYPREFIX="$XBPS_CROSS_BASE"
CFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include"
LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py3_lib} -L${XBPS_CROSS_BASE}/usr/lib"
CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS"
LDSHARED="${CC} -shared $LDFLAGS"
env CC="$CC" LDSHARED="$LDSHARED" \
PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \
PYTHON_CONFIG="${XBPS_CROSS_BASE}/bin/python3-config" \
PYTHON_CONFIG="${XBPS_CROSS_BASE}/usr/bin/python3-config" \
LDFLAGS="$LDFLAGS" python3 build.py build_py --use_syswx
else
python3 build.py build_py --use_syswx