logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

gtk-doc-1.32-r2.ebuild (2392B)


  1. # Copyright 1999-2019 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python3_{7,8,9} )
  5. inherit eutils elisp-common gnome2 python-single-r1 readme.gentoo-r1
  6. DESCRIPTION="GTK+ Documentation Generator"
  7. HOMEPAGE="https://gitlab.gnome.org/GNOME/gtk-doc"
  8. LICENSE="GPL-2 FDL-1.1"
  9. SLOT="0"
  10. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris"
  11. IUSE="debug doc emacs pdf test"
  12. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  13. RDEPEND="
  14. ${PYTHON_DEPS}
  15. dev-libs/libxslt
  16. dev-libs/libxml2
  17. app-text/docbook-xsl-stylesheets
  18. $(python_gen_cond_dep '
  19. dev-python/pygments[${PYTHON_MULTI_USEDEP}]
  20. ')
  21. doc? ( app-text/yelp-tools )
  22. emacs? ( virtual/emacs )
  23. pdf? (
  24. || (
  25. app-text/dblatex
  26. dev-java/fop
  27. )
  28. )
  29. test? ( >=dev-libs/glib-2.38.0:2 )
  30. "
  31. DEPEND="${RDEPEND}
  32. ~dev-util/gtk-doc-am-${PV}
  33. dev-util/itstool
  34. virtual/pkgconfig
  35. "
  36. pkg_setup() {
  37. DOC_CONTENTS="gtk-doc does no longer define global key bindings for Emacs.
  38. You may set your own key bindings for \"gtk-doc-insert\" and
  39. \"gtk-doc-insert-section\" in your ~/.emacs file."
  40. SITEFILE=61${PN}-gentoo.el
  41. python-single-r1_pkg_setup
  42. }
  43. src_prepare() {
  44. # Remove global Emacs keybindings, bug #184588
  45. eapply "${FILESDIR}"/${PN}-1.8-emacs-keybindings.patch
  46. # Apply upstream commit 1baf9a6, bug #646850
  47. sed -e '1,/exit 1/s/exit 1/exit $1/' \
  48. -i gtkdoc-mkpdf.in || die
  49. # Fix dev-libs/glib[gtk-doc] doc generation tests by fixing stuff surrounding deprecations
  50. # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1488
  51. eapply "${FILESDIR}"/${PV}-deprecation-parse-fixes.patch
  52. gnome2_src_prepare
  53. }
  54. src_configure() {
  55. gnome2_src_configure \
  56. $(use_enable debug)
  57. }
  58. src_compile() {
  59. gnome2_src_compile
  60. use emacs && elisp-compile tools/gtk-doc.el
  61. }
  62. src_install() {
  63. gnome2_src_install
  64. python_fix_shebang "${ED}"/usr/bin/
  65. if use doc; then
  66. docinto doc
  67. dodoc doc/*
  68. docinto examples
  69. dodoc examples/*
  70. fi
  71. if use emacs; then
  72. elisp-install ${PN} tools/gtk-doc.el*
  73. elisp-site-file-install "${FILESDIR}/${SITEFILE}"
  74. readme.gentoo_create_doc
  75. fi
  76. }
  77. src_test() {
  78. emake -j1 check
  79. }
  80. pkg_postinst() {
  81. gnome2_pkg_postinst
  82. if use emacs; then
  83. elisp-site-regen
  84. readme.gentoo_print_elog
  85. fi
  86. }
  87. pkg_postrm() {
  88. gnome2_pkg_postrm
  89. use emacs && elisp-site-regen
  90. }