[OE-core] [PATCH 2/2] gobject-introspection: auto-enable/-disable gobject-introspection for meson

Andreas Müller schnitzeltony at gmail.com
Mon Apr 1 13:52:17 UTC 2019


Signed-off-by: Andreas Müller <schnitzeltony at gmail.com>
---
 meta/classes/gobject-introspection.bbclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/classes/gobject-introspection.bbclass b/meta/classes/gobject-introspection.bbclass
index 4ceb0c68b1..968792c0b3 100644
--- a/meta/classes/gobject-introspection.bbclass
+++ b/meta/classes/gobject-introspection.bbclass
@@ -6,14 +6,21 @@
 # This also sets up autoconf-based recipes to build introspection data (or not),
 # depending on distro and machine features (see gobject-introspection-data class).
 inherit python3native gobject-introspection-data
+
+# Auto enable/disable based on GI_DATA_ENABLED
 EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} "
+EXTRA_OEMESON_prepend_class-target = "-Dintrospection=${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'true', 'false', d)} "
 
 # When building native recipes, disable introspection, as it is not necessary,
 # pulls in additional dependencies, and makes build times longer
 EXTRA_OECONF_prepend_class-native = "--disable-introspection "
 EXTRA_OECONF_prepend_class-nativesdk = "--disable-introspection "
+EXTRA_OEMESON_prepend_class-native = "-Dintrospection=False "
+EXTRA_OEMESON_prepend_class-nativesdk = "-Dintrospection=False "
 
-UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection"
+# Avoid triggering configure QA
+UNKNOWN_CONFIGURE_WHITELIST_append = " ${@["", "--enable-introspection --disable-introspection"][(bb.data.inherits_class('autotools', d))]}"
+UNKNOWN_CONFIGURE_WHITELIST_append = " ${@["", "introspection"][(bb.data.inherits_class('meson', d))]}"
 
 # Generating introspection data depends on a combination of native and target
 # introspection tools, and qemu to run the target tools.
-- 
2.20.1



More information about the Openembedded-core mailing list