summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-03-05 22:19:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-07 06:34:52 -0800
commitffa658dc8f62bb61a97a584957f15ca0d926c5a9 (patch)
tree59421d9dda4f3256b61732faf1000c66858b3c5b
parentf0ccd96a6434e45bc885c5b6128630c4ad510da8 (diff)
downloadpoky-ffa658dc8f62bb61a97a584957f15ca0d926c5a9.tar.gz
gtk-doc: inherit classes only if gtk-doc is enabled
Respect GTKDOC_ENABLED when inheriting python3native and DEPENDing on qemu-native, as they're not needed when disabled. python3native is required as otherwise the host Python is most likely used which may or may not have python3-six installed (a requirement of gtk-doc). (From OE-Core rev: b93386b22e1dc78b2917652dac4ad02745a99989) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/gtk-doc.bbclass22
1 files changed, 10 insertions, 12 deletions
diff --git a/meta/classes/gtk-doc.bbclass b/meta/classes/gtk-doc.bbclass
index 5201c7151c..b8db4280bc 100644
--- a/meta/classes/gtk-doc.bbclass
+++ b/meta/classes/gtk-doc.bbclass
@@ -18,27 +18,27 @@ EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'Tru
18EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc " 18EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc "
19EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc " 19EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc "
20 20
21DEPENDS_append_class-target = " gtk-doc-native qemu-native"
22
23# Even though gtkdoc is disabled on -native, gtk-doc package is still 21# Even though gtkdoc is disabled on -native, gtk-doc package is still
24# needed for m4 macros. 22# needed for m4 macros.
25DEPENDS_append_class-native = " gtk-doc-native" 23DEPENDS_append = " gtk-doc-native"
26DEPENDS_append_class-nativesdk = " gtk-doc-native"
27 24
28# The documentation directory, where the infrastructure will be copied. 25# The documentation directory, where the infrastructure will be copied.
29# gtkdocize has a default of "." so to handle out-of-tree builds set this to $S. 26# gtkdocize has a default of "." so to handle out-of-tree builds set this to $S.
30GTKDOC_DOCDIR ?= "${S}" 27GTKDOC_DOCDIR ?= "${S}"
31 28
29export STAGING_DIR_HOST
30
31inherit ${@oe.utils.ifelse(d.getVar('GTKDOC_ENABLED') == 'True', 'python3native', '')}
32
33inherit pkgconfig qemu
34DEPENDS_append = "${@oe.utils.ifelse(d.getVar('GTKDOC_ENABLED') == 'True', ' qemu-native', '')}"
35
32do_configure_prepend () { 36do_configure_prepend () {
33 ( cd ${S}; gtkdocize --docdir ${GTKDOC_DOCDIR} || true ) 37 ( cd ${S}; gtkdocize --docdir ${GTKDOC_DOCDIR} || true )
34} 38}
35 39
36inherit qemu
37
38export STAGING_DIR_HOST
39
40do_compile_prepend_class-target () { 40do_compile_prepend_class-target () {
41 41 if [ ${GTKDOC_ENABLED} = True ]; then
42 # Write out a qemu wrapper that will be given to gtkdoc-scangobj so that it 42 # Write out a qemu wrapper that will be given to gtkdoc-scangobj so that it
43 # can run target helper binaries through that. 43 # can run target helper binaries through that.
44 qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}" 44 qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
@@ -64,7 +64,5 @@ if [ \$? -ne 0 ]; then
64fi 64fi
65EOF 65EOF
66 chmod +x ${B}/gtkdoc-qemuwrapper 66 chmod +x ${B}/gtkdoc-qemuwrapper
67 fi
67} 68}
68
69
70inherit pkgconfig