diff options
author | Petr Kubizňák <kubiznak@2n.com> | 2023-04-03 13:06:41 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-04-13 11:56:06 +0100 |
commit | e79fd53d0a18c1ef3996273a4b2aa639d1a642ba (patch) | |
tree | 247d0acf6ddea52c615839e478e7cff9febad479 /meta/classes-recipe | |
parent | 89e29cf2e12cba3adabcb12104e413ef5ebe1153 (diff) | |
download | poky-e79fd53d0a18c1ef3996273a4b2aa639d1a642ba.tar.gz |
gobject-introspection: reduce dependencies
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 <kubiznak@2n.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r-- | meta/classes-recipe/gobject-introspection.bbclass | 12 |
1 files changed, 7 insertions, 5 deletions
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 | |||
35 | 35 | ||
36 | # Generating introspection data depends on a combination of native and target | 36 | # Generating introspection data depends on a combination of native and target |
37 | # introspection tools, and qemu to run the target tools. | 37 | # introspection tools, and qemu to run the target tools. |
38 | DEPENDS:append:class-target = " gobject-introspection gobject-introspection-native qemu-native" | 38 | DEPENDS:append:class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'gobject-introspection gobject-introspection-native qemu-native', '', d)}" |
39 | 39 | ||
40 | # Even though introspection is disabled on -native, gobject-introspection package is still | 40 | # Even though introspection is disabled on -native, gobject-introspection package is still |
41 | # needed for m4 macros. | 41 | # needed for m4 macros. |
@@ -46,10 +46,12 @@ DEPENDS:append:class-nativesdk = " gobject-introspection-native" | |||
46 | export XDG_DATA_DIRS = "${STAGING_DATADIR}:${STAGING_LIBDIR}" | 46 | export XDG_DATA_DIRS = "${STAGING_DATADIR}:${STAGING_LIBDIR}" |
47 | 47 | ||
48 | do_configure:prepend:class-target () { | 48 | do_configure:prepend:class-target () { |
49 | # introspection.m4 pre-packaged with upstream tarballs does not yet | 49 | if [ "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '1', '0', d)}" = "1" ] ; then |
50 | # have our fixes | 50 | # introspection.m4 pre-packaged with upstream tarballs does not yet |
51 | mkdir -p ${S}/m4 | 51 | # have our fixes |
52 | cp ${STAGING_DIR_TARGET}/${datadir}/aclocal/introspection.m4 ${S}/m4 | 52 | mkdir -p ${S}/m4 |
53 | cp ${STAGING_DIR_TARGET}/${datadir}/aclocal/introspection.m4 ${S}/m4 | ||
54 | fi | ||
53 | } | 55 | } |
54 | 56 | ||
55 | # .typelib files are needed at runtime and so they go to the main package (so | 57 | # .typelib files are needed at runtime and so they go to the main package (so |