diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-04-24 13:26:09 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-25 00:05:20 +0100 |
commit | 07d29e7cec4e03ef1063f29d03aaf54cdc331489 (patch) | |
tree | c6b2b2dcb524840abfd923695269869559f72a11 /meta | |
parent | 8833afc0e05445978d942cfdc67f5c805dec9415 (diff) | |
download | poky-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.bbclass | 11 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib.inc | 6 | ||||
-rw-r--r-- | meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.0.bb | 6 | ||||
-rw-r--r-- | meta/recipes-gnome/gobject-introspection/gobject-introspection_1.60.1.bb | 2 | ||||
-rw-r--r-- | meta/recipes-gnome/json-glib/json-glib_1.4.4.bb | 7 | ||||
-rw-r--r-- | meta/recipes-graphics/clutter/clutter-gtk-1.0.inc | 6 | ||||
-rw-r--r-- | meta/recipes-graphics/pango/pango_1.42.4.bb | 5 | ||||
-rw-r--r-- | meta/recipes-support/atk/at-spi2-core_2.30.0.bb | 6 | ||||
-rw-r--r-- | meta/recipes-support/atk/atk_2.30.0.bb | 6 | ||||
-rw-r--r-- | meta/recipes-support/libsoup/libsoup-2.4_2.64.2.bb | 7 |
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 @@ | |||
10 | GTKDOC_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', \ | 10 | GTKDOC_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. | ||
16 | GTKDOC_MESON_OPTION ?= 'docs' | ||
17 | GTKDOC_MESON_ENABLE_FLAG ?= 'true' | ||
18 | GTKDOC_MESON_DISABLE_FLAG ?= 'false' | ||
19 | |||
20 | # Auto enable/disable based on GTKDOC_ENABLED | ||
13 | EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-gtk-doc --enable-gtk-doc-html --disable-gtk-doc-pdf', \ | 21 | EXTRA_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)} " |
23 | EXTRA_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 |
18 | EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc " | 27 | EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc " |
19 | EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc " | 28 | EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc " |
29 | EXTRA_OEMESON_prepend_class-native = "-D${GTKDOC_MESON_OPTION}=${GTKDOC_MESON_DISABLE_FLAG} " | ||
30 | EXTRA_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 | ||
31 | inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check | 31 | inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check |
32 | 32 | ||
33 | GTKDOC_ENABLE_FLAG = "-Dgtk_doc=true" | 33 | GTKDOC_MESON_OPTION = "gtk_doc" |
34 | GTKDOC_DISABLE_FLAG = "-Dgtk_doc=false" | ||
35 | |||
36 | EXTRA_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 | ||
35 | inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package | 35 | inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package |
36 | 36 | ||
37 | GTKDOC_ENABLE_FLAG = "-Ddocs=true" | ||
38 | GTKDOC_DISABLE_FLAG = "-Ddocs=false" | ||
39 | |||
40 | GIR_MESON_OPTION = 'gir' | 37 | GIR_MESON_OPTION = 'gir' |
41 | 38 | ||
42 | EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \ | ||
43 | '${GTKDOC_DISABLE_FLAG}', d)} " | ||
44 | |||
45 | EXTRA_OEMESON_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}" | 39 | EXTRA_OEMESON_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}" |
46 | 40 | ||
47 | LIBV = "2.10.0" | 41 | LIBV = "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 | ||
29 | inherit meson pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even multilib_script | 29 | inherit meson pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even multilib_script |
30 | 30 | ||
31 | GTKDOC_MESON_OPTION = "gtk_doc" | ||
32 | |||
31 | MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner" | 33 | MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner" |
32 | 34 | ||
33 | DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native autoconf-archive" | 35 | DEPENDS_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 | ||
20 | PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native" | 20 | PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native" |
21 | 21 | ||
22 | # This builds both API docs (via gtk-doc) | ||
23 | GTKDOC_ENABLE_FLAG = "-Ddocs=true" | ||
24 | GTKDOC_DISABLE_FLAG = "-Ddocs=false" | ||
25 | |||
26 | EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \ | ||
27 | '${GTKDOC_DISABLE_FLAG}', d)} " | ||
28 | |||
29 | do_install_append() { | 22 | do_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}" | |||
13 | DEPENDS = "clutter-1.0 gtk+3" | 13 | DEPENDS = "clutter-1.0 gtk+3" |
14 | PACKAGES =+ "${PN}-examples" | 14 | PACKAGES =+ "${PN}-examples" |
15 | 15 | ||
16 | GTKDOC_ENABLE_FLAG = "-Denable_docs=true" | 16 | GTKDOC_MESON_OPTION = "enable_docs" |
17 | GTKDOC_DISABLE_FLAG = "-Denable_docs=false" | ||
18 | |||
19 | EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \ | ||
20 | '${GTKDOC_DISABLE_FLAG}', d)} " | ||
21 | 17 | ||
22 | GIR_MESON_OPTION = 'enable_gi' | 18 | GIR_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 | |||
26 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" | 26 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" |
27 | PACKAGECONFIG[x11] = ",,virtual/libx11 libxft" | 27 | PACKAGECONFIG[x11] = ",,virtual/libx11 libxft" |
28 | 28 | ||
29 | GTKDOC_ENABLE_FLAG = "-Denable_docs=true" | 29 | GTKDOC_MESON_OPTION = "enable_docs" |
30 | GTKDOC_DISABLE_FLAG = "-Denable_docs=false" | ||
31 | EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \ | ||
32 | '${GTKDOC_DISABLE_FLAG}', d)} " | ||
33 | GIR_MESON_OPTION = 'gir' | 30 | GIR_MESON_OPTION = 'gir' |
34 | 31 | ||
35 | LEAD_SONAME = "libpango-1.0*" | 32 | LEAD_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 | |||
22 | EXTRA_OEMESON = " -Dsystemd_user_dir=${systemd_user_unitdir} \ | 22 | EXTRA_OEMESON = " -Dsystemd_user_dir=${systemd_user_unitdir} \ |
23 | -Ddbus_daemon=${bindir}/dbus-daemon" | 23 | -Ddbus_daemon=${bindir}/dbus-daemon" |
24 | 24 | ||
25 | GTKDOC_ENABLE_FLAG = "-Denable_docs=true" | 25 | GTKDOC_MESON_OPTION = "enable_docs" |
26 | GTKDOC_DISABLE_FLAG = "-Denable_docs=false" | ||
27 | |||
28 | EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \ | ||
29 | '${GTKDOC_DISABLE_FLAG}', d)} " | ||
30 | 26 | ||
31 | GIR_MESON_OPTION = 'enable-introspection' | 27 | GIR_MESON_OPTION = 'enable-introspection' |
32 | GIR_MESON_ENABLE_FLAG = 'yes' | 28 | GIR_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" | |||
14 | GNOMEBASEBUILDCLASS = "meson" | 14 | GNOMEBASEBUILDCLASS = "meson" |
15 | inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection | 15 | inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection |
16 | 16 | ||
17 | GTKDOC_ENABLE_FLAG = "-Ddocs=true" | ||
18 | GTKDOC_DISABLE_FLAG = "-Ddocs=false" | ||
19 | |||
20 | EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \ | ||
21 | '${GTKDOC_DISABLE_FLAG}', d)} " | ||
22 | |||
23 | SRC_URI_append = " \ | 17 | SRC_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 | ||
27 | EXTRA_OEMESON_append = " -Dvapi=false" | 27 | EXTRA_OEMESON_append = " -Dvapi=false" |
28 | 28 | ||
29 | GTKDOC_ENABLE_FLAG = "-Ddoc=true" | 29 | GTKDOC_MESON_OPTION = "doc" |
30 | GTKDOC_DISABLE_FLAG = "-Ddoc=false" | ||
31 | |||
32 | EXTRA_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 |