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