gtk-doc-1.25-r1.ebuild 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit eutils elisp-common gnome2 python-single-r1 readme.gentoo-r1
  6. DESCRIPTION="GTK+ Documentation Generator"
  7. HOMEPAGE="http://www.gtk.org/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 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris"
  11. IUSE="debug doc emacs highlight vim"
  12. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  13. RDEPEND="
  14. ${PYTHON_DEPS}
  15. >=dev-libs/glib-2.6:2
  16. >=dev-lang/perl-5.18
  17. dev-libs/libxslt
  18. >=dev-libs/libxml2-2.3.6:2
  19. ~app-text/docbook-xml-dtd-4.3
  20. app-text/docbook-xsl-stylesheets
  21. ~app-text/docbook-sgml-dtd-3.0
  22. >=app-text/docbook-dsssl-stylesheets-1.40
  23. emacs? ( virtual/emacs )
  24. highlight? (
  25. vim? ( || ( app-editors/vim app-editors/gvim ) )
  26. !vim? ( dev-util/source-highlight )
  27. )
  28. "
  29. DEPEND="${RDEPEND}
  30. ~dev-util/gtk-doc-am-${PV}
  31. app-text/yelp-tools
  32. virtual/pkgconfig
  33. "
  34. pkg_setup() {
  35. DOC_CONTENTS="gtk-doc does no longer define global key bindings for Emacs.
  36. You may set your own key bindings for \"gtk-doc-insert\" and
  37. \"gtk-doc-insert-section\" in your ~/.emacs file."
  38. SITEFILE=61${PN}-gentoo.el
  39. python-single-r1_pkg_setup
  40. }
  41. src_prepare() {
  42. # Remove global Emacs keybindings, bug #184588
  43. eapply "${FILESDIR}"/${PN}-1.8-emacs-keybindings.patch
  44. gnome2_src_prepare
  45. }
  46. src_configure() {
  47. local myconf
  48. if use vim; then
  49. myconf="${myconf} $(use_with highlight highlight vim)"
  50. else
  51. myconf="${myconf} $(use_with highlight highlight source-highlight)"
  52. fi
  53. gnome2_src_configure \
  54. --with-xml-catalog="${EPREFIX}"/etc/xml/catalog \
  55. $(use_enable debug) \
  56. ${myconf}
  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/gtkdoc-depscan
  65. # Don't install those files, they are in gtk-doc-am now
  66. rm "${ED}"/usr/share/aclocal/gtk-doc.m4 || die "failed to remove gtk-doc.m4"
  67. rm "${ED}"/usr/bin/gtkdoc-rebase || die "failed to remove gtkdoc-rebase"
  68. if use doc; then
  69. docinto doc
  70. dodoc doc/*
  71. docinto examples
  72. dodoc examples/*
  73. fi
  74. if use emacs; then
  75. elisp-install ${PN} tools/gtk-doc.el*
  76. elisp-site-file-install "${FILESDIR}/${SITEFILE}"
  77. readme.gentoo_create_doc
  78. fi
  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. }