summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2020-09-09 10:00:49 +0200
committerLars Wendler <polynomial-c@gentoo.org>2020-09-09 10:10:13 +0200
commitadb6a014bc1e39827c0e063ca24c607af4ade8fd (patch)
tree65e9b23b4c1d6f4188fc8e6e817ba9a5674621f5
parentapp-emulation/virtualbox: Fixed USE="opengl" dependency (diff)
downloadgentoo-adb6a014bc1e39827c0e063ca24c607af4ade8fd.tar.gz
gentoo-adb6a014bc1e39827c0e063ca24c607af4ade8fd.tar.bz2
gentoo-adb6a014bc1e39827c0e063ca24c607af4ade8fd.zip
virtualbox packages: Bump to version 6.1.14
Closes: https://bugs.gentoo.org/740542 Package-Manager: Portage-3.0.6, Repoman-3.0.1 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
-rw-r--r--app-emulation/virtualbox-additions/Manifest1
-rw-r--r--app-emulation/virtualbox-additions/virtualbox-additions-6.1.14.ebuild34
-rw-r--r--app-emulation/virtualbox-extpack-oracle/Manifest1
-rw-r--r--app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.14.140239.ebuild43
-rw-r--r--app-emulation/virtualbox-guest-additions/Manifest1
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.14a.ebuild221
-rw-r--r--app-emulation/virtualbox-modules/Manifest1
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-6.1.14.ebuild55
-rw-r--r--app-emulation/virtualbox/Manifest1
-rw-r--r--app-emulation/virtualbox/virtualbox-6.1.14a.ebuild509
10 files changed, 867 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-additions/Manifest b/app-emulation/virtualbox-additions/Manifest
index 1b63618298b6..8515e24e4210 100644
--- a/app-emulation/virtualbox-additions/Manifest
+++ b/app-emulation/virtualbox-additions/Manifest
@@ -5,3 +5,4 @@ DIST VBoxGuestAdditions_6.0.22.iso 77352960 BLAKE2B e71447a3e6efbc4b921276d212ae
DIST VBoxGuestAdditions_6.0.24.iso 77355008 BLAKE2B 3bb611323ba41ad94a75d5d28198aaf732bd7c36965abc65755c0ffeec29bd378cf4351b838675667958086e499f5791b942a8e3877c1ed815a22c4d564147a1 SHA512 aea64aff216a0cfa3535d2215ec74dd46243f9aba0c1b95f476bb8f0b3d561994f4fc8cc7d454f03482e1cec9a227014f10045e75756767bd8006e8beb9aaade
DIST VBoxGuestAdditions_6.1.10.iso 60448768 BLAKE2B 99841d7a516ea18d6138c9ff39801c8bcf85eb2dd5bf163d441933362275c96b21ca5f5147979dafa1be26c98f7e2ec2af2666089da0d09004baab4d80f33e95 SHA512 fe16ccc8d9e7bdb56fb464864795b7ca9d59ae6aadbd8ef80bc1b2e36267158bfc04fd5a8e4a0999112a6b1d8818b1cf1eaf2cbd0a1d8341c6fd5808c245df3b
DIST VBoxGuestAdditions_6.1.12.iso 60626944 BLAKE2B cb16f72f9c010e7e97e6ae5d86d02c81bbae2593fd502a3e6d911e794fa15254b631e37587f7ba636686e8897fe27a05f8dee58870200cbb50e2fbbe57142cc3 SHA512 dd0a7705477620205529090e37965a09906e864d3d293405414ba09c951c33d9586ac6f5e1f35e35ece1e2bae0919cc7740b21e302f9c5e2160e5458168372c0
+DIST VBoxGuestAdditions_6.1.14.iso 60981248 BLAKE2B df4e6159e4f0f1b7bb1a92dfbfdadc30aaa6499f5cb4bf80c783e9ef26dfc2d07f9198c3b20677064d1533ecb9a58100da52975478396bbec918268a7ad14e5d SHA512 51c9e128626bf1a02b4467c85829fa694dc46a469852e4effb768fdb56d1a61e28488a887920c7a8e51128370664ca50c883c590297d8c5182980fc2c176c187
diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-6.1.14.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-6.1.14.ebuild
new file mode 100644
index 000000000000..97264897ea7d
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-6.1.14.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN=VBoxGuestAdditions
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=${MY_PN}_${MY_PV}
+
+DESCRIPTION="CD image containing guest additions for VirtualBox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.iso"
+
+LICENSE="GPL-2+ LGPL-2.1+ MIT SGI-B-2.0 CDDL"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="mirror"
+
+RDEPEND="!app-emulation/virtualbox-bin
+ !=app-emulation/virtualbox-9999"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ return 0
+}
+
+src_install() {
+ insinto /usr/share/${PN/-additions}
+ newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
+}
diff --git a/app-emulation/virtualbox-extpack-oracle/Manifest b/app-emulation/virtualbox-extpack-oracle/Manifest
index 63fad7a72491..2e75814a7799 100644
--- a/app-emulation/virtualbox-extpack-oracle/Manifest
+++ b/app-emulation/virtualbox-extpack-oracle/Manifest
@@ -5,3 +5,4 @@ DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.22-137980.tar.gz 23238402 BLAKE2B e
DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.24-139119.tar.gz 23238486 BLAKE2B cad4e6822b51db05fb0b919f4c44ace1743a9d2b5ebcc0da6fe3c9ec43612ec6079614f5d3a9423c320e65b5438089aeef42f331946eb74093e3f8b1ef137300 SHA512 4be76fffb8508dda561e74daf68c71641a0903e554ecdf6b102f3fe35af03883bc88c2ac3cbdae2b3ddfb7ee5c9bdfa8df670662eef139f2a894dea4aa6f2e18
DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.10-138449.tar.gz 10999054 BLAKE2B cf802b561882541399baff74c2d75b33aa70bf8f909b616bbddcde0d98b41927f65ec5ac25e5d89598ae931c1c3c9fe7cc9cba17cb52b87b8d7f46ef935a376b SHA512 9cea8f8547eb4e90df1ec43ee4d2bf4be17f6ec8dd62013589f23019a30e0dd15e37945dca67790628d3f49d6103cf1dc9c53344589d2ce785fef8acf7c81cb9
DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.12-139181.tar.gz 11141691 BLAKE2B ac4cae428d15fa503b47337c5d2bab3e21197b82192fa2009216e438d06b867b17a62890c7525d232919751a5eec770f0ecd835c93aa3e67bcbf13b94d8d5344 SHA512 2abc9f6aaadfd6b0bb65df7eb9c45155ea2ec0d215aedd7589a76753b7323fef47c4799322ed973ef92baf1d64835dc813a235001be2cf4e166e474d5b6e2afc
+DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.14-140239.tar.gz 11145475 BLAKE2B fe64288068cfeb17da5b7583b5218de74dade2f3a994ef46e43bf7811cfeabae3d48f6bb200882892205d5a10294c38296e51e31c900af4cffd402030a85e3b3 SHA512 436ed94cec32365b9b19fe170323519543d18fcdad28eac09438c2238d68e452b25a415d69f244fd26b4c117fc5e2b33c8bd2fb63b31805f62ed9d59500eb304
diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.14.140239.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.14.140239.ebuild
new file mode 100644
index 000000000000..292f61b0055b
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.14.140239.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib
+
+MAIN_PV="$(ver_cut 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+ MY_PV="${MAIN_PV}_$(ver_cut 5-6)"
+ DEP_PV="${MY_PV}"
+ MY_PV="${MY_PV/beta/BETA}"
+ MY_PV="${MY_PV/rc/RC}"
+else
+ MY_PV="${MAIN_PV}"
+ DEP_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(ver_cut 4)"
+MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
+MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
+
+DESCRIPTION="PUEL extensions for VirtualBox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.vbox-extpack -> ${MY_P}.tar.gz"
+
+LICENSE="PUEL"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="bindist mirror strip"
+
+RDEPEND="=app-emulation/virtualbox-${DEP_PV}*"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/usr/lib*/virtualbox/ExtensionPacks/${MY_PN}/.*"
+
+src_install() {
+ insinto /usr/$(get_libdir)/virtualbox/ExtensionPacks/${MY_PN}
+ doins -r linux.${ARCH}
+ doins ExtPack* PXE-Intel.rom
+}
diff --git a/app-emulation/virtualbox-guest-additions/Manifest b/app-emulation/virtualbox-guest-additions/Manifest
index 6a7cf483cc7a..9e05bae427c3 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -5,6 +5,7 @@ DIST VirtualBox-6.0.22.tar.bz2 159831666 BLAKE2B 7c8878aec9ce1d5caf44677fa64119f
DIST VirtualBox-6.0.24.tar.bz2 159833756 BLAKE2B 321f7988a5b55a794e2d51937a0752d96eaefb376c12e2fb23be08dff81b164153e19a7d5963a0404f630fb38d6047b9d954a67923f26b2aa16d861a0c6a1b63 SHA512 e6f98d0036cdebc52c78c5ddbce369d9ef0a036c366647b299060e1ccf6942f6b6f899201dfa08c410a039f353b767a41a0d14579c741dc5c034a035cb16c534
DIST VirtualBox-6.1.10.tar.bz2 164989732 BLAKE2B 0f6d681462245dec10f651c1fac9e7ff5ee1e361d86cb764d84df46a4a51a0e413f8b1ab233e34af53fa3fda14ca17542e4d5c148e857548e03ff80ad2af22ee SHA512 729840d669281ed3ba2936923a50410e52bcec3fcfd5b6b740d5991aa1c25c2a8f5a5a05b4e3e39ef1a271ab3431d4c4f4b3a1262703d1e281d7111f0d4e8a3b
DIST VirtualBox-6.1.12a.tar.bz2 165246721 BLAKE2B e9ee7c10d92b151ab10833c68d0c71a09419bba4dbf86f21401263a98273f5ad5cf628347215d641e80e11d8e77bafeda606822cdd4d02344490fca6b95814ef SHA512 27fe66daf7fa254d9fc4a2cca4a8bbcfbfe6c3387a9f4a740c8ac1297587b5083bccbeef97dcc4e482c4974c843450212e02415b4952eb38b82e179615741193
+DIST VirtualBox-6.1.14a.tar.bz2 165962245 BLAKE2B 7f064ea58f7e4f36a0cda9badc7d16d5e95246de923ab9d179688c7f2f020625efa89c592aceec59d54f1c48934b20674594cc6a63f3f42e9fef39cfd5803027 SHA512 7bdf248b53c517923afc46998e46f63271f71ee73fa6826f367828128944895b2d672d7fc4d05f222e6d45897269fe699f7360ee1534c96450e2cc7bc14c0f13
DIST virtualbox-5.2.36-patches-01.tar.xz 3440 BLAKE2B 66749efba87d82ed4a11ff09444c68f86f82a360e9dbb44fa6072d6c28120f3c23cff8c15bacbd38bce8b69b3d8f35c4d3d493684df962ea6e353eec413dcc38 SHA512 3cf2526d209a54e94cd94840793769fd96fa988e21555d76eda2207a7f87e04b446a28ac6c8a2954e7c00a35107c144cadaec276d171214acdcc2900eb41306c
DIST virtualbox-5.2.44-patches-01.tar.xz 3608 BLAKE2B 6656f1eef7281dcd89e685cfc5403a6e7cd8d3f226d8cca8efa12c2c20339cb68b6f9b259c3de7925fc55433aa93ef7552dfe0441b9ef4a17a733282f791a62e SHA512 0f6a78e9b60b4fff71e87ba13c6a2af255a234f64e2a5f2be79aaf52146e2ab94c0e52def9096a32baf67c66e048f7ae9606a5e4010e9a1de5f31eec831ee892
DIST virtualbox-6.0.22-patches-01.tar.xz 3464 BLAKE2B 03ec3460f1f072c4f673e14a66b1f36de95f55c0c893482434049e077e0eff6d3724a8f1f6046d5ddff66675a9a39ecd2e40a6f43904bd575ba86505ed5e0ade SHA512 44875f8eda2e433bfe3b85551d3157c5b5d1740689e05c54772c78f9feba80ed08df88f99f9dd0d0f26d0912b00919e7ed5c38583a8ddc8e8e7e962d89cd2374
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.14a.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.14a.ebuild
new file mode 100644
index 000000000000..24c3f7e1b184
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.14a.ebuild
@@ -0,0 +1,221 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-mod systemd toolchain-funcs
+
+MY_PN="VirtualBox"
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P="${MY_PN}-${MY_PV}"
+[[ "${PV}" == *a ]] && DIR_PV="$(ver_cut 1-3)"
+
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${DIR_PV:-${MY_PV}}/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-6.1.12-patches-01.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+RDEPEND="
+ acct-group/vboxguest
+ acct-group/vboxsf
+ acct-user/vboxguest
+ X? ( x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libXmu
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXext
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libSM
+ x11-libs/libICE )
+ sys-apps/dbus
+"
+DEPEND="
+ ${RDEPEND}
+ >=dev-util/kbuild-0.1.9998.3127
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-libs/pam
+ sys-power/iasl
+ x11-base/xorg-proto
+"
+PDEPEND="
+ X? ( x11-drivers/xf86-video-vboxvideo )
+"
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+
+S="${WORKDIR}/${MY_PN}-${DIR_PV:-${PV}}"
+VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src"
+
+pkg_setup() {
+ export DISTCC_DISABLE=1 #674256
+ MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest)
+ vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)"
+ use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)"
+
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR} KBUILD_EXTRA_SYMBOLS=${S}/Module.symvers"
+}
+
+src_prepare() {
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Provide kernel sources
+ pushd src/VBox/Additions &>/dev/null || die
+ ebegin "Extracting guest kernel module sources"
+ kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null || die
+ eend
+ popd &>/dev/null || die
+
+ # PaX fixes (see bug #298988)
+ pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
+ eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch
+ popd &>/dev/null || die
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+ use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
+
+ # Remove pointless GCC version check
+ sed -e '/^check_gcc$/d' -i configure || die
+
+ eapply "${WORKDIR}/patches"
+
+ eapply_user
+}
+
+src_configure() {
+ # build the user-space tools, warnings are harmless
+ local cmd=(
+ ./configure
+ --nofatal
+ --disable-xpcom
+ --disable-sdl-ttf
+ --disable-pulse
+ --disable-alsa
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+ --target-arch=${ARCH}
+ --with-linux="${KV_OUT_DIR}"
+ --build-headless
+ )
+ echo "${cmd[@]}"
+ "${cmd[@]}" || die "configure failed"
+ source ./env.sh
+ export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_compile() {
+ MAKE="kmk" emake \
+ VBOX_BUILD_PUBLISHER=_Gentoo \
+ TOOL_GXX3_CC="$(tc-getCC)" TOOL_GXX3_CXX="$(tc-getCXX)" \
+ TOOL_GXX3_LD="$(tc-getCXX)" VBOX_GCC_OPT="${CXXFLAGS}" \
+ TOOL_YASM_AS=yasm \
+ VBOX_ONLY_ADDITIONS=1 \
+ KBUILD_VERBOSE=2
+
+ # Now creating the kernel modules. We must do this _after_
+ # we compiled the user-space tools as we need two of the
+ # automatically generated header files. (>=3.2.0)
+ linux-mod_src_compile
+}
+
+src_install() {
+ linux-mod_src_install
+
+ cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
+
+ insinto /sbin
+ newins mount.vboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
+
+ insinto /usr/sbin/
+ newins VBoxService vboxguest-service
+ fperms 0755 /usr/sbin/vboxguest-service
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 0755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use X ; then
+ doins VBoxClient
+ fperms 0755 /usr/bin/VBoxClient
+
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
+ || die
+ newins 98vboxadd-xclient VBoxClient-all
+ fperms 0755 /usr/bin/VBoxClient-all
+ popd &>/dev/null || die
+ fi
+
+ # udev rule for vboxdrv
+ local udev_rules_dir="/lib/udev/rules.d"
+ dodir ${udev_rules_dir}
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+
+ # VBoxClient autostart file
+ insinto /etc/xdg/autostart
+ doins "${FILESDIR}"/vboxclient.desktop
+
+ # sample xorg.conf
+ dodoc "${FILESDIR}"/xorg.conf.vbox
+ docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ if ! use X ; then
+ elog "use flag X is off, enable it to install the"
+ elog "X Window System video driver."
+ fi
+ elog ""
+ elog "Please add users to the \"vboxguest\" group so they can"
+ elog "benefit from seamless mode, auto-resize and clipboard."
+ elog ""
+ elog "The vboxsf group has been added to make automount services work."
+ elog "These services are part of the shared folders support."
+ elog ""
+ elog "Please add:"
+ elog "/etc/init.d/${PN}"
+ elog "to the default runlevel in order to start"
+ elog "needed services."
+ elog "To use the VirtualBox X driver, use the following"
+ elog "file as your /etc/X11/xorg.conf:"
+ elog " /usr/share/doc/${PF}/xorg.conf.vbox"
+ elog ""
+ elog "Also make sure you use the Mesa library for OpenGL:"
+ elog " eselect opengl set xorg-x11"
+ elog ""
+ elog "An autostart .desktop file has been installed to start"
+ elog "VBoxClient in desktop sessions."
+ elog ""
+ elog "You can mount shared folders with:"
+ elog " mount -t vboxsf <shared_folder_name> <mount_point>"
+ 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-modules/Manifest b/app-emulation/virtualbox-modules/Manifest
index cc1056ad950c..22786b550bc2 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -5,3 +5,4 @@ DIST vbox-kernel-module-src-6.0.22.tar.xz 670780 BLAKE2B dc4055e3db4a59ff174989a
DIST vbox-kernel-module-src-6.0.24.tar.xz 670960 BLAKE2B 26e4b1b6b9ab8c8fd0312b2162fe745dc11ef3f8a7e2f08f49df9d9ef346ec21b64e4a0a480bd726e9cca6ab2ce5d3cf2637aa8923c0843bf78a3ed160b98810 SHA512 9b1093307dffeb64f3ec22c4797268858e1fcc729403e89294c2e3cf0852662b7b0aad4416a593fd25b2107a1995d6bc17078f072b6f7718ed111ab61df8324e
DIST vbox-kernel-module-src-6.1.10.tar.xz 666960 BLAKE2B e1f393a0f7735f4cb692d9feb22c3b6ec371fef04793b1a2f7cc2cadab450539c464f1a97f026c323ae162b853b738b3d6bb3bfde0c3bb854be4da2d251af5e8 SHA512 7ae56ac2d982649448e4dfe93beff22630c35ad40f764cffaaecf3b00c1a598043b7675e1f8eebf17059aa73da6273f0982dbc8377d9878be0712895d1332560
DIST vbox-kernel-module-src-6.1.12.tar.xz 667312 BLAKE2B 31b3f7cd60d00e26c3177c4956d493a243e39d6251aeb3f3d72331d2fa85f2c90e884aa3f27e994502d86a34b1683c7d7db54eb1cc233e220f147119f6e9ed5e SHA512 ec4903fdc74e4be28003e8b231a4c8feb6e807bc59789c2729a8ab4199c6decc878468b67bce3a17625f60a33bb1d7c611e7306815091607b1fade2be521ed44
+DIST vbox-kernel-module-src-6.1.14.tar.xz 670392 BLAKE2B e6f324e71088c71bf67791861c79a81665f2111664428ed1e8a834b8a435bd04c1da49b6755ce5f6b1d883c6de01a0821e8d5a7519e11cf30e8f01a8b4e5d8bb SHA512 ccf4896106a7c86b651ed698abee78387660b7daa0f15329fc4bf2c3a7df4715bf4cce7cace1c6f6931dd9e8d02022d1ca0d005ae12c5139e54d3fb40792cb1c
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.14.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.14.ebuild
new file mode 100644
index 000000000000..6ad5644e2ed2
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.14.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+# package that comes from virtualbox-bin
+
+EAPI=7
+
+inherit linux-mod toolchain-funcs
+
+MY_P="vbox-kernel-module-src-${PV}"
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64"
+IUSE="pax_kernel"
+
+RDEPEND="!=app-emulation/virtualbox-9999"
+
+S="${WORKDIR}"
+
+BUILD_TARGETS="all"
+MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})"
+MODULESD_VBOXDRV_ENABLED="yes"
+MODULESD_VBOXNETADP_ENABLED="no"
+MODULESD_VBOXNETFLT_ENABLED="no"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
+}
+
+src_prepare() {
+ if use pax_kernel && kernel_is -ge 3 0 0 ; then
+ eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch
+ fi
+
+ default
+}
+
+src_install() {
+ linux-mod_src_install
+ insinto /usr/lib/modules-load.d/
+ newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
+}
+
+pkg_postinst() {
+ # Remove vboxpci.ko from current running kernel
+ find /lib/modules/${KV_FULL}/misc -type f -name "vboxpci.ko" -delete
+ linux-mod_pkg_postinst
+}
diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index 6a7cf483cc7a..9e05bae427c3 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -5,6 +5,7 @@ DIST VirtualBox-6.0.22.tar.bz2 159831666 BLAKE2B 7c8878aec9ce1d5caf44677fa64119f
DIST VirtualBox-6.0.24.tar.bz2 159833756 BLAKE2B 321f7988a5b55a794e2d51937a0752d96eaefb376c12e2fb23be08dff81b164153e19a7d5963a0404f630fb38d6047b9d954a67923f26b2aa16d861a0c6a1b63 SHA512 e6f98d0036cdebc52c78c5ddbce369d9ef0a036c366647b299060e1ccf6942f6b6f899201dfa08c410a039f353b767a41a0d14579c741dc5c034a035cb16c534
DIST VirtualBox-6.1.10.tar.bz2 164989732 BLAKE2B 0f6d681462245dec10f651c1fac9e7ff5ee1e361d86cb764d84df46a4a51a0e413f8b1ab233e34af53fa3fda14ca17542e4d5c148e857548e03ff80ad2af22ee SHA512 729840d669281ed3ba2936923a50410e52bcec3fcfd5b6b740d5991aa1c25c2a8f5a5a05b4e3e39ef1a271ab3431d4c4f4b3a1262703d1e281d7111f0d4e8a3b
DIST VirtualBox-6.1.12a.tar.bz2 165246721 BLAKE2B e9ee7c10d92b151ab10833c68d0c71a09419bba4dbf86f21401263a98273f5ad5cf628347215d641e80e11d8e77bafeda606822cdd4d02344490fca6b95814ef SHA512 27fe66daf7fa254d9fc4a2cca4a8bbcfbfe6c3387a9f4a740c8ac1297587b5083bccbeef97dcc4e482c4974c843450212e02415b4952eb38b82e179615741193
+DIST VirtualBox-6.1.14a.tar.bz2 165962245 BLAKE2B 7f064ea58f7e4f36a0cda9badc7d16d5e95246de923ab9d179688c7f2f020625efa89c592aceec59d54f1c48934b20674594cc6a63f3f42e9fef39cfd5803027 SHA512 7bdf248b53c517923afc46998e46f63271f71ee73fa6826f367828128944895b2d672d7fc4d05f222e6d45897269fe699f7360ee1534c96450e2cc7bc14c0f13
DIST virtualbox-5.2.36-patches-01.tar.xz 3440 BLAKE2B 66749efba87d82ed4a11ff09444c68f86f82a360e9dbb44fa6072d6c28120f3c23cff8c15bacbd38bce8b69b3d8f35c4d3d493684df962ea6e353eec413dcc38 SHA512 3cf2526d209a54e94cd94840793769fd96fa988e21555d76eda2207a7f87e04b446a28ac6c8a2954e7c00a35107c144cadaec276d171214acdcc2900eb41306c
DIST virtualbox-5.2.44-patches-01.tar.xz 3608 BLAKE2B 6656f1eef7281dcd89e685cfc5403a6e7cd8d3f226d8cca8efa12c2c20339cb68b6f9b259c3de7925fc55433aa93ef7552dfe0441b9ef4a17a733282f791a62e SHA512 0f6a78e9b60b4fff71e87ba13c6a2af255a234f64e2a5f2be79aaf52146e2ab94c0e52def9096a32baf67c66e048f7ae9606a5e4010e9a1de5f31eec831ee892
DIST virtualbox-6.0.22-patches-01.tar.xz 3464 BLAKE2B 03ec3460f1f072c4f673e14a66b1f36de95f55c0c893482434049e077e0eff6d3724a8f1f6046d5ddff66675a9a39ecd2e40a6f43904bd575ba86505ed5e0ade SHA512 44875f8eda2e433bfe3b85551d3157c5b5d1740689e05c54772c78f9feba80ed08df88f99f9dd0d0f26d0912b00919e7ed5c38583a8ddc8e8e7e962d89cd2374
diff --git a/app-emulation/virtualbox/virtualbox-6.1.14a.ebuild b/app-emulation/virtualbox/virtualbox-6.1.14a.ebuild
new file mode 100644
index 000000000000..d90ebff1db66
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-6.1.14a.ebuild
@@ -0,0 +1,509 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+inherit desktop flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
+
+MY_PN="VirtualBox"
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=${MY_PN}-${MY_PV}
+[[ "${PV}" == *a ]] && DIR_PV="$(ver_cut 1-3)"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${DIR_PV:-${MY_PV}}/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-6.1.12-patches-01.tar.xz"
+
+LICENSE="GPL-2 dtrace? ( CDDL )"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64"
+IUSE="alsa debug doc dtrace headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
+
+CDEPEND="
+ ${PYTHON_DEPS}
+ !app-emulation/virtualbox-bin
+ acct-group/vboxusers
+ ~app-emulation/virtualbox-modules-${DIR_PV:-${PV}}
+ dev-libs/libIDL
+ >=dev-libs/libxslt-1.1.19
+ net-misc/curl
+ dev-libs/libxml2
+ media-libs/libpng:0=
+ media-libs/libvpx:0=
+ sys-libs/zlib:=
+ !headless? (
+ media-libs/libsdl:0[X,video]
+ x11-libs/libX11
+ x11-libs/libxcb:=
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ opengl? ( media-libs/libglvnd[X] )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ opengl? ( dev-qt/qtopengl:5 )
+ x11-libs/libXinerama
+ )
+ )
+ libressl? ( dev-libs/libressl:= )
+ !libressl? ( dev-libs/openssl:0= )
+ lvm? ( sys-fs/lvm2 )
+ opus? ( media-libs/opus )
+ udev? ( >=virtual/udev-171 )
+ vnc? ( >=net-libs/libvncserver-0.9.9 )
+"
+DEPEND="
+ ${CDEPEND}
+ alsa? ( >=media-libs/alsa-lib-1.0.13 )
+ !headless? ( x11-libs/libXinerama )
+ pam? ( sys-libs/pam )
+ pax_kernel? ( sys-apps/elfix )
+ pulseaudio? ( media-sound/pulseaudio )
+ qt5? ( dev-qt/linguist-tools:5 )
+ vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-util/kbuild-0.1.9998.3127
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-libs/libcap
+ sys-power/iasl
+ virtual/pkgconfig
+ doc? (
+ app-text/docbook-sgml-dtd:4.4
+ dev-texlive/texlive-basic
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexrecommended
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-fontsrecommended
+ dev-texlive/texlive-fontsextra
+ )
+ java? ( >=virtual/jdk-1.6 )
+"
+RDEPEND="
+ ${CDEPEND}
+ java? ( >=virtual/jre-1.6 )
+"
+
+QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
+ usr/lib/virtualbox/VBoxSDL.so
+ usr/lib/virtualbox/VBoxSharedFolders.so
+ usr/lib/virtualbox/VBoxDD2.so
+ usr/lib/virtualbox/VBoxOGLrenderspu.so
+ usr/lib/virtualbox/VBoxPython.so
+ usr/lib/virtualbox/VBoxDD.so
+ usr/lib/virtualbox/VBoxDDU.so
+ usr/lib/virtualbox/VBoxREM64.so
+ usr/lib/virtualbox/VBoxSharedClipboard.so
+ usr/lib/virtualbox/VBoxHeadless.so
+ usr/lib/virtualbox/VBoxRT.so
+ usr/lib/virtualbox/VBoxREM.so
+ usr/lib/virtualbox/VBoxSettings.so
+ usr/lib/virtualbox/VBoxKeyboard.so
+ usr/lib/virtualbox/VBoxSharedCrOpenGL.so
+ usr/lib/virtualbox/VBoxVMM.so
+ usr/lib/virtualbox/VirtualBox.so
+ usr/lib/virtualbox/VBoxOGLhosterrorspu.so
+ usr/lib/virtualbox/components/VBoxC.so
+ usr/lib/virtualbox/components/VBoxSVCM.so
+ usr/lib/virtualbox/components/VBoxDDU.so
+ usr/lib/virtualbox/components/VBoxRT.so
+ usr/lib/virtualbox/components/VBoxREM.so
+ usr/lib/virtualbox/components/VBoxVMM.so
+ usr/lib/virtualbox/VBoxREM32.so
+ usr/lib/virtualbox/VBoxPython2_7.so
+ usr/lib/virtualbox/VBoxXPCOMC.so
+ usr/lib/virtualbox/VBoxOGLhostcrutil.so
+ usr/lib/virtualbox/VBoxNetDHCP.so
+ usr/lib/virtualbox/VBoxNetNAT.so"
+
+S="${WORKDIR}/${MY_PN}-${DIR_PV:-${MY_PV}}"
+
+REQUIRED_USE="
+ java? ( sdk )
+ python? ( sdk )
+ vboxwebsrv? ( java )
+ ${PYTHON_REQUIRED_USE}
+"
+
+pkg_pretend() {
+ if ! use headless && ! use qt5 ; then
+ einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend."
+ elif use headless && use qt5 ; then
+ einfo "You selected USE=\"headless qt5\", defaulting to"
+ einfo "USE=\"headless\", this build will not include any X11/Qt frontend."
+ fi
+
+ if ! use opengl ; then
+ einfo "No USE=\"opengl\" selected, this build will lack"
+ einfo "the OpenGL feature."
+ fi
+ if ! use python ; then
+ einfo "You have disabled the \"python\" USE flag. This will only"
+ einfo "disable the python bindings being installed."
+ fi
+}
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ tc-ld-disable-gold #bug 488176
+ tc-export CC CXX LD AR RANLIB
+ export HOST_CC="$(tc-getBUILD_CC)"
+}
+
+src_prepare() {
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Replace pointless GCC version check with something less stupid.
+ # This is needed for the qt5 version check.
+ sed -e 's@^check_gcc$@cc_maj="$(${CC} -dumpversion | cut -d. -f1)" ; cc_min="$(${CC} -dumpversion | cut -d. -f2)"@' \
+ -i configure || die
+
+ # Disable things unused or split into separate ebuilds
+ sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+ "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
+
+ # Respect LDFLAGS
+ sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+ -i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+ # Do not use hard-coded ld (related to bug #488176)
+ sed -e '/QUIET)ld /s@ld @$(LD) @' \
+ -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+ # Use PAM only when pam USE flag is enbaled (bug #376531)
+ if ! use pam ; then
+ elog "Disabling PAM removes the possibility to use the VRDP features."
+ sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+ sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+ src/VBox/HostServices/Makefile.kmk || die
+ fi
+
+ # add correct java path
+ if use java ; then
+ sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+ -i "${S}"/Config.kmk || die
+ java-pkg-opt-2_src_prepare
+ fi
+
+ # Only add nopie patch when we're on hardened
+ if gcc-specs-pie ; then
+ eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
+ fi
+
+ # Only add paxmark patch when we're on pax_kernel
+ if use pax_kernel ; then
+ eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
+ fi
+
+ eapply "${WORKDIR}/patches"
+
+ eapply_user
+}
+
+doecho() {
+ echo "$@"
+ "$@" || die
+}
+
+src_configure() {
+ local myconf=(
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+ --disable-dbus
+ --disable-kmods
+ $(usex alsa '' --disable-alsa)
+ $(usex debug --build-debug '')
+ $(usex doc '' --disable-docs)
+ $(usex java '' --disable-java)
+ $(usex lvm '' --disable-devmapper)
+ $(usex opus '' --disable-libopus)
+ $(usex pulseaudio '' --disable-pulse)
+ $(usex python '' --disable-python)
+ $(usex vboxwebsrv --enable-webservice '')
+ $(usex vnc --enable-vnc '')
+ )
+ if ! use headless ; then
+ myconf+=(
+ $(usex opengl '' --disable-opengl)
+ $(usex qt5 '' --disable-qt)
+ )
+ else
+ myconf+=(
+ --build-headless
+ --disable-opengl
+ )
+ fi
+ if use amd64 && ! has_multilib_profile ; then
+ myconf+=( --disable-vmmraw )
+ fi
+ # not an autoconf script
+ doecho ./configure ${myconf[@]}
+}
+
+src_compile() {
+ source ./env.sh || die
+
+ # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+ MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
+ MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
+ MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+ MAKE="kmk" emake \
+ VBOX_BUILD_PUBLISHER=_Gentoo \
+ TOOL_GXX3_CC="$(tc-getCC)" TOOL_GXX3_CXX="$(tc-getCXX)" \
+ TOOL_GXX3_LD="$(tc-getCXX)" VBOX_GCC_OPT="${CXXFLAGS}" \
+ TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
+ VBOX_WITH_VBOXIMGMOUNT=1 \
+ all
+}
+
+src_install() {
+ cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
+
+ local vbox_inst_path="/usr/$(get_libdir)/${PN}" each size ico icofile
+
+ vbox_inst() {
+ local binary="${1}"
+ local perms="${2:-0750}"
+ local path="${3:-${vbox_inst_path}}"
+
+ [[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
+ [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+ insinto ${path}
+ doins ${binary}
+ fowners root:vboxusers ${path}/${binary}
+ fperms ${perms} ${path}/${binary}
+ }
+
+ # Create configuration files
+ insinto /etc/vbox
+ newins "${FILESDIR}/${PN}-4-config" vbox.cfg
+
+ # Set the correct libdir
+ sed \
+ -e "s@MY_LIBDIR@$(get_libdir)@" \
+ -i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+ # Install the wrapper script
+ exeinto ${vbox_inst_path}
+ newexe "${FILESDIR}/${PN}-ose-6-wrapper" "VBox"
+ fowners root:vboxusers ${vbox_inst_path}/VBox
+ fperms 0750 ${vbox_inst_path}/VBox
+
+ # Install binaries and libraries
+ insinto ${vbox_inst_path}
+ doins -r components
+
+ for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,Tunctl,VMMPreload,XPCOMIPCD} vboximg-mount *so *r0 iPxeBaseBin ; do
+ vbox_inst ${each}
+ done
+
+ # These binaries need to be suid root.
+ for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+ vbox_inst ${each} 4750
+ done
+
+ # Install EFI Firmware files (bug #320757)
+ for each in VBoxEFI{32,64}.fd ; do
+ vbox_inst ${each} 0644
+ done
+
+ # VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+ # VBoxXPCOMIPCD (bug #524202)
+ for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
+ pax-mark -m "${ED}"${vbox_inst_path}/${each}
+ done
+
+ # Symlink binaries to the shipped wrapper
+ for each in vbox{autostart,balloonctrl,bugreport,headless,manage} VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
+ dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+ done
+ dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
+ dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
+
+ if use pam ; then
+ # VRDPAuth only works with this (bug #351949)
+ dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+ fi
+
+ # set an env-variable for 3rd party tools
+ echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
+ doenvd "${T}/90virtualbox"
+
+ if ! use headless ; then
+ vbox_inst rdesktop-vrdp
+ vbox_inst VBoxSDL 4750
+ pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
+
+ for each in vboxsdl VBoxSDL ; do
+ dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+ done
+
+ if use qt5 ; then
+ vbox_inst VirtualBox
+ vbox_inst VirtualBoxVM 4750
+ for each in VirtualBox{,VM} ; do
+ pax-mark -m "${ED}"${vbox_inst_path}/${each}
+ done
+
+ if use opengl ; then
+ vbox_inst VBoxTestOGL
+ pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
+ fi
+
+ for each in virtualbox{,vm} VirtualBox{,VM} ; do
+ dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+ done
+
+ insinto /usr/share/${PN}
+ doins -r nls
+ doins -r UnattendedTemplates
+
+ domenu ${PN}.desktop
+ fi
+
+ pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+ for size in 16 32 48 64 128 ; do
+ newicon -s ${size} ${PN}-${size}px.png ${PN}.png
+ done
+ newicon ${PN}-48px.png ${PN}.png
+ doicon -s scalable ${PN}.svg
+ popd &>/dev/null || die
+ pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+ for size in 16 24 32 48 64 72 96 128 256 512 ; do
+ for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+ icofile="${PN}-${ico}-${size}px.png"
+ if [[ -f "${icofile}" ]] ; then
+ newicon -s ${size} ${icofile} ${PN}-${ico}.png
+ fi
+ done
+ done
+ popd &>/dev/null || die
+ fi
+
+ if use lvm ; then
+ vbox_inst VBoxVolInfo 4750
+ dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+ fi
+
+ if use sdk ; then
+ insinto ${vbox_inst_path}
+ doins -r sdk
+
+ if use java ; then
+ java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+ java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
+ fi
+ fi
+
+ if use udev ; then
+ # New way of handling USB device nodes for VBox (bug #356215)
+ local udevdir="$(get_udevdir)"
+ insinto ${udevdir}
+ doins VBoxCreateUSBNode.sh
+ fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
+ fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+ insinto ${udevdir}/rules.d
+ sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
+ > "${T}"/10-virtualbox.rules || die
+ doins "${T}"/10-virtualbox.rules
+ fi
+
+ if use vboxwebsrv ; then
+ vbox_inst vboxwebsrv
+ dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+ newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+ newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+ fi
+
+ # Remove dead symlinks (bug #715338)
+ find "${ED}"/usr/$(get_libdir)/${PN} -xtype l -delete || die
+
+ # Fix version string in extensions or else they don't get accepted
+ # by the virtualbox host process (see bug #438930)
+ find ExtensionPacks -type f -name "ExtPack.xml" -print0 \
+ | xargs --no-run-if-empty --null sed -i '/Version/s@_Gentoo@@' \
+ || die
+
+ local extensions_dir="${vbox_inst_path}/ExtensionPacks"
+
+ if use vnc ; then
+ insinto ${extensions_dir}
+ doins -r ExtensionPacks/VNC
+ fi
+
+ if use dtrace ; then
+ insinto ${extensions_dir}
+ doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
+ fi
+
+ if use doc ; then
+ dodoc UserManual.pdf
+ fi
+
+ newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
+}
+
+pkg_preinst() {
+ xdg_pkg_preinst
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ if use udev ; then
+ udevadm control --reload-rules \
+ && udevadm trigger --subsystem-match=usb
+ fi
+
+ tmpfiles_process /usr/lib/tmpfiles.d/virtualbox-vboxusb.conf
+
+ if ! use headless && use qt5 ; then
+ elog "To launch VirtualBox just type: \"virtualbox\"."
+ fi
+ elog "You must be in the vboxusers group to use VirtualBox."
+ elog ""
+ elog "The latest user manual is available for download at:"
+ elog "http://download.virtualbox.org/virtualbox/${DIR_PV:-${PV}}/UserManual.pdf"
+ elog ""
+ elog "For advanced networking setups you should emerge:"
+ elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
+ elog ""
+ elog "Starting with version 4.0.0, ${PN} has USB-1 support."
+ elog "For USB-2 support, PXE-boot ability and VRDP support please emerge"
+ elog " app-emulation/virtualbox-extpack-oracle"
+ elog "package."
+ elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and"
+ elog "the \"extension\" USE flag. For installation of the guest additions ISO"
+ elog "image, please emerge"
+ elog " app-emulation/virtualbox-additions"
+ elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge"
+ elog " app-emulation/virtualbox-extpack-oracle"
+ if ! use udev ; then
+ elog ""
+ elog "WARNING!"
+ elog "Without USE=udev, USB devices will likely not work in ${PN}."
+ elif [[ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ]] ; then
+ elog ""
+ elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
+ elog "or else USB in ${PN} won't work."
+ fi
+}
+
+pkg_postrm() {
+ xdg_pkg_postrm
+}