summaryrefslogtreecommitdiff
blob: 2323cf3e5c0d17c235960134037a2bfde16b0e87 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vboxgtk/vboxgtk-0.8.0.ebuild,v 1.2 2012/07/23 15:46:28 hasufell Exp $

EAPI="4"
PYTHON_DEPEND="2:2.6"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="2.[45] 3.* *-jython"

inherit gnome2-utils distutils

DESCRIPTION="GTK frontend for VirtualBox"
HOMEPAGE="http://code.google.com/p/vboxgtk/"
SRC_URI="http://vboxgtk.googlecode.com/files/${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="
	|| ( app-emulation/virtualbox[-headless,python,sdk]
		>=app-emulation/virtualbox-bin-2.2.2[python] )
	>=dev-python/pygobject-2.28.0:2"

PKG_LINGUAS="cs gl"
for PKG_LINGUA in ${PKG_LINGUAS}; do
	IUSE="${IUSE} linguas_${PKG_LINGUA/-/_}"
done

src_prepare() {
	distutils_src_prepare
	for LINGUA in ${PKG_LINGUAS}; do
		if ! use linguas_${LINGUA/-/_}; then
			rm -r po/"${LINGUA}".po || die "LINGUAS removal failed"
		fi
	done
}

pkg_preinst() {
	gnome2_icon_savelist
}

pkg_postinst() {
	distutils_pkg_postinst
	gnome2_icon_cache_update
}

pkg_postrm() {
	distutils_pkg_postrm
	gnome2_icon_cache_update
}