From e79fd53d0a18c1ef3996273a4b2aa639d1a642ba Mon Sep 17 00:00:00 2001 From: Petr Kubizňák Date: Mon, 3 Apr 2023 13:06:41 +0200 Subject: gobject-introspection: reduce dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When GI_DATA_ENABLED is 'False' (e.g. because 'gobject-introspection-data' is not in DISTRO_FEATURES), gobject-introspection, gobject-introspection-native and qemu-native should not be added to DEPENDS. This is to reduce dependency chain when g-i is disabled. (From OE-Core rev: 4e51c1815c92bb15977a3bdb14171d770da44004) Signed-off-by: Petr Kubizňák Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/classes-recipe/gobject-introspection.bbclass | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'meta/classes-recipe/gobject-introspection.bbclass') diff --git a/meta/classes-recipe/gobject-introspection.bbclass b/meta/classes-recipe/gobject-introspection.bbclass index 0c7b7d200a..98edb93761 100644 --- a/meta/classes-recipe/gobject-introspection.bbclass +++ b/meta/classes-recipe/gobject-introspection.bbclass @@ -35,7 +35,7 @@ EXTRA_OEMESON:prepend:class-nativesdk = "${@['', '${GIRMESONBUILD}'][d.getVar('G # Generating introspection data depends on a combination of native and target # introspection tools, and qemu to run the target tools. -DEPENDS:append:class-target = " gobject-introspection gobject-introspection-native qemu-native" +DEPENDS:append:class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'gobject-introspection gobject-introspection-native qemu-native', '', d)}" # Even though introspection is disabled on -native, gobject-introspection package is still # needed for m4 macros. @@ -46,10 +46,12 @@ DEPENDS:append:class-nativesdk = " gobject-introspection-native" export XDG_DATA_DIRS = "${STAGING_DATADIR}:${STAGING_LIBDIR}" do_configure:prepend:class-target () { - # introspection.m4 pre-packaged with upstream tarballs does not yet - # have our fixes - mkdir -p ${S}/m4 - cp ${STAGING_DIR_TARGET}/${datadir}/aclocal/introspection.m4 ${S}/m4 + if [ "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '1', '0', d)}" = "1" ] ; then + # introspection.m4 pre-packaged with upstream tarballs does not yet + # have our fixes + mkdir -p ${S}/m4 + cp ${STAGING_DIR_TARGET}/${datadir}/aclocal/introspection.m4 ${S}/m4 + fi } # .typelib files are needed at runtime and so they go to the main package (so -- cgit v1.2.3-54-g00ecf