diff options
author | Andreas Müller <schnitzeltony@gmail.com> | 2019-04-05 08:37:25 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-11 21:15:56 +0100 |
commit | 5b33b053c13813d0d4eadc96bca43639831dfe3c (patch) | |
tree | 0aa70afdd7affb5fe11e044384a07d5f3d3b3a00 /meta/classes/gobject-introspection.bbclass | |
parent | 645dbc3ce7f6788d0ab1f6286cac41dad2ead2df (diff) | |
download | openembedded-core-contrib-5b33b053c13813d0d4eadc96bca43639831dfe3c.tar.gz |
gobject-introspection: auto-enable/-disable gobject-introspection for meson
* the class sets defaults used most common which can be overriden by recipes
* UNKNOWN_CONFIGURE_WHITELIST was removed for autotools (and not added for meson)
as suggested by Alexander Kanavin [1]
[1] http://lists.openembedded.org/pipermail/openembedded-core/2019-April/280716.html
(From OE-Core rev: 59589383131df6bc0c8787cd00a16ee59e21d441)
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/gobject-introspection.bbclass')
-rw-r--r-- | meta/classes/gobject-introspection.bbclass | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/meta/classes/gobject-introspection.bbclass b/meta/classes/gobject-introspection.bbclass index 4ceb0c68b1..504f75e28d 100644 --- a/meta/classes/gobject-introspection.bbclass +++ b/meta/classes/gobject-introspection.bbclass @@ -6,14 +6,24 @@ # 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 + +# meson: default option name to enable/disable introspection. This matches most +# project's configuration. In doubts - check meson_options.txt in project's +# source path. +GIR_MESON_OPTION ?= 'introspection' +GIR_MESON_ENABLE_FLAG ?= 'true' +GIR_MESON_DISABLE_FLAG ?= 'false' + +# 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 = "-D${GIR_MESON_OPTION}=${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GIR_MESON_ENABLE_FLAG}', '${GIR_MESON_DISABLE_FLAG}', 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 " - -UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection" +EXTRA_OEMESON_prepend_class-native = "-D${GIR_MESON_OPTION}=${GIR_MESON_DISABLE_FLAG} " +EXTRA_OEMESON_prepend_class-nativesdk = "-D${GIR_MESON_OPTION}=${GIR_MESON_DISABLE_FLAG} " # Generating introspection data depends on a combination of native and target # introspection tools, and qemu to run the target tools. |