1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7} )
7 DISTUTILS_SINGLE_IMPL=1
9 DISTUTILS_USE_SETUPTOOLS=no
10 inherit gnome2 distutils-r1
12 DESCRIPTION="A graphical tool for administering virtual machines"
13 HOMEPAGE="http://virt-manager.org"
15 if [[ ${PV} = *9999* ]]; then
19 EGIT_REPO_URI="https://github.com/virt-manager/virt-manager.git"
21 SRC_URI="http://virt-manager.org/download/sources/${PN}/${P}.tar.gz"
22 KEYWORDS="~amd64 ~ppc64 ~x86"
27 IUSE="gtk policykit sasl"
29 RDEPEND="!app-emulation/virtinst
32 >=app-emulation/libvirt-glib-1.0.0[introspection]
33 $(python_gen_cond_dep '
34 dev-libs/libxml2[python,${PYTHON_MULTI_USEDEP}]
35 dev-python/argcomplete[${PYTHON_MULTI_USEDEP}]
36 dev-python/ipaddr[${PYTHON_MULTI_USEDEP}]
37 dev-python/libvirt-python[${PYTHON_MULTI_USEDEP}]
38 dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
39 dev-python/requests[${PYTHON_MULTI_USEDEP}]
41 >=sys-libs/libosinfo-0.2.10[introspection]
44 >=net-libs/gtk-vnc-0.3.8[gtk3(+),introspection]
45 net-misc/spice-gtk[usbredir,gtk3,introspection,sasl?]
46 net-misc/x11-ssh-askpass
47 x11-libs/gtk+:3[introspection]
48 x11-libs/gtksourceview:4[introspection]
49 x11-libs/vte:2.91[introspection]
50 policykit? ( sys-auth/polkit[introspection] )
58 DOCS=( README.md NEWS.md )
61 distutils-r1_src_prepare
66 --default-graphics=spice
74 local mydistutilsargs=( --no-update-icon-cache --no-compile-schemas )
75 distutils-r1_src_install
77 python_fix_shebang "${ED}"/usr/share/virt-manager
85 export GNOME2_ECLASS_ICONS=$(find 'usr/share/virt-manager/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null)
87 rm -rf "${ED}/usr/share/virt-manager/virtManager"
88 rm -f "${ED}/usr/share/virt-manager/virt-manager"
89 rm -rf "${ED}/usr/share/virt-manager/ui/"
90 rm -rf "${ED}/usr/share/virt-manager/icons/"
91 rm -rf "${ED}/usr/share/man/man1/virt-manager.1*"
92 rm -rf "${ED}/usr/share/icons/"
93 rm -rf "${ED}/usr/share/applications/virt-manager.desktop"
94 rm -rf "${ED}/usr/bin/virt-manager"
99 use gtk && gnome2_pkg_postinst