diff options
Diffstat (limited to 'meta/classes/gobject-introspection.bbclass')
-rw-r--r-- | meta/classes/gobject-introspection.bbclass | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/meta/classes/gobject-introspection.bbclass b/meta/classes/gobject-introspection.bbclass index 37389cbc8b..504f75e28d 100644 --- a/meta/classes/gobject-introspection.bbclass +++ b/meta/classes/gobject-introspection.bbclass @@ -6,18 +6,28 @@ # 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. -DEPENDS_append_class-target = " gobject-introspection gobject-introspection-native qemu-native" +DEPENDS_append_class-target = " gobject-introspection gobject-introspection-native qemu-native prelink-native" # Even though introspection is disabled on -native, gobject-introspection package is still # needed for m4 macros. @@ -25,7 +35,7 @@ DEPENDS_append_class-native = " gobject-introspection-native" DEPENDS_append_class-nativesdk = " gobject-introspection-native" # This is used by introspection tools to find .gir includes -export XDG_DATA_DIRS = "${STAGING_DATADIR}" +export XDG_DATA_DIRS = "${STAGING_DATADIR}:${STAGING_LIBDIR}" do_configure_prepend_class-target () { # introspection.m4 pre-packaged with upstream tarballs does not yet @@ -40,4 +50,4 @@ FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib" # .gir files go to dev package, as they're needed for developing (but not for # running) things that depends on introspection. -FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir" +FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir" |