summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-emulation/virtualbox-additions/Manifest1
-rw-r--r--app-emulation/virtualbox-additions/virtualbox-additions-5.2.22.ebuild33
-rw-r--r--app-emulation/virtualbox-bin/Manifest4
-rw-r--r--app-emulation/virtualbox-bin/virtualbox-bin-5.2.22.126460.ebuild287
-rw-r--r--app-emulation/virtualbox-extpack-oracle/Manifest1
-rw-r--r--app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.22.126460.ebuild42
-rw-r--r--app-emulation/virtualbox-guest-additions/Manifest1
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.22.ebuild227
-rw-r--r--app-emulation/virtualbox-modules/Manifest1
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-5.2.22.ebuild51
-rw-r--r--app-emulation/virtualbox/Manifest1
-rw-r--r--app-emulation/virtualbox/virtualbox-5.2.22.ebuild473
12 files changed, 1122 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-additions/Manifest b/app-emulation/virtualbox-additions/Manifest
index 9fe67ae6c372..8b15c0021930 100644
--- a/app-emulation/virtualbox-additions/Manifest
+++ b/app-emulation/virtualbox-additions/Manifest
@@ -1,3 +1,4 @@
DIST VBoxGuestAdditions_5.2.14.iso 57978880 BLAKE2B de5cb3c5b7e2f3ee018588308573389fd973820e87d5b2e6640499c96dc21db95e71eb4e5e2469455febba8b2ccb4a7c6014176e784613218fa7eccabefe9e53 SHA512 1fd878f9e7fc1687907ac8dff6827bfd7aefe3ed48012b0dbbaf42ced21695ce52be6fe146128a6d1c67c7a0c5c39c9ef24e8ee562271fda117d13cca81427cb
DIST VBoxGuestAdditions_5.2.18.iso 57976832 BLAKE2B d212345e99856699ab43e83d747937a4bb7b0ee57dfa58d3e06d910fa94bb01a570afc2d5faa2ec64fd9c7377a0ab4c2bda32af5557b0655bc9cf30dc9c01691 SHA512 f4328afd4947e0e9d2f15bc15ec6ca7d9207d3d46e936d6575789e5a4f27ea271137b6f23592ff992530047a76393cdedd0dc8b10f61d7c94da5f5c7bd484a1c
DIST VBoxGuestAdditions_5.2.20.iso 58013696 BLAKE2B 1a0df07f2a086c41741d884a3eabd43d6f1fee368b143fbae4c8dbc930834fb8d5dd82e8563fe7c9e4c562a58e79c25e9603847d9eca908943e525505bf2f697 SHA512 a8b8f12a8f0b26bb88745d33aa419c45adb4a1e682c3af9a34b0556ac1d8bdf33044253ede41d894e0dba1857f8f3c5cc234006149771a25133c6112ec4aa4c3
+DIST VBoxGuestAdditions_5.2.22.iso 58013696 BLAKE2B 196f0048b685200328bcf753f3df23eac6477ce863885e93a54951795368bf62bdaa497589001ec203d75809b1f74ebbaa80419406d26bc7db43a131f5b9d698 SHA512 b320174b2f2ef796ac2c9c920579be38f0cedaa037d21992863ac355ecf6e99ae2aea56c70fb2034e9e03afac2cd7297f7717b447a6981701755593110164d37
diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-5.2.22.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.22.ebuild
new file mode 100644
index 000000000000..7fa00c8a161c
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.22.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2018 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"
+KEYWORDS="~amd64 ~x86"
+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-bin/Manifest b/app-emulation/virtualbox-bin/Manifest
index 1cac2a0925ab..dd9b0fc23a53 100644
--- a/app-emulation/virtualbox-bin/Manifest
+++ b/app-emulation/virtualbox-bin/Manifest
@@ -1,12 +1,16 @@
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.14-123301.tar.gz 19589209 BLAKE2B 385bdfb4cef67788a1dd3e758f52dab7a367f56ca8d286e465af9a7674ffe3bc0f6187a66d7d19bb8f2a8fc0e23e0ce7ef35ac2d46fd6971dc2df96e8a61ca11 SHA512 a47a7173685b72995e5012386fc8f6c55f9106049a28ecaea223f58f1bb40077e0929cf05102a2588e516fe90891428b8e569ec9351fcaf235eb9f8293e45b92
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.18-124319.tar.gz 19592275 BLAKE2B 7be65024837e46073049d3d751df00b50bf2d5d81faef3ba2a869429800d999f473b570bfe75201d07347e751893d280f7238a076a172ad2046b64c151b675ba SHA512 fa4bf8202f4d5f86cf4a04aaf6e77ce2f86ccde126d5543846793a021fc1e861f35d256432d762aebd38fc6cd0fa0bfe2a4def76334f468de316fe925d2fe414
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.20-125813.tar.gz 19641208 BLAKE2B ffe4e89b88609d575f7e9f5aed5330de5024462ae564684cf3f565b62649d022c8fc9368cfd1685e3e4fc34e9a23cb0651c483f129b533f9afec38bcae89d587 SHA512 df9ae6af9ad1c1106bf8bf0595fdcdd3ec45bc74b90655e762fb18a4c8ea268bed366ce3caaf0f95682577b61b337650a6fe7ef901f6925fa38679ccd885c21c
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.22-126460.tar.gz 19640932 BLAKE2B 162ab40da6b2cd30d00e020666a1f4fb026e29af2ca9d6c36c294e5fa299b61ab8fd147f24d2b500426c768808db2c7693c30e88519e695d7759f8eedf1c52c5 SHA512 85b8552668b6580bea24f051ad861c82b9ba32177fb7fa37fe2980d8bab32a84325d02bfa9c8f55c2021a4000ef2546d8996ca8b99ca7fc19f8281a92108dfb0
DIST VirtualBox-5.2.14-123301-Linux_amd64.run 88749523 BLAKE2B 5a2791a1258adcdc82f8776fb0d5502d525faa0083b808f1875f0c61b848aa371fa0b6b73ca024c244b36dfb074a8839747ad27a87cb8dfbaad09096a0cec887 SHA512 8c4633ef0e3a9f7f26603009a23244696a6f91baffa9777a0daf8f09abd80b4aca944dabfd2a10acddf4759e64ec719948d73ecaaf187a60a15e097467060ea9
DIST VirtualBox-5.2.14-123301-Linux_x86.run 87776718 BLAKE2B 609c24ad2ba5b005f7cb619fbe2c2a82f026a7ae4ef74cda800c526c8c3552a2a1ed1af5a2a2b3d9c56f0dfbcdda493c2cc92b58156cbf41ebfb1d43bfee8aca SHA512 820c2b6c97a48c125b69e1f749a3b1473d5fe672726ae2cec30f20a6652186a28b3900d4aeffca701415275229232925d1c8c347aefa7a86840a2c5bf13f21a7
DIST VirtualBox-5.2.18-124319-Linux_amd64.run 88780242 BLAKE2B a07e5bfcc2e988a4e499a974d97ed36cad9a95055d2df3aab8def3cbf19da4658411465d973935c86bd1642047e16a16041eb6f9da0f85183e86d5022208332a SHA512 f280ca01e4e9cd20bcd88479548b10931558052bcf45e96ba9dd70f9ca81036509c5391fac4ce1635b1d2597a10093979bd58017612d34a56b7df20a59a30b74
DIST VirtualBox-5.2.18-124319-Linux_x86.run 87838159 BLAKE2B 6b89a068ac699a1aaf77859b4373ea93fc3bfa863234e8befda725326297589a6e8e535c2b6f48ae60ac50805c224b6a889b7fa4bfb06e5dbb44623a5c84b02e SHA512 791ba9bab7e92e058b41ada88925f3d1159eaf922f8029a254096b994608a0be4d916de9b067923e6fcc176a5d7fcfe16c45e00a204bac22e3a7ce7409014595
DIST VirtualBox-5.2.20-125813-Linux_amd64.run 88841683 BLAKE2B a3cce78d5a90187ece0eda11032a36096a05b0a7020ec729c07963510db6fa4e436edbf03b5e385d826c7e2ddeae84e4138273b6b5876be2b33c7a8f259753f3 SHA512 28614d71b564e138526cf75662d5e0ce2c083bfa4bc0124f7b0d20532b5a09391d00609a2c003ac5311220c844f2b1fffdee46f53e1018f0df5b6ff1b7a6ba12
DIST VirtualBox-5.2.20-125813-Linux_x86.run 87889359 BLAKE2B bc66cf6af5e7a92c642e028bc82830641bed02f5e7daa4c607b165af9f707b3ec359a0ab40f68822472e0087a9a17723de20567f08f14125f8c74d058eecbc88 SHA512 8a7cba49194a7dcb86b3b908e9b8f83d3ad83cfd057e75bda6bb16da1f62ec65e10892696f94f0bc0f4bff4f4f055aa2bdc250e10b46d06b3f8f616000dad48a
+DIST VirtualBox-5.2.22-126460-Linux_amd64.run 88821201 BLAKE2B 1b0433844247ee9531af915dcbb740183fa29fb296f8c78b4165cc3b48300da71f7d329026983da581ffff0d7b8976a2e5e32d5e948861a557ddfa2437813ea0 SHA512 22b20a68884a114818fcdfe9a459a7c3b1b3598526a74cc66407f5bcdc6eb6bcbe022b820477ccdc081e22349777b73fac9d6126585ee3c8fa0d3d24624006f3
+DIST VirtualBox-5.2.22-126460-Linux_x86.run 87817677 BLAKE2B 5f11e5f92386c9524869082cf1a5af413c69fe5b36b1ace58887076000c7b928267eb7c3be22282885d6871ccdcee981ec79a526c71f281f0e8ada5858194851 SHA512 32d44b6d691e33a1ee1426cb7a3cb3648722709c588d177951b8be802546faadfd612567981bbbfed3d782b18260e6e638e7879813f3b06bb5a8387b052b0227
DIST VirtualBoxSDK-5.2.14-123301.zip 10154044 BLAKE2B 273219029c59ffd685fffb7e14fff914a5397acc0676c8b4ccaee9cecee51e90880e68d883125e061d6c02e09b53235821ff89a265e937c9b4e67365452a97d2 SHA512 c69e6f537af611b9a4bcbab3e014fa25c6593f754940c6596e451cf895cb088186d037ac4816a3bae793213c774befd54ffa86d43948fa546f753a37fcdabd51
DIST VirtualBoxSDK-5.2.18-124319.zip 10153509 BLAKE2B fc937cfe4c6bb1ad6416fc975b7f8c31604fc78fe4da59596054831a8f5e47b7e2c39ad855f3ae0f45b3aa3a527bc6ad9b559901aefbd2f188c04fc3f8342188 SHA512 fefac8821e0ba83d130fad1dffa5f1d49c063d39694028005f655b8dd4f93bb8ab9697cdd2ea03c9cbc1d977f01da92ca6e6aa571497171a1d414ece239db680
DIST VirtualBoxSDK-5.2.20-125813.zip 10152506 BLAKE2B 0a0fe51b22391430b5f67f4dfa24e2985beb364f69acf67f19154bbd5acca00260abdc8ade32c245e1a19340c88ee49776442b036dccdb5f932c052c9701c7e3 SHA512 e87b41bc23de5aae3a368834dc33e4b0eff63e945f81323886491cd6139089c29dc113d5d2144ac76650d501d3a6f0fc858ff2e1afe29df4396ed7cc7552762d
+DIST VirtualBoxSDK-5.2.22-126460.zip 10154660 BLAKE2B e0a0106f695ca7198d4b2ac5c62bb435fe7934858115dcb3aed57b40d82655bd54cbbae63b279132c23762a227c53affe68131a0bf9452c69dcaf2162b1e4ebf SHA512 1d34b8f7f32602b5656fdb6184e6c35cc54d6ecb36bc41d7df3e154f18c27ea5938635969feb69defe86a53897eee87792514967f15810224ee89e8e523d2b29
diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-5.2.22.126460.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.22.126460.ebuild
new file mode 100644
index 000000000000..33b7d2250e10
--- /dev/null
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.22.126460.ebuild
@@ -0,0 +1,287 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit xdg-utils gnome2 pax-utils python-r1 udev unpacker eapi7-ver
+
+MAIN_PV="$(ver_cut 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+ MY_PV="${MAIN_PV}_$(ver_cut 5)"
+ MY_PV="${MY_PV/beta/BETA}"
+ MY_PV="${MY_PV/rc/RC}"
+else
+ MY_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(ver_cut 4)"
+VBOX_PV="${MY_PV}-${VBOX_BUILD_ID}"
+MY_P="VirtualBox-${VBOX_PV}-Linux"
+# needed as sometimes the extpack gets another build ID
+EXTP_PV="${VBOX_PV}"
+EXTP_PN="Oracle_VM_VirtualBox_Extension_Pack"
+EXTP_P="${EXTP_PN}-${EXTP_PV}"
+# needed as sometimes the SDK gets another build ID
+SDK_PV="${VBOX_PV}"
+SDK_P="VirtualBoxSDK-${SDK_PV}"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="amd64? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
+ x86? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
+ https://download.virtualbox.org/virtualbox/${MY_PV}/${EXTP_P}.vbox-extpack -> ${EXTP_P}.tar.gz"
+
+LICENSE="GPL-2 PUEL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+additions +chm headless python vboxwebsrv rdesktop-vrdp"
+RESTRICT="mirror"
+
+if [[ "${PV}" != *beta* ]] ; then
+ SRC_URI+="
+ sdk? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${SDK_P}.zip )"
+ IUSE+=" sdk"
+fi
+
+DEPEND="app-arch/unzip
+ ${PYTHON_DEPS}"
+
+RDEPEND="!!app-emulation/virtualbox
+ !app-emulation/virtualbox-additions
+ ~app-emulation/virtualbox-modules-${MAIN_PV}
+ !headless? (
+ dev-libs/glib
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/libpng
+ media-libs/libsdl[X]
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXft
+ x11-libs/libXi
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ chm? ( dev-libs/expat )
+ )
+ dev-libs/libxml2
+ sys-fs/lvm2
+ x11-libs/libXau
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXmu
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libXdmcp
+ ${PYTHON_DEPS}"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+S="${WORKDIR}"
+
+QA_PREBUILT="opt/VirtualBox/*"
+
+PYTHON_UPDATER_IGNORE="1"
+
+src_unpack() {
+ unpack_makeself ${MY_P}_${ARCH}.run
+ unpack ./VirtualBox.tar.bz2
+
+ mkdir "${S}"/${EXTP_PN} || die
+ pushd "${S}"/${EXTP_PN} &>/dev/null || die
+ unpack ${EXTP_P}.tar.gz
+ popd &>/dev/null || die
+
+ if [[ "${PV}" != *beta* ]] && use sdk ; then
+ unpack VirtualBoxSDK-${SDK_PV}.zip
+ fi
+}
+
+src_configure() {
+ :;
+}
+
+src_compile() {
+ :;
+}
+
+src_install() {
+ # create virtualbox configurations files
+ insinto /etc/vbox
+ newins "${FILESDIR}/${PN}-config" vbox.cfg
+
+ if ! use headless ; then
+ newmenu "${FILESDIR}"/${PN}.desktop-2 ${PN}.desktop
+
+ # set up symlinks (bug #572012)
+ dosym ../../../../opt/VirtualBox/virtualbox.xml /usr/share/mime/packages/virtualbox.xml
+
+ local size ico icofile
+ for size in 16 24 32 48 64 72 96 128 256 ; do
+ pushd "${S}"/icons/${size}x${size} &>/dev/null || die
+ if [[ -f "virtualbox.png" ]] ; then
+ doicon -s ${size} virtualbox.png
+ fi
+ for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+ icofile="virtualbox-${ico}.png"
+ if [[ -f "${icofile}" ]] ; then
+ doicon -s ${size} ${icofile}
+ fi
+ done
+ popd &>/dev/null || die
+ done
+ doicon -s scalable "${S}"/icons/scalable/virtualbox.svg
+ insinto /usr/share/pixmaps
+ newins "${S}"/icons/48x48/virtualbox.png ${PN}.png
+ fi
+
+ pushd "${S}"/${EXTP_PN} &>/dev/null || die
+ insinto /opt/VirtualBox/ExtensionPacks/${EXTP_PN}
+ doins -r linux.${ARCH}
+ doins ExtPack* PXE-Intel.rom
+ popd &>/dev/null || die
+ rm -rf "${S}"/${EXTP_PN}
+
+ insinto /opt/VirtualBox
+ dodir /opt/bin
+
+ doins UserManual.pdf
+
+ if [[ "${PV}" != *beta* ]] && use sdk ; then
+ doins -r sdk
+ fi
+
+ if use additions; then
+ doins -r additions
+ fi
+
+ if use vboxwebsrv; then
+ doins vboxwebsrv
+ fowners root:vboxusers /opt/VirtualBox/vboxwebsrv
+ fperms 0750 /opt/VirtualBox/vboxwebsrv
+ dosym ../../opt/VirtualBox/VBox.sh /opt/bin/vboxwebsrv
+ newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+ newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+ fi
+
+ if use rdesktop-vrdp; then
+ doins rdesktop-vrdp
+ doins -r rdesktop-vrdp-keymaps
+ fperms 0750 /opt/VirtualBox/rdesktop-vrdp
+ dosym ../../opt/VirtualBox/rdesktop-vrdp /opt/bin/rdesktop-vrdp
+ fi
+
+ if ! use headless && use chm; then
+ doins kchmviewer VirtualBox.chm
+ fowners root:vboxusers /opt/VirtualBox/kchmviewer
+ fperms 0750 /opt/VirtualBox/kchmviewer
+ fi
+
+ # This ebuild / package supports only py2.7. When py3 comes is unknown.
+ # The compile phase makes VBoxPython2_7.so.
+ # py3 support would presumably require a binary pre-compiled by py3.
+ use python && doins VBoxPython.so VBoxPython2_7.so
+
+ rm -rf src rdesktop* deffiles install* routines.sh runlevel.sh \
+ vboxdrv.sh VBox.sh VBox.png vboxnet.sh additions VirtualBox.desktop \
+ VirtualBox.tar.bz2 LICENSE VBoxSysInfo.sh rdesktop* vboxwebsrv \
+ webtest kchmviewer VirtualBox.chm vbox-create-usb-node.sh \
+ 90-vbox-usb.fdi uninstall.sh vboxshell.py vboxdrv-pardus.py \
+ VBoxPython?_*.so
+
+ if use headless ; then
+ rm -rf VBoxSDL VirtualBox VBoxKeyboard.so
+ fi
+
+ doins -r * || die
+
+ # create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid)
+ dosym ../VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so
+ dosym ../VBoxREM.so /opt/VirtualBox/components/VBoxREM.so
+ dosym ../VBoxRT.so /opt/VirtualBox/components/VBoxRT.so
+ dosym ../VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so
+ dosym ../VBoxXPCOM.so /opt/VirtualBox/components/VBoxXPCOM.so
+
+ local each
+ for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,NetAdpCtl,NetDHCP,NetNAT,TestOGL,ExtPackHelperApp}; do
+ fowners root:vboxusers /opt/VirtualBox/${each}
+ fperms 0750 /opt/VirtualBox/${each}
+ pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+ done
+ # VBoxNetAdpCtl and VBoxNetDHCP binaries need to be suid root in any case..
+ fperms 4750 /opt/VirtualBox/VBoxNetAdpCtl
+ fperms 4750 /opt/VirtualBox/VBoxNetDHCP
+ fperms 4750 /opt/VirtualBox/VBoxNetNAT
+
+ if ! use headless ; then
+ # Hardened build: Mark selected binaries set-user-ID-on-execution
+ for each in VBox{SDL,Headless} VirtualBox; do
+ fowners root:vboxusers /opt/VirtualBox/${each}
+ fperms 4510 /opt/VirtualBox/${each}
+ pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+ done
+
+ dosym ../VirtualBox/VBox.sh /opt/bin/VirtualBox
+ dosym ../VirtualBox/VBox.sh /opt/bin/VBoxSDL
+ else
+ # Hardened build: Mark selected binaries set-user-ID-on-execution
+ fowners root:vboxusers /opt/VirtualBox/VBoxHeadless
+ fperms 4510 /opt/VirtualBox/VBoxHeadless
+ pax-mark -m "${ED%/}"/opt/VirtualBox/VBoxHeadless
+ fi
+
+ exeinto /opt/VirtualBox
+ newexe "${FILESDIR}/${PN}-3-wrapper" "VBox.sh"
+ fowners root:vboxusers /opt/VirtualBox/VBox.sh
+ fperms 0750 /opt/VirtualBox/VBox.sh
+
+ dosym ../VirtualBox/VBox.sh /opt/bin/VBoxManage
+ dosym ../VirtualBox/VBox.sh /opt/bin/VBoxVRDP
+ dosym ../VirtualBox/VBox.sh /opt/bin/VBoxHeadless
+ dosym ../VirtualBox/VBoxTunctl /opt/bin/VBoxTunctl
+
+ # set an env-variable for 3rd party tools
+ echo -n "VBOX_APP_HOME=/opt/VirtualBox" > "${T}/90virtualbox"
+ doenvd "${T}/90virtualbox"
+
+ local udevdir="$(get_udevdir)"
+ insinto ${udevdir}/rules.d
+ doins "${FILESDIR}"/10-virtualbox.rules
+ sed "s@%UDEVDIR%@${udevdir}@" \
+ -i "${ED%/}"${udevdir}/rules.d/10-virtualbox.rules || die
+ # move udev scripts into ${udevdir} (bug #372491)
+ mv "${ED%/}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${ED%/}"${udevdir} || die
+ fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+
+ gnome2_icon_cache_update
+
+ udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
+
+ elog ""
+ if ! use headless ; then
+ elog "To launch VirtualBox just type: \"VirtualBox\""
+ elog ""
+ fi
+ elog "You must be in the vboxusers group to use VirtualBox."
+ elog ""
+ elog "For advanced networking setups you should emerge:"
+ elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
+ elog ""
+ elog "Please visit http://www.virtualbox.org/wiki/Editions for"
+ elog "an overview about the different features of ${PN}"
+ elog "and virtualbox-ose"
+ if [ -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_desktop_database_update
+}
diff --git a/app-emulation/virtualbox-extpack-oracle/Manifest b/app-emulation/virtualbox-extpack-oracle/Manifest
index 9fe87678b214..cec42d427b5a 100644
--- a/app-emulation/virtualbox-extpack-oracle/Manifest
+++ b/app-emulation/virtualbox-extpack-oracle/Manifest
@@ -1,3 +1,4 @@
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.14-123301.tar.gz 19589209 BLAKE2B 385bdfb4cef67788a1dd3e758f52dab7a367f56ca8d286e465af9a7674ffe3bc0f6187a66d7d19bb8f2a8fc0e23e0ce7ef35ac2d46fd6971dc2df96e8a61ca11 SHA512 a47a7173685b72995e5012386fc8f6c55f9106049a28ecaea223f58f1bb40077e0929cf05102a2588e516fe90891428b8e569ec9351fcaf235eb9f8293e45b92
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.18-124319.tar.gz 19592275 BLAKE2B 7be65024837e46073049d3d751df00b50bf2d5d81faef3ba2a869429800d999f473b570bfe75201d07347e751893d280f7238a076a172ad2046b64c151b675ba SHA512 fa4bf8202f4d5f86cf4a04aaf6e77ce2f86ccde126d5543846793a021fc1e861f35d256432d762aebd38fc6cd0fa0bfe2a4def76334f468de316fe925d2fe414
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.20-125813.tar.gz 19641208 BLAKE2B ffe4e89b88609d575f7e9f5aed5330de5024462ae564684cf3f565b62649d022c8fc9368cfd1685e3e4fc34e9a23cb0651c483f129b533f9afec38bcae89d587 SHA512 df9ae6af9ad1c1106bf8bf0595fdcdd3ec45bc74b90655e762fb18a4c8ea268bed366ce3caaf0f95682577b61b337650a6fe7ef901f6925fa38679ccd885c21c
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.22-126460.tar.gz 19640932 BLAKE2B 162ab40da6b2cd30d00e020666a1f4fb026e29af2ca9d6c36c294e5fa299b61ab8fd147f24d2b500426c768808db2c7693c30e88519e695d7759f8eedf1c52c5 SHA512 85b8552668b6580bea24f051ad861c82b9ba32177fb7fa37fe2980d8bab32a84325d02bfa9c8f55c2021a4000ef2546d8996ca8b99ca7fc19f8281a92108dfb0
diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.22.126460.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.22.126460.ebuild
new file mode 100644
index 000000000000..8a111898f4de
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.22.126460.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2018 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)"
+ 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"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="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 d7c4560be218..89057cd147a8 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -1,6 +1,7 @@
DIST VirtualBox-5.2.14.tar.bz2 118597539 BLAKE2B 5e0a8d92405378eb438cae375041609f7a0e1288b040d3a0bcc06157f16ddd48b3537f2f026aa12a71c5319bdef56d6f3907785ac51ebe05a8b7143e04f22d0a SHA512 b8202eccd83e9f2c92a77548d003082b6b3ff7838bb32ae48c3a25dcd622bfdc8ceca42cc49b855eeabf4439c55ad42df9b3959dd1bab77de154468e139c904e
DIST VirtualBox-5.2.18.tar.bz2 118700952 BLAKE2B 5e9a5ca5379d80a8d9d0d53fe7b1f7cd98e03b6c535867932d55aa6a936e65f2d294264da014f332c2caa933a262ced3e350d9eb685ad99dec02a02ffcf5e7cb SHA512 f67c17cdd39e699e6c80af82a2c2d0c5dab073ddba2b55393740e605debb973030c48ce736ae753fc1e680845f0b62209c0f8951db08b665e9cdd83c52d5be20
DIST VirtualBox-5.2.20.tar.bz2 118760364 BLAKE2B 7a5f72340796d3278ef5f3210f4b25bf4d999ec93cdd0449853faf68b38c45a6ffd00fe2c88f12296029882f7715c012d1793cfff9d1c2441aa4db414fa3225e SHA512 ff039e487c43b584c5c5959df1622151d82f6c39101af869262f800d07e68a68005ed442112e36ebe249ed79de34c0b974bbd43e7889a5d40df2ebe7dec77a15
+DIST VirtualBox-5.2.22.tar.bz2 118757134 BLAKE2B be795cdbfb09d3d443f63e190b63898239622f5a57aefdd90f382d9a849d09cc1abc2624071fbc60b2c04a12f33376184540cc362c19225733f99a3bcc8ff6a3 SHA512 4f6c4611a3114778f45419587dc1519ca07410c1ea6474cdb18ecd3b068639a4fdac3f25146fe9b8e006e30f19eba134ce9f665182008b033f6f78497e1ea722
DIST virtualbox-5.2.12-patches-01.tar.xz 2616 BLAKE2B 5731484d185414d83588ee227bbc1eef266451d1a3a710adf1b769cd6404ef1750dba7a60549f2ab9f3fb81ef15809db9ea0190127caefc72d7bc9bb8b741fb0 SHA512 712b55392a8e8357e95abb42ea4f8dac3391ecbf9cbecf27c7dbf674c40f42a1eb19d227a1b3adcf621384a9f64a6438d20fb43866c736189097fb5770c5c654
DIST virtualbox-5.2.16-patches-01.tar.xz 2952 BLAKE2B 1d23d83bdb4d9576d402b67cc81d4427c5fe9163550d2817546382e1c1087000553d4a9a864f2527a909f52ce389105bcfe5518b5407de1299c7d2a62ee3cc21 SHA512 88c21583c51ae8e22e5fd3f08baae686045e884883153e2e365c35ba19f2773d5964c523a4ad3777fe30ca96bf76fab8819e09beeadf8350193041bff783893d
DIST virtualbox-5.2.16-patches-02.tar.xz 3152 BLAKE2B c8d8f3872f544a465c7d1aa07291599307120ac9eabfb299ddd788a11f85ca6c2d84b8e7306ee4ad436270dad0dd39f101ee68a549eac15afd1e3cdc03f23c6c SHA512 85ee8c4045de562d71ab2d761695ea48b6726a6f0c4bcaa2562bb0d147542d3f1a1b5b47cf593a7f22dac1b86f87b59a56bef421dce3e1fa8e5260cd41998450
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.22.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.22.ebuild
new file mode 100644
index 000000000000..64bc7a6872f8
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.22.ebuild
@@ -0,0 +1,227 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-mod systemd user toolchain-funcs
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P="VirtualBox-${MY_PV}"
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-5.2.16-patches-02.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+RDEPEND="
+ 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_P}"
+
+pkg_setup() {
+ MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest)
+ vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)"
+ use X && MODULE_NAMES+=" vboxvideo(misc:${WORKDIR}/vboxvideo::${WORKDIR}/vboxvideo)"
+
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build 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
+ "${S}"/src/VBox/Additions/linux/export_modules.sh "${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_prepare() {
+ # PaX fixes (see bug #298988)
+ pushd "${WORKDIR}" &>/dev/null || die
+ eapply "${FILESDIR}"/vboxguest-4.1.0-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
+
+ # stupid new header references...
+ local vboxheader mdir
+ for vboxheader in {product,revision,version}-generated.h ; do
+ for mdir in vbox{guest,sf} ; do
+ ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
+ "${WORKDIR}/${mdir}/${vboxheader}"
+ done
+ done
+
+ # 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 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
+ insinto /usr/share/doc/${PF}
+ doins "${FILESDIR}"/xorg.conf.vbox
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_preinst() {
+ enewgroup vboxguest
+ enewuser vboxguest -1 /bin/sh /dev/null vboxguest
+ # automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+ enewgroup vboxsf
+}
+
+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 edfaaffb1276..aa442162ce22 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,3 +1,4 @@
DIST vbox-kernel-module-src-5.2.14.tar.xz 637352 BLAKE2B 7ccefbb13f25fe995e0f769192a93baa91358c09e7126d6a6c8bef7fceeab50082f78843140d23cf88c4931c561552c4131b17625e7a3821766571387d78d2a3 SHA512 920eca67fb10ed4d1eeab95b14e65c585dd96df82a4690c34c9d85366ec6dd9835f9a772eb4718a80e6ffb2637de2a698151a6bdfd7984fc2070cd0bade5c077
DIST vbox-kernel-module-src-5.2.18.tar.xz 638008 BLAKE2B 8ad08362e81365956bace1f6591ddd5f8201f3464df6f3f378c6c1b88f8a58eb823646f5c36f8c5efbdcd9941ec8eb46b604b356a39bf44af50b0ee9e5a6914a SHA512 0ba280b111725f6e77544e29db4dfbc8c418d928fd03db0a5d747703513147bc3b7ff7fcfa544298414ec97e95c99f9408c1fe2349d652552a652b6518898401
DIST vbox-kernel-module-src-5.2.20.tar.xz 638452 BLAKE2B f8fa29e21a77ebfec765ce0e006aaba9fdc76773e216d0c24c705e688730598e85b2c191406acd376f4020c67e296b6f22b0acecb7f15f3e343233b4a7da62fa SHA512 5378be30ab697ded6c07e74b15a38331914b19f72c55847e92e6e89541c25d89aeb6020aaaa3820e84902efb10a5b7ba7190a5271da93cd490b25fcbd787bf28
+DIST vbox-kernel-module-src-5.2.22.tar.xz 638492 BLAKE2B 71aba29b056bb3dfeffbf4632fbf7f15d89b988267ba24c766b78b1d9c50a4d27fb1b8e699108b973af68024f9f77ca0a8ad787355d7342fe1400f14189487ff SHA512 3361bb536af8e8d490377be04d1b1b9af478538e23ec409d3e0205ad930c16e5228c57ae7d92d214ac533ae64298d9eaff3c9284ff9bb308108d1ad7d69fb507
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.22.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.22.ebuild
new file mode 100644
index 000000000000..49a28e2fd79c
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.22.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2018 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 user
+
+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"
+KEYWORDS="~amd64 ~x86"
+IUSE="pax_kernel"
+
+RDEPEND="!=app-emulation/virtualbox-9999"
+
+S="${WORKDIR}"
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
+
+pkg_setup() {
+ enewgroup vboxusers
+ 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/
+ doins "${FILESDIR}"/virtualbox.conf
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+}
diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index 049bb31e1e06..a948c84631c2 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,5 +1,6 @@
DIST VirtualBox-5.2.14.tar.bz2 118597539 BLAKE2B 5e0a8d92405378eb438cae375041609f7a0e1288b040d3a0bcc06157f16ddd48b3537f2f026aa12a71c5319bdef56d6f3907785ac51ebe05a8b7143e04f22d0a SHA512 b8202eccd83e9f2c92a77548d003082b6b3ff7838bb32ae48c3a25dcd622bfdc8ceca42cc49b855eeabf4439c55ad42df9b3959dd1bab77de154468e139c904e
DIST VirtualBox-5.2.18.tar.bz2 118700952 BLAKE2B 5e9a5ca5379d80a8d9d0d53fe7b1f7cd98e03b6c535867932d55aa6a936e65f2d294264da014f332c2caa933a262ced3e350d9eb685ad99dec02a02ffcf5e7cb SHA512 f67c17cdd39e699e6c80af82a2c2d0c5dab073ddba2b55393740e605debb973030c48ce736ae753fc1e680845f0b62209c0f8951db08b665e9cdd83c52d5be20
DIST VirtualBox-5.2.20.tar.bz2 118760364 BLAKE2B 7a5f72340796d3278ef5f3210f4b25bf4d999ec93cdd0449853faf68b38c45a6ffd00fe2c88f12296029882f7715c012d1793cfff9d1c2441aa4db414fa3225e SHA512 ff039e487c43b584c5c5959df1622151d82f6c39101af869262f800d07e68a68005ed442112e36ebe249ed79de34c0b974bbd43e7889a5d40df2ebe7dec77a15
+DIST VirtualBox-5.2.22.tar.bz2 118757134 BLAKE2B be795cdbfb09d3d443f63e190b63898239622f5a57aefdd90f382d9a849d09cc1abc2624071fbc60b2c04a12f33376184540cc362c19225733f99a3bcc8ff6a3 SHA512 4f6c4611a3114778f45419587dc1519ca07410c1ea6474cdb18ecd3b068639a4fdac3f25146fe9b8e006e30f19eba134ce9f665182008b033f6f78497e1ea722
DIST virtualbox-5.2.12-patches-01.tar.xz 2616 BLAKE2B 5731484d185414d83588ee227bbc1eef266451d1a3a710adf1b769cd6404ef1750dba7a60549f2ab9f3fb81ef15809db9ea0190127caefc72d7bc9bb8b741fb0 SHA512 712b55392a8e8357e95abb42ea4f8dac3391ecbf9cbecf27c7dbf674c40f42a1eb19d227a1b3adcf621384a9f64a6438d20fb43866c736189097fb5770c5c654
DIST virtualbox-5.2.16-patches-02.tar.xz 3152 BLAKE2B c8d8f3872f544a465c7d1aa07291599307120ac9eabfb299ddd788a11f85ca6c2d84b8e7306ee4ad436270dad0dd39f101ee68a549eac15afd1e3cdc03f23c6c SHA512 85ee8c4045de562d71ab2d761695ea48b6726a6f0c4bcaa2562bb0d147542d3f1a1b5b47cf593a7f22dac1b86f87b59a56bef421dce3e1fa8e5260cd41998450
diff --git a/app-emulation/virtualbox/virtualbox-5.2.22.ebuild b/app-emulation/virtualbox/virtualbox-5.2.22.ebuild
new file mode 100644
index 000000000000..adcba1fd0cd8
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-5.2.22.ebuild
@@ -0,0 +1,473 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit flag-o-matic gnome2-utils java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.16-patches-02.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
+
+RDEPEND="!app-emulation/virtualbox-bin
+ ~app-emulation/virtualbox-modules-${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/libXcursor
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ opengl? ( virtual/opengl media-libs/freeglut )
+ 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="${RDEPEND}
+ >=dev-util/kbuild-0.1.9998.3127
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-libs/libcap
+ sys-power/iasl
+ virtual/pkgconfig
+ alsa? ( >=media-libs/alsa-lib-1.0.13 )
+ 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
+ )
+ !headless? ( x11-libs/libXinerama )
+ java? ( >=virtual/jdk-1.6 )
+ pam? ( sys-libs/pam )
+ pax_kernel? ( sys-apps/elfix )
+ pulseaudio? ( media-sound/pulseaudio )
+ qt5? ( dev-qt/linguist-tools:5 )
+ vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
+ ${PYTHON_DEPS}"
+RDEPEND="${RDEPEND}
+ 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_P}"
+
+REQUIRED_USE="
+ java? ( sdk )
+ python? ( sdk )
+ vboxwebsrv? ( java )
+ ${PYTHON_REQUIRED_USE}
+"
+
+pkg_setup() {
+ 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
+ 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="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' \
+ -i configure || die
+
+ # Don't use "echo -n"
+ sed 's@ECHO_N="echo -n"@ECHO_N="printf"@' -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
+}
+
+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 --build-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
+ ./configure ${myconf[@]} || die "configure failed"
+}
+
+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_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
+ TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
+ TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
+ TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
+ VBOX_GCC_OPT="${CXXFLAGS}" \
+ TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
+ all
+}
+
+src_install() {
+ local binpath="release"
+ use debug && binpath="debug"
+ cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die
+
+ local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile
+
+ vbox_inst() {
+ local binary="${1}"
+ local perms="${2:-0750}"
+ local path="${3:-${vbox_inst_path}}"
+
+ [[ -n "${binary}" ]] || die "vbox_inst: No binray 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-5-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
+
+ # *.rc files for x86_64 are only available on multilib systems
+ local rcfiles="*.rc"
+ if use amd64 && ! has_multilib_profile ; then
+ rcfiles=""
+ fi
+ for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; 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)
+ pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die
+ for fwfile in VBoxEFI{32,64}.fd ; do
+ vbox_inst ${fwfile} 0644
+ done
+ popd &>/dev/null || die
+
+ # 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{headless,manage} VBox{Headless,Manage,VRDP} ; do
+ dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+ done
+ dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
+
+ 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 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 4750
+ pax-mark -m "${ED%/}"${vbox_inst_path}/VirtualBox
+
+ if use opengl ; then
+ vbox_inst VBoxTestOGL
+ pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxTestOGL
+ fi
+
+ for each in virtualbox VirtualBox ; do
+ dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+ done
+
+ insinto /usr/share/${PN}
+ doins -r nls
+ doins -r UnattendedTemplates
+
+ newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${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
+
+ if use doc ; then
+ dodoc UserManual.pdf
+ fi
+
+ newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+
+ 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/${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() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}