xref: /openbmc/openbmc/poky/meta/classes-recipe/gobject-introspection-data.bbclass (revision 92b42cb35d755f8cfe6c17d403711a536e0f0721)
1*92b42cb3SPatrick Williams#
2*92b42cb3SPatrick Williams# Copyright OpenEmbedded Contributors
3*92b42cb3SPatrick Williams#
4*92b42cb3SPatrick Williams# SPDX-License-Identifier: MIT
5*92b42cb3SPatrick Williams#
6*92b42cb3SPatrick Williams
7*92b42cb3SPatrick Williams# This variable is set to True if gobject-introspection-data is in
8*92b42cb3SPatrick Williams# DISTRO_FEATURES and qemu-usermode is in MACHINE_FEATURES, and False otherwise.
9*92b42cb3SPatrick Williams#
10*92b42cb3SPatrick Williams# It should be used in recipes to determine whether introspection data should be built,
11*92b42cb3SPatrick Williams# so that qemu use can be avoided when necessary.
12*92b42cb3SPatrick WilliamsGI_DATA_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'gobject-introspection-data', \
13*92b42cb3SPatrick Williams                      bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}"
14*92b42cb3SPatrick Williams
15*92b42cb3SPatrick Williamsdo_compile:prepend() {
16*92b42cb3SPatrick Williams    # This prevents g-ir-scanner from writing cache data to $HOME
17*92b42cb3SPatrick Williams    export GI_SCANNER_DISABLE_CACHE=1
18*92b42cb3SPatrick Williams}
19