From daf9a7e51b0fda6da89dcbd2605a97e628035e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Wed, 25 Mar 2020 00:23:21 +0100 Subject: [PATCH] python3-gobject: fix cross 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/python3-gobject/template | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/srcpkgs/python3-gobject/template b/srcpkgs/python3-gobject/template index 6af77760a7..81c0e61694 100644 --- a/srcpkgs/python3-gobject/template +++ b/srcpkgs/python3-gobject/template @@ -7,7 +7,7 @@ build_style=meson build_helper="gir" configure_args="-Dpython=python${py3_ver}" pycompile_module="gi pygtkcompat" -hostmakedepends="pkg-config python3 python3-MarkupSafe" +hostmakedepends="gobject-introspection pkg-config python3 python3-MarkupSafe" makedepends="libglib-devel python3-cairo-devel python3-devel" depends="gir-freedesktop python3-cairo" short_desc="Python3 bindings for GObject" @@ -17,6 +17,19 @@ homepage="https://pygobject.readthedocs.io/" distfiles="${GNOME_SITE}/pygobject/${version%.*}/pygobject-${version}.tar.xz" checksum=c39ca2a28364b57fa00549c6e836346031e6b886c3ceabfd8ab4b4fed0a83611 +pre_configure() { + if [ ! -s "${XBPS_CROSS_BASE}/usr/share/gobject-introspection-1.0/tests/gitestmacros.h" ]; 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 +} + +post_install() { + # In case it was copied make sure it's removed + rm -rf ${XBPS_CROSS_BASE}/usr/share/gobject-introspection-1.0/tests +} + python3-gobject-devel_package() { depends="libgirepository-devel python3-cairo-devel libglib-devel libffi-devel