diff options
Diffstat (limited to 'external/poky/meta/classes/gtk-doc.bbclass')
-rw-r--r-- | external/poky/meta/classes/gtk-doc.bbclass | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/external/poky/meta/classes/gtk-doc.bbclass b/external/poky/meta/classes/gtk-doc.bbclass index b4f67549..7dd662bf 100644 --- a/external/poky/meta/classes/gtk-doc.bbclass +++ b/external/poky/meta/classes/gtk-doc.bbclass @@ -10,13 +10,24 @@ GTKDOC_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', \ bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}" +# meson: default option name to enable/disable gtk-doc. This matches most +# project's configuration. In doubts - check meson_options.txt in project's +# source path. +GTKDOC_MESON_OPTION ?= 'docs' +GTKDOC_MESON_ENABLE_FLAG ?= 'true' +GTKDOC_MESON_DISABLE_FLAG ?= 'false' + +# Auto enable/disable based on GTKDOC_ENABLED EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-gtk-doc --enable-gtk-doc-html --disable-gtk-doc-pdf', \ '--disable-gtk-doc', d)} " +EXTRA_OEMESON_prepend_class-target = "-D${GTKDOC_MESON_OPTION}=${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_MESON_ENABLE_FLAG}', '${GTKDOC_MESON_DISABLE_FLAG}', d)} " # When building native recipes, disable gtkdoc, as it is not necessary, # pulls in additional dependencies, and makes build times longer EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc " EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc " +EXTRA_OEMESON_prepend_class-native = "-D${GTKDOC_MESON_OPTION}=${GTKDOC_MESON_DISABLE_FLAG} " +EXTRA_OEMESON_prepend_class-nativesdk = "-D${GTKDOC_MESON_OPTION}=${GTKDOC_MESON_DISABLE_FLAG} " # Even though gtkdoc is disabled on -native, gtk-doc package is still # needed for m4 macros. @@ -41,7 +52,7 @@ 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}'])}" + qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\\$GIR_EXTRA_LIBS_PATH','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}" cat > ${B}/gtkdoc-qemuwrapper << EOF #!/bin/sh # Use a modules directory which doesn't exist so we don't load random things @@ -51,6 +62,9 @@ export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy GIR_EXTRA_LIBS_PATH=\`find ${B} -name *.so -printf "%h\n"|sort|uniq| tr '\n' ':'\`\$GIR_EXTRA_LIBS_PATH GIR_EXTRA_LIBS_PATH=\`find ${B} -name .libs| tr '\n' ':'\`\$GIR_EXTRA_LIBS_PATH +# meson sets this wrongly (only to libs in build-dir), qemu-wrapper_cmdline() and GIR_EXTRA_LIBS_PATH take care of it properly +unset LD_LIBRARY_PATH + if [ -d ".libs" ]; then $qemu_binary ".libs/\$@" else |