void-packages/srcpkgs/gobject-introspection/files/g-ir-scanner-qemuwrapper
2019-02-12 23:54:12 -02:00

25 lines
731 B
Bash
Executable file

#!/bin/sh
# Use a modules directory which doesn't exist so we don't load random things
# which may then get deleted (or their dependencies) and potentially segfault
export GIO_MODULE_DIR=${XBPS_CROSS_BASE}/gio/modules-dummy
case "$XBPS_TARGET_MACHINE" in
x86_64*) _MACHINE=x86_64 ;;
i686) _MACHINE=i386 ;;
aarch64*) _MACHINE=aarch64 ;;
armv*) _MACHINE=arm ;;
mipsel*) _MACHINE=mipsel ;;
mips*) _MACHINE=mips ;;
ppc64le*) _MACHINE=ppc64le ;;
ppc64*) _MACHINE=ppc64 ;;
ppc*) _MACHINE=ppc ;;
*)
echo "unknown qemu architecture: $XBPS_TARGET_MACHINE"
exit 1
;;
esac
/usr/bin/qemu-${_MACHINE}-static \
-L ${XBPS_CROSS_BASE} \
-E LD_LIBRARY_PATH="${XBPS_CROSS_BASE}/usr/lib:.libs:${GIR_EXTRA_LIBS_PATH}" \
"$@"