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