summaryrefslogtreecommitdiff
blob: e922347526f13415485429a9ddd2b52ed186fa5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"
NEEDS_PYTHON=2.4

inherit python bzr

DESCRIPTION="A desktop-agnostic library for GLib-based projects"
HOMEPAGE="https://launchpad.net/libdesktop-agnostic"
SRC_URI=""
EBZR_REPO_URI="lp:libdesktop-agnostic"

LICENSE="LGPL-2.1 GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="debug gconf gnome -gnome-vfs -xfce"

SHARED_DEPEND=">=dev-libs/glib-2.16
	>=x11-libs/gtk+-2.12
	>=dev-python/pygobject-2.12
	>=dev-python/pygtk-2.12
	gconf? ( >=gnome-base/gconf-2.0 )
	gnome? (
		gnome-base/gnome-desktop
	)
	gnome-vfs? (
		gnome-base/gnome-vfs:2
	)
	xfce? ( xfce-base/thunar )"

DEPEND="${SHARED_DEPEND}
	dev-libs/gobject-introspection
	>=dev-lang/vala-0.7.7"
RDEPEND="${SHARED_DEPEND}"

src_prepare() {
	# See https://bugs.launchpad.net/libdesktop-agnostic/+bug/519831
	epatch ${FILESDIR}/desktop-agnostic-various-fixes.patch
}

src_configure() {
	local cfg="keyfile" de="glib" vfs="gio" myconf=""
	if use gconf; then
		cfg="gconf,${cfg}"
	fi
	if use gnome; then
		de="gnome,${de}"
	fi
	if use gnome-vfs; then
		vfs="gnome-vfs,${vfs}"
	fi
	if use xfce; then
		vfs="thunar-vfs,${vfs}"
	fi
	if use debug; then
		myconf="${myconf} --enable-debug"
	fi
	./waf configure --prefix=/usr --with-glade --config-backends=${cfg} \
		--desktop-entry-backends=${de} --vfs-backends=${vfs} \
		${myconf} || die "Could not configure ${PN}."
}

src_compile() {
	./waf || die "Could not compile ${PN}."
}

src_install() {
	./waf install --destdir="${D}" || die "Could not install ${PN}."
}