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.
This commit is contained in:
Jürgen Buchmüller 2019-04-28 14:33:31 +02:00
parent 2b3560f1ab
commit f7107d38eb
2 changed files with 12 additions and 5 deletions

View File

@ -0,0 +1,12 @@
# 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
}

View File

@ -39,11 +39,6 @@ post_configure() {
}
post_install() {
if [ "$CROSS_BUILD" ]; then
# Move gir-1.0 files erroneously installed in
# a ${XBPS_CROSS_TRIPLET}/ prefixed subdir
mv -v ${DESTDIR}/usr/{${XBPS_CROSS_TRIPLET}/usr,}/share/gir-1.0
fi
vinstall ${FILESDIR}/polkit-1.pam 644 etc/pam.d polkit-1
vsv polkitd
}