1 |
# Copyright 1999-2010 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/gtk-doc/gtk-doc-1.13.ebuild,v 1.3 2010/07/25 16:26:40 klausman Exp $ |
4 |
|
5 |
EAPI="2" |
6 |
|
7 |
inherit eutils elisp-common gnome2 |
8 |
|
9 |
DESCRIPTION="GTK+ Documentation Generator" |
10 |
HOMEPAGE="http://www.gtk.org/gtk-doc/" |
11 |
|
12 |
LICENSE="GPL-2 FDL-1.1" |
13 |
SLOT="0" |
14 |
KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" |
15 |
IUSE="debug doc emacs test" |
16 |
|
17 |
RDEPEND=">=dev-libs/glib-2.6 |
18 |
>=dev-lang/perl-5.6 |
19 |
>=app-text/openjade-1.3.1 |
20 |
dev-libs/libxslt |
21 |
>=dev-libs/libxml2-2.3.6 |
22 |
~app-text/docbook-xml-dtd-4.3 |
23 |
app-text/docbook-xsl-stylesheets |
24 |
~app-text/docbook-sgml-dtd-3.0 |
25 |
>=app-text/docbook-dsssl-stylesheets-1.40 |
26 |
emacs? ( virtual/emacs )" |
27 |
|
28 |
DEPEND="${RDEPEND} |
29 |
~dev-util/gtk-doc-am-${PV} |
30 |
>=dev-util/pkgconfig-0.19 |
31 |
>=app-text/scrollkeeper-0.3.14 |
32 |
>=app-text/gnome-doc-utils-0.3.2 |
33 |
test? ( app-text/scrollkeeper-dtd )" |
34 |
|
35 |
SITEFILE=61${PN}-gentoo.el |
36 |
|
37 |
DOCS="AUTHORS ChangeLog MAINTAINERS NEWS README TODO" |
38 |
|
39 |
src_prepare() { |
40 |
gnome2_src_prepare |
41 |
|
42 |
# Remove global Emacs keybindings. |
43 |
epatch "${FILESDIR}/${PN}-1.8-emacs-keybindings.patch" |
44 |
} |
45 |
|
46 |
src_compile() { |
47 |
gnome2_src_compile |
48 |
|
49 |
use emacs && elisp-compile tools/gtk-doc.el |
50 |
} |
51 |
|
52 |
src_install() { |
53 |
gnome2_src_install |
54 |
|
55 |
# Don't install those files, they are in gtk-doc-am now |
56 |
rm "${D}"/usr/share/aclocal/gtk-doc.m4 || die "failed to remove gtk-doc.m4" |
57 |
rm "${D}"/usr/bin/gtkdoc-rebase || die "failed to remove gtkdoc-rebase" |
58 |
|
59 |
if use doc; then |
60 |
docinto doc |
61 |
dodoc doc/* |
62 |
docinto examples |
63 |
dodoc examples/* |
64 |
fi |
65 |
|
66 |
if use emacs; then |
67 |
elisp-install ${PN} tools/gtk-doc.el* |
68 |
elisp-site-file-install "${FILESDIR}/${SITEFILE}" |
69 |
fi |
70 |
} |
71 |
|
72 |
pkg_postinst() { |
73 |
if use emacs; then |
74 |
elisp-site-regen |
75 |
elog "gtk-doc does no longer define global key bindings for Emacs." |
76 |
elog "You may set your own key bindings for \"gtk-doc-insert\" and" |
77 |
elog "\"gtk-doc-insert-section\" in your ~/.emacs file." |
78 |
fi |
79 |
} |
80 |
|
81 |
pkg_postrm() { |
82 |
use emacs && elisp-site-regen |
83 |
} |