net-news/liferea: make backends mutually exclusive.
[gentoo-soor-overlay.git] / net-news / liferea / liferea-1.5.2b.ebuild
Commit [+]AuthorDateLineData
81a735b1
LVM
Leonardo Valeri Manera2008-05-10 15:34:21 +02001# Copyright 1999-2008 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: $
4
5EAPI="1"
6
7WANT_AUTOMAKE=1.7
8WANT_AUTOCONF=latest
9inherit gnome2 eutils
10
11DESCRIPTION="News Aggregator for RDF/RSS/CDF/Atom/Echo/etc feeds"
12HOMEPAGE="http://liferea.sourceforge.net/"
13SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
14LICENSE="GPL-2"
15
16SLOT="0"
17KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
18IUSE="avahi dbus gtkhtml gnutls libnotify lua networkmanager webkit xulrunner"
19
20RDEPEND="xulrunner? ( net-libs/xulrunner:1.8 )
500496c7
LVM
Leonardo Valeri Manera2008-05-10 17:32:32 +020021 !xulrunner? ( webkit? ( net-libs/webkitgtk ) )
22 !amd64? ( !xulrunner? ( !webkit? ( gtkhtml? ( gnome-extra/gtkhtml:2 ) ) ) )
81a735b1
LVM
Leonardo Valeri Manera2008-05-10 15:34:21 +020023 >=x11-libs/gtk+-2.8:2
24 x11-libs/pango
25 gnome-base/gconf:2
26 >=dev-libs/libxml2-2.6.27:2
27 >=dev-libs/libxslt-1.1.19
28 >=dev-db/sqlite-3.3:3
29 dev-libs/glib:2
30 gnome-base/libglade:2.0
31 avahi? ( net-dns/avahi )
32 dbus? ( >=dev-libs/dbus-glib-0.71 )
33 gnutls? ( net-libs/gnutls )
34 libnotify? ( >=x11-libs/libnotify-0.3.2 )
35 lua? ( >=dev-lang/lua-5.1 )
36 networkmanager? ( net-misc/networkmanager )"
37
38DEPEND="${RDEPEND}
39 dev-util/pkgconfig
40 >=dev-util/intltool-0.35"
41
42DOCS="AUTHORS ChangeLog NEWS README"
43
bc66e618
LVM
Leonardo Valeri Manera2008-05-10 15:38:05 +020044S="${WORKDIR}"/${PN}-1.5.2
45
81a735b1
LVM
Leonardo Valeri Manera2008-05-10 15:34:21 +020046pkg_setup() {
47 # Backends are now mutually exclusive.
500496c7
LVM
Leonardo Valeri Manera2008-05-10 17:32:32 +020048 # we prefer xulrunner over webkit over gtkhtml
49 if use xulrunner; then
50 einfo "Select XULrunner 1.8 backend."
51 G2CONF="--enable-xulrunner --disable-webkit --disable gtkhtml2"
52 elif use webkit; then
53 einfo "Selected webkit backend."
54 G2CONF="--disable-xulrunner --enable-webkit --disable gtkhtml2"
55 elif use gtkhtml; then
56 if ! use amd64; then
57 einfo "Selected GtkHTML2 backend."
58 G2CONF="--disable-xulrunner --disable-webkit --enable gtkhtml2"
59 else
60 eerror "GtkHTML2 backend is not supported on amd64 anymore."
61 eerror "Please choose either the xulrunner or the webkit backend."
62 die "Choose either the xulrunner or the webkit backend"
63 fi
64 else
65 ewarn "You must choose one backend for liferea to work."
81a735b1
LVM
Leonardo Valeri Manera2008-05-10 15:34:21 +020066 ewarn "Choices are: xulrunner, webkit, gtkhtml."
67 die "You must enable one of the backends"
68 fi
69
70 G2CONF="${G2CONF} \
71 --disable-gecko \
81a735b1
LVM
Leonardo Valeri Manera2008-05-10 15:34:21 +020072 $(use_enable avahi) \
73 $(use_enable dbus) \
74 $(use_enable gnutls) \
75 $(use_enable libnotify) \
76 $(use_enable lua) \
77 $(use_enable networkmanager nm)"
78}
79
80src_install() {
81 gnome2_src_install
82 rm -f "${D}"/usr/bin/${PN}
83 mv "${D}"/usr/bin/${PN}-bin "${D}"/usr/bin/${PN}
84}