[oe-commits] [openembedded-core] 33/34: gtk-doc: inherit classes only if gtk-doc is enabled

git at git.openembedded.org git at git.openembedded.org
Wed Mar 7 14:35:36 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit b93386b22e1dc78b2917652dac4ad02745a99989
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Mon Mar 5 22:19:31 2018 +0000

    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).
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/gtk-doc.bbclass | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/meta/classes/gtk-doc.bbclass b/meta/classes/gtk-doc.bbclass
index 5201c71..b8db428 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
 EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc "
 EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc "
 
-DEPENDS_append_class-target = " gtk-doc-native qemu-native"
-
 # Even though gtkdoc is disabled on -native, gtk-doc package is still
 # needed for m4 macros.
-DEPENDS_append_class-native = " gtk-doc-native"
-DEPENDS_append_class-nativesdk = " gtk-doc-native"
+DEPENDS_append = " gtk-doc-native"
 
 # The documentation directory, where the infrastructure will be copied.
 # gtkdocize has a default of "." so to handle out-of-tree builds set this to $S.
 GTKDOC_DOCDIR ?= "${S}"
 
+export STAGING_DIR_HOST
+
+inherit ${@oe.utils.ifelse(d.getVar('GTKDOC_ENABLED') == 'True', 'python3native', '')}
+
+inherit pkgconfig qemu
+DEPENDS_append = "${@oe.utils.ifelse(d.getVar('GTKDOC_ENABLED') == 'True', ' qemu-native', '')}"
+
 do_configure_prepend () {
 	( cd ${S}; gtkdocize --docdir ${GTKDOC_DOCDIR} || true )
 }
 
-inherit qemu
-
-export STAGING_DIR_HOST
-
 do_compile_prepend_class-target () {
-
+    if [ ${GTKDOC_ENABLED} = True ]; then
         # Write out a qemu wrapper that will be given to gtkdoc-scangobj so that it
         # can run target helper binaries through that.
         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
 fi
 EOF
         chmod +x ${B}/gtkdoc-qemuwrapper
+    fi
 }
-
-
-inherit pkgconfig

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list