From f7107d38eb07806450ec596d91015d204780f166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sun, 28 Apr 2019 14:33:31 +0200 Subject: [PATCH] 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. --- common/hooks/pre-install/98-fixup-gir-path.sh | 12 ++++++++++++ srcpkgs/polkit/template | 5 ----- 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 common/hooks/pre-install/98-fixup-gir-path.sh diff --git a/common/hooks/pre-install/98-fixup-gir-path.sh b/common/hooks/pre-install/98-fixup-gir-path.sh new file mode 100644 index 00000000000..c81c8257294 --- /dev/null +++ b/common/hooks/pre-install/98-fixup-gir-path.sh @@ -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 +} diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template index 75ce14d508d..e2b9da98fd5 100644 --- a/srcpkgs/polkit/template +++ b/srcpkgs/polkit/template @@ -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 }