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

21 lines
827 B
Plaintext
Raw Normal View History

2019-01-29 14:18:25 +01:00
#!/bin/sh
#
# 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
# wrapper for g-ir-compiler, which runs the target version of it through qemu.
# g-ir-compiler writes out the raw content of a C struct to disk, and therefore
# is architecture dependent.
if [ -x build/tools/g-ir-compiler ]; then
# We are compiling gobject-introspection.
# lets used the one we just compiled.
gir_bin=build/tools/g-ir-compiler
elif [ -x ${XBPS_CROSS_BASE}/usr/bin/g-ir-compiler.wrapped ]; then
# Lets use the g-ir-compiler from the target
gir_bin=${XBPS_CROSS_BASE}/usr/bin/g-ir-compiler.wrapped
fi
exec /usr/bin/g-ir-scanner-qemuwrapper ${gir_bin} "$@"
fi
exec /usr/bin/g-ir-compiler.wrapped "$@"