gtk-doc-1.33.0.ebuild (2352B)
1 # Copyright 1999-2020 Gentoo Authors 2 # Distributed under the terms of the GNU General Public License v2 3 4 EAPI=6 5 PYTHON_COMPAT=( python3_{6,7,8,9} ) 6 7 inherit autotools 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 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris" 15 16 IUSE="debug doc emacs" 17 REQUIRED_USE="${PYTHON_REQUIRED_USE}" 18 19 RDEPEND=" 20 >=dev-libs/glib-2.6:2 21 dev-libs/libxslt 22 >=dev-libs/libxml2-2.3.6:2 23 ~app-text/docbook-xml-dtd-4.3 24 app-text/docbook-xsl-stylesheets 25 ~app-text/docbook-sgml-dtd-3.0 26 >=app-text/docbook-dsssl-stylesheets-1.40 27 emacs? ( >=app-editors/emacs-23.1:* ) 28 $(python_gen_cond_dep ' 29 dev-python/pygments[${PYTHON_MULTI_USEDEP}] 30 ') 31 " 32 DEPEND="${RDEPEND} 33 ~dev-util/gtk-doc-am-${PV} 34 dev-util/itstool 35 virtual/pkgconfig 36 " 37 38 # tests require unpackaged python module "anytree", and require java(fop) or tex(dblatex) 39 RESTRICT="test" 40 41 pkg_setup() { 42 DOC_CONTENTS="gtk-doc does no longer define global key bindings for Emacs. 43 You may set your own key bindings for \"gtk-doc-insert\" and 44 \"gtk-doc-insert-section\" in your ~/.emacs file." 45 SITEFILE=61${PN}-gentoo.el 46 python-single-r1_pkg_setup 47 } 48 49 src_prepare() { 50 # Remove global Emacs keybindings, bug #184588 51 eapply "${FILESDIR}"/${PN}-1.8-emacs-keybindings.patch 52 53 gnome2_src_prepare 54 eautoreconf 55 } 56 57 src_configure() { 58 gnome2_src_configure \ 59 --with-xml-catalog="${EPREFIX}"/etc/xml/catalog \ 60 $(use_enable debug) 61 } 62 63 src_compile() { 64 gnome2_src_compile 65 use emacs && elisp-compile tools/gtk-doc.el 66 } 67 68 src_install() { 69 gnome2_src_install 70 71 python_fix_shebang "${ED}"/usr/bin/gtkdoc-depscan 72 73 # Don't install this file, it's in gtk-doc-am now 74 rm "${ED}"/usr/share/aclocal/gtk-doc.m4 || die "failed to remove gtk-doc.m4" 75 76 if use doc; then 77 docinto doc 78 dodoc doc/* 79 docinto examples 80 dodoc examples/* 81 fi 82 83 if use emacs; then 84 elisp-install ${PN} tools/gtk-doc.el* 85 elisp-site-file-install "${FILESDIR}/${SITEFILE}" 86 readme.gentoo_create_doc 87 fi 88 } 89 90 pkg_postinst() { 91 gnome2_pkg_postinst 92 if use emacs; then 93 elisp-site-regen 94 readme.gentoo_print_elog 95 fi 96 } 97 98 pkg_postrm() { 99 gnome2_pkg_postrm 100 use emacs && elisp-site-regen 101 }