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 <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2021-05-05 17:18:47 +02:00
committed by Richard Purdie
parent 13e4ff2250
commit 7572042364
3 changed files with 47 additions and 0 deletions

View File

@@ -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 ''}"

View File

@@ -205,6 +205,7 @@ RECIPE_MAINTAINER_pn-gdk-pixbuf = "Ross Burton <ross.burton@arm.com>"
RECIPE_MAINTAINER_pn-gettext = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-gettext-minimal-native = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-ghostscript = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-gi-docgen = "Alexander Kanavin <alex.kanavin@gmail.com>"
RECIPE_MAINTAINER_pn-git = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_MAINTAINER_pn-glew = "Anuj Mittal <anuj.mittal@intel.com>"
RECIPE_MAINTAINER_pn-glib-2.0 = "Anuj Mittal <anuj.mittal@intel.com>"

View File

@@ -0,0 +1,22 @@
SUMMARY = "Documentation tool for GObject-based libraries"
DESCRIPTION = "GI-DocGen is a document generator for GObject-based libraries. GObject is \
the base type system of the GNOME project. GI-Docgen reuses the \
introspection data generated by GObject-based libraries to generate the API \
reference of these libraries, as well as other ancillary documentation."
HOMEPAGE = "https://gnome.pages.gitlab.gnome.org/gi-docgen/"
LICENSE = "GPLv3+ & Apache-2.0"
LIC_FILES_CHKSUM = "file://gi-docgen.py;beginline=1;endline=5;md5=2dc0f1f01202478cfe813c0e7f80b326"
SRC_URI = "git://gitlab.gnome.org/GNOME/gi-docgen.git;protocol=https;branch=main"
PV = "2021.5"
SRCREV = "7dee859321573f9c843ef7fb136f11142cb6ddf8"
S = "${WORKDIR}/git"
inherit setuptools3
RDEPENDS_${PN} += "python3-asyncio python3-core python3-jinja2 python3-json python3-markdown python3-markupsafe python3-pygments python3-toml python3-typogrify python3-xml"
BBCLASSEXTEND = "native"