summaryrefslogtreecommitdiff
blob: e7534cc8cea4eb39c3172e4e30c8b7850ce00d9a (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit linux-mod multilib

DESCRIPTION="KVM Virtualization package"
HOMEPAGE="http://kvm.qumranet.com/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
#IUSE="inkernel"

RDEPEND="media-libs/libsdl
	media-libs/alsa-lib
	!app-emulation/qemu"
DEPEND="${RDEPEND}"

pkg_setup() {
	MODULE_NAMES="kvm(drivers/kvm:${S}/kernel) \
				kvm-intel(drivers/kvm:${S}/kernel) \
				kvm-amd(drivers/kvm:${S}/kernel)"
	linux-mod_pkg_setup
}

src_compile() {
	MYCONF="--prefix=/usr --disable-gcc-check --qemu-cc=gcc"
	./configure ${MYCONF} || die "configure failed"

	BUILD_TARGETS="clean all"
	linux-mod_src_compile
	#cd kernel
	#ARCH="$(tc-arch-kernel)" emake || die "making kernel module failed"
	#cd ..
	emake -C user || die "making user failed"
	emake -C qemu || die "making qemu failed"
}

src_install() {
	#addpredict /$(get_libdir)/modules/${KV_FULL}
	linux-mod_src_install
	emake -C user DESTDIR=${D} install || die "installing user failed"
	emake -C qemu DESTDIR=${D} install || die "installing qemu failed"
	#emake install || die "install failed"
}