void-packages/srcpkgs/gobject-introspection/files/g-ir-scanner-wrapper

17 lines
694 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
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 "$@"