void-packages/srcpkgs/gobject-introspection/files/g-ir-scanner-wrapper
q66 c223011e19 gobject-introspection: fix wrong ld library path in cross
See comments in patch for further information. This solution
is a bit hacky but I don't see any other way out.

Closes: #11359 [via git-merge-pr]
2019-04-27 21:21:01 +02:00

18 lines
821 B
Bash
Executable file

#!/usr/bin/env bash
# Check if we are running in an xbps-src environment and run the wrapper if that
# is the case.
if [ -n "$XBPS_CROSS_BASE" -a -n "$XBPS_TARGET_MACHINE" -a -n "$XBPS_VERSION" ]; then
# This prevents g-ir-scanner from writing cache data to $HOME
export GI_SCANNER_DISABLE_CACHE=1
# This prevents the native C compiler from using $XBPS_CROSS_BASE libraries
export GI_SCANNER_EXTRA_LD_LIBRARY_PATH=/usr/lib
exec /usr/bin/g-ir-scanner.wrapped \
--use-binary-wrapper=/usr/bin/g-ir-scanner-qemuwrapper \
--use-ldd-wrapper=/usr/bin/g-ir-scanner-lddwrapper \
--add-include-path=${XBPS_CROSS_BASE}/usr/share/gir-1.0 \
--add-include-path=${XBPS_CROSS_BASE}/usr/lib/gir-1.0 \
"${@//-I\/usr\/include/-I${XBPS_CROSS_BASE}\/usr\/include}"
fi
exec /usr/bin/g-ir-scanner.wrapped "$@"