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

19 lines
821 B
Bash

#!/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 "$@"