blob: 3c0653437ca52b7d0c1beaa0f54d905c13dd3eae (
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
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit bash-completion-r1
MY_PV_1="$(ver_cut 1-2)"
MY_PV_2="$(ver_cut 2)"
[[ $(( ${MY_PV_2} % 2 )) -eq 0 ]] && SD="stable" || SD="development"
DESCRIPTION="Tool to convert guests from foreign hypervisors to run on KVM"
HOMEPAGE="https://libguestfs.org/"
SRC_URI="https://download.libguestfs.org/${PN}/${MY_PV_1}-${SD}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
if [ "${SD}" == "stable" ]; then
KEYWORDS="~amd64"
fi
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND=">=app-emulation/libguestfs-1.56.0[ocaml]
dev-libs/json-c
dev-libs/libpcre2
dev-ml/libvirt-ocaml
sys-libs/libnbd[ocaml]
sys-libs/libosinfo
>=sys-block/nbdkit-1.42.0[curl,libssh,nbd,python]
virtual/libcrypt:="
RDEPEND="${DEPEND}
app-arch/unzip
app-emulation/qemu"
BDEPEND="dev-ml/findlib[ocamlopt]
dev-ml/ocaml-gettext[ocamlopt]
dev-ml/ocaml-gettext-stub[ocamlopt]
dev-perl/IPC-Run3
sys-devel/gettext
virtual/pkgconfig
test? ( dev-ml/ounit2[ocamlopt] )"
src_test() {
# libguestfs tests won't work until the new environment is sourced
# Automatic testers (tinderboxes) probably won't do this, so do it ourselves if needed
if [[ -z "${LIBGUESTFS_PATH}" ]]; then
local -x $(<${BROOT}/etc/env.d/99libguestfs-appliance) || die
fi
# Can't reach libvirt from the sandbox
local -x SKIP_TEST_O_LIBVIRT_SH=1
# Requires libnbd "blkhash" support, which is not in portage and an automagic dependency
# of libnbd
local -x SKIP_TEST_O_OVIRT_UPLOAD_SH=1
local -x SKIP_TEST_VIRTIO_WIN_ISO_SH=1
local -x SKIP_TEST_WINDOWS_UEFI_CONVERSION_SH=1
# Requires 3rd party Windows binaries: rhsrvany.exe or pvvxsvc.exe
local -x SKIP_TEST_I_OVA_AS_ROOT_SH=1
# Requires supermin
local -x SKIP_TEST_O_OVIRT_SH=1
# Must be called explicilty even without above variable because
# emake check -n fails due to missing Windows headers.
emake check
}
src_install() {
default
dobashcomp bash/virt-v2v
}
|