From 570928df0e774c6a696eb4b0f9c24c93adffbb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Tue, 24 Mar 2020 18:59:35 +0100 Subject: [PATCH] cjs: fix cross build The cross-built gobject-introspection does not contain the /usr/share/gobject-introspection-1.0/tests directory. If it's missing, copy from the host and always remove it after install to be safe. --- srcpkgs/cjs/template | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/srcpkgs/cjs/template b/srcpkgs/cjs/template index 9f23b060db1..9a2ba2a73c6 100644 --- a/srcpkgs/cjs/template +++ b/srcpkgs/cjs/template @@ -19,10 +19,19 @@ checksum=7dab9615c41d9cb3b2409b2aa6cb9813ef5762f8c62526f54b4b3734079961f6 pre_configure() { cp ${FILESDIR}/ax_code_coverage.m4 m4/ - + if [ ! -d "${XBPS_CROSS_BASE}/usr/share/gobject-introspection-1.0/tests" ]; then + # /usr/share/gobject-introspection-1.0/tests missing in cross builds + cp -aR /usr/share/gobject-introspection-1.0/tests \ + ${XBPS_CROSS_BASE}/usr/share/gobject-introspection-1.0 + fi NOCONFIGURE=1 ./autogen.sh } +post_install() { + # In case it was copied make sure it's removed + rm -rf ${XBPS_CROSS_BASE}/usr/share/gobject-introspection-1.0/tests +} + cjs-devel_package() { depends="${makedepends} ${sourcepkg}>=${version}_${revision}" short_desc+=" - development files"