Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 157987 | Differences between
and this patch

Collapse All | Expand All

(-)kvm-12.ebuild (-8 / +25 lines)
Lines 22-35 Link Here
22
	      kernel/kvm-amd(extra:)"
22
	      kernel/kvm-amd(extra:)"
23
BUILD_TARGETS="kernel"
23
BUILD_TARGETS="kernel"
24
24
25
pkg_setup() {
26
	if [ "$(gcc-major-version)" == "4" ]; then
27
	eerror "qemu requires gcc-3 in order to build and work correctly"
28
	eerror "please compile it switching to gcc-3."
29
	die "gcc 4 cannot build qemu"
30
	fi
31
}
32
25
src_compile() {
33
src_compile() {
26
        linux-mod_pkg_setup	
34
	#fix make install to not install modules
27
	conf_opts="--with-patched-kernel"
35
	sed -i '/$(kcmd)/d' ${WORKDIR}/${P}/Makefile
36
37
	linux-mod_pkg_setup	
38
	conf_opts="--prefix=/usr"
39
28
	./configure ${conf_opts} || die "configure failed"
40
	./configure ${conf_opts} || die "configure failed"
29
    	if ! linux_chkconfig_present KVM; then
41
	#Check if kvm is NOT part of the kernel and compile the module
42
	if ! linux_chkconfig_present KVM; then
30
		linux-mod_src_compile
43
		linux-mod_src_compile
44
		./configure ${conf_opts}
45
	#If it is we need to disable the build of the module
46
	else
47
		./confiure ${conf_opts} --with-patched-kernel || die "Configure failed"
31
	fi
48
	fi
32
	emake user qemu || die "make fail"
49
	make user qemu || die "make failed"
33
}
50
}
34
51
35
pkg_preinst() {
52
pkg_preinst() {
Lines 37-46 Link Here
37
}
54
}
38
55
39
src_install() {
56
src_install() {
40
	emake install DESTDIR="${D}" || die
57
	make install DESTDIR="${D}" || die
41
    	if ! linux_chkconfig_present KVM; then
58
		if ! linux_chkconfig_present KVM; then
42
		linux-mod_src_install
59
		linux-mod_src_install
43
	fi
60
	fi
44
        insinto /etc/udev/rules.d/
61
		insinto /etc/udev/rules.d/
45
	doins ${WORKDIR}/scripts/65-kvm.rules
62
	doins ${WORKDIR}/${P}/scripts/65-kvm.rules
46
}
63
}

Return to bug 157987