summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2008-12-18 12:14:53 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2008-12-18 12:14:53 +0000
commit5333610112aa54594610779eab4f61eea417bd7c (patch)
tree61e448687c5baf57a50df8372088a76b94910237 /app-emulation/virtualbox-guest-additions
parentProxy commit Alessio's ebuilds. (diff)
downloadhistorical-5333610112aa54594610779eab4f61eea417bd7c.tar.gz
historical-5333610112aa54594610779eab4f61eea417bd7c.tar.bz2
historical-5333610112aa54594610779eab4f61eea417bd7c.zip
Proxy commit Alessio's ebuilds.
Package-Manager: portage-2.2_rc17/cvs/Linux 2.6.27-gentoo-r6 x86_64
Diffstat (limited to 'app-emulation/virtualbox-guest-additions')
-rw-r--r--app-emulation/virtualbox-guest-additions/ChangeLog34
-rw-r--r--app-emulation/virtualbox-guest-additions/Manifest14
-rw-r--r--app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-2-localconfig1
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-1.6.6-r1.ebuild130
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-2.0.4-r1.ebuild146
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-2.0.6.ebuild146
6 files changed, 461 insertions, 10 deletions
diff --git a/app-emulation/virtualbox-guest-additions/ChangeLog b/app-emulation/virtualbox-guest-additions/ChangeLog
index 435d9b29ba17..12a943eb3502 100644
--- a/app-emulation/virtualbox-guest-additions/ChangeLog
+++ b/app-emulation/virtualbox-guest-additions/ChangeLog
@@ -1,10 +1,34 @@
# ChangeLog for app-emulation/virtualbox-guest-additions
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-guest-additions/ChangeLog,v 1.7 2008/10/28 18:15:29 jokey Exp $
-
- 28 Oct 2008; Markus Ullmann <jokey@gentoo.org>
- virtualbox-guest-additions-1.6.6.ebuild:
- Reinstate stable keyword for bug #244718
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-guest-additions/ChangeLog,v 1.8 2008/12/18 12:14:53 flameeyes Exp $
+
+*virtualbox-guest-additions-2.0.6 (18 Dec 2008)
+*virtualbox-guest-additions-2.0.4-r1 (18 Dec 2008)
+*virtualbox-guest-additions-1.6.6-r1 (18 Dec 2008)
+
+ 18 Dec 2008; Diego E. Pettenò <flameeyes@gentoo.org>
+ files/virtualbox-guest-additions-2-localconfig,
+ +virtualbox-guest-additions-1.6.6-r1.ebuild,
+ +virtualbox-guest-additions-2.0.4-r1.ebuild,
+ +virtualbox-guest-additions-2.0.6.ebuild:
+ Proxy commit Alessio's ebuilds.
+
+ 26 Nov 2008; Alessio Cassibba (X-Drum) <swapon@gmail.com>
+ virtualbox-guest-additions-2.0.4-r1.ebuild,
+ virtualbox-guest-additions-2.0.6.ebuild,
+ files/virtualbox-guest-additions-2-localconfig:
+ Version Bump; add x11-libs/libXmu to RDEPEND thanks to Mike Limansky, wrt
+ bug #246701; force ebuild to respect the X USE flag; improve build speed
+ (don't build unneeded stuff); add vboxclient.desktop; drop version 2.0.2
+
+ 31 Oct 2008; Alessio Cassibba (X-Drum) <swapon@gmail.com>
+ -virtualbox-guest-additions-1.6.6.ebuild,
+ +virtualbox-guest-additions-1.6.6-r1.ebuild,
+ -virtualbox-guest-additions-2.0.2.ebuild,
+ +virtualbox-guest-additions-2.0.2-r1.ebuild,
+ -virtualbox-guest-additions-2.0.4.ebuild,
+ +virtualbox-guest-additions-2.0.4-r1.ebuild:
+ fix two typos thanks to Walter Meinl, wrt bug #236151
*virtualbox-guest-additions-2.0.4 (27 Oct 2008)
diff --git a/app-emulation/virtualbox-guest-additions/Manifest b/app-emulation/virtualbox-guest-additions/Manifest
index 5af148f699ed..2c3199e39b7f 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -1,20 +1,24 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-AUX virtualbox-guest-additions-2-localconfig 845 RMD160 5cd3b73046f0dbe8eebef9041f224b6c2433b733 SHA1 1a31b795e4037e444b94afdaa586349f1ae34d9b SHA256 ac7c25fd5f93f4a9ab76a085c58c9c3eb5e93f9e58594a022799df7103040a43
+AUX virtualbox-guest-additions-2-localconfig 877 RMD160 7a09c0e50c1294c289cfd0665dc29986e55f2f7c SHA1 186a04d197c4f1a22376f767b4804cb05a8c811a SHA256 0115ff252376fa9c1244f79f183041a8e1b078f64d8bea2126d344e8b21a7b84
AUX virtualbox-guest-additions.initd 1463 RMD160 4daceefa3e10659381f4b714512548944c7f54fd SHA1 f5290150bbf99feac5c6d81c4f82f9191e5f1786 SHA256 933dbdc5e5363dfbdc2d51deed0726ab91f1ea89e330298266b9ffb03c38989a
DIST VirtualBox-1.6.6-OSE.tar.bz2 35483853 RMD160 4b17428371089806cf6f5e52d1905936f7beb01d SHA1 7c323b35d77277c650cbce2821ab6778d1e3270e SHA256 acb3c20ef751ed408489d7b5c2d5d441226055a6e83bfeb9258ce2d55baba4da
DIST VirtualBox-2.0.2-OSE.tar.bz2 37548591 RMD160 4156f2efe5245236f9890abcd0adb5ad5291f86f SHA1 cdc51cc4e5ff189cf9eff832179494009df1334a SHA256 0318c69eace3db0979f0aefd27aeb6c54d7c1aafcc6a156b076bc116a1d8805b
DIST VirtualBox-2.0.4-OSE.tar.bz2 37841781 RMD160 390a2b4d97a3ed6fdc885b89354884a07b3fc464 SHA1 f8e7c109546c033927bd41e78f259adb81cb1504 SHA256 5618fb09efafac3fc9c183a44aa3c1d8c44d1d7fa58bfb5a73c221f1dd8740fd
+DIST VirtualBox-2.0.6-OSE.tar.bz2 37834467 RMD160 d75b9fbfe1311a5d83388d470d665ba8da0ab73b SHA1 e0f43d59b3309b37fe1703fb19b234f590598733 SHA256 75aea6e429beb953c8d0427cc38e4d25ccd849505ed57fdee0be22cada5497c5
+EBUILD virtualbox-guest-additions-1.6.6-r1.ebuild 3546 RMD160 c121453fd40a0e5c40e8a001419f1c8043e0f150 SHA1 dd72cc65f44dcb39398ef9de1ab7542d320da98e SHA256 53573906c5bfa6a4952a48777c2d3692bc39311a48013540b723539a19c7d48b
EBUILD virtualbox-guest-additions-1.6.6.ebuild 3536 RMD160 1ad699db63d3b74bae87cd77d2559618b9f1065a SHA1 8fc6a3525195d6e97c6efd2d2ade6646a0df6907 SHA256 aa14ed7dba90188851914d0ececc006e9289b25b37494386984e04da0bd51810
EBUILD virtualbox-guest-additions-2.0.2.ebuild 3756 RMD160 b0b9e2a3fd5e4f7cf529949eba4818c5f9363598 SHA1 71c659a013e4a3a2ea878643e9b28ac1c333bcf6 SHA256 ef6aefc0db4ebdb6cf96b48a45272963562be85f1478c2fdf3125440df7287d8
+EBUILD virtualbox-guest-additions-2.0.4-r1.ebuild 3989 RMD160 31991e3526f2f6639177524922b5667a40cdc8be SHA1 9a6154add811f2674bc0ace4feb243bd8b8698c5 SHA256 6b0737772d2f3acb27aba559336dc7b70847edb338332ed476a0d682e5007ec7
EBUILD virtualbox-guest-additions-2.0.4.ebuild 3756 RMD160 f7106dade073a0345679781390d76b53b7656cd7 SHA1 128b23ccd0694b2624a81b900948166b3e2e1036 SHA256 ec29873eaa9538d5f63684ef78e8c7e39dcf6233c7605dbd855c9639cc9811e8
-MISC ChangeLog 6788 RMD160 e27038e7ebaf9dfa25847d406532c69c58ff4077 SHA1 bb470d0a33622b3a455fe6935944d118d177f838 SHA256 a10a3f2b29a328de2ee7ae8534dc73dd50a96214b44c943943408d30021fb17e
+EBUILD virtualbox-guest-additions-2.0.6.ebuild 3986 RMD160 5ffe56b1bb637a9f30d3db3e26210428238ab789 SHA1 857fe0aa5783b1d7deff471f1a0f4a3d1d49a716 SHA256 526e13f904244a99cdc015028a2482c455105cc325b6435f0dbabc7aac88e846
+MISC ChangeLog 7902 RMD160 336954e4811840ca887ad2b0422ff710dd153568 SHA1 9cea10b7815c9897c1a0accab75bf0ef6e875c92 SHA256 1605da3e7c48b20d7d690f139f694926adeea5f76f3f11c4bb675d2076e4be7d
MISC metadata.xml 344 RMD160 12935d5b21be85bc4222fd06371c93dcbf6f534e SHA1 68b99919921f246738cce4350b77d895e7c78106 SHA256 fff5aeb6f453d2e137765ca5016e81344cb0cd0cecd51d81bbb889cb1d7a5ba9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
-iEYEARECAAYFAkkHVsYACgkQz974XjDVpbkFeQCgzjb1JbfEGRl+jvgyYDmdMcTh
-ujwAoIVEoKxlnimHJQl2ATbPY0eOKjp7
-=+dFh
+iEYEARECAAYFAklKPsYACgkQAiZjviIA2XhT4ACdFenXNEqZkiG9fExWWYPe5H/X
+TugAn2p3CwIEqfuNXtNMINj8/X/nfgZ1
+=7xbD
-----END PGP SIGNATURE-----
diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-2-localconfig b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-2-localconfig
index 3e1f7d8cbb32..5e6371e76648 100644
--- a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-2-localconfig
+++ b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-2-localconfig
@@ -24,4 +24,5 @@ KBUILD_MSG_STYLE := brief
## paths, origin, hardening
VBOX_WITH_HARDENING := 2
VBOX_WITH_ORIGIN :=
+VBOX_ONLY_ADDITIONS := 1
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-1.6.6-r1.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-1.6.6-r1.ebuild
new file mode 100644
index 000000000000..de998bf0475c
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-1.6.6-r1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-1.6.6-r1.ebuild,v 1.1 2008/12/18 12:14:53 flameeyes Exp $
+
+inherit eutils linux-mod
+
+MY_P=VirtualBox-${PV}-OSE
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Linux guests"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="http://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+RDEPEND="x11-libs/libXt
+ amd64? ( app-emulation/emul-linux-x86-xlibs )
+ X? ( ~x11-drivers/xf86-video-virtualbox-${PV}
+ ~x11-drivers/xf86-input-virtualbox-${PV}
+ x11-apps/xrandr
+ x11-apps/xrefresh )"
+DEPEND="${RDEPEND}
+ dev-util/kbuild
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-devel/dev86
+ sys-power/iasl
+ x11-proto/renderproto"
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxadd(misc:${WORKDIR}/vboxadd:${WORKDIR}/vboxadd)
+ vboxvfs(misc:${WORKDIR}/vboxvfs:${WORKDIR}/vboxvfs)"
+
+S=${WORKDIR}/${MY_P/-OSE/}
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # Create and unpack a tarball with the sources of the Linux guest
+ # kernel modules, to include all the needed files
+ "${MY_P/-OSE/}"/src/VBox/Additions/linux/export_modules "${WORKDIR}/vbox-kmod.tar.gz"
+ unpack ./vbox-kmod.tar.gz
+
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ cd "${S}"
+ rm -rf kBuild/bin tools
+}
+
+src_compile() {
+ linux-mod_src_compile
+
+ # build the user-space tools, warnings are harmless
+ ./configure --nofatal \
+ --disable-xpcom \
+ --disable-sdl-ttf \
+ --disable-pulse \
+ --disable-alsa \
+ --build-headless || die "configure failed"
+ source ./env.sh
+
+ for each in src/VBox/{Runtime,Additions/common} \
+ src/VBox/Additions/linux{sharedfolders,daemon} ; do
+ MAKE="kmk" emake TOOL_YASM_AS=yasm \
+ || die "kmk failed"
+ done
+}
+
+src_install() {
+ linux-mod_src_install
+
+ cd "${S}"/out/linux.${ARCH}/release/bin/additions
+
+ # shared folders
+ insinto /sbin
+ newins mountvboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ # time synchronisation system service
+ insinto /usr/sbin
+ doins vboxadd-timesync
+ fperms 0755 /usr/sbin/vboxadd-timesync
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+
+ # VBoxClient user service and xrandr wrapper
+ if use X; then
+ insinto /usr/bin
+ doins VBoxClient
+ fperms 4755 /usr/bin/VBoxClient
+
+ dodir /etc/X11/xinit/xinitrc.d/
+ echo -e "#/bin/sh\n/usr/bin/VBoxClient" \
+ >> "${D}/etc/X11/xinit/xinitrc.d/98VBoxClient"
+ fperms 0755 /etc/X11/xinit/xinitrc.d/98VBoxClient
+
+ cd "${S}"/src/VBox/Additions/x11/installer
+ newins VBoxRandR.sh VBoxRandR
+ fperms 0755 /usr/bin/VBoxRandR
+ fi
+
+ # udev rule for vboxdrv
+ dodir /etc/udev/rules.d
+ echo 'KERNEL=="vboxadd", NAME="vboxadd", OWNER="root", MODE="0660"' \
+ >> "${D}/etc/udev/rules.d/60-virtualbox-guest-additions.rules"
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ if ! useq X ; then
+ elog "use flag X is off, enable it to install the"
+ elog "X Window System input and video drivers"
+ fi
+ elog "Please add:"
+ elog "/etc/init.d/${PN}"
+ elog "to the default runlevel in order to load all"
+ elog "needed modules and services."
+ elog ""
+ elog "Warning:"
+ elog "this ebuild is only needed if you are running gentoo"
+ elog "inside a VirtualBox Virtual Machine, you don't need"
+ elog "it to run VirtualBox itself."
+ elog ""
+}
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-2.0.4-r1.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-2.0.4-r1.ebuild
new file mode 100644
index 000000000000..fcebc2b74fad
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-2.0.4-r1.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-2.0.4-r1.ebuild,v 1.1 2008/12/18 12:14:53 flameeyes Exp $
+
+inherit eutils linux-mod
+
+MY_P=VirtualBox-${PV}-OSE
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Linux guests"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="http://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+RDEPEND="x11-libs/libXt
+ amd64? ( app-emulation/emul-linux-x86-xlibs )
+ X? ( ~x11-drivers/xf86-video-virtualbox-${PV}
+ ~x11-drivers/xf86-input-virtualbox-${PV}
+ x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libXmu )"
+DEPEND="${RDEPEND}
+ >=dev-util/kbuild-0.1.4
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-devel/dev86
+ sys-power/iasl
+ x11-proto/renderproto"
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxadd(misc:${WORKDIR}/vboxadd:${WORKDIR}/vboxadd)
+ vboxvfs(misc:${WORKDIR}/vboxvfs:${WORKDIR}/vboxvfs)"
+
+S=${WORKDIR}/${MY_P/-OSE/}
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # Create and unpack a tarball with the sources of the Linux guest
+ # kernel modules, to include all the needed files
+ "${MY_P/-OSE/}"/src/VBox/Additions/linux/export_modules "${WORKDIR}/vbox-kmod.tar.gz"
+ unpack ./vbox-kmod.tar.gz
+
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ cd "${S}"
+ rm -rf kBuild/bin tools
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-2-localconfig" LocalConfig.kmk
+}
+
+src_compile() {
+ linux-mod_src_compile
+
+ # build the user-space tools, warnings are harmless
+ ./configure --nofatal \
+ --disable-xpcom \
+ --disable-sdl-ttf \
+ --disable-pulse \
+ --disable-alsa \
+ --build-headless || die "configure failed"
+ source ./env.sh
+
+ for each in /src/VBox/{Runtime,Additions/common} \
+ /src/VBox/Additions/linux/{sharedfolders,daemon} ; do
+ cd "${S}"${each}
+ MAKE="kmk" emake TOOL_YASM_AS=yasm \
+ KBUILD_PATH="${S}/kBuild" \
+ || die "kmk VBoxControl failed"
+ done
+
+ if use X; then
+ cd "${S}"/src/VBox/Additions/x11/xclient
+ MAKE="kmk" emake TOOL_YASM_AS=yasm \
+ KBUILD_PATH="${S}/kBuild" \
+ || die "kmk VBoxClient failed"
+ fi
+}
+
+src_install() {
+ linux-mod_src_install
+
+ cd "${S}"/out/linux.${ARCH}/release/bin/additions
+
+ # shared folders
+ insinto /sbin
+ newins mountvboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ # time synchronisation system service
+ insinto /usr/sbin
+ doins vboxadd-timesync
+ fperms 0755 /usr/sbin/vboxadd-timesync
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 4755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use X; then
+ doins VBoxClient
+ fperms 4755 /usr/bin/VBoxClient
+
+ dodir /etc/X11/xinit/xinitrc.d/
+ echo -e "#/bin/sh\n/usr/bin/VBoxClient" \
+ >> "${D}/etc/X11/xinit/xinitrc.d/98VBoxClient"
+ fperms 0755 /etc/X11/xinit/xinitrc.d/98VBoxClient
+
+ cd "${S}"/src/VBox/Additions/x11/installer
+ newins VBoxRandR.sh VBoxRandR
+ fperms 0755 /usr/bin/VBoxRandR
+ fi
+
+ # udev rule for vboxdrv
+ dodir /etc/udev/rules.d
+ echo 'KERNEL=="vboxadd", NAME="vboxadd", OWNER="root", MODE="0660"' \
+ >> "${D}/etc/udev/rules.d/60-virtualbox-guest-additions.rules"
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ if ! useq X ; then
+ elog "use flag X is off, enable it to install the"
+ elog "X Window System input and video drivers"
+ fi
+ elog "Please add:"
+ elog "/etc/init.d/${PN}"
+ elog "to the default runlevel in order to load all"
+ elog "needed modules and services."
+ elog ""
+ elog "Warning:"
+ elog "this ebuild is only needed if you are running gentoo"
+ elog "inside a VirtualBox Virtual Machine, you don't need"
+ elog "it to run VirtualBox itself."
+ elog ""
+}
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-2.0.6.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-2.0.6.ebuild
new file mode 100644
index 000000000000..26e6e2d1e669
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-2.0.6.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-2.0.6.ebuild,v 1.1 2008/12/18 12:14:53 flameeyes Exp $
+
+inherit eutils linux-mod
+
+MY_P=VirtualBox-${PV}-OSE
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Linux guests"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="http://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+RDEPEND="x11-libs/libXt
+ amd64? ( app-emulation/emul-linux-x86-xlibs )
+ X? ( ~x11-drivers/xf86-video-virtualbox-${PV}
+ ~x11-drivers/xf86-input-virtualbox-${PV}
+ x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libXmu )"
+DEPEND="${RDEPEND}
+ >=dev-util/kbuild-0.1.4
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-devel/dev86
+ sys-power/iasl
+ x11-proto/renderproto"
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxadd(misc:${WORKDIR}/vboxadd:${WORKDIR}/vboxadd)
+ vboxvfs(misc:${WORKDIR}/vboxvfs:${WORKDIR}/vboxvfs)"
+
+S=${WORKDIR}/${MY_P/-OSE/}
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # Create and unpack a tarball with the sources of the Linux guest
+ # kernel modules, to include all the needed files
+ "${MY_P/-OSE/}"/src/VBox/Additions/linux/export_modules "${WORKDIR}/vbox-kmod.tar.gz"
+ unpack ./vbox-kmod.tar.gz
+
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ cd "${S}"
+ rm -rf kBuild/bin tools
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-2-localconfig" LocalConfig.kmk
+}
+
+src_compile() {
+ linux-mod_src_compile
+
+ # build the user-space tools, warnings are harmless
+ ./configure --nofatal \
+ --disable-xpcom \
+ --disable-sdl-ttf \
+ --disable-pulse \
+ --disable-alsa \
+ --build-headless || die "configure failed"
+ source ./env.sh
+
+ for each in /src/VBox/{Runtime,Additions/common} \
+ /src/VBox/Additions/linux/{sharedfolders,daemon} ; do
+ cd "${S}"${each}
+ MAKE="kmk" emake TOOL_YASM_AS=yasm \
+ KBUILD_PATH="${S}/kBuild" \
+ || die "kmk VBoxControl failed"
+ done
+
+ if use X; then
+ cd "${S}"/src/VBox/Additions/x11/xclient
+ MAKE="kmk" emake TOOL_YASM_AS=yasm \
+ KBUILD_PATH="${S}/kBuild" \
+ || die "kmk VBoxClient failed"
+ fi
+}
+
+src_install() {
+ linux-mod_src_install
+
+ cd "${S}"/out/linux.${ARCH}/release/bin/additions
+
+ # shared folders
+ insinto /sbin
+ newins mountvboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ # time synchronisation system service
+ insinto /usr/sbin
+ doins vboxadd-timesync
+ fperms 0755 /usr/sbin/vboxadd-timesync
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 4755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use X; then
+ doins VBoxClient
+ fperms 4755 /usr/bin/VBoxClient
+
+ dodir /etc/X11/xinit/xinitrc.d/
+ echo -e "#/bin/sh\n/usr/bin/VBoxClient" \
+ >> "${D}/etc/X11/xinit/xinitrc.d/98VBoxClient"
+ fperms 0755 /etc/X11/xinit/xinitrc.d/98VBoxClient
+
+ cd "${S}"/src/VBox/Additions/x11/installer
+ newins VBoxRandR.sh VBoxRandR
+ fperms 0755 /usr/bin/VBoxRandR
+ fi
+
+ # udev rule for vboxdrv
+ dodir /etc/udev/rules.d
+ echo 'KERNEL=="vboxadd", NAME="vboxadd", OWNER="root", MODE="0660"' \
+ >> "${D}/etc/udev/rules.d/60-virtualbox-guest-additions.rules"
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ if ! useq X ; then
+ elog "use flag X is off, enable it to install the"
+ elog "X Window System input and video drivers"
+ fi
+ elog "Please add:"
+ elog "/etc/init.d/${PN}"
+ elog "to the default runlevel in order to load all"
+ elog "needed modules and services."
+ elog ""
+ elog "Warning:"
+ elog "this ebuild is only needed if you are running gentoo"
+ elog "inside a VirtualBox Virtual Machine, you don't need"
+ elog "it to run VirtualBox itself."
+ elog ""
+}