From 7572042364dcb601f8078dff303fb6a3cc4a8466 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 5 May 2021 17:18:47 +0200 Subject: gi-docgen: add a recipe and class This seems to be the gtk-doc successor, and gnome projects such as pango and gdk-pixbuf have started transitioning to it. (From OE-Core rev: f87bb7d848015c371095ef3ff423eee81e6d8ecd) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/classes/gi-docgen.bbclass | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 meta/classes/gi-docgen.bbclass (limited to 'meta/classes/gi-docgen.bbclass') diff --git a/meta/classes/gi-docgen.bbclass b/meta/classes/gi-docgen.bbclass new file mode 100644 index 0000000000..5750f7028d --- /dev/null +++ b/meta/classes/gi-docgen.bbclass @@ -0,0 +1,24 @@ +# gi-docgen is a new gnome documentation generator, which +# seems to be a successor to gtk-doc: +# https://gitlab.gnome.org/GNOME/gi-docgen + +# This variable is set to True if api-documentation is in +# DISTRO_FEATURES, and False otherwise. +GIDOCGEN_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'True', 'False', d)}" +# When building native recipes, disable gi-docgen, as it is not necessary, +# pulls in additional dependencies, and makes build times longer +GIDOCGEN_ENABLED_class-native = "False" +GIDOCGEN_ENABLED_class-nativesdk = "False" + +# meson: default option name to enable/disable gi-docgen. This matches most +# projects' configuration. In doubts - check meson_options.txt in project's +# source path. +GIDOCGEN_MESON_OPTION ?= 'gtk_doc' +GIDOCGEN_MESON_ENABLE_FLAG ?= 'true' +GIDOCGEN_MESON_DISABLE_FLAG ?= 'false' + +# Auto enable/disable based on GIDOCGEN_ENABLED +EXTRA_OEMESON_prepend = "-D${GIDOCGEN_MESON_OPTION}=${@bb.utils.contains('GIDOCGEN_ENABLED', 'True', '${GIDOCGEN_MESON_ENABLE_FLAG}', '${GIDOCGEN_MESON_DISABLE_FLAG}', d)} " + +DEPENDS_append = "${@' gi-docgen-native gi-docgen' if d.getVar('GIDOCGEN_ENABLED') == 'True' else ''}" + -- cgit v1.2.3-54-g00ecf