gtk-doc_1.32.bb 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. SUMMARY = "Documentation generator for glib-based software"
  2. DESCRIPTION = "Gtk-doc is a set of scripts that extract specially formatted comments \
  3. from glib-based software and produce a set of html documentation files from them"
  4. HOMEPAGE = "https://www.gtk.org/docs/"
  5. LICENSE = "GPLv2"
  6. LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
  7. inherit gnomebase
  8. # Configure the scripts correctly (and build their dependencies) only if they are actually
  9. # going to be used; otheriwse we need only the m4/makefile includes from the gtk-doc tarball.
  10. PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "api-documentation", "working-scripts", "", d)}"
  11. # This will cause target gtk-doc to hardcode paths of native dependencies
  12. # into its scripts. This means that target gtk-doc package is broken;
  13. # hopefully no one minds because its scripts are not used for anything during build
  14. # and shouldn't be used on targets.
  15. PACKAGECONFIG[working-scripts] = ",,libxslt-native xmlto-native python3-six python3-pygments"
  16. PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,glib-2.0"
  17. SRC_URI[archive.md5sum] = "07764836262e154e94922e5f2aa476ae"
  18. SRC_URI[archive.sha256sum] = "de0ef034fb17cb21ab0c635ec730d19746bce52984a6706e7bbec6fb5e0b907c"
  19. SRC_URI += "file://0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch \
  20. file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \
  21. file://conditionaltests.patch \
  22. file://no-clobber.patch \
  23. "
  24. SRC_URI_append_class-native = " file://pkg-config-native.patch"
  25. BBCLASSEXTEND = "native nativesdk"
  26. # Do not check for XML catalogs when building because that
  27. # information is not used for anything during build. Recipe
  28. # dependencies make sure we have all the right bits.
  29. do_configure_prepend() {
  30. sed -i -e 's,^JH_CHECK_XML_CATALOG.*,,' ${S}/configure.ac
  31. }
  32. do_install_append () {
  33. # configure values for python3 and pkg-config encoded in scripts
  34. for fn in ${bindir}/gtkdoc-depscan \
  35. ${bindir}/gtkdoc-mkhtml2 \
  36. ${datadir}/gtk-doc/python/gtkdoc/config.py; do
  37. sed -e 's,${RECIPE_SYSROOT_NATIVE}/usr/bin/pkg-config,${bindir}/pkg-config,' \
  38. -e 's,${HOSTTOOLS_DIR}/python3,${bindir}/python3,' \
  39. -i ${D}$fn
  40. done
  41. }
  42. FILES_${PN} += "${datadir}/sgml"
  43. FILES_${PN}-dev += "${libdir}/cmake"
  44. FILES_${PN}-doc = ""
  45. SYSROOT_PREPROCESS_FUNCS_append_class-native = " gtkdoc_makefiles_sysroot_preprocess"
  46. gtkdoc_makefiles_sysroot_preprocess() {
  47. # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
  48. # instead of libtool wrapper or running them directly
  49. sed -i \
  50. -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
  51. ${SYSROOT_DESTDIR}${datadir}/gtk-doc/data/gtk-doc*make
  52. }