]> Pileus Git - ~andy/sunrise/blob - app-text/xmlroff/xmlroff-0.6.2.ebuild
app-text/apvlv: Version bump, debug use flag addition
[~andy/sunrise] / app-text / xmlroff / xmlroff-0.6.2.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit eutils autotools
8
9 DESCRIPTION="A fast, free, high-quality, multi-platform XSL formatter"
10 HOMEPAGE="http://xmlroff.org/"
11 SRC_URI="http://xmlroff.org/download/${P}.tar.gz"
12
13 LICENSE="as-is"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="cairo debug doc svg truetype"
17
18 # at least ciaro or gnome-print is required (as backend)
19
20 RDEPEND="x11-libs/gtk+
21         x11-libs/pango
22         dev-libs/glib:2
23         dev-libs/libxml2
24         dev-libs/libxslt
25         cairo? ( x11-libs/cairo[svg?] )
26         !cairo? ( gnome-base/libgnomeprint )
27         svg? ( gnome-base/librsvg )
28         truetype? ( media-libs/freetype )"
29 DEPEND="${RDEPEND}
30         dev-util/pkgconfig"
31
32 src_prepare() {
33         epatch "${FILESDIR}/automagic.patch"
34
35         eautoreconf
36 }
37
38 src_configure() {
39         local myconf
40
41         use debug && myconf="--enable-libfo-debug"
42
43         econf \
44                 $(use_enable cairo) \
45                 $(use_enable !cairo gp) \
46                 $(use_with svg) \
47                 $(use_with truetype freetype) \
48                 ${myconf}
49 }
50
51 src_install() {
52         local docdir="/usr/share/doc/${PF}"
53
54         emake DESTDIR="${D}" HTML_DIR="${docdir}" install || die "emake install failed"
55
56         if use doc; then
57                 mv "${D}/${docdir}/${PN}" "${D}/${docdir}/html" || die
58         else
59                 rm -r "${D}/${docdir}/${PN}" || die
60         fi
61
62         dodoc AUTHORS ChangeLog NEWS README TODO || die "dodoc failed"
63 }