From 253b9f0b98c176ce38dce5b942902126593cd22b Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Sun, 6 Nov 2022 09:04:59 -0500 Subject: [PATCH] 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. --- srcpkgs/gnubg/template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srcpkgs/gnubg/template b/srcpkgs/gnubg/template index dc7ddded0f2..39d5ef85b1c 100644 --- a/srcpkgs/gnubg/template +++ b/srcpkgs/gnubg/template @@ -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 }