2012-02-22 13:28:44 +04:00
|
|
|
# Copyright 1999-2012 Gentoo Foundation
|
2012-02-06 16:39:49 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2012-04-09 17:26:40 +04:00
|
|
|
# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/virtualbox-modules-4.1.8.ebuild,v 1.3 2012/04/09 12:04:48 maekke Exp $
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
# XXX: the tarball here is just the kernel modules split out of the binary
|
|
|
|
# package that comes from virtualbox-bin
|
|
|
|
|
2012-02-08 10:16:21 +04:00
|
|
|
EAPI=4
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
inherit eutils linux-mod
|
|
|
|
|
|
|
|
MY_P=vbox-kernel-module-src-${PV}
|
|
|
|
DESCRIPTION="Kernel Modules for Virtualbox"
|
|
|
|
HOMEPAGE="http://www.virtualbox.org/"
|
2012-02-08 10:16:21 +04:00
|
|
|
SRC_URI="http://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
LICENSE="GPL-2"
|
|
|
|
SLOT="0"
|
2012-04-09 17:26:40 +04:00
|
|
|
KEYWORDS="amd64 x86"
|
2012-02-08 10:16:21 +04:00
|
|
|
IUSE="pax_kernel"
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
RDEPEND="!=app-emulation/virtualbox-9999"
|
|
|
|
|
|
|
|
S=${WORKDIR}
|
|
|
|
|
|
|
|
BUILD_TARGETS="all"
|
|
|
|
BUILD_TARGET_ARCH="${ARCH}"
|
2012-02-08 10:16:21 +04:00
|
|
|
MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
pkg_setup() {
|
|
|
|
linux-mod_pkg_setup
|
2012-02-08 10:16:21 +04:00
|
|
|
|
2012-02-06 16:39:49 +04:00
|
|
|
BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
|
|
|
|
enewgroup vboxusers
|
|
|
|
}
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
if kernel_is -ge 2 6 33 ; then
|
|
|
|
# evil patch for new kernels - header moved
|
|
|
|
grep -lR linux/autoconf.h * | xargs sed -i -e 's:<linux/autoconf.h>:<generated/autoconf.h>:'
|
|
|
|
fi
|
2012-02-08 10:16:21 +04:00
|
|
|
|
|
|
|
if use pax_kernel && kernel_is -ge 3 0 0 ; then
|
|
|
|
epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
|
|
|
|
fi
|
2012-02-06 16:39:49 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
linux-mod_src_install
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
linux-mod_pkg_postinst
|
|
|
|
elog "Starting with the 3.x release new kernel modules were added,"
|
|
|
|
elog "be sure to load all the needed modules."
|
|
|
|
elog ""
|
|
|
|
elog "Please add \"vboxdrv\", \"vboxnetflt\" and \"vboxnetadp\" to:"
|
2012-02-08 10:16:21 +04:00
|
|
|
elog "/etc/conf.d/modules"
|
2012-02-06 16:39:49 +04:00
|
|
|
}
|