diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-11-11 16:59:23 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-13 16:11:27 +0000 |
commit | d5dc2866ecb0e284ebed17de51f318c0abe1bd06 (patch) | |
tree | 7f0623059afcf14f78fd1cbc2a99ad493ec8afdc /meta/classes | |
parent | 76d74e10d0d29c8c56d3cc103c77108d5f410a64 (diff) | |
download | poky-d5dc2866ecb0e284ebed17de51f318c0abe1bd06.tar.gz |
gobject-introspection: Add -Dintrospection only when GIR_MESON_OPTION is not empty
meson now does not allow unknown options which means we have to be
mindful of adding -Dintrospection unconditionally and provide an option
to recipes to set GIR_MESON_OPTION = "" and when recipe does that then
do not add -D<Dintrospection> option to meson. This will help recipes to
use meson 60.x+ just by adding
GIR_MESON_OPTION = ""
(From OE-Core rev: c75a9439154834d45b2be1ac95682586b4409fb4)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/gobject-introspection.bbclass | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/classes/gobject-introspection.bbclass b/meta/classes/gobject-introspection.bbclass index 822a226d5f..4db1b362d9 100644 --- a/meta/classes/gobject-introspection.bbclass +++ b/meta/classes/gobject-introspection.bbclass | |||
@@ -14,16 +14,18 @@ GIR_MESON_OPTION ?= 'introspection' | |||
14 | GIR_MESON_ENABLE_FLAG ?= 'true' | 14 | GIR_MESON_ENABLE_FLAG ?= 'true' |
15 | GIR_MESON_DISABLE_FLAG ?= 'false' | 15 | GIR_MESON_DISABLE_FLAG ?= 'false' |
16 | 16 | ||
17 | # Define g-i options such that they can be disabled completely when GIR_MESON_OPTION is empty | ||
18 | GIRMESONTARGET = "-D${GIR_MESON_OPTION}=${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GIR_MESON_ENABLE_FLAG}', '${GIR_MESON_DISABLE_FLAG}', d)} " | ||
19 | GIRMESONBUILD = "-D${GIR_MESON_OPTION}=${GIR_MESON_DISABLE_FLAG} " | ||
17 | # Auto enable/disable based on GI_DATA_ENABLED | 20 | # Auto enable/disable based on GI_DATA_ENABLED |
18 | EXTRA_OECONF:prepend:class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} " | 21 | EXTRA_OECONF:prepend:class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} " |
19 | 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)} " | 22 | EXTRA_OEMESON:prepend:class-target = "${@['', '${GIRMESONTARGET}'][d.getVar('GIR_MESON_OPTION') != '']}" |
20 | |||
21 | # When building native recipes, disable introspection, as it is not necessary, | 23 | # When building native recipes, disable introspection, as it is not necessary, |
22 | # pulls in additional dependencies, and makes build times longer | 24 | # pulls in additional dependencies, and makes build times longer |
23 | EXTRA_OECONF:prepend:class-native = "--disable-introspection " | 25 | EXTRA_OECONF:prepend:class-native = "--disable-introspection " |
24 | EXTRA_OECONF:prepend:class-nativesdk = "--disable-introspection " | 26 | EXTRA_OECONF:prepend:class-nativesdk = "--disable-introspection " |
25 | EXTRA_OEMESON:prepend:class-native = "-D${GIR_MESON_OPTION}=${GIR_MESON_DISABLE_FLAG} " | 27 | EXTRA_OEMESON:prepend:class-native = "${@['', '${GIRMESONBUILD}'][d.getVar('GIR_MESON_OPTION') != '']}" |
26 | EXTRA_OEMESON:prepend:class-nativesdk = "-D${GIR_MESON_OPTION}=${GIR_MESON_DISABLE_FLAG} " | 28 | EXTRA_OEMESON:prepend:class-nativesdk = "${@['', '${GIRMESONBUILD}'][d.getVar('GIR_MESON_OPTION') != '']}" |
27 | 29 | ||
28 | # Generating introspection data depends on a combination of native and target | 30 | # Generating introspection data depends on a combination of native and target |
29 | # introspection tools, and qemu to run the target tools. | 31 | # introspection tools, and qemu to run the target tools. |