summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-04-24 13:26:09 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-25 00:05:20 +0100
commit07d29e7cec4e03ef1063f29d03aaf54cdc331489 (patch)
treec6b2b2dcb524840abfd923695269869559f72a11 /meta
parent8833afc0e05445978d942cfdc67f5c805dec9415 (diff)
downloadpoky-07d29e7cec4e03ef1063f29d03aaf54cdc331489.tar.gz
gtk-doc.bbclass: unify option setting for meson-based recipes
This is done similarly to gobject-introspection work by Andreas Müller, and allows dropping duplicate clutter from the recipes. (From OE-Core rev: ff578f4451a0a199202e576b647840910b4d3f59) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/gtk-doc.bbclass11
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc6
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.0.bb6
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection_1.60.1.bb2
-rw-r--r--meta/recipes-gnome/json-glib/json-glib_1.4.4.bb7
-rw-r--r--meta/recipes-graphics/clutter/clutter-gtk-1.0.inc6
-rw-r--r--meta/recipes-graphics/pango/pango_1.42.4.bb5
-rw-r--r--meta/recipes-support/atk/at-spi2-core_2.30.0.bb6
-rw-r--r--meta/recipes-support/atk/atk_2.30.0.bb6
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4_2.64.2.bb7
10 files changed, 18 insertions, 44 deletions
diff --git a/meta/classes/gtk-doc.bbclass b/meta/classes/gtk-doc.bbclass
index 707d74d108..7dd662bf86 100644
--- a/meta/classes/gtk-doc.bbclass
+++ b/meta/classes/gtk-doc.bbclass
@@ -10,13 +10,24 @@
10GTKDOC_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', \ 10GTKDOC_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', \
11 bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}" 11 bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}"
12 12
13# meson: default option name to enable/disable gtk-doc. This matches most
14# project's configuration. In doubts - check meson_options.txt in project's
15# source path.
16GTKDOC_MESON_OPTION ?= 'docs'
17GTKDOC_MESON_ENABLE_FLAG ?= 'true'
18GTKDOC_MESON_DISABLE_FLAG ?= 'false'
19
20# Auto enable/disable based on GTKDOC_ENABLED
13EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-gtk-doc --enable-gtk-doc-html --disable-gtk-doc-pdf', \ 21EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-gtk-doc --enable-gtk-doc-html --disable-gtk-doc-pdf', \
14 '--disable-gtk-doc', d)} " 22 '--disable-gtk-doc', d)} "
23EXTRA_OEMESON_prepend_class-target = "-D${GTKDOC_MESON_OPTION}=${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_MESON_ENABLE_FLAG}', '${GTKDOC_MESON_DISABLE_FLAG}', d)} "
15 24
16# When building native recipes, disable gtkdoc, as it is not necessary, 25# When building native recipes, disable gtkdoc, as it is not necessary,
17# pulls in additional dependencies, and makes build times longer 26# pulls in additional dependencies, and makes build times longer
18EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc " 27EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc "
19EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc " 28EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc "
29EXTRA_OEMESON_prepend_class-native = "-D${GTKDOC_MESON_OPTION}=${GTKDOC_MESON_DISABLE_FLAG} "
30EXTRA_OEMESON_prepend_class-nativesdk = "-D${GTKDOC_MESON_OPTION}=${GTKDOC_MESON_DISABLE_FLAG} "
20 31
21# Even though gtkdoc is disabled on -native, gtk-doc package is still 32# Even though gtkdoc is disabled on -native, gtk-doc package is still
22# needed for m4 macros. 33# needed for m4 macros.
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index 574bb38557..69bcd0dd1d 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -30,11 +30,7 @@ LEAD_SONAME = "libglib-2.0.*"
30 30
31inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check 31inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check
32 32
33GTKDOC_ENABLE_FLAG = "-Dgtk_doc=true" 33GTKDOC_MESON_OPTION = "gtk_doc"
34GTKDOC_DISABLE_FLAG = "-Dgtk_doc=false"
35
36EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
37 '${GTKDOC_DISABLE_FLAG}', d)} "
38 34
39# This avoids the need to depend on target python3, which in case of mingw is not even possible. 35# This avoids the need to depend on target python3, which in case of mingw is not even possible.
40# meson's python configuration pokes into python3 configuration, so this provides the native config to it. 36# meson's python configuration pokes into python3 configuration, so this provides the native config to it.
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.0.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.0.bb
index e423b99687..7fef697f3f 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.0.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.0.bb
@@ -34,14 +34,8 @@ SRC_URI[sha256sum] = "dd50973c7757bcde15de6bcd3a6d462a445efd552604ae6435a0532fbb
34 34
35inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package 35inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package
36 36
37GTKDOC_ENABLE_FLAG = "-Ddocs=true"
38GTKDOC_DISABLE_FLAG = "-Ddocs=false"
39
40GIR_MESON_OPTION = 'gir' 37GIR_MESON_OPTION = 'gir'
41 38
42EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
43 '${GTKDOC_DISABLE_FLAG}', d)} "
44
45EXTRA_OEMESON_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}" 39EXTRA_OEMESON_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}"
46 40
47LIBV = "2.10.0" 41LIBV = "2.10.0"
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.60.1.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.60.1.bb
index f87597f190..40beab0c41 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.60.1.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.60.1.bb
@@ -28,6 +28,8 @@ SRC_URI_append_class-native = " file://0001-Relocate-the-repository-directory-fo
28 28
29inherit meson pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even multilib_script 29inherit meson pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even multilib_script
30 30
31GTKDOC_MESON_OPTION = "gtk_doc"
32
31MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner" 33MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner"
32 34
33DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native autoconf-archive" 35DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native autoconf-archive"
diff --git a/meta/recipes-gnome/json-glib/json-glib_1.4.4.bb b/meta/recipes-gnome/json-glib/json-glib_1.4.4.bb
index 31c008db47..1c663f93e1 100644
--- a/meta/recipes-gnome/json-glib/json-glib_1.4.4.bb
+++ b/meta/recipes-gnome/json-glib/json-glib_1.4.4.bb
@@ -19,13 +19,6 @@ SRC_URI[archive.sha256sum] = "720c5f4379513dc11fd97dc75336eb0c0d3338c53128044d9f
19 19
20PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native" 20PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native"
21 21
22# This builds both API docs (via gtk-doc)
23GTKDOC_ENABLE_FLAG = "-Ddocs=true"
24GTKDOC_DISABLE_FLAG = "-Ddocs=false"
25
26EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
27 '${GTKDOC_DISABLE_FLAG}', d)} "
28
29do_install_append() { 22do_install_append() {
30 if ! ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then 23 if ! ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)}; then
31 rm -rf ${D}${datadir}/installed-tests ${D}${libexecdir} 24 rm -rf ${D}${datadir}/installed-tests ${D}${libexecdir}
diff --git a/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc b/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc
index 5f7daf8124..11826a6f0c 100644
--- a/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc
+++ b/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc
@@ -13,10 +13,6 @@ ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
13DEPENDS = "clutter-1.0 gtk+3" 13DEPENDS = "clutter-1.0 gtk+3"
14PACKAGES =+ "${PN}-examples" 14PACKAGES =+ "${PN}-examples"
15 15
16GTKDOC_ENABLE_FLAG = "-Denable_docs=true" 16GTKDOC_MESON_OPTION = "enable_docs"
17GTKDOC_DISABLE_FLAG = "-Denable_docs=false"
18
19EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
20 '${GTKDOC_DISABLE_FLAG}', d)} "
21 17
22GIR_MESON_OPTION = 'enable_gi' 18GIR_MESON_OPTION = 'enable_gi'
diff --git a/meta/recipes-graphics/pango/pango_1.42.4.bb b/meta/recipes-graphics/pango/pango_1.42.4.bb
index f3be9f44e1..58e1f41be5 100644
--- a/meta/recipes-graphics/pango/pango_1.42.4.bb
+++ b/meta/recipes-graphics/pango/pango_1.42.4.bb
@@ -26,10 +26,7 @@ DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo h
26PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" 26PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
27PACKAGECONFIG[x11] = ",,virtual/libx11 libxft" 27PACKAGECONFIG[x11] = ",,virtual/libx11 libxft"
28 28
29GTKDOC_ENABLE_FLAG = "-Denable_docs=true" 29GTKDOC_MESON_OPTION = "enable_docs"
30GTKDOC_DISABLE_FLAG = "-Denable_docs=false"
31EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
32 '${GTKDOC_DISABLE_FLAG}', d)} "
33GIR_MESON_OPTION = 'gir' 30GIR_MESON_OPTION = 'gir'
34 31
35LEAD_SONAME = "libpango-1.0*" 32LEAD_SONAME = "libpango-1.0*"
diff --git a/meta/recipes-support/atk/at-spi2-core_2.30.0.bb b/meta/recipes-support/atk/at-spi2-core_2.30.0.bb
index 36e8a9ef48..cfe0ddeef2 100644
--- a/meta/recipes-support/atk/at-spi2-core_2.30.0.bb
+++ b/meta/recipes-support/atk/at-spi2-core_2.30.0.bb
@@ -22,11 +22,7 @@ inherit meson gtk-doc gettext systemd pkgconfig upstream-version-is-even gobject
22EXTRA_OEMESON = " -Dsystemd_user_dir=${systemd_user_unitdir} \ 22EXTRA_OEMESON = " -Dsystemd_user_dir=${systemd_user_unitdir} \
23 -Ddbus_daemon=${bindir}/dbus-daemon" 23 -Ddbus_daemon=${bindir}/dbus-daemon"
24 24
25GTKDOC_ENABLE_FLAG = "-Denable_docs=true" 25GTKDOC_MESON_OPTION = "enable_docs"
26GTKDOC_DISABLE_FLAG = "-Denable_docs=false"
27
28EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
29 '${GTKDOC_DISABLE_FLAG}', d)} "
30 26
31GIR_MESON_OPTION = 'enable-introspection' 27GIR_MESON_OPTION = 'enable-introspection'
32GIR_MESON_ENABLE_FLAG = 'yes' 28GIR_MESON_ENABLE_FLAG = 'yes'
diff --git a/meta/recipes-support/atk/atk_2.30.0.bb b/meta/recipes-support/atk/atk_2.30.0.bb
index 84fdb1510a..4e22b3f811 100644
--- a/meta/recipes-support/atk/atk_2.30.0.bb
+++ b/meta/recipes-support/atk/atk_2.30.0.bb
@@ -14,12 +14,6 @@ DEPENDS = "gettext-native glib-2.0"
14GNOMEBASEBUILDCLASS = "meson" 14GNOMEBASEBUILDCLASS = "meson"
15inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection 15inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection
16 16
17GTKDOC_ENABLE_FLAG = "-Ddocs=true"
18GTKDOC_DISABLE_FLAG = "-Ddocs=false"
19
20EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
21 '${GTKDOC_DISABLE_FLAG}', d)} "
22
23SRC_URI_append = " \ 17SRC_URI_append = " \
24 file://0001-meson.build-enable-introspection-for-cross-compile.patch \ 18 file://0001-meson.build-enable-introspection-for-cross-compile.patch \
25 file://0001-Switch-from-filename-to-basename.patch \ 19 file://0001-Switch-from-filename-to-basename.patch \
diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.64.2.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.64.2.bb
index b095397ec2..e718b2248d 100644
--- a/meta/recipes-support/libsoup/libsoup-2.4_2.64.2.bb
+++ b/meta/recipes-support/libsoup/libsoup-2.4_2.64.2.bb
@@ -26,12 +26,7 @@ PACKAGECONFIG[gssapi] = "-Dgssapi=true,-Dgssapi=false,krb5"
26 26
27EXTRA_OEMESON_append = " -Dvapi=false" 27EXTRA_OEMESON_append = " -Dvapi=false"
28 28
29GTKDOC_ENABLE_FLAG = "-Ddoc=true" 29GTKDOC_MESON_OPTION = "doc"
30GTKDOC_DISABLE_FLAG = "-Ddoc=false"
31
32EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
33 '${GTKDOC_DISABLE_FLAG}', d)} "
34
35 30
36# When built without gnome support, libsoup-2.4 will contain only one shared lib 31# When built without gnome support, libsoup-2.4 will contain only one shared lib
37# and will therefore become subject to renaming by debian.bbclass. Prevent 32# and will therefore become subject to renaming by debian.bbclass. Prevent