summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmail.com>2019-04-05 08:37:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-11 21:15:56 +0100
commit5b33b053c13813d0d4eadc96bca43639831dfe3c (patch)
tree0aa70afdd7affb5fe11e044384a07d5f3d3b3a00 /meta
parent645dbc3ce7f6788d0ab1f6286cac41dad2ead2df (diff)
downloadpoky-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')
-rw-r--r--meta/classes/gobject-introspection.bbclass14
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 @@
6# This also sets up autoconf-based recipes to build introspection data (or not), 6# This also sets up autoconf-based recipes to build introspection data (or not),
7# depending on distro and machine features (see gobject-introspection-data class). 7# depending on distro and machine features (see gobject-introspection-data class).
8inherit python3native gobject-introspection-data 8inherit python3native gobject-introspection-data
9
10# meson: default option name to enable/disable introspection. This matches most
11# project's configuration. In doubts - check meson_options.txt in project's
12# source path.
13GIR_MESON_OPTION ?= 'introspection'
14GIR_MESON_ENABLE_FLAG ?= 'true'
15GIR_MESON_DISABLE_FLAG ?= 'false'
16
17# Auto enable/disable based on GI_DATA_ENABLED
9EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} " 18EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} "
19EXTRA_OEMESON_prepend_class-target = "-D${GIR_MESON_OPTION}=${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GIR_MESON_ENABLE_FLAG}', '${GIR_MESON_DISABLE_FLAG}', d)} "
10 20
11# When building native recipes, disable introspection, as it is not necessary, 21# When building native recipes, disable introspection, as it is not necessary,
12# pulls in additional dependencies, and makes build times longer 22# pulls in additional dependencies, and makes build times longer
13EXTRA_OECONF_prepend_class-native = "--disable-introspection " 23EXTRA_OECONF_prepend_class-native = "--disable-introspection "
14EXTRA_OECONF_prepend_class-nativesdk = "--disable-introspection " 24EXTRA_OECONF_prepend_class-nativesdk = "--disable-introspection "
15 25EXTRA_OEMESON_prepend_class-native = "-D${GIR_MESON_OPTION}=${GIR_MESON_DISABLE_FLAG} "
16UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection" 26EXTRA_OEMESON_prepend_class-nativesdk = "-D${GIR_MESON_OPTION}=${GIR_MESON_DISABLE_FLAG} "
17 27
18# Generating introspection data depends on a combination of native and target 28# Generating introspection data depends on a combination of native and target
19# introspection tools, and qemu to run the target tools. 29# introspection tools, and qemu to run the target tools.