void-packages/common/hooks/pre-install/98-fixup-gir-path.sh
Jürgen Buchmüller f7107d38eb cross gir: hook to fix wrong cross install path
When cross building the gir files (*.gir, *.typelib) are installed
at ${DESTDIR}/usr/${XBPS_CROROSS_TRIPLET}/usr/* while they need to
be at ${DESTDIR}/usr/*
This hook is a temporary workaround until we can fix the cross gir
install to not insert the (as it seems) host's ${DESTDIR} into the
target's destination path.

Remove the temporary hack in polkit which is now handled by the hook.
2019-04-28 14:37:40 +02:00

12 lines
404 B
Bash

# This hook fixes the wrong install path of 'gir' files
# when cross building packages. It's a workaround and
# not a proper fix. Remove it once the root cause of the
# problem is fixed.
hook() {
[ -z "$CROSS_BUILD" ] && return
if [ -d "${DESTDIR}/usr/${XBPS_CROSS_TRIPLET}/usr" ]; then
cp -a "${DESTDIR}"/usr/{${XBPS_CROSS_TRIPLET}/usr/*,}
rm -rf "${DESTDIR}"/usr/${XBPS_CROSS_TRIPLET}/usr
fi
}