gtk-doc: always inherit python3native
PATCH 1/2 gtk-doc: always inherit python3native
My attempt at only inheriting python3native if it was needed was broken and didn't work, so back it out and always inherit.
Signed-off-by Ross Burton <[email protected]>
--- meta/classes/gtk-doc.bbclass | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
meta/classes/gtk-doc.bbclass +2 -4
@@ -28,10 +28,8 @@ 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', '')}" +inherit python3native pkgconfig qemu +DEPENDS_append = "${@' qemu-native' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}" do_configure_prepend () { ( cd ${S}; gtkdocize --docdir ${GTKDOC_DOCDIR} || true )
Signature · 1 line
2.11.0
PATCH 2/2 gtk-doc: improve calling of gtkdocize
gtkdocize is only needed if the recipe is using autotools, so instead of hiding all errors from it, only run it if we're also inheriting autotools.
Also instead of cd'ing into ${S}, pass --srcdir.
Signed-off-by Ross Burton <[email protected]>
--- meta/classes/gtk-doc.bbclass | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
meta/classes/gtk-doc.bbclass +9 -2
@@ -31,8 +31,15 @@ export STAGING_DIR_HOST inherit python3native pkgconfig qemu DEPENDS_append = "${@' qemu-native' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}" -do_configure_prepend () { - ( cd ${S}; gtkdocize --docdir ${GTKDOC_DOCDIR} || true ) +# Run gtkdocize if the recipe is using autotools +run_gtkdocize () { + bbnote Running gtkdocize... + gtkdocize --srcdir ${S} --docdir ${GTKDOC_DOCDIR} +} + +python () { + if bb.data.inherits_class("autotools", d): + d.appendVarFlag('do_configure', 'prefuncs', ' run_gtkdocize') } do_compile_prepend_class-target () {
Signature · 1 line
2.11.0