New comment by newbluemoon on void-packages repository https://github.com/void-linux/void-packages/issues/27437#issuecomment-752364348 Comment: What about preventing that `$XBPS_CROSS_BASE` ends up in `INTROSPECTION_GIRDIR` and `INTROSPECTION_TYPELIBDIR` in the first place; i.e. not setting `PKG_CONFIG_SYSROOT_DIR` in the pkg-config wrapper when these variables are queried, like e.g. below and removing `98-fixup-gir-path.sh`? ``` diff --git a/common/hooks/pre-configure/02-script-wrapper.sh b/common/hooks/pre-configure/02-script-wrapper.sh index fe2000af11..2c978c4977 100644 --- a/common/hooks/pre-configure/02-script-wrapper.sh +++ b/common/hooks/pre-configure/02-script-wrapper.sh @@ -87,7 +87,10 @@ pkgconfig_wrapper() { cat >>${XBPS_WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-pkg-config<<_EOF #!/bin/sh -export PKG_CONFIG_SYSROOT_DIR="$XBPS_CROSS_BASE" +case \$@ in + *--variable=gir*|*--variable=typelib*) ;; + *) export PKG_CONFIG_SYSROOT_DIR="$XBPS_CROSS_BASE" ;; +esac export PKG_CONFIG_PATH="$XBPS_CROSS_BASE/usr/lib/pkgconfig:$XBPS_CROSS_BASE/usr/share/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}" export PKG_CONFIG_LIBDIR="$XBPS_CROSS_BASE/usr/lib/pkgconfig\${PKG_CONFIG_LIBDIR:+:\${PKG_CONFIG_LIBDIR}}" exec /usr/bin/pkg-config "\$@" ```