summaryrefslogtreecommitdiff
blob: da1fd2803d22402d5cc77040ab904dab4c1b6a1e (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="4"
GCONF_DEBUG="no"

inherit linux-info gnome2
if [[ ${PV} = 9999 ]]; then
	inherit gnome2-live
fi

DESCRIPTION="Simple GNOME 3 application to access remote or virtual systems"
HOMEPAGE="https://live.gnome.org/Design/Apps/Boxes"

LICENSE="LGPL-2"
SLOT="0"
IUSE="bindist"
if [[ ${PV} = 9999 ]]; then
	KEYWORDS=""
else
	KEYWORDS="~amd64" # qemu-kvm[spice] is 64bit-only
fi

# CHECK: We're hard-depending on qemu-kvm[spice]. Does app-emulation/qemu
# support spice or not?
# NOTE: sys-fs/* stuff is called via exec()
RDEPEND="
	>=dev-libs/libxml2-2.7.8:2
	>=sys-fs/udev-165[gudev]
	>=dev-libs/glib-2.29.90:2
	>=dev-libs/gobject-introspection-0.9.6
	>=sys-libs/libosinfo-0.1.1
	app-emulation/qemu-kvm[spice]
	>=app-emulation/libvirt-0.9.3[libvirtd,qemu]
	>=app-emulation/libvirt-glib-0.0.8
	>=x11-libs/gtk+-3.3.5:3
	>=net-libs/gtk-vnc-0.4.4[gtk3]
	>=net-misc/spice-gtk-0.9[gtk3]
	>=app-misc/tracker-0.14[iso]
	>=gnome-base/libgnomekbd-3

	sys-fs/fuse
	sys-fs/fuseiso
	sys-fs/mtools"
DEPEND="${RDEPEND}
	>=dev-util/intltool-0.40
	>=sys-devel/gettext-0.17
	virtual/pkgconfig"

if [[ ${PV} = 9999 ]]; then
	DEPEND="${DEPEND}
		>=dev-lang/vala-0.14.0:0.14
		sys-libs/libosinfo[introspection,vala]
		app-emulation/libvirt-glib[introspection,vala]
		net-libs/gtk-vnc[introspection,vala]
		net-misc/spice-gtk[introspection,vala]"
fi

pkg_pretend() {
	linux_config_exists

	if ! { linux_chkconfig_present KVM_AMD || \
		linux_chkconfig_present KVM_INTEL; }; then
		ewarn "You need KVM support in your kernel to use GNOME Boxes!"
	fi
}

pkg_setup() {
	DOCS="AUTHORS README NEWS THANKS TODO"
	G2CONF="--disable-schemas-compile
		--disable-strict-cc
		$(use_enable !bindist logos)
		VALAC=$(type -P valac-0.14)"
}

pkg_postinst() {
	gnome2_pkg_postinst
	elog "Before running gnome-boxes, you will need to load the KVM modules"
	elog "If you have an Intel Processor, run:"
	elog "	modprobe kvm-intel"
	einfo
	elog "If you have an AMD Processor, run:"
	elog "	modprobe kvm-amd"
}