gnubg: defer setting PYTHON_CPPFLAGS until pre_configure

The package pulls itself as a hostmakedepends on cross; exporting
PYTHON_CPPFLAGS at the top level of the template will corrupt the build
environment when the native host package must also be built.
This commit is contained in:
Andrew J. Hesford 2022-11-06 09:04:59 -05:00
parent 5c1e3f5680
commit 253b9f0b98
1 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,6 @@ LDLIBS="-lm -lreadline -lpython${py3_ver}"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" ${pkgname}"
export PYTHON_CPPFLAGS="-I$XBPS_CROSS_BASE/usr/include/python${py3_ver}"
fi
case "$XBPS_TARGET_MACHINE" in
@ -31,5 +30,7 @@ pre_configure() {
makeweights < gnubg.weights > gnubg.wd
makebearoff -o 6 -s 7999999 -f gnubg_os0.bd
makebearoff -t 6x6 -f gnubg_ts0.bd
export PYTHON_CPPFLAGS="-I${XBPS_CROSS_BASE}/usr/include/python${py3_ver}"
fi
}