[OE-core] [PATCH 2/2 V2] gobject-introspection: auto-enable/-disable gobject-introspection for meson

Alexander Kanavin alex.kanavin at gmail.com
Mon Apr 1 16:10:28 UTC 2019


On Mon, 1 Apr 2019 at 18:01, Andreas Müller <schnitzeltony at gmail.com> wrote:
> +# 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', 'true', 'false', d)} "

Thanks, may I also ask that you go over the recipes in oe-core that
inherit meson, and tweak them to use this option? (there is not a lot,
and some don't use g-i at all).

>  # 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 "
> +EXTRA_OEMESON_prepend_class-native = "-D${GIR_MESON_OPTION}=False "
> +EXTRA_OEMESON_prepend_class-nativesdk = "-D${GIR_MESON_OPTION}=False "
>
> -UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection"
> +# Avoid triggering configure QA
> +UNKNOWN_CONFIGURE_WHITELIST_append = " ${@["", "--enable-introspection --disable-introspection"][(bb.data.inherits_class('autotools', d))]}"
> +UNKNOWN_CONFIGURE_WHITELIST_append = " ${@["", "${GIR_MESON_OPTION}"][(bb.data.inherits_class('meson', d))]}"

I honestly don't remember why the whitelisting was considered a good
idea, but I think it would be better to drop it altogether? That way
there will be no silent regressions (when upstream decides to rename
the option, for example, which does happen).

Alex


More information about the Openembedded-core mailing list