public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-guest-additions/, app-emulation/virtualbox-additions/, ...
@ 2015-11-11 12:20 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2015-11-11 12:20 UTC (permalink / raw
  To: gentoo-commits

commit:     550659425cb2fcb397a7fe9a344574c72babee18
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 11 11:08:43 2015 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Nov 11 12:20:32 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55065942

virtualbox packages: Bump to version 5.0.10

Package-Manager: portage-2.2.24
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 app-emulation/virtualbox-additions/Manifest        |   1 +
 .../virtualbox-additions-5.0.10.ebuild             |  36 ++
 app-emulation/virtualbox-bin/Manifest              |   4 +
 .../virtualbox-bin-5.0.10.104061.ebuild            | 357 +++++++++++++++++
 app-emulation/virtualbox-extpack-oracle/Manifest   |   1 +
 .../virtualbox-extpack-oracle-5.0.10.104061.ebuild |  43 +++
 app-emulation/virtualbox-guest-additions/Manifest  |   1 +
 .../virtualbox-guest-additions-5.0.10.ebuild       | 212 +++++++++++
 app-emulation/virtualbox-modules/Manifest          |   1 +
 .../virtualbox-modules-5.0.10.ebuild               |  59 +++
 app-emulation/virtualbox/Manifest                  |   1 +
 app-emulation/virtualbox/virtualbox-5.0.10.ebuild  | 423 +++++++++++++++++++++
 x11-drivers/xf86-video-virtualbox/Manifest         |   1 +
 .../xf86-video-virtualbox-5.0.10.ebuild            | 174 +++++++++
 14 files changed, 1314 insertions(+)

diff --git a/app-emulation/virtualbox-additions/Manifest b/app-emulation/virtualbox-additions/Manifest
index 7b32a88..38193bb 100644
--- a/app-emulation/virtualbox-additions/Manifest
+++ b/app-emulation/virtualbox-additions/Manifest
@@ -1,5 +1,6 @@
 DIST VBoxGuestAdditions_4.3.28.iso 58241024 SHA256 9f52e186d6c9407b2676d4b2ed1cdf96940ec129cc2bd92e54b24526271a9733 SHA512 78055f389dc1a7bd62577f1fa670b8f8899ab3a58a87953d30fcaea1cd0c77f8662e15fea932c434309747971a2a61b61854b6f087654d9d2fb2de07fb6f1b5c WHIRLPOOL 64275e44c01f4f260899a7c16aaeb494ebe81277e7cbdec87e487736833cc239338f3c32c00759244b3be55c5754788593b81d06dab7d9ab26991369fa9d65fd
 DIST VBoxGuestAdditions_4.3.30.iso 58257408 SHA256 432c2da1d9a939de7ba1d2cfb10595031374af9ce66417a43979d1794beedbb1 SHA512 a782e47381b708aee8a8f2c1d6608d51d09a2fb0d55ea3b543530a31cbf489043f05d4c334a9e269b922318339cb78a897603b8bce2749fe02088a6e9a4fd177 WHIRLPOOL c70b9e630820f7be38e38fd7ce20073c3766758950f60367a3a6e666644f10baadbfb5a9dc67c7c8364770e7ae28d27d632c53699fd6d1102bf672672419f1f2
 DIST VBoxGuestAdditions_4.3.32.iso 58349568 SHA256 187f49b567dea056d9de255c155f8eaa3449dffe08ccf22ae8ab1dda708f78fe SHA512 3938ade4fd030f2471b34b11296af3874c3936659c635a9d7e222697f2dc72c65fc4f73f42800def8a8bcc518951bb9a3504156811af18e00722a6f61c03b6a4 WHIRLPOOL 8e5f25709ea1b74f94f303f29ef7d1601f29681515981b2f16fddd4af4c9bec842101bfab7626112777284c3f243f8e4a66a23d09a23af353e4f1e0645043618
+DIST VBoxGuestAdditions_5.0.10.iso 59002880 SHA256 8f7ffee3fac75793e48d1859b65a95879b3ed5bc1c3164c967e85d69244c594b SHA512 95080cc991f99d11aea771088b980faa42c9f0d33ee31afc53de758d49cb62db0275bd5907ff2bf29382194e6227e965986ccdbec7bf50e254e178689e291b65 WHIRLPOOL 24a2c79f3868d14da387c4f282af848411d0a78a8c4431b72f64474cc05ca2bb24aef923e3e1d9e0f1ae17cc342aa821c2ad782d8af233f3c09c4b26afb4c7f9
 DIST VBoxGuestAdditions_5.0.6.iso 58966016 SHA256 59ed9911c2bb22357345448c3df6104938b45fa780311d20c330e39c6e309991 SHA512 8d9252b4961da760e71a94acd0292f23373b6ef2f9cfee48053efffbc9ec8f396a71f87e48eedf36f73c884774f1898567e2eeb454f4d343f85973d3b548b85f WHIRLPOOL 73164707e2e5aed992080ea80479d885383be47918e11ba387fb8f9ba7d1db585e3fcaf14ec904cc02af7b05cc00cf0a540ef9ae14adeb877a4f5f7d196e8aa8
 DIST VBoxGuestAdditions_5.0.8.iso 58992640 SHA256 a6ab45a043e460c87f145ec626c1cc2a1ae74222f15aa725004cdc84bf48e9f3 SHA512 8a808b964b916930748cdde96cbf0b3657506758155336b5d7a294cde28129cff50ec5e88fdd5e0c3bad8a5df99e8244c08677811aa4e3982f4255273d66820a WHIRLPOOL a2fe1cb6c334f44a4dd962a0479b1a2956ebd9a9d5aee9c6a3a2203c22a1f764aa1829f1a813d14f60cfdebef27ddb59c554a0db50b18641df2da6a1d67d20c5

diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-5.0.10.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-5.0.10.ebuild
new file mode 100644
index 0000000..e46434c
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-5.0.10.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+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="http://www.virtualbox.org/"
+SRC_URI="http://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 7892b5d..e360922 100644
--- a/app-emulation/virtualbox-bin/Manifest
+++ b/app-emulation/virtualbox-bin/Manifest
@@ -1,6 +1,7 @@
 DIST Oracle_VM_VirtualBox_Extension_Pack-4.3.28-100309.tar.gz 15961939 SHA256 72e101d9dc5eabeb76d1ab5bd6d2f817a11c89adfe8bb72cc5d614a2eef532d1 SHA512 57ad44a99a7abcad195e6ceccc1fe7b494979da65601a52e0be8336bb819812d5cef48a8bc0fe9f74f3a05238e6fd29562ac678d4ef7e0c78587fe81c287a65e WHIRLPOOL fb08189c53841664119bffb4de6a76d6f72fb035f887ed5e948f38faa5be2891e35de0806da02d299e818370285bcddba06eb84bea7db4d3cfa09d92f8042db7
 DIST Oracle_VM_VirtualBox_Extension_Pack-4.3.30-101610.tar.gz 15983777 SHA256 770d49247976f2a0d14a66196dddf864c6b9d185671e2a29cab459fc28f105db SHA512 f5d8275fe3e1ea60e8d15af3b0c7382faab172df39369c8904ff734a5105daed87a48215880b2e286c6735ead341c237d2260e6ee923f513818f85cf0b452def WHIRLPOOL 3b1e29a44413ebc65dc250b2366b1fe75d6ea48fd94b722c8ec9eb7e97e6981470e9201c9840d566953c9c9bdd4a7893f9d525b3fac7150ca24391f696bba9c4
 DIST Oracle_VM_VirtualBox_Extension_Pack-4.3.32-103443.tar.gz 15994576 SHA256 3f041c019985c35974bf034a9f7d941149fcc3e23a6200b47579140405af5f88 SHA512 212c21f6fc0af093e2d409827348d776377164b9c78b6c01dc710d4a63f53fa7ef52a66491d81b96dc64af4747d79ca0d0df55b052cf6b1c8ceb239c32dc1c75 WHIRLPOOL d67b55c409c6e06080010a25a4a64e660dcd0efaadffe2311166bed06c3f494a5f20cff131a42e07e82aba3cab7f53dea101fb3e5fabeecc2bdb0dd4a167c0ce
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.0.10-104061.tar.gz 16918255 SHA256 c846fa26fec8587e57180c85c408cad377c48ad26830b0dc839ebf9025e3d29c SHA512 ae6bab29c14b1ace849ebf5715360fc0921950c62345e18709347f44c07f88727bf1785d53437e39d67f8c56d92cef1f6e3d03c3f7d6dd76c6d4d9ee7f1f1d5b WHIRLPOOL 822c3c9b20f9171b3e9d1896c2ff648ead049d63e45b8353da5d37e7f874433878fedcfb2f10ae5f50e4860466560a37b6102e8ffb3e9625106ce5188f491726
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.0.6-103037.tar.gz 16874845 SHA256 4eed4f3d253bffe4ce61ee9431d79cbe1f897b3583efc2ff3746f453450787b5 SHA512 fb3fb06e88cc5bded6246375727df2deebb6c0dbb889b8516e0bab0af0c05ef3e1baa8c1eb94d34af2e63600bc36814eab8d8f25abb0fd1ad982ea242f456468 WHIRLPOOL 51ddd27d61e214cb41c5d8c50b0d5d01f885f4ae9facabd3cece500fd41b2a72d42b6ad766aa52e9c315c6fca2dca0f07a1a6b1fa0dc2b87f2cd3c4bf1e54aaa
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.0.8-103449.tar.gz 16880584 SHA256 febd2c99909cb932a98c2b9f73ce8eb03fc183c8c8f2fc874985cf3d598f6b94 SHA512 6a29aa1c52b460bded6e342cc66bb28d93f7f4c71eb108854dd2ba6934ae399e6ee7bd8acd29dda934f2933eb05b2e3878568fee76e5eb55ae43a695123568df WHIRLPOOL d6865e702c787c441da30a49e5aaff818a7530f2a82313c326a509cb3bb98f7cf22d511e3265b99a14402b2b9a7c4614d40ed570e6a6ba5522f4752248e2f338
 DIST VirtualBox-4.3.28-100309-Linux_amd64.run 85677523 SHA256 8c862533f876dc32fbfae993597b1123e2feac81a302c60e73b7ee891e17a77f SHA512 75dc2cd257b187b0a497b87c2f1e576a57ceece290327a98804c903810522444b0a64a704bc51a25945dbaa5c0caf30898ba258829577e2f17f7c736fcf59bb0 WHIRLPOOL c8d5d885807ad633bf1c4c6f98cac8dddf4002dc2e21ed2d2fb2f0a859f447b7ce06d1c49c4daff4147b25ca4992da14b6b75b39f47075c861732e6ef00091d1
@@ -9,6 +10,8 @@ DIST VirtualBox-4.3.30-101610-Linux_amd64.run 81069522 SHA256 5745bc9b1edd1d7d28
 DIST VirtualBox-4.3.30-101610-Linux_x86.run 80537038 SHA256 c8e42d247ecfa1ff3e3da6c7988a58e2d64fbb54598e9b08211308226d61c42a SHA512 629907432887606b1e31328a751c5ec3c764e90b3eae4a984c5d9e6b5f77b626e8eafa235bb55a0e1725fe95324dcb3cc1c8e2f441d716a8408d1e1ddf0e5dde WHIRLPOOL c10976693284b7b1c178aa036eb5d28ce76366362ac00eb0f686e8f99ddb93df508654d8acab0912714d3f9215d8f217a91999c25877fb2b973171b9be8b7d09
 DIST VirtualBox-4.3.32-103443-Linux_amd64.run 81100243 SHA256 e99dbf0e382081fa78cbc5803b473e2fe4bc945eb50cf0b5717853f4cdb34da3 SHA512 c68cf69de524ec0229d07943087bc433b0902710f48ddd67106f0f10500d38d38a0e3ff97e40bc81495f12f2bcd68ee0f3d19fda46c999960fd1b3f64bf220f3 WHIRLPOOL 15aa5ce0b49ac7c75fc6191e4a0283a721db247a667f63b94f04dbf1f00122958c8945181f4ec5791b1a6ba6425f98a3bf92f80eebf29b831260cc8274cf1cd7
 DIST VirtualBox-4.3.32-103443-Linux_x86.run 80496078 SHA256 89e3493052b43574454c1f6bed2a1ddf3504dbcf5096cb2f541b242dd6636cfc SHA512 66455075385879364afe7c77051d7b7873dff543647bbbdcdb9e0e63ef9fa2c49a11a45ac3c2cb96cbb59fe75e5e502c3d4cd99ac1ba8c580e65ae3e3da5c427 WHIRLPOOL bdbd2b62fc8bf83604ffa217f5e592ff48058a6f6c10e0fb07e214847d6cc915f858fef03b6c196625339f3d31f2ce6c4614b9ae206eacfb35957253893bea06
+DIST VirtualBox-5.0.10-104061-Linux_amd64.run 84448721 SHA256 77c3500f460f24850c796fbef84d7ecd7cf05b5a34256e712172e6f159f119e9 SHA512 431edd417f7e7931dfa4314ef095aedc3eb489349d16a13cb8bae1c9fbf6b19aed00e845b9389ff1805959649b8cabb6b8e38c36cb7b65f8450d403f68b6d414 WHIRLPOOL 0d598ec0be6a8ea41c3908c47c072480bd37542a633493834367941c063734104d73f2cb2c8ceb2d34625d89249e18bc98383970f5647c69858b1caa0c7e9447
+DIST VirtualBox-5.0.10-104061-Linux_x86.run 83537357 SHA256 7860f1a07f2535873ccfe2a46f63d71fa8ee491e7f194e577001d2f27ba4f7c3 SHA512 657071112ce8b54335d1ff67feab8785c13e5e09370763472d8f99970bef41aa4da3a4db158d5f778e8a39af05464538047c71742156a5749c2858cf7d6a04aa WHIRLPOOL 78718e91978e13eacbc4ac9b035b07043effb5785ffec3475f710e775b94736df98c4b45a6fdcd93733e418fc62a91992cf761c41b98e7288ec4714599669aab
 DIST VirtualBox-5.0.6-103037-Linux_amd64.run 84407761 SHA256 938b7b247e3260cc148f17a34f47c3363d377fd9e47add1635570908bedaf4a4 SHA512 87b4e1eb5896a87fc5004c09281d7f963dc3f07cf7405be48082a6f24225f3052577ec9c21f157cafe6f0188371142643723714d7f586a814f9e549cace480b1 WHIRLPOOL ec066521a2f73e02578e0528fabbab691bd1d196cf7bd764cdf3fa6f4f0429683320a45a1e7fc23f9f6a6ddfb8024367945f2ae75d2c7c20e609788b8e5a5a2b
 DIST VirtualBox-5.0.6-103037-Linux_x86.run 83527117 SHA256 557992579e2abca01e6a3b22d779174192fa3f7b037230fd1d47bfd70d52cbc5 SHA512 8611733e6ddd5903b29221172f530887c659f96b1a317c0dcff40a2184f299c26b53e77fd61e5bb0e6475082453c7d30191f6e195942ed31f43fa6b72353edee WHIRLPOOL 4bba29189ccaecfc88347a1015abb3dd888222d65b2a6e45a453871af7c7d5fe86702e1cd7ec655793d79139828cfb35ee4424a16a940f41215708f6ed0907ed
 DIST VirtualBox-5.0.8-103449-Linux_amd64.run 84540882 SHA256 91bea0393f0b0afdc139660f23d77512723d367446d482545ded2eeeaba851d0 SHA512 5ab4d98070ba062cdacd88f60454333bdfa416fe0065978d3358fe1aaa7bb839f4a940630e9bb2f0e114879f2a839e3e1daf6d5000d11094c56951decda5babf WHIRLPOOL 915e6c7f30012087d9e37283fe3f073b9119aaadfb8a996899d9201003a8b30a490a5ecd9c61e3c919e957cda5ba9483df15d59d7ea2a13b600818ec9cc5f9d4
@@ -16,5 +19,6 @@ DIST VirtualBox-5.0.8-103449-Linux_x86.run 83752397 SHA256 3b18e5bb5cde12d4d91ad
 DIST VirtualBoxSDK-4.3.28-100309.zip 11698378 SHA256 fe0cc316cecb3dfe9bbb925e6c023620d4cfd8e137b2a9b9f40f22f527af16fa SHA512 6af7d2107cff080281a356cbf522961b2e9d1917e861e410b169ce5ca3cefe05cc87e4e01f78ae171f8716f7006c031f14fc01d8d282a872a4f619638049b11a WHIRLPOOL 23a77dbc410a28b2799264da88d79b2c4335c07da67dd8bf4be26cac271e3ed38a9bf4fb2966ec0a3c06fb869bb252f5fa6a34a9a9c62cbb9a2fb0ad76442f66
 DIST VirtualBoxSDK-4.3.30-101610.zip 11436700 SHA256 6d8f1a006d56dfa1bbec10a35369c80c75845fdc6127c4d806b5c69cec03ab7e SHA512 2b2b3220d9ce908813699f8fc4cee80de5b29cb134ec968c2ccbb78c40b8d0d8aeb666996627f0f13cd036ef0376582c48f6c12b45acb7593d8b0eefd6eba960 WHIRLPOOL fe82cacecfedc05b6d92feac5285bc41100a9538f6cb37027c85ee08e051580243e2635af9d873c67970ecab5e8ee8eee0cee89e50be59895b44862264aa3fdf
 DIST VirtualBoxSDK-4.3.32-103443.zip 11435565 SHA256 84ff42f0e9d8f8945387247e7f57123d37cc2c53035ab1eca5414ca82102613a SHA512 914951d91adfa0d77e29863c7108d2e116a01562d0e0454b1203ae7d6e7e0a224f65a51cbf1e83b8067cb40da65708d2022ab5be35f2905a28f032653c827869 WHIRLPOOL 2e53a6f2d6e6e4f328139b03de8bf09b1a72ca3981addef7a2d02d8dbc02e8ea6c319b16facdcdb1be5d941d7d24b64598990112d3d52ca5e5c9b0a2c4d8e89e
+DIST VirtualBoxSDK-5.0.10-104061.zip 9634423 SHA256 270b9e8eb29ca7490cabe94cb7992c1a91f3bb002d1698d64ab4c787e55e9d80 SHA512 69dbbd49b1bee9ccc23bc5e9b2fd001043687d3993d0ecc285158aeca1282cd18b8308aa340e2d7b18c9c170c55f229df7041408a1e9811d78ba890c0ebc4ed0 WHIRLPOOL 1ea777baff50ba59544e0dde00b9969477b229f6d9db705a5e64d035f9ca532dce3f453e0e59fe7a12976d431e9048d43a7c23f42bdbd58e25b1014e6366abfc
 DIST VirtualBoxSDK-5.0.6-103037.zip 9634988 SHA256 e4df6402b1ddb067f54923d211bd32bc2d6117b91295707be707bb2c8e7e408e SHA512 aee6e59a22c2ec7c99fe22054d7bdd0a5f2ed627c76b530c17fcdbd430343b20ebbbda11bce3c905ff4641d050b75f989f84ed49507ad4dca4c47364b8eda0f7 WHIRLPOOL c4e5f8aac4c0d885f78dfea562375a16157553148480bf441378f15569287fbd28f5a44b2d18ad6e393a1ede9cb907ad750c003ba61346d88279484ad944688a
 DIST VirtualBoxSDK-5.0.8-103449.zip 9635495 SHA256 c79826d184058701d0d2dbd345b7f188cee5dcac4297895f326cc18fc1253e92 SHA512 7161e8366cc9487bcadabc4a9ed9b27df6abdbc7d3fd82b9f824cc3a3054a6840526204b4e0366962a50d54f19f528f90efcb27cd2ddbf7b9e36d27ae7a573de WHIRLPOOL 933b70e5ebf33f3512e8f25312d27ebcbd3b272f9e07e41edad60f7e3fe6dc88f3b5a9d3b00c2e6d23d2ae8ec9c2d7e6f64680678a168e4d67f94bd9d8b15b65

diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-5.0.10.104061.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-5.0.10.104061.ebuild
new file mode 100644
index 0000000..be70505
--- /dev/null
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-5.0.10.104061.ebuild
@@ -0,0 +1,357 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils fdo-mime gnome2 pax-utils python-r1 udev unpacker versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 5)"
+	MY_PV="${MY_PV/beta/BETA}"
+	MY_PV="${MY_PV/rc/RC}"
+else
+	MY_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(get_version_component_range 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 as well as home use"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="amd64? ( http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
+	x86? ( http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
+	http://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? ( http://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? (
+		x11-libs/libXcursor
+		media-libs/libsdl[X]
+		x11-libs/libXrender
+		x11-libs/libXfixes
+		media-libs/libpng
+		x11-libs/libXi
+		x11-libs/libXrandr
+		x11-libs/libXinerama
+		x11-libs/libXft
+		media-libs/freetype
+		media-libs/fontconfig
+		x11-libs/libXext
+		dev-libs/glib
+		chm? ( dev-libs/expat )
+	)
+	x11-libs/libXt
+	dev-libs/libxml2
+	x11-libs/libXau
+	x11-libs/libX11
+	x11-libs/libXmu
+	x11-libs/libSM
+	x11-libs/libICE
+	x11-libs/libXdmcp
+	${PYTHON_DEPS}"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+S=${WORKDIR}
+
+QA_TEXTRELS_amd64="opt/VirtualBox/VBoxVMM.so"
+QA_TEXTRELS_x86="opt/VirtualBox/VBoxGuestPropSvc.so
+	opt/VirtualBox/VBoxSDL.so
+	opt/VirtualBox/VBoxDbg.so
+	opt/VirtualBox/VBoxSharedFolders.so
+	opt/VirtualBox/VBoxDD2.so
+	opt/VirtualBox/VBoxOGLrenderspu.so
+	opt/VirtualBox/VBoxPython.so
+	opt/VirtualBox/VBoxPython2_7.so
+	opt/VirtualBox/VBoxDD.so
+	opt/VirtualBox/VBoxVRDP.so
+	opt/VirtualBox/VBoxDDU.so
+	opt/VirtualBox/VBoxREM64.so
+	opt/VirtualBox/VBoxSharedClipboard.so
+	opt/VirtualBox/VBoxHeadless.so
+	opt/VirtualBox/VBoxRT.so
+	opt/VirtualBox/VRDPAuth.so
+	opt/VirtualBox/VBoxREM.so
+	opt/VirtualBox/VBoxSettings.so
+	opt/VirtualBox/VBoxKeyboard.so
+	opt/VirtualBox/VBoxSharedCrOpenGL.so
+	opt/VirtualBox/VBoxVMM.so
+	opt/VirtualBox/VirtualBox.so
+	opt/VirtualBox/VBoxOGLhosterrorspu.so
+	opt/VirtualBox/components/VBoxC.so
+	opt/VirtualBox/components/VBoxSVCM.so
+	opt/VirtualBox/VBoxREM32.so
+	opt/VirtualBox/VBoxXPCOMC.so
+	opt/VirtualBox/VBoxOGLhostcrutil.so
+	opt/VirtualBox/VBoxNetDHCP.so
+	opt/VirtualBox/VBoxGuestControlSvc.so"
+QA_PRESTRIPPED="opt/VirtualBox/VBoxDD.so
+	opt/VirtualBox/VBoxDD2.so
+	opt/VirtualBox/VBoxDDU.so
+	opt/VirtualBox/VBoxDbg.so
+	opt/VirtualBox/VBoxGuestControlSvc.so
+	opt/VirtualBox/VBoxGuestPropSvc.so
+	opt/VirtualBox/VBoxHeadless
+	opt/VirtualBox/VBoxHeadless.so
+	opt/VirtualBox/VBoxKeyboard.so
+	opt/VirtualBox/VBoxManage
+	opt/VirtualBox/VBoxNetAdpCtl
+	opt/VirtualBox/VBoxNetDHCP
+	opt/VirtualBox/VBoxNetDHCP.so
+	opt/VirtualBox/VBoxOGLhostcrutil.so
+	opt/VirtualBox/VBoxOGLhosterrorspu.so
+	opt/VirtualBox/VBoxOGLrenderspu.so
+	opt/VirtualBox/VBoxPython.so
+	opt/VirtualBox/VBoxPython2_7.so
+	opt/VirtualBox/VBoxREM.so
+	opt/VirtualBox/VBoxREM32.so
+	opt/VirtualBox/VBoxREM64.so
+	opt/VirtualBox/VBoxRT.so
+	opt/VirtualBox/VBoxSDL
+	opt/VirtualBox/VBoxSDL.so
+	opt/VirtualBox/VBoxSVC
+	opt/VirtualBox/VBoxSettings.so
+	opt/VirtualBox/VBoxSharedClipboard.so
+	opt/VirtualBox/VBoxSharedCrOpenGL.so
+	opt/VirtualBox/VBoxSharedFolders.so
+	opt/VirtualBox/VBoxTestOGL
+	opt/VirtualBox/VBoxTunctl
+	opt/VirtualBox/VBoxVMM.so
+	opt/VirtualBox/VBoxVRDP.so
+	opt/VirtualBox/VBoxXPCOM.so
+	opt/VirtualBox/VBoxXPCOMC.so
+	opt/VirtualBox/VBoxXPCOMIPCD
+	opt/VirtualBox/VRDPAuth.so
+	opt/VirtualBox/VirtualBox
+	opt/VirtualBox/VirtualBox.so
+	opt/VirtualBox/accessible/libqtaccessiblewidgets.so
+	opt/VirtualBox/components/VBoxC.so
+	opt/VirtualBox/components/VBoxSVCM.so
+	opt/VirtualBox/components/VBoxXPCOMIPCC.so
+	opt/VirtualBox/kchmviewer
+	opt/VirtualBox/libQtCoreVBox.so.4
+	opt/VirtualBox/libQtGuiVBox.so.4
+	opt/VirtualBox/libQtNetworkVBox.so.4
+	opt/VirtualBox/libQtOpenGLVBox.so.4
+	opt/VirtualBox/vboxwebsrv"
+
+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
+		pushd "${S}"/icons &>/dev/null || die
+		for size in * ; do
+			if [ -f "${size}/virtualbox.png" ] ; then
+				insinto "/usr/share/icons/hicolor/${size}/apps"
+				newins "${size}/virtualbox.png" ${PN}.png
+			fi
+		done
+		dodir /usr/share/pixmaps
+		cp "48x48/virtualbox.png" "${D}/usr/share/pixmaps/${PN}.png" \
+			|| die
+		popd &>/dev/null || die
+
+		newmenu "${FILESDIR}"/${PN}.desktop-2 ${PN}.desktop
+	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.  Where py3 comes is unknown.
+	# The compile phase makes VBoxPython2_[4-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 /opt/VirtualBox/VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so
+	dosym /opt/VirtualBox/VBoxREM.so /opt/VirtualBox/components/VBoxREM.so
+	dosym /opt/VirtualBox/VBoxRT.so /opt/VirtualBox/components/VBoxRT.so
+	dosym /opt/VirtualBox/VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so
+	dosym /opt/VirtualBox/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 "${D}"/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 "${D}"/opt/VirtualBox/${each}
+		done
+
+		dosym /opt/VirtualBox/VBox.sh /opt/bin/VirtualBox
+		dosym /opt/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 "${D}"/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 /opt/VirtualBox/VBox.sh /opt/bin/VBoxManage
+	dosym /opt/VirtualBox/VBox.sh /opt/bin/VBoxVRDP
+	dosym /opt/VirtualBox/VBox.sh /opt/bin/VBoxHeadless
+	dosym /opt/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 "${D}"${udevdir}/rules.d/10-virtualbox.rules || die
+	# move udev scripts into ${udevdir} (bug #372491)
+	mv "${D}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${D}"${udevdir} || die
+	fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+}
+
+pkg_postinst() {
+	fdo-mime_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() {
+	fdo-mime_desktop_database_update
+}

diff --git a/app-emulation/virtualbox-extpack-oracle/Manifest b/app-emulation/virtualbox-extpack-oracle/Manifest
index be9f554..550f8eb 100644
--- a/app-emulation/virtualbox-extpack-oracle/Manifest
+++ b/app-emulation/virtualbox-extpack-oracle/Manifest
@@ -1,5 +1,6 @@
 DIST Oracle_VM_VirtualBox_Extension_Pack-4.3.28-100309.tar.gz 15961939 SHA256 72e101d9dc5eabeb76d1ab5bd6d2f817a11c89adfe8bb72cc5d614a2eef532d1 SHA512 57ad44a99a7abcad195e6ceccc1fe7b494979da65601a52e0be8336bb819812d5cef48a8bc0fe9f74f3a05238e6fd29562ac678d4ef7e0c78587fe81c287a65e WHIRLPOOL fb08189c53841664119bffb4de6a76d6f72fb035f887ed5e948f38faa5be2891e35de0806da02d299e818370285bcddba06eb84bea7db4d3cfa09d92f8042db7
 DIST Oracle_VM_VirtualBox_Extension_Pack-4.3.30-101610.tar.gz 15983777 SHA256 770d49247976f2a0d14a66196dddf864c6b9d185671e2a29cab459fc28f105db SHA512 f5d8275fe3e1ea60e8d15af3b0c7382faab172df39369c8904ff734a5105daed87a48215880b2e286c6735ead341c237d2260e6ee923f513818f85cf0b452def WHIRLPOOL 3b1e29a44413ebc65dc250b2366b1fe75d6ea48fd94b722c8ec9eb7e97e6981470e9201c9840d566953c9c9bdd4a7893f9d525b3fac7150ca24391f696bba9c4
 DIST Oracle_VM_VirtualBox_Extension_Pack-4.3.32-103443.tar.gz 15994576 SHA256 3f041c019985c35974bf034a9f7d941149fcc3e23a6200b47579140405af5f88 SHA512 212c21f6fc0af093e2d409827348d776377164b9c78b6c01dc710d4a63f53fa7ef52a66491d81b96dc64af4747d79ca0d0df55b052cf6b1c8ceb239c32dc1c75 WHIRLPOOL d67b55c409c6e06080010a25a4a64e660dcd0efaadffe2311166bed06c3f494a5f20cff131a42e07e82aba3cab7f53dea101fb3e5fabeecc2bdb0dd4a167c0ce
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.0.10-104061.tar.gz 16918255 SHA256 c846fa26fec8587e57180c85c408cad377c48ad26830b0dc839ebf9025e3d29c SHA512 ae6bab29c14b1ace849ebf5715360fc0921950c62345e18709347f44c07f88727bf1785d53437e39d67f8c56d92cef1f6e3d03c3f7d6dd76c6d4d9ee7f1f1d5b WHIRLPOOL 822c3c9b20f9171b3e9d1896c2ff648ead049d63e45b8353da5d37e7f874433878fedcfb2f10ae5f50e4860466560a37b6102e8ffb3e9625106ce5188f491726
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.0.6-103037.tar.gz 16874845 SHA256 4eed4f3d253bffe4ce61ee9431d79cbe1f897b3583efc2ff3746f453450787b5 SHA512 fb3fb06e88cc5bded6246375727df2deebb6c0dbb889b8516e0bab0af0c05ef3e1baa8c1eb94d34af2e63600bc36814eab8d8f25abb0fd1ad982ea242f456468 WHIRLPOOL 51ddd27d61e214cb41c5d8c50b0d5d01f885f4ae9facabd3cece500fd41b2a72d42b6ad766aa52e9c315c6fca2dca0f07a1a6b1fa0dc2b87f2cd3c4bf1e54aaa
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.0.8-103449.tar.gz 16880584 SHA256 febd2c99909cb932a98c2b9f73ce8eb03fc183c8c8f2fc874985cf3d598f6b94 SHA512 6a29aa1c52b460bded6e342cc66bb28d93f7f4c71eb108854dd2ba6934ae399e6ee7bd8acd29dda934f2933eb05b2e3878568fee76e5eb55ae43a695123568df WHIRLPOOL d6865e702c787c441da30a49e5aaff818a7530f2a82313c326a509cb3bb98f7cf22d511e3265b99a14402b2b9a7c4614d40ed570e6a6ba5522f4752248e2f338

diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.0.10.104061.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.0.10.104061.ebuild
new file mode 100644
index 0000000..19d40ce
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.0.10.104061.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 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="$(get_version_component_range 4)"
+MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
+MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
+
+DESCRIPTION="PUEL extensions for VirtualBox"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="http://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/$(get_libdir)/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 b9b1872..ad0e206 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -1,5 +1,6 @@
 DIST VirtualBox-4.3.28.tar.bz2 100092002 SHA256 e157ab76d1958ae2c56b2a3875194fbff3de82486ad0e30032fd5bd772297c31 SHA512 b6e849a1420515b6dbda8cee0ab64940dd93296ec58cde76676ac257ff3dad0459aa1fd0bda7e1d0abc751d2d59f055465b198a546fdbb4e70e934a78654a8fc WHIRLPOOL 1b739f1f989032e07829a23ffadadd49e31109d70b0effbc44126a48a165218ff3ebafa576fa0e4f2af76a404033b60e5c9804ac43db5dd3024f1eca25ca70da
 DIST VirtualBox-4.3.30.tar.bz2 97428942 SHA256 ea9569ec16cd6202ee61bcadb2506d31ac12fd343adb91565773a05eaaea9a36 SHA512 d0817335cf4bd196da93b91ede6bc9e48ca0d471166ab2790dbf508a4574e4ace54a86053932abf3b4e804c583e80a713d2ab2e556dc15bee6ef3a62f88b95fc WHIRLPOOL 47cbd702e83cc737e04b5862cc6c52e32be244dc1dc0145f582f57b2f19bb898f0f4b200576a28f10a3290691f1ffd43c256e8c8eb5545a9723be8eefca88a38
 DIST VirtualBox-4.3.32.tar.bz2 98168101 SHA256 dc5bf4e6f9989792d31bac174d20d7fc9e638654fa5a99c02b20a60557927261 SHA512 856b36cd90647cdceb7e182d066e9e1489d2bae0b71ce8b2f6324cd2d9854806eaea0fe0aad2d4e8b84bd836c688e13258ae69e094320572729b7d886c8d35f0 WHIRLPOOL 441041947dcd190d73a9cc5007bc0001b6eeb36ba958f4a09fca775670faff690423095d334e258fc0d6dcbef01d74a085505c8549397ced5dbe75ca96724144
+DIST VirtualBox-5.0.10.tar.bz2 110904399 SHA256 56eafae439b91ea3c3748f2128b2969ba76983acf821acaa08e043c129b45a89 SHA512 8836e5b57ed46b57b12a9fdb6a632e895c3106dad58c3ab3e28f9178ce69499c493a935b6df8b872dc4677c12eb826a46113bdb902e4fb3d2f8ee6d768e53930 WHIRLPOOL 05516c1d9a3cd876a67a73b86df47ec7d1ef08ed921cb3e25ef483676413982ac8a7ce6562f3003240d862a33759aee5e6c94a303a2a35b66025d72cb15d4404
 DIST VirtualBox-5.0.6.tar.bz2 109863328 SHA256 22d63f28c43165a31dcccdec1c65f376f46d7e09555c47611cfaafb5576a5843 SHA512 3e51c9476c29a3ba79adda2d3b0c0b516459f58c8aa5e7b795be1aa2468b8e61241bbe5615787d7302a5f95230a446377bd8698f801c2114b26a471ae8bbbc11 WHIRLPOOL 11603c9aa14acac87032b5d8fc1f8d0a567632ca591230e0cc5c1d9a1ae9b39ebccb1a3bb85e1845abc01b04da550a2ef889e1bf91da0bb82df1fafa384f88b4
 DIST VirtualBox-5.0.8.tar.bz2 110540476 SHA256 e043518b7ab150e478c00b622360a5feb95f4e5b19e72bfcc71174356e2dacb3 SHA512 2a8e0f3e5fbb4b45786aa48cb408cf712cd968af65b25219eb39d54274612978704359b620179d751e828783950eb29d4cf330ac408a84dd65edbd0d98e25aa4 WHIRLPOOL 2b054cdb5c7c39008e876f0703e154509f4a79183aa85c4998717ae07a72e015a71bd22dc0427c8a464b3e16db92ebe9d731971f9788fbe56c8cc936669496fe

diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.0.10.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.0.10.ebuild
new file mode 100644
index 0000000..a1d8560
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.0.10.ebuild
@@ -0,0 +1,212 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils 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="http://www.virtualbox.org/"
+SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+RDEPEND="X? ( ~x11-drivers/xf86-video-virtualbox-${PV}
+		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
+		x11-proto/glproto )
+	sys-apps/dbus
+	!!x11-drivers/xf86-input-virtualbox"
+DEPEND="${RDEPEND}
+	>=dev-util/kbuild-0.1.9998_pre20131130
+	>=dev-lang/yasm-0.6.2
+	sys-devel/bin86
+	sys-libs/pam
+	sys-power/iasl
+	X? ( x11-proto/renderproto )
+	!X? ( x11-proto/xproto )"
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest)
+		vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+	linux-mod_pkg_setup
+	BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}"
+	enewgroup vboxguest
+	enewuser vboxguest -1 /bin/sh /dev/null vboxguest
+	# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+	enewgroup vboxsf
+}
+
+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 "${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
+	epatch "${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...
+	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
+}
+
+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"' \
+		>> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+		|| die
+	echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+		>> "${D}/${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_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 b2103ec..8316415 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,5 +1,6 @@
 DIST vbox-kernel-module-src-4.3.28.tar.xz 539876 SHA256 fb052997ec4992b0ee102475051b5d7bd8485e17405c6b3dcc94e1fa4a53b761 SHA512 637149f8595cb023e75116f83237bb4cef1b05627f58d475fa952ac86a85aa3cbab5f0cec723d730979f831999c920f35248e5f8db8f6987fb4c15c4a29bd517 WHIRLPOOL ab1ed07ee148a1ef352c0fda3f09865405be4146b987a5dffcb753d7512a00aa88c2ba1f7184b56d694c88320b350c6ececd3bec5636dd1586fc14a6be8a874d
 DIST vbox-kernel-module-src-4.3.30.tar.xz 540712 SHA256 28d89c06a4db190ec690980d68552745fb87ee2e23a3fe53edb29edda889f9d8 SHA512 8536d4bd105edf0fc112488232f7c85d8606b28b6cbeb28ee56bc135f693d1059328e75023299a67033bc1d486aea6a81c0fb23d51af500968119aa2f05156dc WHIRLPOOL 17452456aa127ca4ba53b2883f43970980f26094b80feaaa49b4773c386834d59f67afe21649539edc6dabde8725fd49c968002df9f2eb0e1ea8e888a2f8089b
 DIST vbox-kernel-module-src-4.3.32.tar.xz 546132 SHA256 4f0cf8a2d0f6714a5825551fa6ad38b85a70aac3a9949771bdcd85916ed12dae SHA512 7289dc1dd3a7e8812a57d3d1411c99ac25ddb33991e06e49a6212b030c6b6c2f08075c471f474c539b26be8a221934261af8f67a1aa4572f2e9cdb7433623a57 WHIRLPOOL 771c655bb5a7179d798330e438a3799d79cd1711844e491badaf7b6e0cb25fe2017a753675b0700b6ee2d8251bcc603f84a703cbe73b5bfcb46859b781d7c2d9
+DIST vbox-kernel-module-src-5.0.10.tar.xz 592612 SHA256 d62362fe55291e94dfde20461549a4898fa782869e0cf88301cc3c09e6638f30 SHA512 e9a6166912f0550dde2fc2d62a104480ed179c3121c43ca66e4ee17ade51c71b3d9bfb2fc00a9af318a8fe0b2115f650023a80612d3f279d2b3b33a767664bbb WHIRLPOOL 4889f17ca4b33a12bc1d99e9ac5418834003957d8590ffcad9875ba5172edb26055c74c3d0daf0dba2c7b0c60faf3eb1ac92c94c63b74abe7965a46ef080d972
 DIST vbox-kernel-module-src-5.0.6.tar.xz 593640 SHA256 57b6ea7e772dbe032d8a024e48ad572c76dc4165ce2fb99cd45317c97466912f SHA512 88f1c61a6e749ba7076a3727baadf8ff7e0c3a70c279c6261757c7b8f0b3debd70a8cca21aea9e8b3a67feb0044c4e29439a075ccca3aaec0c0220f5a9264ac9 WHIRLPOOL c01fc142d650ef402601f457d83aeb3911200f3b7d5fbc4004c1da80832a911be01903f65ea92de592ff7e1f10688f77106a100d5fec8887767c8e8a7eb92a0d
 DIST vbox-kernel-module-src-5.0.8.tar.xz 594164 SHA256 16513e3bec113e6e594a58ff0999ba70de4214c889dafed90ca181a6a603457d SHA512 91faf0054cd359a7455c1933dea3a37829f092eb966d8d2c6855061d3ecadfa1ea91a2258479f5696f373577f7aef1939bdd5808f9ca336e15f5476f4f6d464e WHIRLPOOL 837578475126fe8484e89140248971ce89e637a629a26b1324dc0b8b22d65fe351a1860d5c009223723a9d420d1a6f859c12c17ade510451177a6213f1905328

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.0.10.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.0.10.ebuild
new file mode 100644
index 0000000..4bf9415
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.0.10.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+#      package that comes from virtualbox-bin
+
+EAPI=5
+
+inherit eutils linux-mod user
+
+MY_P=vbox-kernel-module-src-${PV}
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="http://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() {
+	linux-mod_pkg_setup
+
+	BUILD_PARAMS="KERN_DIR=${KV_DIR} KERNOUT=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
+	enewgroup vboxusers
+}
+
+src_prepare() {
+	if kernel_is -ge 2 6 33 ; then
+		# evil patch for new kernels - header moved
+		grep -lR linux/autoconf.h *  | xargs sed -i -e 's:<linux/autoconf.h>:<generated/autoconf.h>:'
+	fi
+
+	if use pax_kernel && kernel_is -ge 3 0 0 ; then
+		epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
+	fi
+}
+
+src_install() {
+	linux-mod_src_install
+	insinto /usr/lib/modules-load.d/
+	doins "${FILESDIR}"/virtualbox.conf
+}
+
+pkg_postinst() {
+	linux-mod_pkg_postinst
+	elog "If you are using sys-apps/openrc, please add \"vboxdrv\", \"vboxnetflt\""
+	elog "and \"vboxnetadp\" to:"
+	elog "  /etc/conf.d/modules"
+}

diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index ce14662..3f1d873 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,6 +1,7 @@
 DIST VirtualBox-4.3.28.tar.bz2 100092002 SHA256 e157ab76d1958ae2c56b2a3875194fbff3de82486ad0e30032fd5bd772297c31 SHA512 b6e849a1420515b6dbda8cee0ab64940dd93296ec58cde76676ac257ff3dad0459aa1fd0bda7e1d0abc751d2d59f055465b198a546fdbb4e70e934a78654a8fc WHIRLPOOL 1b739f1f989032e07829a23ffadadd49e31109d70b0effbc44126a48a165218ff3ebafa576fa0e4f2af76a404033b60e5c9804ac43db5dd3024f1eca25ca70da
 DIST VirtualBox-4.3.30.tar.bz2 97428942 SHA256 ea9569ec16cd6202ee61bcadb2506d31ac12fd343adb91565773a05eaaea9a36 SHA512 d0817335cf4bd196da93b91ede6bc9e48ca0d471166ab2790dbf508a4574e4ace54a86053932abf3b4e804c583e80a713d2ab2e556dc15bee6ef3a62f88b95fc WHIRLPOOL 47cbd702e83cc737e04b5862cc6c52e32be244dc1dc0145f582f57b2f19bb898f0f4b200576a28f10a3290691f1ffd43c256e8c8eb5545a9723be8eefca88a38
 DIST VirtualBox-4.3.32.tar.bz2 98168101 SHA256 dc5bf4e6f9989792d31bac174d20d7fc9e638654fa5a99c02b20a60557927261 SHA512 856b36cd90647cdceb7e182d066e9e1489d2bae0b71ce8b2f6324cd2d9854806eaea0fe0aad2d4e8b84bd836c688e13258ae69e094320572729b7d886c8d35f0 WHIRLPOOL 441041947dcd190d73a9cc5007bc0001b6eeb36ba958f4a09fca775670faff690423095d334e258fc0d6dcbef01d74a085505c8549397ced5dbe75ca96724144
+DIST VirtualBox-5.0.10.tar.bz2 110904399 SHA256 56eafae439b91ea3c3748f2128b2969ba76983acf821acaa08e043c129b45a89 SHA512 8836e5b57ed46b57b12a9fdb6a632e895c3106dad58c3ab3e28f9178ce69499c493a935b6df8b872dc4677c12eb826a46113bdb902e4fb3d2f8ee6d768e53930 WHIRLPOOL 05516c1d9a3cd876a67a73b86df47ec7d1ef08ed921cb3e25ef483676413982ac8a7ce6562f3003240d862a33759aee5e6c94a303a2a35b66025d72cb15d4404
 DIST VirtualBox-5.0.6.tar.bz2 109863328 SHA256 22d63f28c43165a31dcccdec1c65f376f46d7e09555c47611cfaafb5576a5843 SHA512 3e51c9476c29a3ba79adda2d3b0c0b516459f58c8aa5e7b795be1aa2468b8e61241bbe5615787d7302a5f95230a446377bd8698f801c2114b26a471ae8bbbc11 WHIRLPOOL 11603c9aa14acac87032b5d8fc1f8d0a567632ca591230e0cc5c1d9a1ae9b39ebccb1a3bb85e1845abc01b04da550a2ef889e1bf91da0bb82df1fafa384f88b4
 DIST VirtualBox-5.0.8.tar.bz2 110540476 SHA256 e043518b7ab150e478c00b622360a5feb95f4e5b19e72bfcc71174356e2dacb3 SHA512 2a8e0f3e5fbb4b45786aa48cb408cf712cd968af65b25219eb39d54274612978704359b620179d751e828783950eb29d4cf330ac408a84dd65edbd0d98e25aa4 WHIRLPOOL 2b054cdb5c7c39008e876f0703e154509f4a79183aa85c4998717ae07a72e015a71bd22dc0427c8a464b3e16db92ebe9d731971f9788fbe56c8cc936669496fe
 DIST virtualbox-4.3.16-patches-01.tar.xz 4288 SHA256 270c4f01b2c13c4133987b3acc073dfbf78840212cf09f083dbf8fc80407ce6f SHA512 595f88c4b388b4807347c15c1750ec73aceba1c82ad993e9a05c7b78dfece7b679aff0338b3a48e2ccee7911fb5ed0dba803052332a270230078551f747052bc WHIRLPOOL 2157ee3fb9beed906cff28647c869e37d62551ad8c93801c0f0ec6893675f11786aa6d92acf11c348d30aa58b6e03a3faa879c664dddac6e5b8525035986c9ca

diff --git a/app-emulation/virtualbox/virtualbox-5.0.10.ebuild b/app-emulation/virtualbox/virtualbox-5.0.10.ebuild
new file mode 100644
index 0000000..a3e23f6
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-5.0.10.ebuild
@@ -0,0 +1,423 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils fdo-mime flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 qt4-r2 toolchain-funcs udev
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+	https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.0.2-patches-01.tar.xz"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise as well as home use"
+HOMEPAGE="http://www.virtualbox.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa doc headless java libressl pam pulseaudio +opengl python +qt4 +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
+	!libressl? ( dev-libs/openssl:0= )
+	libressl? ( dev-libs/libressl:= )
+	dev-libs/libxml2
+	media-libs/libpng:0=
+	media-libs/libvpx
+	sys-libs/zlib
+	!headless? (
+		qt4? (
+			dev-qt/qtgui:4
+			dev-qt/qtcore:4
+			opengl? ( dev-qt/qtopengl:4 )
+			x11-libs/libXinerama
+		)
+		opengl? ( virtual/opengl media-libs/freeglut )
+		x11-libs/libX11
+		x11-libs/libXcursor
+		x11-libs/libXext
+		x11-libs/libXmu
+		x11-libs/libXt
+		media-libs/libsdl:0[X,video]
+	)
+
+	java? ( >=virtual/jre-1.6:= )
+	udev? ( >=virtual/udev-171 )
+	vnc? ( >=net-libs/libvncserver-0.9.9 )"
+DEPEND="${RDEPEND}
+	>=dev-util/kbuild-0.1.9998_pre20131130
+	>=dev-lang/yasm-0.6.2
+	sys-devel/bin86
+	sys-power/iasl
+	pam? ( sys-libs/pam )
+	sys-libs/libcap
+	doc? (
+		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/jre-1.6:= )
+	virtual/pkgconfig
+	alsa? ( >=media-libs/alsa-lib-1.0.13 )
+	!headless? ( x11-libs/libXinerama )
+	pulseaudio? ( media-sound/pulseaudio )
+	vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
+	${PYTHON_DEPS}"
+
+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_4.so
+	usr/lib/virtualbox/VBoxPython2_5.so
+	usr/lib/virtualbox/VBoxPython2_6.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"
+
+REQUIRED_USE="
+	java? ( sdk )
+	python? (
+		( sdk )
+	)
+	vboxwebsrv? ( java )
+	${PYTHON_REQUIRED_USE}
+"
+
+pkg_setup() {
+	if ! use headless && ! use qt4 ; then
+		einfo "No USE=\"qt4\" selected, this build will not include"
+		einfo "any Qt frontend."
+	elif use headless && use qt4 ; then
+		einfo "You selected USE=\"headless qt4\", 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
+}
+
+src_prepare() {
+	# Remove shipped binaries (kBuild,yasm), see bug #232775
+	rm -rf kBuild/bin tools
+
+	# 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
+
+	# 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
+
+	if ! gcc-specs-pie ; then
+		EPATCH_EXCLUDE="050_${PN}-5.0.2-nopie.patch"
+	fi
+
+	EPATCH_EXCLUDE="007_virtualbox-4.3.16-gsoap2813.patch" \
+	EPATCH_SUFFIX="patch" \
+	EPATCH_FORCE="yes" \
+	epatch "${WORKDIR}/patches"
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf
+	use alsa       || myconf+=" --disable-alsa"
+	use doc        || myconf+=" --disable-docs"
+	use java       || myconf+=" --disable-java"
+	use opengl     || myconf+=" --disable-opengl"
+	use pulseaudio || myconf+=" --disable-pulse"
+	use python     || myconf+=" --disable-python"
+	use vboxwebsrv && myconf+=" --enable-webservice"
+	use vnc        && myconf+=" --enable-vnc"
+	if ! use headless ; then
+		use qt4 || myconf+=" --disable-qt4"
+	else
+		myconf+=" --build-headless --disable-opengl"
+	fi
+	if use amd64 && ! has_multilib_profile ; then
+		myconf+=" --disable-vmmraw"
+	fi
+	# not an autoconf script
+	./configure \
+		--with-gcc="$(tc-getCC)" \
+		--with-g++="$(tc-getCXX)" \
+		--disable-kmods \
+		--disable-dbus \
+		--disable-devmapper \
+		${myconf} \
+		|| die "configure failed"
+}
+
+src_compile() {
+	source ./env.sh
+
+	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+	# and strip all flags
+	# strip-flags
+
+	MAKEJOBS=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+')
+	MAKELOAD=$(echo ${MAKEOPTS} | egrep -o '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+')
+	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() {
+	cd "${S}"/out/linux.${ARCH}/release/bin || die
+
+	# Create configuration files
+	insinto /etc/vbox
+	newins "${FILESDIR}/${PN}-4-config" vbox.cfg
+
+	# Set the right libdir
+	sed -i \
+		-e "s@MY_LIBDIR@$(get_libdir)@" \
+		"${D}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+	# Symlink binaries to the shipped wrapper
+	exeinto /usr/$(get_libdir)/${PN}
+	newexe "${FILESDIR}/${PN}-ose-3-wrapper" "VBox"
+	fowners root:vboxusers /usr/$(get_libdir)/${PN}/VBox
+	fperms 0750 /usr/$(get_libdir)/${PN}/VBox
+
+	dosym /usr/$(get_libdir)/${PN}/VBox /usr/bin/VBoxManage
+	dosym /usr/$(get_libdir)/${PN}/VBox /usr/bin/VBoxVRDP
+	dosym /usr/$(get_libdir)/${PN}/VBox /usr/bin/VBoxHeadless
+	dosym /usr/$(get_libdir)/${PN}/VBoxTunctl /usr/bin/VBoxTunctl
+
+	# Install binaries and libraries
+	insinto /usr/$(get_libdir)/${PN}
+	doins -r components
+
+	if use sdk ; then
+		doins -r sdk
+	fi
+
+	if use vboxwebsrv ; then
+		doins vboxwebsrv
+		fowners root:vboxusers /usr/$(get_libdir)/${PN}/vboxwebsrv
+		fperms 0750 /usr/$(get_libdir)/${PN}/vboxwebsrv
+		dosym /usr/$(get_libdir)/${PN}/VBox /usr/bin/vboxwebsrv
+		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+	fi
+
+	local rcfiles="*.rc"
+	if use amd64 && ! has_multilib_profile ; then
+		rcfiles=""
+	fi
+
+	for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,ExtPackHelperApp} *so *r0 ${rcfiles} ; do
+		doins ${each}
+		fowners root:vboxusers /usr/$(get_libdir)/${PN}/${each}
+		fperms 0750 /usr/$(get_libdir)/${PN}/${each}
+	done
+
+	# VBoxNetAdpCtl and VBoxNetDHCP binaries need to be suid root in any case..
+	for each in VBoxNet{AdpCtl,DHCP,NAT} ; do
+		doins ${each}
+		fowners root:vboxusers /usr/$(get_libdir)/${PN}/${each}
+		fperms 4750 /usr/$(get_libdir)/${PN}/${each}
+	done
+
+	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+	# VBoxXPCOMIPCD (bug #524202)
+	for each in VBox{Manage,SVC,XPCOMIPCD} ; do
+		pax-mark -m "${D}"/usr/$(get_libdir)/${PN}/${each}
+	done
+
+	if ! use headless ; then
+		doins VBoxSDL
+		fowners root:vboxusers /usr/$(get_libdir)/${PN}/VBoxSDL
+		fperms 4750 /usr/$(get_libdir)/${PN}/VBoxSDL
+		pax-mark -m "${D}"/usr/$(get_libdir)/${PN}/VBoxSDL
+
+		if use opengl && use qt4 ; then
+			doins VBoxTestOGL
+			fowners root:vboxusers /usr/$(get_libdir)/${PN}/VBoxTestOGL
+			fperms 0750 /usr/$(get_libdir)/${PN}/VBoxTestOGL
+			pax-mark -m "${D}"/usr/$(get_libdir)/${PN}/VBoxTestOGL
+		fi
+
+		dosym /usr/$(get_libdir)/${PN}/VBox /usr/bin/VBoxSDL
+
+		if use qt4 ; then
+			doins VirtualBox
+			fowners root:vboxusers /usr/$(get_libdir)/${PN}/VirtualBox
+			fperms 4750 /usr/$(get_libdir)/${PN}/VirtualBox
+			pax-mark -m "${D}"/usr/$(get_libdir)/${PN}/VirtualBox
+
+			dosym /usr/$(get_libdir)/${PN}/VBox /usr/bin/VirtualBox
+
+			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
+	fi
+
+	doins VBoxHeadless
+	fowners root:vboxusers /usr/$(get_libdir)/${PN}/VBoxHeadless
+	fperms 4750 /usr/$(get_libdir)/${PN}/VBoxHeadless
+	pax-mark -m "${D}"/usr/$(get_libdir)/${PN}/VBoxHeadless
+
+	insinto /usr/$(get_libdir)/${PN}
+	# Install EFI Firmware files (bug #320757)
+	pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die
+	for fwfile in VBoxEFI{32,64}.fd ; do
+		doins ${fwfile}
+		fowners root:vboxusers /usr/$(get_libdir)/${PN}/${fwfile}
+	done
+	popd &>/dev/null || die
+
+	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
+		doins "${FILESDIR}"/10-virtualbox.rules
+		sed "s@%UDEVDIR%@${udevdir}@" \
+			-i "${D}"${udevdir}/rules.d/10-virtualbox.rules || die
+	fi
+
+	insinto /usr/share/${PN}
+	if ! use headless && use qt4 ; then
+		doins -r nls
+	fi
+
+	# VRDPAuth only works with this (bug #351949)
+	dosym VBoxAuth.so  /usr/$(get_libdir)/${PN}/VRDPAuth.so
+
+	# set an env-variable for 3rd party tools
+	echo -n "VBOX_APP_HOME=/usr/$(get_libdir)/${PN}" > "${T}/90virtualbox"
+	doenvd "${T}/90virtualbox"
+
+	if use java ; then
+		java-pkg_regjar "${D}/usr/$(get_libdir)/${PN}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+		java-pkg_regso "${D}/usr/$(get_libdir)/${PN}/libvboxjxpcom.so"
+	fi
+}
+
+pkg_postinst() {
+	fdo-mime_desktop_database_update
+
+	if use udev ; then
+		udevadm control --reload-rules \
+			&& udevadm trigger --subsystem-match=usb
+	fi
+
+	if ! use headless && use qt4 ; 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 "IMPORTANT!"
+	elog "If you upgrade from app-emulation/virtualbox-ose make sure to run"
+	elog "\"env-update\" as root and logout and relogin as the user you wish"
+	elog "to run ${PN} as."
+	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() {
+	fdo-mime_desktop_database_update
+}

diff --git a/x11-drivers/xf86-video-virtualbox/Manifest b/x11-drivers/xf86-video-virtualbox/Manifest
index b9b1872..ad0e206 100644
--- a/x11-drivers/xf86-video-virtualbox/Manifest
+++ b/x11-drivers/xf86-video-virtualbox/Manifest
@@ -1,5 +1,6 @@
 DIST VirtualBox-4.3.28.tar.bz2 100092002 SHA256 e157ab76d1958ae2c56b2a3875194fbff3de82486ad0e30032fd5bd772297c31 SHA512 b6e849a1420515b6dbda8cee0ab64940dd93296ec58cde76676ac257ff3dad0459aa1fd0bda7e1d0abc751d2d59f055465b198a546fdbb4e70e934a78654a8fc WHIRLPOOL 1b739f1f989032e07829a23ffadadd49e31109d70b0effbc44126a48a165218ff3ebafa576fa0e4f2af76a404033b60e5c9804ac43db5dd3024f1eca25ca70da
 DIST VirtualBox-4.3.30.tar.bz2 97428942 SHA256 ea9569ec16cd6202ee61bcadb2506d31ac12fd343adb91565773a05eaaea9a36 SHA512 d0817335cf4bd196da93b91ede6bc9e48ca0d471166ab2790dbf508a4574e4ace54a86053932abf3b4e804c583e80a713d2ab2e556dc15bee6ef3a62f88b95fc WHIRLPOOL 47cbd702e83cc737e04b5862cc6c52e32be244dc1dc0145f582f57b2f19bb898f0f4b200576a28f10a3290691f1ffd43c256e8c8eb5545a9723be8eefca88a38
 DIST VirtualBox-4.3.32.tar.bz2 98168101 SHA256 dc5bf4e6f9989792d31bac174d20d7fc9e638654fa5a99c02b20a60557927261 SHA512 856b36cd90647cdceb7e182d066e9e1489d2bae0b71ce8b2f6324cd2d9854806eaea0fe0aad2d4e8b84bd836c688e13258ae69e094320572729b7d886c8d35f0 WHIRLPOOL 441041947dcd190d73a9cc5007bc0001b6eeb36ba958f4a09fca775670faff690423095d334e258fc0d6dcbef01d74a085505c8549397ced5dbe75ca96724144
+DIST VirtualBox-5.0.10.tar.bz2 110904399 SHA256 56eafae439b91ea3c3748f2128b2969ba76983acf821acaa08e043c129b45a89 SHA512 8836e5b57ed46b57b12a9fdb6a632e895c3106dad58c3ab3e28f9178ce69499c493a935b6df8b872dc4677c12eb826a46113bdb902e4fb3d2f8ee6d768e53930 WHIRLPOOL 05516c1d9a3cd876a67a73b86df47ec7d1ef08ed921cb3e25ef483676413982ac8a7ce6562f3003240d862a33759aee5e6c94a303a2a35b66025d72cb15d4404
 DIST VirtualBox-5.0.6.tar.bz2 109863328 SHA256 22d63f28c43165a31dcccdec1c65f376f46d7e09555c47611cfaafb5576a5843 SHA512 3e51c9476c29a3ba79adda2d3b0c0b516459f58c8aa5e7b795be1aa2468b8e61241bbe5615787d7302a5f95230a446377bd8698f801c2114b26a471ae8bbbc11 WHIRLPOOL 11603c9aa14acac87032b5d8fc1f8d0a567632ca591230e0cc5c1d9a1ae9b39ebccb1a3bb85e1845abc01b04da550a2ef889e1bf91da0bb82df1fafa384f88b4
 DIST VirtualBox-5.0.8.tar.bz2 110540476 SHA256 e043518b7ab150e478c00b622360a5feb95f4e5b19e72bfcc71174356e2dacb3 SHA512 2a8e0f3e5fbb4b45786aa48cb408cf712cd968af65b25219eb39d54274612978704359b620179d751e828783950eb29d4cf330ac408a84dd65edbd0d98e25aa4 WHIRLPOOL 2b054cdb5c7c39008e876f0703e154509f4a79183aa85c4998717ae07a72e015a71bd22dc0427c8a464b3e16db92ebe9d731971f9788fbe56c8cc936669496fe

diff --git a/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.10.ebuild b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.10.ebuild
new file mode 100644
index 0000000..1fad4cc
--- /dev/null
+++ b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.10.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils linux-mod multilib python-single-r1 versionator toolchain-funcs
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+DESCRIPTION="VirtualBox video driver"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dri"
+
+RDEPEND=">=x11-base/xorg-server-1.7:=[-minimal]
+	x11-libs/libXcomposite"
+DEPEND="${RDEPEND}
+	>=dev-util/kbuild-0.1.9998_pre20131130
+	${PYTHON_DEPS}
+	>=dev-lang/yasm-0.6.2
+	>=sys-devel/gcc-4.9.0
+	sys-power/iasl
+	x11-proto/fontsproto
+	x11-proto/randrproto
+	x11-proto/renderproto
+	x11-proto/resourceproto
+	x11-proto/scrnsaverproto
+	x11-proto/xextproto
+	x11-proto/xineramaproto
+	x11-proto/xproto
+	x11-libs/libXdmcp
+	x11-libs/libXau
+	x11-libs/libX11
+	x11-libs/libXfixes
+	x11-libs/libXext
+	dri? (  x11-proto/xf86driproto
+		>=x11-libs/libdrm-2.4.5 )"
+
+REQUIRED_USE=( "${PYTHON_REQUIRED_USE}" )
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxvideo(misc:${WORKDIR}/vboxvideo_drm:${WORKDIR}/vboxvideo_drm)"
+
+S="${WORKDIR}/${MY_P}"
+
+QA_TEXTRELS_x86="usr/lib/VBoxOGL.so"
+
+pkg_setup() {
+	if [ "${MERGE_TYPE}" != "binary" ]; then
+		version_is_at_least 4.9 $(gcc-version) || die "Please set gcc 4.9 or higher as active in gcc-config to build ${PN}"
+	fi
+
+	linux-mod_pkg_setup
+	BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}"
+
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	# Prepare the vboxvideo_drm sources and Makefile in ${WORKDIR}
+	cp -a "${S}"/src/VBox/Additions/linux/drm "${WORKDIR}/vboxvideo_drm" \
+		|| die "cannot copy vboxvideo_drm directory"
+	cp "${FILESDIR}/${PN}-3-vboxvideo_drm.makefile" \
+		"${WORKDIR}/vboxvideo_drm/Makefile" \
+			|| die "cannot copy vboxvideo_drm Makefile"
+
+	# stupid new header references...
+	for vboxheader in {product,version}-generated.h ; do
+		ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
+			"${WORKDIR}/vboxvideo_drm/${vboxheader}"
+	done
+
+	# Remove shipped binaries (kBuild,yasm), see bug #232775
+	rm -rf kBuild/bin tools
+
+	# Disable things unused or splitted into separate ebuilds
+	cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+
+	# Ugly hack to build the opengl part of the video driver
+	epatch "${FILESDIR}/${PN}-2.2.0-enable-opengl.patch"
+
+	# unset useless/problematic checks in configure
+	epatch "${FILESDIR}/${PN}-5.0.0_beta3-configure_checks.patch"
+
+	# link with lazy on hardened #394757
+	sed -i '/^TEMPLATE_VBOXR3EXE_LDFLAGS.linux/s/$/ -Wl,-z,lazy/' Config.kmk || die
+}
+
+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() {
+	for each in /src/VBox/{Runtime,Additions/common/VBoxGuestLib} \
+		/src/VBox/{GuestHost/OpenGL,Additions/x11/x11stubs,Additions/common/crOpenGL} \
+		/src/VBox/Additions/x11/vboxvideo ; do
+			cd "${S}"${each} || die
+			MAKE="kmk" \
+			emake TOOL_YASM_AS=yasm \
+			VBOX_USE_SYSTEM_XORG_HEADERS=1 \
+			KBUILD_PATH="${S}/kBuild" \
+			KBUILD_VERBOSE=2
+	done
+
+	if use dri ; then
+		# 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
+	fi
+}
+
+src_install() {
+	if use dri; then
+		linux-mod_src_install
+	fi
+
+	cd "${S}/out/linux.${ARCH}/release/bin/additions"
+	insinto /usr/$(get_libdir)/xorg/modules/drivers
+	newins vboxvideo_drv_system.so vboxvideo_drv.so
+
+	# Guest OpenGL driver
+	insinto /usr/$(get_libdir)
+	doins -r VBoxOGL*
+
+	if use dri ; then
+		dosym /usr/$(get_libdir)/VBoxOGL.so \
+			/usr/$(get_libdir)/dri/vboxvideo_dri.so
+	fi
+}
+
+pkg_postinst() {
+	elog "You need to edit the file /etc/X11/xorg.conf and set:"
+	elog ""
+	elog "  Driver  \"vboxvideo\""
+	elog ""
+	elog "in the Graphics device section (Section \"Device\")"
+	elog ""
+	if use dri; then
+		elog "To use the kernel drm video driver, please add:"
+		elog "\"vboxvideo\" to:"
+		if has_version sys-apps/openrc ; then
+			elog "/etc/conf.d/modules"
+		else
+			elog "/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}"
+		fi
+		elog ""
+	fi
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-guest-additions/, app-emulation/virtualbox-additions/, ...
@ 2017-12-19  0:37 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2017-12-19  0:37 UTC (permalink / raw
  To: gentoo-commits

commit:     9bf438961a97011568542025170bf7ff2154cf42
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 19 00:34:26 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Dec 19 00:36:57 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bf43896

virtualbox packages: Bump to version 5.2.2

Closes: https://bugs.gentoo.org/635542
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-emulation/virtualbox-additions/Manifest        |   1 +
 .../virtualbox-additions-5.2.2.ebuild              |  35 ++
 app-emulation/virtualbox-bin/Manifest              |   4 +
 .../virtualbox-bin-5.2.2.119230.ebuild             | 287 +++++++++++++
 app-emulation/virtualbox-extpack-oracle/Manifest   |   1 +
 .../virtualbox-extpack-oracle-5.2.2.119230.ebuild  |  42 ++
 app-emulation/virtualbox-guest-additions/Manifest  |   1 +
 .../virtualbox-guest-additions-5.2.2.ebuild        | 228 ++++++++++
 app-emulation/virtualbox-modules/Manifest          |   1 +
 .../virtualbox-modules-5.2.2.ebuild                |  60 +++
 app-emulation/virtualbox/Manifest                  |   2 +
 app-emulation/virtualbox/virtualbox-5.2.2.ebuild   | 459 +++++++++++++++++++++
 12 files changed, 1121 insertions(+)

diff --git a/app-emulation/virtualbox-additions/Manifest b/app-emulation/virtualbox-additions/Manifest
index d17d0ecc7f6..17db60b0435 100644
--- a/app-emulation/virtualbox-additions/Manifest
+++ b/app-emulation/virtualbox-additions/Manifest
@@ -1,3 +1,4 @@
 DIST VBoxGuestAdditions_5.1.26.iso 59496448 BLAKE2B c2ea9dac192b09efb41daf57fd12541fc86ae13a21eb5650e2b2bb2256c13b3cfd00f0020d12d92eaa3dead9b3a7928cf766be7d58e2e2b7d5116d5b0d7d7c9c SHA512 5329ce9bb787efed088a9f89412974cef3a982a351c0053b3daf15a9c95c55f99556e2b86cdcd39c168042503eb00eaa83fb99f8f5c4c97d177dd2b61bb33f5d
 DIST VBoxGuestAdditions_5.1.28.iso 59494400 BLAKE2B fe91d8c7bf04e8eced7003f954879d25802e6afb8e7cb51f422ac2949845d394eeea252b1b5771731757827e3090226bddaae82c79c238e5f83611fcd05e85a7 SHA512 68a1bcaa658bff040d18c5d59fe20bb0e6155186bdaea5cf30d673d8356fa33087a23280f3d571742ca1c144caef421d0c32a080fee0cb05c6046f361fbe2785
 DIST VBoxGuestAdditions_5.1.30.iso 59494400 BLAKE2B 37f70eb8dd17e0492a106fa5e2cea1ed93b0a0a955e75a3a32d5bd45c447c6c4ff8e78e13b19922a34e8e982d1de5bbf0815a8e81c2a8ea2596477318d7acbf5 SHA512 3205444339a0c85a3b234ba462add21033b5b3eee18eecc15b150b21f5f9f1aadb92b7049bef6be1201e1acfd1edd6f2924c38d56a52770113c8401bcca9abcb
+DIST VBoxGuestAdditions_5.2.2.iso 60481536 BLAKE2B 560dc43a901cfaad4d9d6ca6f065614751765de7d78575c0dfe7d8ebcb0bf828a2b676ae91f6b346f179065e0f093e54742821c8a60765ec347d07288ae7b9fe SHA512 3c75468821287e4abe80e319ea8d4cd66c3075061610f74619c474b8c5bd8542ab55fe8747cb710e34863fcbc056b03c9256ad7d4b32fe9b0b56d74c4d93f3b5

diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-5.2.2.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.2.ebuild
new file mode 100644
index 00000000000..967492859a7
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+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="http://www.virtualbox.org/"
+SRC_URI="http://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 302ada1f3a8..e62bca810dd 100644
--- a/app-emulation/virtualbox-bin/Manifest
+++ b/app-emulation/virtualbox-bin/Manifest
@@ -1,12 +1,16 @@
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.26-117224.tar.gz 19624237 BLAKE2B 593d70c49e47b49cc64d1c4c8f78703e6cd608f4ef6ab836492822429d213c1b70323cfe7847a206d284821572431423a841e8d802a3f47519818906cee63e39 SHA512 c6e31e8fb26b8ca32c423d14e85e15f6372a030ec40e9f06ce1e1234913d3586cc58d46819684c99cf3ced37f35d0a964339199cad5cf43580c88bf1afa63ef6
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.28-117968.tar.gz 19626161 BLAKE2B 0f2677cfd4e29b3178f750c932747983267de980d9bef58c6e4937829f835f57977f3bedecb358f2bb1fd8d84d5ae1ef1bf4f38cb0d459f752e9542ad3543f5a SHA512 71c6ce267c14303bbd9e386ea849d37aeb569afff848054deced4c74fd6fffca83c96b392d066f684b7101a786cc7d24cf9308114c08cbb77b26bb07bf23fcf8
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.30-118389.tar.gz 19624724 BLAKE2B de52acef8ad0785e576b361721d3a2f0b3d7e3820964d7e47fb6ffa7fd33bc4126f0e496396a412994e5eadc17fbd72699295865aa520f5e4b7a8ca53007e905 SHA512 6b468879f0fb6d6f916c40fb60f418457c526c20ebb1a6253bfc38392e0ae965e3b54590173b0d974070ced1646db82035950fb7dd54b22e20f4ad29850d6cf4
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.2-119230.tar.gz 19504049 BLAKE2B ff3be5b81c409c33d7c831e2bba6df7d7ab87e6422d8cc4cbc3599f75c84100fceec5547b8f9b44d204941b48102a23a4c2183340ec017159ae7c37e07d21813 SHA512 cf3f08f7ee966b5a991fe029b3d4014f333678f0fddb9d75589695811dc4d780651a6dbdddf55a6466631bf8a9dce099256468490847229ac2c26dba9fc57d27
 DIST VirtualBox-5.1.26-117224-Linux_amd64.run 87981522 BLAKE2B a1067daca90eb45509aa314d8e346f565cca845c8ec2fdbe6d27ec6d12e4cf6a288638a083295da62858bcda44b2f97720475b246e9e03013ab68c9c5e191720 SHA512 9b486fd52918469fdffaa39bbef234d22fad9d3b562fa04443bf6c1040e744db6dc9bd103ead299127b82c5d4bc96c1e05f677cacd623affa6569408c8d26df5
 DIST VirtualBox-5.1.26-117224-Linux_x86.run 87090639 BLAKE2B 89ec5ed5a9c0a5c16fbe4e3bbab5035c027d1c24ca561536a9c7e1924a5b7b5ddd180aa798212a3dc213439dc844761b73212d7fb1ed7611b0a91b078e96c950 SHA512 3aafad5374dc79c0fdd9bf1da6708ae4ce2f43d9fce3222326424bf03d6b73a7283ba5ebeb01a9ab6b24eeb8a8ec7c23af84e40f3edeb512c2101c329f4091e7
 DIST VirtualBox-5.1.28-117968-Linux_amd64.run 88391123 BLAKE2B 4fbabed2d0d1a7d61e734818003048e58e9763eee5ba46b7653ee0f0efa13bd7830cce6bcf607dd09559dffbf5352f1ae21729e86f049067063e3a2426f602dd SHA512 e84f002ed4804533832dfcc65f12ad4e72d6693de5af62bf26b702d19d8f17511335415968eac44ee3d98e87d5137c0004afa213b0bf75b89699cbe3bc20097c
 DIST VirtualBox-5.1.28-117968-Linux_x86.run 87582159 BLAKE2B 39e9c8b222ee284d678022a09fca0d0214a116b97fefbc73248bb7bba4d7ccc323619fa93e1bf2c719dee00ac17cb21da86c1f1155ad88ca52301bcdb42c9fb9 SHA512 96491961bfae60671b40f591151da26dab3135feaa3b9cf3838d7e74104cb4ae716eb5ff76ab75683c98ffba840cacaa045fa959f8e4eb4ab976801d38ebb917
 DIST VirtualBox-5.1.30-118389-Linux_amd64.run 88186323 BLAKE2B 4700613906658a223134130e99eb4f669ffc875e732e9b43d237926b9a33d385d6056240ae5f498d13b6a0cf26c600b293657fc64c838db498bd3935fa23a8e4 SHA512 b6312abbf5c0e4bf22aca50a81d297a0ed21d5b4b72242e21750ac088c56817dc90ac1ae068dd9006f4f736130510f26f55793b8c09999c590da09908e304280
 DIST VirtualBox-5.1.30-118389-Linux_x86.run 87397839 BLAKE2B cc0fb245f98883dc19cfc9a64d8c7a9593d8ae784895a9a8224c146779ab65901052ba5d62f57c9cd5bc46d23e208cc97046fd6641eb8848e90c4828bd745813 SHA512 643ef90453e3a6a6d3fbb365176a72de1743230a58ee45f1cb22fd8bb57c9cfe6013ec1ffdb0076a248d1987a1e3fea13ca71ef9ca983cb8e6378d30c76451fb
+DIST VirtualBox-5.2.2-119230-Linux_amd64.run 90346949 BLAKE2B f6ae64b7b9b5ad41865a12792bd611d05c8899250c1740fcfabc0c6c07ce495e143b29c8bc8b5b2c2dbe690076c8593c030de4374af9d31a82e99dc9c58fec40 SHA512 a99d0922b341b821976bc944a5882d2804ca7ceb565a9512ce86c3968fb0d27dc533009dde51bea4881d729c97277597d329927183be4ffd081b5ed73c8f5ec3
+DIST VirtualBox-5.2.2-119230-Linux_x86.run 89548224 BLAKE2B de4cfd7a21caa49bc5752bfe097e99ec5e55eb9abcfafc34eb9f74e88c12fb6d0af1754e88180daf7f420ca3b968a25a3a0d6b878ebe6f7eb51c543ed24fbb1d SHA512 cd83828fdde57ac6c9b1bed58a8500c7ad2d2e83b83a4ffe304addd1d5df277dbddebc1e9c779030e5352b66b6a7505309fb0b5cfbbb575f122a7f126c397591
 DIST VirtualBoxSDK-5.1.26-117224.zip 9860247 BLAKE2B 6525792471a71aca9824e2fa9a0c9b722f248bf4873f3f683a04ab335bb06257fd051e1baeb2c106d663c09e805f88784bb01614042660949566766002183b4e SHA512 d2bef837d61bfb35ba550f004345c2c412c2f62da23ffded6dff8aa33281fdce7c0a8f6b70c131b35e04c34ca0a4221bf97a78e65a470c657980572ebedb0774
 DIST VirtualBoxSDK-5.1.28-117968.zip 9860778 BLAKE2B 9f4e4d9c74331be5781ad6820f340c48b372949916952a0f98d040fea05f0319975b1f83fbf479de8c0e2eda2927ff56f3a26901dbfe08395b2b3c4273d11bb6 SHA512 d7e365c57a1179ccbba7e695b8b8fc4dcdf36b45fbb199000878ccb161b13208b14ad3fe963f99a9b680cba5a2c562e3d39cf9892acc16879919ddaa4d24c22b
 DIST VirtualBoxSDK-5.1.30-118389.zip 9861374 BLAKE2B 4890a76c5bdf6ec8215095ce3246ee518a6cf527136fd896bec3503175115de05e52f946b5c44fa82ecb087900a5eb4f2bbd0cfa79a4eba94ba4d48f757f9604 SHA512 89d3407860f202329e5958e724b848884a9047f01000090d1000bce22005311b3650c1ef1fb1fc998c29cc77887af856b64a5ac76154408cae7b921860d8a9f1
+DIST VirtualBoxSDK-5.2.2-119230.zip 10146673 BLAKE2B 8bdb6ffcd9e0a59c5a27676a9cd71c402b6a8dd7c03fc7e543e620e3f96b02f252e46432b3724fad508953636a9643731fe60c7cad2ef79a107d83ea154aca3b SHA512 2bfd6e391af3ad55dfced0dcf551112c364317b226bdc29bab42420055c2dc6053f9ab5ce28eace15bb9c7680ddc83c0bc77c53938d05d507cdd51a6c781a27f

diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-5.2.2.119230.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.2.119230.ebuild
new file mode 100644
index 00000000000..af542eaeea1
--- /dev/null
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.2.119230.ebuild
@@ -0,0 +1,287 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils xdg-utils gnome2 pax-utils python-r1 udev unpacker versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 5)"
+	MY_PV="${MY_PV/beta/BETA}"
+	MY_PV="${MY_PV/rc/RC}"
+else
+	MY_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(get_version_component_range 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="http://www.virtualbox.org/"
+SRC_URI="amd64? ( http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
+	x86? ( http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
+	http://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? ( http://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 "${D}"/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 "${D}"/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 "${D}"/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 "${D}"${udevdir}/rules.d/10-virtualbox.rules || die
+	# move udev scripts into ${udevdir} (bug #372491)
+	mv "${D}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${D}"${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 890bfe89075..e6c1ff31eee 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.1.26-117224.tar.gz 19624237 BLAKE2B 593d70c49e47b49cc64d1c4c8f78703e6cd608f4ef6ab836492822429d213c1b70323cfe7847a206d284821572431423a841e8d802a3f47519818906cee63e39 SHA512 c6e31e8fb26b8ca32c423d14e85e15f6372a030ec40e9f06ce1e1234913d3586cc58d46819684c99cf3ced37f35d0a964339199cad5cf43580c88bf1afa63ef6
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.28-117968.tar.gz 19626161 BLAKE2B 0f2677cfd4e29b3178f750c932747983267de980d9bef58c6e4937829f835f57977f3bedecb358f2bb1fd8d84d5ae1ef1bf4f38cb0d459f752e9542ad3543f5a SHA512 71c6ce267c14303bbd9e386ea849d37aeb569afff848054deced4c74fd6fffca83c96b392d066f684b7101a786cc7d24cf9308114c08cbb77b26bb07bf23fcf8
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.30-118389.tar.gz 19624724 BLAKE2B de52acef8ad0785e576b361721d3a2f0b3d7e3820964d7e47fb6ffa7fd33bc4126f0e496396a412994e5eadc17fbd72699295865aa520f5e4b7a8ca53007e905 SHA512 6b468879f0fb6d6f916c40fb60f418457c526c20ebb1a6253bfc38392e0ae965e3b54590173b0d974070ced1646db82035950fb7dd54b22e20f4ad29850d6cf4
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.2-119230.tar.gz 19504049 BLAKE2B ff3be5b81c409c33d7c831e2bba6df7d7ab87e6422d8cc4cbc3599f75c84100fceec5547b8f9b44d204941b48102a23a4c2183340ec017159ae7c37e07d21813 SHA512 cf3f08f7ee966b5a991fe029b3d4014f333678f0fddb9d75589695811dc4d780651a6dbdddf55a6466631bf8a9dce099256468490847229ac2c26dba9fc57d27

diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.2.119230.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.2.119230.ebuild
new file mode 100644
index 00000000000..4d09c1248e6
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.2.119230.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 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="$(get_version_component_range 4)"
+MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
+MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
+
+DESCRIPTION="PUEL extensions for VirtualBox"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="http://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 0732dfee050..28f083c31ae 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -1,5 +1,6 @@
 DIST VirtualBox-5.1.26.tar.bz2 115915813 BLAKE2B c770420804fd0bcbe5582fccfefc55b6d69a603a99cc9ba26e72f6c1947a3e2bcbc5e9e1aa0185d544fb37b10db8233aa4c5cd14777138f63c2959a3ca5e6954 SHA512 680e9646a51a0a5923b3ded10007ee1c1e2a41c6d8a961d2b2540db6578bed2847154f4cac87e3cfe1118a62595b47c7df99da854f6c340e173b9eb8cacf2add
 DIST VirtualBox-5.1.28.tar.bz2 116427658 BLAKE2B cf18e3677962b5ae5c32dade4a6054e3bc35d5b4a7422ee77529150a9a55893d88b0b5c73504caa9a7fa58d178788a6383ac933e818bc4e8b972d7f4ac6b8522 SHA512 5c21fd535424d7fd9adbb51894ec6d37ecf00a63a850362bd7b61fedca5031e096641814130a97ad839c0bd7089dc3dc465509615aab2af3c5735ff71005670a
 DIST VirtualBox-5.1.30.tar.bz2 116510730 BLAKE2B fe1d9ea37aa33a6aa6a78aebb469e267b9412e96cadc0a5287c263e8be21fdd0c9035a03e31ca954bef99eb5c05416de2bdfde5a657daa9a61eb795815d33542 SHA512 6c44d9593f4815644a484b306e621fe7eca224002f85d89c00f2470300f2c78dbfe50ffda61d2c2465df14ca77c70a2ab86f1a05116feeee9f5833857eb18dee
+DIST VirtualBox-5.2.2.tar.bz2 118424845 BLAKE2B c918ff1d3989d2d94cec807b596b5daceece6388575f40c70b3581288be664e39cd0f0dae974516d1122110d5660185bac7bcf336418d8f44455290cafb52a7d SHA512 415956cfe987a20eb0a372288c29f0e388bd706a3b94ff69b92ef5bbf2e9aecd75761a56f5421ef97d165f756cd7fd46b9eaf16b74b7d2460b831d7f03aae7dc
 DIST virtualbox-5.1.24-patches-01.tar.xz 2708 BLAKE2B 6779a7ad1b013cf2e735817eae9785451c6a91e4a61558a650cfdc67d80b63db0eb33992a3207b0acc1e80b75caef14d9d291705ca7b3c96c4185c31e585e92d SHA512 0028e593818013f809831ac5a73eec63988c0aefb4b309fb3c928efbea8db8b8f46bd7c82f156396adc704f0567474df262dfe9bb6e09af0b2c23528fe2c6e2d
 DIST virtualbox-5.1.30-patches-02.tar.xz 2608 BLAKE2B 08b05a26622a7acec455f6d0dc72858f5f2758488e50d219f83c3d12606419d48e9d99302cde5a275929fe79af900c1b3ea3957fe9dfdaa952aaa0da9933291a SHA512 8a490f7cc44e40262fc47819736251c177adb635256794e9500f52729197c85211d5b0c0d000268089953a4c185872a8ba03c5d42df6b80f05eac8b81335320a

diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.2.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.2.ebuild
new file mode 100644
index 00000000000..ac4efcb4574
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.2.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils 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="http://www.virtualbox.org/"
+SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+	https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-5.1.30-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
+		x11-proto/glproto )
+	sys-apps/dbus
+	!!x11-drivers/xf86-input-virtualbox
+	!x11-drivers/xf86-video-virtualbox
+"
+DEPEND="
+	${RDEPEND}
+	>=dev-util/kbuild-0.1.9998.3127
+	>=dev-lang/yasm-0.6.2
+	sys-devel/bin86
+	sys-libs/pam
+	sys-power/iasl
+	X? ( x11-proto/renderproto )
+	!X? ( x11-proto/xproto )
+"
+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=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}"
+	enewgroup vboxguest
+	enewuser vboxguest -1 /bin/sh /dev/null vboxguest
+	# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+	enewgroup vboxsf
+}
+
+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...
+	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
+
+	rm "${WORKDIR}/patches/011_virtualbox-5.1.30-sysmacros.patch" || 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"' \
+		>> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+		|| die
+	echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+		>> "${D}/${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_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 a700928d53c..40cdcd21019 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,3 +1,4 @@
 DIST vbox-kernel-module-src-5.1.26.tar.xz 625384 BLAKE2B f3f0676854e7c597281c4937e2753a117844f584248c824bce2f931adb3f1ee234b71b60f701da7043916fe716c3973ede0f39d6614c60a483fedf34cc70d49e SHA512 c77e0d8dfade2abac95162e7e7a424be4875e44d43bcf2a13e0e50caa69f5fd0d21c77f03bb2cd4cbd5df4ab31e9fbd49ecd9220a49af8cd10081b960e014010
 DIST vbox-kernel-module-src-5.1.28.tar.xz 625464 BLAKE2B 5d34468ac09ae07149161ce9a1ba4e5181d10a615fa712689967d5a41087df6691d396dcc870d871d6cf7e1965af21750f759cfe756e59d5084ba2dd95218000 SHA512 c8ae6c065ad42e57eee9a54f288ba60fd9b32efe18cb74c8a035d547b30e7d857c9091307485a8dfc77eec45de29d3217c6871140e167e2438759c314c47680a
 DIST vbox-kernel-module-src-5.1.30.tar.xz 625424 BLAKE2B 00d33cad237af1f0d5b4dbea38f84e0327d10d97fc309a8c7536433cb4fddf3614e6de160646077040b4fdc6dd126cfa2250081084ca0243cc572d9f5e9d5dfd SHA512 8e2113584e63e2ace71b708dc77428fd09167a1bded12b47312a5a8f85ef448e17f76b4300dba4c8ec99d7f8cb278cef039c6282c676e35b8f200bafb5c4770a
+DIST vbox-kernel-module-src-5.2.2.tar.xz 633924 BLAKE2B 85307332f3b0eaea1832b357c4f44a90c38165caaf3dae5d073a92f04f7d1ddf440e8a53fecf2dab4f0179002051382fa4fe1af8be12279bfc921f578c1743a1 SHA512 ec513912567bf58f367f08e212a5d3b82e7caae5fec6985f2253ee9405907b567c8cbd2dea277ddef1344711927eb75525f95d6204ef07cb1325d22185ccb5a4

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild
new file mode 100644
index 00000000000..efe1eef91f9
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# 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=6
+
+inherit eutils linux-mod user
+
+MY_P=vbox-kernel-module-src-${PV}
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="http://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
+
+	CONFIG_CHECK="!TRIM_UNUSED_KSYMS"
+	ERROR_TRIM_UNUSED_KSYMS="The kernel option CONFIG_TRIM_UNUSED_KSYMS removed kernel symbols that are needed by ${PN} to load correctly."
+
+	linux-mod_pkg_setup
+
+	BUILD_PARAMS="KERN_DIR=${KV_DIR} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
+	BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
+}
+
+src_prepare() {
+	if use pax_kernel && kernel_is -ge 3 0 0 ; then
+		epatch "${FILESDIR}"/${PN}-4.1.4-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
+	elog "If you are using sys-apps/openrc, please add \"vboxdrv\", \"vboxnetflt\","
+	elog "\"vboxnetadp\" and \"vboxpci\" to:"
+	elog "  /etc/conf.d/modules"
+}

diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index 0732dfee050..76c48477bdd 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,5 +1,7 @@
 DIST VirtualBox-5.1.26.tar.bz2 115915813 BLAKE2B c770420804fd0bcbe5582fccfefc55b6d69a603a99cc9ba26e72f6c1947a3e2bcbc5e9e1aa0185d544fb37b10db8233aa4c5cd14777138f63c2959a3ca5e6954 SHA512 680e9646a51a0a5923b3ded10007ee1c1e2a41c6d8a961d2b2540db6578bed2847154f4cac87e3cfe1118a62595b47c7df99da854f6c340e173b9eb8cacf2add
 DIST VirtualBox-5.1.28.tar.bz2 116427658 BLAKE2B cf18e3677962b5ae5c32dade4a6054e3bc35d5b4a7422ee77529150a9a55893d88b0b5c73504caa9a7fa58d178788a6383ac933e818bc4e8b972d7f4ac6b8522 SHA512 5c21fd535424d7fd9adbb51894ec6d37ecf00a63a850362bd7b61fedca5031e096641814130a97ad839c0bd7089dc3dc465509615aab2af3c5735ff71005670a
 DIST VirtualBox-5.1.30.tar.bz2 116510730 BLAKE2B fe1d9ea37aa33a6aa6a78aebb469e267b9412e96cadc0a5287c263e8be21fdd0c9035a03e31ca954bef99eb5c05416de2bdfde5a657daa9a61eb795815d33542 SHA512 6c44d9593f4815644a484b306e621fe7eca224002f85d89c00f2470300f2c78dbfe50ffda61d2c2465df14ca77c70a2ab86f1a05116feeee9f5833857eb18dee
+DIST VirtualBox-5.2.2.tar.bz2 118424845 BLAKE2B c918ff1d3989d2d94cec807b596b5daceece6388575f40c70b3581288be664e39cd0f0dae974516d1122110d5660185bac7bcf336418d8f44455290cafb52a7d SHA512 415956cfe987a20eb0a372288c29f0e388bd706a3b94ff69b92ef5bbf2e9aecd75761a56f5421ef97d165f756cd7fd46b9eaf16b74b7d2460b831d7f03aae7dc
 DIST virtualbox-5.1.24-patches-01.tar.xz 2708 BLAKE2B 6779a7ad1b013cf2e735817eae9785451c6a91e4a61558a650cfdc67d80b63db0eb33992a3207b0acc1e80b75caef14d9d291705ca7b3c96c4185c31e585e92d SHA512 0028e593818013f809831ac5a73eec63988c0aefb4b309fb3c928efbea8db8b8f46bd7c82f156396adc704f0567474df262dfe9bb6e09af0b2c23528fe2c6e2d
 DIST virtualbox-5.1.30-patches-02.tar.xz 2608 BLAKE2B 08b05a26622a7acec455f6d0dc72858f5f2758488e50d219f83c3d12606419d48e9d99302cde5a275929fe79af900c1b3ea3957fe9dfdaa952aaa0da9933291a SHA512 8a490f7cc44e40262fc47819736251c177adb635256794e9500f52729197c85211d5b0c0d000268089953a4c185872a8ba03c5d42df6b80f05eac8b81335320a
+DIST virtualbox-5.2.0-patches-01.tar.xz 2460 BLAKE2B d3f973dc7ee0557c360f801c3bf84065a7e7bc9960984398b8f86d71fab32c59774e970c6cf873be07bcb9666af168570e8a78705a5999b1fc5d863dbbc6e538 SHA512 b91278dd81a50e412f5a281c72949f591a1c53303080549b74b28763cab9e3948948afb0256e0453d17736683cca3372a8e9c6d63f02f3eff3ef92c2a1ea332b

diff --git a/app-emulation/virtualbox/virtualbox-5.2.2.ebuild b/app-emulation/virtualbox/virtualbox-5.2.2.ebuild
new file mode 100644
index 00000000000..f6ef3647989
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-5.2.2.ebuild
@@ -0,0 +1,459 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 toolchain-funcs udev xdg-utils
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+	https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.0-patches-01.tar.xz"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="http://www.virtualbox.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc headless java libressl lvm 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
+		)
+	)
+	java? ( >=virtual/jre-1.6:= )
+	libressl? ( dev-libs/libressl:= )
+	!libressl? ( dev-libs/openssl:0= )
+	lvm? ( sys-fs/lvm2 )
+	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/jre-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}"
+
+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"
+
+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.1.24-nopie.patch"
+	fi
+
+	# Only add paxmark patch when we're on pax_kernel
+	if use pax_kernel ; then
+		eapply "${FILESDIR}"/virtualbox-5.1.4-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
+	)
+	use alsa       || myconf+=( --disable-alsa )
+	use debug      && myconf+=( --build-debug )
+	use doc        || myconf+=( --disable-docs )
+	use java       || myconf+=( --disable-java )
+	use lvm        || myconf+=( --disable-devmapper )
+	use opengl     || myconf+=( --disable-opengl )
+	use pulseaudio || myconf+=( --disable-pulse )
+	use python     || myconf+=( --disable-python )
+	use vboxwebsrv && myconf+=( --enable-webservice )
+	use vnc        && myconf+=( --enable-vnc )
+	if ! use headless ; then
+		use qt5 || myconf+=( --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 "${D}"/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 "${D}"${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
+
+	# VRDPAuth only works with this (bug #351949)
+	dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+
+	# 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 "${D}"${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 "${D}"${vbox_inst_path}/VirtualBox
+
+			if use opengl ; then
+				vbox_inst VBoxTestOGL
+				pax-mark -m "${D}"${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
+
+			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 "${D}${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+			java-pkg_regso "${D}${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
+}
+
+pkg_postinst() {
+	xdg_desktop_database_update
+
+	if use udev ; then
+		udevadm control --reload-rules \
+			&& udevadm trigger --subsystem-match=usb
+	fi
+
+	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 "IMPORTANT!"
+	elog "If you upgrade from app-emulation/virtualbox-ose make sure to run"
+	elog "\"env-update\" as root and logout and relogin as the user you wish"
+	elog "to run ${PN} as."
+	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_desktop_database_update
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-guest-additions/, app-emulation/virtualbox-additions/, ...
@ 2017-12-20 12:30 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2017-12-20 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     07e85792252bf97443401ee3cce5360352f638d9
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 20 12:30:33 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Dec 20 12:30:33 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07e85792

vitrualbox packages: Bump to version 5.2.4

Bug: https://bugs.gentoo.org/641748
Closes: https://bugs.gentoo.org/641784
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-emulation/virtualbox-additions/Manifest        |   1 +
 .../virtualbox-additions-5.2.4.ebuild              |  35 ++
 app-emulation/virtualbox-bin/Manifest              |   4 +
 .../virtualbox-bin-5.2.4.119785.ebuild             | 287 +++++++++++++
 app-emulation/virtualbox-extpack-oracle/Manifest   |   1 +
 .../virtualbox-extpack-oracle-5.2.4.119785.ebuild  |  42 ++
 app-emulation/virtualbox-guest-additions/Manifest  |   1 +
 .../virtualbox-guest-additions-5.2.4.ebuild        | 228 ++++++++++
 app-emulation/virtualbox-modules/Manifest          |   1 +
 .../virtualbox-modules-5.2.4.ebuild                |  59 +++
 app-emulation/virtualbox/Manifest                  |   1 +
 app-emulation/virtualbox/virtualbox-5.2.4.ebuild   | 459 +++++++++++++++++++++
 12 files changed, 1119 insertions(+)

diff --git a/app-emulation/virtualbox-additions/Manifest b/app-emulation/virtualbox-additions/Manifest
index 8e57ef51553..1752e6a8183 100644
--- a/app-emulation/virtualbox-additions/Manifest
+++ b/app-emulation/virtualbox-additions/Manifest
@@ -1,3 +1,4 @@
 DIST VBoxGuestAdditions_5.1.26.iso 59496448 BLAKE2B c2ea9dac192b09efb41daf57fd12541fc86ae13a21eb5650e2b2bb2256c13b3cfd00f0020d12d92eaa3dead9b3a7928cf766be7d58e2e2b7d5116d5b0d7d7c9c SHA512 5329ce9bb787efed088a9f89412974cef3a982a351c0053b3daf15a9c95c55f99556e2b86cdcd39c168042503eb00eaa83fb99f8f5c4c97d177dd2b61bb33f5d
 DIST VBoxGuestAdditions_5.1.30.iso 59494400 BLAKE2B 37f70eb8dd17e0492a106fa5e2cea1ed93b0a0a955e75a3a32d5bd45c447c6c4ff8e78e13b19922a34e8e982d1de5bbf0815a8e81c2a8ea2596477318d7acbf5 SHA512 3205444339a0c85a3b234ba462add21033b5b3eee18eecc15b150b21f5f9f1aadb92b7049bef6be1201e1acfd1edd6f2924c38d56a52770113c8401bcca9abcb
 DIST VBoxGuestAdditions_5.2.2.iso 60481536 BLAKE2B 560dc43a901cfaad4d9d6ca6f065614751765de7d78575c0dfe7d8ebcb0bf828a2b676ae91f6b346f179065e0f093e54742821c8a60765ec347d07288ae7b9fe SHA512 3c75468821287e4abe80e319ea8d4cd66c3075061610f74619c474b8c5bd8542ab55fe8747cb710e34863fcbc056b03c9256ad7d4b32fe9b0b56d74c4d93f3b5
+DIST VBoxGuestAdditions_5.2.4.iso 57868288 BLAKE2B 8affaa8a4bfdc434081e62a194b751fc143f748995b769cf565497751787a15fafc627b994ef8d30ea98275039cf8d85e6e5cdc3a7d806961f063c9c6fd1423d SHA512 51445f43ed337f7ea850b599c7dc80837e697de0ef1eb33e79b2dccadda50c1cb1fd37e98387648564cb47c4d593f7138e68410033c83ec0a4a65f04a057723d

diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-5.2.4.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.4.ebuild
new file mode 100644
index 00000000000..967492859a7
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.4.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+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="http://www.virtualbox.org/"
+SRC_URI="http://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 63f4dc2a0d7..17b9cd2a8fd 100644
--- a/app-emulation/virtualbox-bin/Manifest
+++ b/app-emulation/virtualbox-bin/Manifest
@@ -1,12 +1,16 @@
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.26-117224.tar.gz 19624237 BLAKE2B 593d70c49e47b49cc64d1c4c8f78703e6cd608f4ef6ab836492822429d213c1b70323cfe7847a206d284821572431423a841e8d802a3f47519818906cee63e39 SHA512 c6e31e8fb26b8ca32c423d14e85e15f6372a030ec40e9f06ce1e1234913d3586cc58d46819684c99cf3ced37f35d0a964339199cad5cf43580c88bf1afa63ef6
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.30-118389.tar.gz 19624724 BLAKE2B de52acef8ad0785e576b361721d3a2f0b3d7e3820964d7e47fb6ffa7fd33bc4126f0e496396a412994e5eadc17fbd72699295865aa520f5e4b7a8ca53007e905 SHA512 6b468879f0fb6d6f916c40fb60f418457c526c20ebb1a6253bfc38392e0ae965e3b54590173b0d974070ced1646db82035950fb7dd54b22e20f4ad29850d6cf4
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.2-119230.tar.gz 19504049 BLAKE2B ff3be5b81c409c33d7c831e2bba6df7d7ab87e6422d8cc4cbc3599f75c84100fceec5547b8f9b44d204941b48102a23a4c2183340ec017159ae7c37e07d21813 SHA512 cf3f08f7ee966b5a991fe029b3d4014f333678f0fddb9d75589695811dc4d780651a6dbdddf55a6466631bf8a9dce099256468490847229ac2c26dba9fc57d27
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.4-119785.tar.gz 19465971 BLAKE2B eb37636ba0c856654ee0a06fb09fea848cef834cf75dcabf92d2a52994b0e2add74539213d9c3f7793496ffeaa35e623ebd9068e5dd5c7cfa8944e6a14ad2448 SHA512 97f496c9e3ef63a513c6fc31127459136b2bbef885a277d30c832831f079e3fbe8c6900b1799db1a4497a32b116cafb2fe982bd28a201da8d6f4222f70c548d8
 DIST VirtualBox-5.1.26-117224-Linux_amd64.run 87981522 BLAKE2B a1067daca90eb45509aa314d8e346f565cca845c8ec2fdbe6d27ec6d12e4cf6a288638a083295da62858bcda44b2f97720475b246e9e03013ab68c9c5e191720 SHA512 9b486fd52918469fdffaa39bbef234d22fad9d3b562fa04443bf6c1040e744db6dc9bd103ead299127b82c5d4bc96c1e05f677cacd623affa6569408c8d26df5
 DIST VirtualBox-5.1.26-117224-Linux_x86.run 87090639 BLAKE2B 89ec5ed5a9c0a5c16fbe4e3bbab5035c027d1c24ca561536a9c7e1924a5b7b5ddd180aa798212a3dc213439dc844761b73212d7fb1ed7611b0a91b078e96c950 SHA512 3aafad5374dc79c0fdd9bf1da6708ae4ce2f43d9fce3222326424bf03d6b73a7283ba5ebeb01a9ab6b24eeb8a8ec7c23af84e40f3edeb512c2101c329f4091e7
 DIST VirtualBox-5.1.30-118389-Linux_amd64.run 88186323 BLAKE2B 4700613906658a223134130e99eb4f669ffc875e732e9b43d237926b9a33d385d6056240ae5f498d13b6a0cf26c600b293657fc64c838db498bd3935fa23a8e4 SHA512 b6312abbf5c0e4bf22aca50a81d297a0ed21d5b4b72242e21750ac088c56817dc90ac1ae068dd9006f4f736130510f26f55793b8c09999c590da09908e304280
 DIST VirtualBox-5.1.30-118389-Linux_x86.run 87397839 BLAKE2B cc0fb245f98883dc19cfc9a64d8c7a9593d8ae784895a9a8224c146779ab65901052ba5d62f57c9cd5bc46d23e208cc97046fd6641eb8848e90c4828bd745813 SHA512 643ef90453e3a6a6d3fbb365176a72de1743230a58ee45f1cb22fd8bb57c9cfe6013ec1ffdb0076a248d1987a1e3fea13ca71ef9ca983cb8e6378d30c76451fb
 DIST VirtualBox-5.2.2-119230-Linux_amd64.run 90346949 BLAKE2B f6ae64b7b9b5ad41865a12792bd611d05c8899250c1740fcfabc0c6c07ce495e143b29c8bc8b5b2c2dbe690076c8593c030de4374af9d31a82e99dc9c58fec40 SHA512 a99d0922b341b821976bc944a5882d2804ca7ceb565a9512ce86c3968fb0d27dc533009dde51bea4881d729c97277597d329927183be4ffd081b5ed73c8f5ec3
 DIST VirtualBox-5.2.2-119230-Linux_x86.run 89548224 BLAKE2B de4cfd7a21caa49bc5752bfe097e99ec5e55eb9abcfafc34eb9f74e88c12fb6d0af1754e88180daf7f420ca3b968a25a3a0d6b878ebe6f7eb51c543ed24fbb1d SHA512 cd83828fdde57ac6c9b1bed58a8500c7ad2d2e83b83a4ffe304addd1d5df277dbddebc1e9c779030e5352b66b6a7505309fb0b5cfbbb575f122a7f126c397591
+DIST VirtualBox-5.2.4-119785-Linux_amd64.run 88575441 BLAKE2B c0cdf3cb1c17f1de000926e0b1db9902c965040723a62de95ef518bd4180ce95d4c2c5830abbdbf65823447af22d71f574b85e8ccc322ddc05137556f4381401 SHA512 f5741e29348a7a307146b8f34e0e9c4bccd8368879ba7c4e3836de21ad014f31ecf1bb7033173f8651483d4a11ffca7c8b475f9149474533cd7ab8c31ba8cbb9
+DIST VirtualBox-5.2.4-119785-Linux_x86.run 87653837 BLAKE2B 069005e59da03e9cc6d8ef3cc296c192095c4b37bc17de5e768d13f46e1d8bdd7573e6b1a2b359cee5a37c2a2bb9808707317c07b4dd3d76cbbc0ed0824f55bb SHA512 245a90b8312988d6b19765ecd404bc569b370c400353294a564dde4ab57a006fda3e24dd423d7ba3afdfcd20484b95adc86d598ebbd640f1742d9c92ed010021
 DIST VirtualBoxSDK-5.1.26-117224.zip 9860247 BLAKE2B 6525792471a71aca9824e2fa9a0c9b722f248bf4873f3f683a04ab335bb06257fd051e1baeb2c106d663c09e805f88784bb01614042660949566766002183b4e SHA512 d2bef837d61bfb35ba550f004345c2c412c2f62da23ffded6dff8aa33281fdce7c0a8f6b70c131b35e04c34ca0a4221bf97a78e65a470c657980572ebedb0774
 DIST VirtualBoxSDK-5.1.30-118389.zip 9861374 BLAKE2B 4890a76c5bdf6ec8215095ce3246ee518a6cf527136fd896bec3503175115de05e52f946b5c44fa82ecb087900a5eb4f2bbd0cfa79a4eba94ba4d48f757f9604 SHA512 89d3407860f202329e5958e724b848884a9047f01000090d1000bce22005311b3650c1ef1fb1fc998c29cc77887af856b64a5ac76154408cae7b921860d8a9f1
 DIST VirtualBoxSDK-5.2.2-119230.zip 10146673 BLAKE2B 8bdb6ffcd9e0a59c5a27676a9cd71c402b6a8dd7c03fc7e543e620e3f96b02f252e46432b3724fad508953636a9643731fe60c7cad2ef79a107d83ea154aca3b SHA512 2bfd6e391af3ad55dfced0dcf551112c364317b226bdc29bab42420055c2dc6053f9ab5ce28eace15bb9c7680ddc83c0bc77c53938d05d507cdd51a6c781a27f
+DIST VirtualBoxSDK-5.2.4-119785.zip 10150272 BLAKE2B 58b16d12f6d2939ef0a45e0bf627f7977740ef9c3f277935c624f6b226cfa84390ea3d74a840c9da85bfc392b60ecebb2a8bc1dae51db92848bea42deaaea536 SHA512 b23637d9eb086c999733a5a0725a8a97ade5af11ccb7fa6e74bd20281270333d551ea22ae404f462726a2250593b624cbbb8169af9d16a07bd2383bdc74da92e

diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-5.2.4.119785.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.4.119785.ebuild
new file mode 100644
index 00000000000..af542eaeea1
--- /dev/null
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.4.119785.ebuild
@@ -0,0 +1,287 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils xdg-utils gnome2 pax-utils python-r1 udev unpacker versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 5)"
+	MY_PV="${MY_PV/beta/BETA}"
+	MY_PV="${MY_PV/rc/RC}"
+else
+	MY_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(get_version_component_range 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="http://www.virtualbox.org/"
+SRC_URI="amd64? ( http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
+	x86? ( http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
+	http://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? ( http://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 "${D}"/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 "${D}"/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 "${D}"/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 "${D}"${udevdir}/rules.d/10-virtualbox.rules || die
+	# move udev scripts into ${udevdir} (bug #372491)
+	mv "${D}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${D}"${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 b6d24313917..7e8455c20bc 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.1.26-117224.tar.gz 19624237 BLAKE2B 593d70c49e47b49cc64d1c4c8f78703e6cd608f4ef6ab836492822429d213c1b70323cfe7847a206d284821572431423a841e8d802a3f47519818906cee63e39 SHA512 c6e31e8fb26b8ca32c423d14e85e15f6372a030ec40e9f06ce1e1234913d3586cc58d46819684c99cf3ced37f35d0a964339199cad5cf43580c88bf1afa63ef6
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.30-118389.tar.gz 19624724 BLAKE2B de52acef8ad0785e576b361721d3a2f0b3d7e3820964d7e47fb6ffa7fd33bc4126f0e496396a412994e5eadc17fbd72699295865aa520f5e4b7a8ca53007e905 SHA512 6b468879f0fb6d6f916c40fb60f418457c526c20ebb1a6253bfc38392e0ae965e3b54590173b0d974070ced1646db82035950fb7dd54b22e20f4ad29850d6cf4
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.2-119230.tar.gz 19504049 BLAKE2B ff3be5b81c409c33d7c831e2bba6df7d7ab87e6422d8cc4cbc3599f75c84100fceec5547b8f9b44d204941b48102a23a4c2183340ec017159ae7c37e07d21813 SHA512 cf3f08f7ee966b5a991fe029b3d4014f333678f0fddb9d75589695811dc4d780651a6dbdddf55a6466631bf8a9dce099256468490847229ac2c26dba9fc57d27
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.4-119785.tar.gz 19465971 BLAKE2B eb37636ba0c856654ee0a06fb09fea848cef834cf75dcabf92d2a52994b0e2add74539213d9c3f7793496ffeaa35e623ebd9068e5dd5c7cfa8944e6a14ad2448 SHA512 97f496c9e3ef63a513c6fc31127459136b2bbef885a277d30c832831f079e3fbe8c6900b1799db1a4497a32b116cafb2fe982bd28a201da8d6f4222f70c548d8

diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.4.119785.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.4.119785.ebuild
new file mode 100644
index 00000000000..4d09c1248e6
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.4.119785.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 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="$(get_version_component_range 4)"
+MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
+MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
+
+DESCRIPTION="PUEL extensions for VirtualBox"
+HOMEPAGE="http://www.virtualbox.org/"
+SRC_URI="http://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 f03f743843f..774382693bf 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -1,5 +1,6 @@
 DIST VirtualBox-5.1.26.tar.bz2 115915813 BLAKE2B c770420804fd0bcbe5582fccfefc55b6d69a603a99cc9ba26e72f6c1947a3e2bcbc5e9e1aa0185d544fb37b10db8233aa4c5cd14777138f63c2959a3ca5e6954 SHA512 680e9646a51a0a5923b3ded10007ee1c1e2a41c6d8a961d2b2540db6578bed2847154f4cac87e3cfe1118a62595b47c7df99da854f6c340e173b9eb8cacf2add
 DIST VirtualBox-5.1.30.tar.bz2 116510730 BLAKE2B fe1d9ea37aa33a6aa6a78aebb469e267b9412e96cadc0a5287c263e8be21fdd0c9035a03e31ca954bef99eb5c05416de2bdfde5a657daa9a61eb795815d33542 SHA512 6c44d9593f4815644a484b306e621fe7eca224002f85d89c00f2470300f2c78dbfe50ffda61d2c2465df14ca77c70a2ab86f1a05116feeee9f5833857eb18dee
 DIST VirtualBox-5.2.2.tar.bz2 118424845 BLAKE2B c918ff1d3989d2d94cec807b596b5daceece6388575f40c70b3581288be664e39cd0f0dae974516d1122110d5660185bac7bcf336418d8f44455290cafb52a7d SHA512 415956cfe987a20eb0a372288c29f0e388bd706a3b94ff69b92ef5bbf2e9aecd75761a56f5421ef97d165f756cd7fd46b9eaf16b74b7d2460b831d7f03aae7dc
+DIST VirtualBox-5.2.4.tar.bz2 118481693 BLAKE2B 874f5e65d97befaf72767626a1f3271a0b7c30f8dc998dc10aee9478039cecd14ce11c9c624ba596c09641aae9a41ca91ae33e5a82218bc8acd8cd32ebb727e1 SHA512 19cb168393098fd28ab2017a27d09a558721d57b31c5d3610deb68a17dfa7fd7ffe9ad7be18714a314724ab5ecb54e7ab5fb76183e8e89afbed2da79649e2798
 DIST virtualbox-5.1.24-patches-01.tar.xz 2708 BLAKE2B 6779a7ad1b013cf2e735817eae9785451c6a91e4a61558a650cfdc67d80b63db0eb33992a3207b0acc1e80b75caef14d9d291705ca7b3c96c4185c31e585e92d SHA512 0028e593818013f809831ac5a73eec63988c0aefb4b309fb3c928efbea8db8b8f46bd7c82f156396adc704f0567474df262dfe9bb6e09af0b2c23528fe2c6e2d
 DIST virtualbox-5.1.30-patches-02.tar.xz 2608 BLAKE2B 08b05a26622a7acec455f6d0dc72858f5f2758488e50d219f83c3d12606419d48e9d99302cde5a275929fe79af900c1b3ea3957fe9dfdaa952aaa0da9933291a SHA512 8a490f7cc44e40262fc47819736251c177adb635256794e9500f52729197c85211d5b0c0d000268089953a4c185872a8ba03c5d42df6b80f05eac8b81335320a

diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.4.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.4.ebuild
new file mode 100644
index 00000000000..ac4efcb4574
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.4.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils 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="http://www.virtualbox.org/"
+SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+	https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-5.1.30-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
+		x11-proto/glproto )
+	sys-apps/dbus
+	!!x11-drivers/xf86-input-virtualbox
+	!x11-drivers/xf86-video-virtualbox
+"
+DEPEND="
+	${RDEPEND}
+	>=dev-util/kbuild-0.1.9998.3127
+	>=dev-lang/yasm-0.6.2
+	sys-devel/bin86
+	sys-libs/pam
+	sys-power/iasl
+	X? ( x11-proto/renderproto )
+	!X? ( x11-proto/xproto )
+"
+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=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}"
+	enewgroup vboxguest
+	enewuser vboxguest -1 /bin/sh /dev/null vboxguest
+	# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+	enewgroup vboxsf
+}
+
+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...
+	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
+
+	rm "${WORKDIR}/patches/011_virtualbox-5.1.30-sysmacros.patch" || 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"' \
+		>> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+		|| die
+	echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+		>> "${D}/${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_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 2077c1d2f04..cd5418fad2a 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,3 +1,4 @@
 DIST vbox-kernel-module-src-5.1.26.tar.xz 625384 BLAKE2B f3f0676854e7c597281c4937e2753a117844f584248c824bce2f931adb3f1ee234b71b60f701da7043916fe716c3973ede0f39d6614c60a483fedf34cc70d49e SHA512 c77e0d8dfade2abac95162e7e7a424be4875e44d43bcf2a13e0e50caa69f5fd0d21c77f03bb2cd4cbd5df4ab31e9fbd49ecd9220a49af8cd10081b960e014010
 DIST vbox-kernel-module-src-5.1.30.tar.xz 625424 BLAKE2B 00d33cad237af1f0d5b4dbea38f84e0327d10d97fc309a8c7536433cb4fddf3614e6de160646077040b4fdc6dd126cfa2250081084ca0243cc572d9f5e9d5dfd SHA512 8e2113584e63e2ace71b708dc77428fd09167a1bded12b47312a5a8f85ef448e17f76b4300dba4c8ec99d7f8cb278cef039c6282c676e35b8f200bafb5c4770a
 DIST vbox-kernel-module-src-5.2.2.tar.xz 633924 BLAKE2B 85307332f3b0eaea1832b357c4f44a90c38165caaf3dae5d073a92f04f7d1ddf440e8a53fecf2dab4f0179002051382fa4fe1af8be12279bfc921f578c1743a1 SHA512 ec513912567bf58f367f08e212a5d3b82e7caae5fec6985f2253ee9405907b567c8cbd2dea277ddef1344711927eb75525f95d6204ef07cb1325d22185ccb5a4
+DIST vbox-kernel-module-src-5.2.4.tar.xz 634212 BLAKE2B d8be416f958f672c2ab50b5197f708bc1febca292d5262eec710c07561be7de810fb1dfd5961ef9367c91e0ac1b6033419f85444471e8d40406d4ab860de2a23 SHA512 3c2113a8781cde1a44954267ee469db91c843305a5b1468b1fd346af3f3626a3d98c8a958ec0e255401f569f75e652dbbb1a85fd6cc6b203cf170745c630cee1

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.4.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.4.ebuild
new file mode 100644
index 00000000000..2c9761e6f22
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.4.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# 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=6
+
+inherit eutils linux-mod user
+
+MY_P=vbox-kernel-module-src-${PV}
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="http://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
+
+	CONFIG_CHECK="!TRIM_UNUSED_KSYMS"
+	ERROR_TRIM_UNUSED_KSYMS="The kernel option CONFIG_TRIM_UNUSED_KSYMS removed kernel symbols that are needed by ${PN} to load correctly."
+
+	linux-mod_pkg_setup
+
+	BUILD_PARAMS="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
+		epatch "${FILESDIR}"/${PN}-4.1.4-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
+	elog "If you are using sys-apps/openrc, please add \"vboxdrv\", \"vboxnetflt\","
+	elog "\"vboxnetadp\" and \"vboxpci\" to:"
+	elog "  /etc/conf.d/modules"
+}

diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index 03df1690401..48d4569de5f 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,6 +1,7 @@
 DIST VirtualBox-5.1.26.tar.bz2 115915813 BLAKE2B c770420804fd0bcbe5582fccfefc55b6d69a603a99cc9ba26e72f6c1947a3e2bcbc5e9e1aa0185d544fb37b10db8233aa4c5cd14777138f63c2959a3ca5e6954 SHA512 680e9646a51a0a5923b3ded10007ee1c1e2a41c6d8a961d2b2540db6578bed2847154f4cac87e3cfe1118a62595b47c7df99da854f6c340e173b9eb8cacf2add
 DIST VirtualBox-5.1.30.tar.bz2 116510730 BLAKE2B fe1d9ea37aa33a6aa6a78aebb469e267b9412e96cadc0a5287c263e8be21fdd0c9035a03e31ca954bef99eb5c05416de2bdfde5a657daa9a61eb795815d33542 SHA512 6c44d9593f4815644a484b306e621fe7eca224002f85d89c00f2470300f2c78dbfe50ffda61d2c2465df14ca77c70a2ab86f1a05116feeee9f5833857eb18dee
 DIST VirtualBox-5.2.2.tar.bz2 118424845 BLAKE2B c918ff1d3989d2d94cec807b596b5daceece6388575f40c70b3581288be664e39cd0f0dae974516d1122110d5660185bac7bcf336418d8f44455290cafb52a7d SHA512 415956cfe987a20eb0a372288c29f0e388bd706a3b94ff69b92ef5bbf2e9aecd75761a56f5421ef97d165f756cd7fd46b9eaf16b74b7d2460b831d7f03aae7dc
+DIST VirtualBox-5.2.4.tar.bz2 118481693 BLAKE2B 874f5e65d97befaf72767626a1f3271a0b7c30f8dc998dc10aee9478039cecd14ce11c9c624ba596c09641aae9a41ca91ae33e5a82218bc8acd8cd32ebb727e1 SHA512 19cb168393098fd28ab2017a27d09a558721d57b31c5d3610deb68a17dfa7fd7ffe9ad7be18714a314724ab5ecb54e7ab5fb76183e8e89afbed2da79649e2798
 DIST virtualbox-5.1.24-patches-01.tar.xz 2708 BLAKE2B 6779a7ad1b013cf2e735817eae9785451c6a91e4a61558a650cfdc67d80b63db0eb33992a3207b0acc1e80b75caef14d9d291705ca7b3c96c4185c31e585e92d SHA512 0028e593818013f809831ac5a73eec63988c0aefb4b309fb3c928efbea8db8b8f46bd7c82f156396adc704f0567474df262dfe9bb6e09af0b2c23528fe2c6e2d
 DIST virtualbox-5.1.30-patches-02.tar.xz 2608 BLAKE2B 08b05a26622a7acec455f6d0dc72858f5f2758488e50d219f83c3d12606419d48e9d99302cde5a275929fe79af900c1b3ea3957fe9dfdaa952aaa0da9933291a SHA512 8a490f7cc44e40262fc47819736251c177adb635256794e9500f52729197c85211d5b0c0d000268089953a4c185872a8ba03c5d42df6b80f05eac8b81335320a
 DIST virtualbox-5.2.0-patches-01.tar.xz 2460 BLAKE2B d3f973dc7ee0557c360f801c3bf84065a7e7bc9960984398b8f86d71fab32c59774e970c6cf873be07bcb9666af168570e8a78705a5999b1fc5d863dbbc6e538 SHA512 b91278dd81a50e412f5a281c72949f591a1c53303080549b74b28763cab9e3948948afb0256e0453d17736683cca3372a8e9c6d63f02f3eff3ef92c2a1ea332b

diff --git a/app-emulation/virtualbox/virtualbox-5.2.4.ebuild b/app-emulation/virtualbox/virtualbox-5.2.4.ebuild
new file mode 100644
index 00000000000..f6ef3647989
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-5.2.4.ebuild
@@ -0,0 +1,459 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 toolchain-funcs udev xdg-utils
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+	https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.0-patches-01.tar.xz"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="http://www.virtualbox.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc headless java libressl lvm 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
+		)
+	)
+	java? ( >=virtual/jre-1.6:= )
+	libressl? ( dev-libs/libressl:= )
+	!libressl? ( dev-libs/openssl:0= )
+	lvm? ( sys-fs/lvm2 )
+	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/jre-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}"
+
+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"
+
+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.1.24-nopie.patch"
+	fi
+
+	# Only add paxmark patch when we're on pax_kernel
+	if use pax_kernel ; then
+		eapply "${FILESDIR}"/virtualbox-5.1.4-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
+	)
+	use alsa       || myconf+=( --disable-alsa )
+	use debug      && myconf+=( --build-debug )
+	use doc        || myconf+=( --disable-docs )
+	use java       || myconf+=( --disable-java )
+	use lvm        || myconf+=( --disable-devmapper )
+	use opengl     || myconf+=( --disable-opengl )
+	use pulseaudio || myconf+=( --disable-pulse )
+	use python     || myconf+=( --disable-python )
+	use vboxwebsrv && myconf+=( --enable-webservice )
+	use vnc        && myconf+=( --enable-vnc )
+	if ! use headless ; then
+		use qt5 || myconf+=( --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 "${D}"/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 "${D}"${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
+
+	# VRDPAuth only works with this (bug #351949)
+	dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+
+	# 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 "${D}"${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 "${D}"${vbox_inst_path}/VirtualBox
+
+			if use opengl ; then
+				vbox_inst VBoxTestOGL
+				pax-mark -m "${D}"${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
+
+			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 "${D}${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+			java-pkg_regso "${D}${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
+}
+
+pkg_postinst() {
+	xdg_desktop_database_update
+
+	if use udev ; then
+		udevadm control --reload-rules \
+			&& udevadm trigger --subsystem-match=usb
+	fi
+
+	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 "IMPORTANT!"
+	elog "If you upgrade from app-emulation/virtualbox-ose make sure to run"
+	elog "\"env-update\" as root and logout and relogin as the user you wish"
+	elog "to run ${PN} as."
+	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_desktop_database_update
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-guest-additions/, app-emulation/virtualbox-additions/, ...
@ 2018-02-28 10:39 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2018-02-28 10:39 UTC (permalink / raw
  To: gentoo-commits

commit:     6d42a65c201dbf0c72889a86a30eef7ecd0339ba
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 28 10:39:39 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Feb 28 10:39:39 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d42a65c

virtualbox packages: Bump to versions 5.1.34 and 5.2.8

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-emulation/virtualbox-additions/Manifest        |   2 +
 .../virtualbox-additions-5.1.34.ebuild             |  35 +++
 .../virtualbox-additions-5.2.8.ebuild              |  35 +++
 app-emulation/virtualbox-bin/Manifest              |   8 +
 .../virtualbox-bin-5.1.34.121010.ebuild            | 287 +++++++++++++++++++++
 .../virtualbox-bin-5.2.8.121009.ebuild             | 287 +++++++++++++++++++++
 app-emulation/virtualbox-extpack-oracle/Manifest   |   2 +
 .../virtualbox-extpack-oracle-5.1.34.121010.ebuild |  42 +++
 .../virtualbox-extpack-oracle-5.2.8.121009.ebuild  |  42 +++
 app-emulation/virtualbox-guest-additions/Manifest  |   2 +
 .../virtualbox-guest-additions-5.1.34.ebuild       | 221 ++++++++++++++++
 .../virtualbox-guest-additions-5.2.8.ebuild        | 228 ++++++++++++++++
 app-emulation/virtualbox-modules/Manifest          |   2 +
 .../virtualbox-modules-5.1.34.ebuild               |  65 +++++
 .../virtualbox-modules-5.2.8.ebuild                |  56 ++++
 app-emulation/virtualbox/Manifest                  |   2 +
 ...albox-5.2.6.ebuild => virtualbox-5.1.34.ebuild} |  11 +-
 app-emulation/virtualbox/virtualbox-5.2.6.ebuild   |   2 +-
 ...ualbox-5.2.6.ebuild => virtualbox-5.2.8.ebuild} |   7 +-
 x11-drivers/xf86-video-virtualbox/Manifest         |   1 +
 .../xf86-video-virtualbox-5.1.34.ebuild            | 192 ++++++++++++++
 21 files changed, 1514 insertions(+), 15 deletions(-)

diff --git a/app-emulation/virtualbox-additions/Manifest b/app-emulation/virtualbox-additions/Manifest
index cc03e64c652..d0d9cea111c 100644
--- a/app-emulation/virtualbox-additions/Manifest
+++ b/app-emulation/virtualbox-additions/Manifest
@@ -1,2 +1,4 @@
 DIST VBoxGuestAdditions_5.1.32.iso 59512832 BLAKE2B 73fcbb3d1db1056970a86e9c1c1efe1f8ddc3566c327df5bb8e14b22b827fc603dcba580a6db60c75f3dff00f268313ac196d49355e184395793363c6d16df68 SHA512 073b103308f7cab18ca096bbb863d8cdea8efd8aa4896b2ab2a6326f549f1cf6afb70ccb55baa1dab85485879e522584a9f91adb4434c5f8bd649e73dae65900
+DIST VBoxGuestAdditions_5.1.34.iso 59619328 BLAKE2B e8e7786a82785c4d58c2206c3ede4119c435c2884eba470128cd12ad968077eea7a7850fb05c20ef18ec01fb27919ae29a706d4b059203a7a55dba94f7680564 SHA512 e8c376a558991d603fbb6554969d27c510621bfd8f53542126f57c3604d68f6da7f7732361369b6144794575f40c22e0df0a9b2b4190d3462d80c035b7f0451f
 DIST VBoxGuestAdditions_5.2.6.iso 57866240 BLAKE2B a9028dc084eaf8e2a759112a2dfcc9f15486a1479fbb0c3ab77484e2775b8ed8df3759d265b73bea18cf20e02d82c022c8af1f23e9a640b89f69d2a6bd8c3e26 SHA512 23fe9512455d77b4cade7f731c9244439882ae54068158384e96c988ba7b4e2721ba2414189f6366f7c2d13f6e5355a0fa0bff501db6087705b8d1242e9d0f2a
+DIST VBoxGuestAdditions_5.2.8.iso 57972736 BLAKE2B 4f78b5faa8379777f88be98af1c6e023863395004d5326a698801141ed939edbb04f5109967179e8777bdfae39a77ffa724c9f08f54a14a8898a074512318816 SHA512 29d1bd00e6f5f5ceb7fa50719dde6e05b17111583a0ada16f47cd1e38e9302a3d5d4d7708cef9c8c3f9c4eb2d5ccc276c792700e0733cec2dc611ba1e5bed098

diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-5.1.34.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-5.1.34.ebuild
new file mode 100644
index 00000000000..a28d6005cb4
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-5.1.34.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+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-additions/virtualbox-additions-5.2.8.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.8.ebuild
new file mode 100644
index 00000000000..a28d6005cb4
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.8.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+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 e749dc55d02..34552b2e5df 100644
--- a/app-emulation/virtualbox-bin/Manifest
+++ b/app-emulation/virtualbox-bin/Manifest
@@ -1,8 +1,16 @@
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.32-120294.tar.gz 19589163 BLAKE2B b35d9bb90216a77706fe5f0de624affaff4177d4b6e561f7c76003efd1a386a1f5b5f6b1c6b559cddde6ffb55ab5f7eba3e4c9b2135f31c09313b473ba6579e5 SHA512 c1e13fc59b9556f980bec02bb2860e717f752d42c3d810f70267e5c07898bb1aba9d3f3403fa5aa388478aa609397da49dcf10311836d68093101715a6ae200d
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.34-121010.tar.gz 19591849 BLAKE2B 573afe3624a3eace4272a067f472e32dbe344755814aefaa8d6685da0ff31e04faa7f6a22a58974938067fce3a0ea3d66a0c5d02db999105029cc7c5c8fea24b SHA512 4f05bc7abe989fbc0928aba259ad60b09f5b085859c0ddc3e24c052fdb4becb055795c8f0038fc4dd95be7b9954a3034afd499798bb58fe16522602cfe91e7fa
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.6-120293.tar.gz 19468503 BLAKE2B 5e1e490352fb06ceee868171583e50f8ca634a53799237cd1a3632566b6ca14d526e714156ccbeae48bf01aa4372a89d8926601cf5c1d8d34127d2d1e6a53edb SHA512 f81715b5e89ae21080d9a1b23cfd9be30bc35b32963c1b710262c1ee88bedc405dd9d2ff96761b8725716bd98625eea58fc076de6d42a4728078ebe303e195af
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.8-121009.tar.gz 19469421 BLAKE2B 81651876802ad767339f3984a26375118f01e4b99b4247398e0cea8d749905431b40945f8a72d0c7802b2743080f01d3044aafd21600c4927773994c5a114a1f SHA512 2b69e2acab91ce95e9807006c79862fc0d1d10fdd269bd9cdf8f11b6704821823b103c7a4a76ad99c10e0868bd397ffe0e72b2eb2aa4fc2bd81ff968c71c2280
 DIST VirtualBox-5.1.32-120294-Linux_amd64.run 88360402 BLAKE2B f548855260467be536f2e5ff95ae110636b1fa824a78058cf9318b21592d9643bd780691984ff803c7b0ec998f8e1720d81731fb26df42718cfe3c7b56ad09e4 SHA512 3b7e722ee231ad087b4d2419406e46b6b33a7947d6dcc8ecc0456f04925fb551810c5f27a54d9c99b0d729c1bb0d5d79d17bb8720291c8210ab88c15215244ec
 DIST VirtualBox-5.1.32-120294-Linux_x86.run 87387598 BLAKE2B 657842740d52f046c969196ca776e5572e3bfde55587575bdcc2a957863bb890a40954c9fa014e9184ee77e1e5a81388eadbc5fcfcd22a21c0485e25074bb900 SHA512 38cb01d89edb1fcb44940bdd94c69af824577ebc9fa30a5a2c7c837142fc70848326325b9ee131ad878a9dce71e10b9762854ef0aa66c9060c159abc40c89241
+DIST VirtualBox-5.1.34-121010-Linux_amd64.run 88309202 BLAKE2B 77b906e52f54926a3d6a41ec54de906b4beca3c7ae817d3db20a480352ba4804d28cc41d8b501e89893b4ba153e8c62c7d9d106acd771c35431a1c841e964cdb SHA512 28b0b9cd58e1deba8b008bd0a2f611400de426701d9256cad58527761cfaed52949bb817a7b2cc101e15f524c79a605972349d87b637b7497ada0816421ecf4c
+DIST VirtualBox-5.1.34-121010-Linux_x86.run 87377358 BLAKE2B 48a0011a8fe80604a660eeb833b5b406f19827d9e22a0ae1f7a1394951b554a3d141d2150640107ebbb3d381b783084b7f7a2c4265302727524b98ced947c756 SHA512 7866f35f315ad9207fe85e0cfdbff7e5fb19f55ec1bff07606cadf68a9f7f965169b7c95713599952db4c9ba346f0813169f944e0d69702c4f2c43f35ff6c61f
 DIST VirtualBox-5.2.6-120293-Linux_amd64.run 88554959 BLAKE2B ca35ed89b47a65c82abdc5268ec2b85fc78f405981e0919198effb99ca307fa74e2329d3901fcae9a18fada1dbefc2c39feec78609b818acf89ed09036f3693a SHA512 501e3de48553e3664242303c6f403784ffa71cb064de36c141a2be67aebe1d44161aab62af2101ada277cc02d98678fffbabbeb3aee69a5f97dca5dddb3ea553
 DIST VirtualBox-5.2.6-120293-Linux_x86.run 87725517 BLAKE2B 301a44c5086377cff6e8cce794238661bebd6417a645de64227cfd5dccda5091d2bd88c33beaf393ceba61d912aed672eeba6ca084dd56553e042dfb0709a1f2 SHA512 f44753fdaad115aea5a576ac0b04463b7c25958c5c0a2cb20de76ef24045addbbd6fdfee60b0070149f78add2225f3384a523abd7938ee83f2fd9e79414b0742
+DIST VirtualBox-5.2.8-121009-Linux_amd64.run 88493520 BLAKE2B 2986918bb2eda12447468fb642d3760d999d3af3e5595bf7260e94572f15a811655cd3f1348e1cf23a827011b1eebf84f07f13185f4eab3c353a957c58c105d4 SHA512 211f94910ef50a00b178482c0600be48ecddb48086846515b7705b111a36f81346efd4cbeb39255d85f3a0e778509e0dd7676e4c9bcbea49014988be8635910f
+DIST VirtualBox-5.2.8-121009-Linux_x86.run 87705037 BLAKE2B 8d6774d0be3a3e12cd258bb6799e6f3eb84a3cff670277c0b910671879014b513d1e2958ebf60f5aaa1ee4ef56be52cc0908b3cb5fa25fa78db77023fbbb3660 SHA512 ee75f64332a8d1df61b60a28661d7b7ef760c789dabca61b749f5cf33ffbe5ef09d64bde6da4255e659b1bf86d947eca8d18d697738e4de9f6b0b423ea647e9b
 DIST VirtualBoxSDK-5.1.32-120294.zip 9860157 BLAKE2B c9222bc865bdd70cc2ac516b27d1a1c91e0c05b04129a0c9793701ca8080c184ae2d8157bf687995c074aa03b8242e931164b03c5942e4d57589def16aa21b57 SHA512 aa2f0b647e177f95543c41beca64546a5d9b68f2081365ceb9a4494e500747de55fc71e899f31d65b96a9b5a1c8bfeaf8518ddb45791fb25e0ad992776c4c186
+DIST VirtualBoxSDK-5.1.34-121010.zip 9863604 BLAKE2B 63c7a28d509a910d4b63e7784a85a2cb125c6d5f6b6bf311c971235c706c4279266f40853f4c735ad41b483fd4febbf36bf9f07477e73675d39846b20e9105d7 SHA512 8a3931132e4eaffbcd82d64e9b34d6c2cce0c2971731b10af97f4e79e926baecd3ba3ead4b454512115e59c3f186d466ddbc9b13c83230f2b80743f5e0d0578c
 DIST VirtualBoxSDK-5.2.6-120293.zip 10149320 BLAKE2B cc42df0d5e6a3f100fe5b205c6ab930f5537a9671c69ade26f60fe0922dd57ee2e82354e142acfcf08da3a5bd89ae796fa17a02b672185a7d7a78685df93f4b3 SHA512 73c50891df9094e4a894fe6a39026f2fc267f4cf6be9ce3130a8e20650ca7787c76cdf456c3d0035111ec3110d8300b5a9d15a4de3f2bdaa583980a4b83d5d6f
+DIST VirtualBoxSDK-5.2.8-121009.zip 10153749 BLAKE2B 0534f568f83d73f70f4192389e0f602bc4184d45a4a1aa82983692bf4e35fac0589eef21f5aa561c88c736aaa398986de0077dcdf3aa211df655788f5592b423 SHA512 386e38ee6e584ff8b0444b9285a67d259bb93f53d6e6b6e082cefd4121578da91ea56e2eb329b6848ff5476a14ad3055287b806cd25a21155aa6f708c58244a5

diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-5.1.34.121010.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-5.1.34.121010.ebuild
new file mode 100644
index 00000000000..256314a1aed
--- /dev/null
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-5.1.34.121010.ebuild
@@ -0,0 +1,287 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils xdg-utils gnome2 pax-utils python-r1 udev unpacker versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 5)"
+	MY_PV="${MY_PV/beta/BETA}"
+	MY_PV="${MY_PV/rc/RC}"
+else
+	MY_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(get_version_component_range 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 "${D}"/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 "${D}"/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 "${D}"/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 "${D}"${udevdir}/rules.d/10-virtualbox.rules || die
+	# move udev scripts into ${udevdir} (bug #372491)
+	mv "${D}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${D}"${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-bin/virtualbox-bin-5.2.8.121009.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.8.121009.ebuild
new file mode 100644
index 00000000000..256314a1aed
--- /dev/null
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.8.121009.ebuild
@@ -0,0 +1,287 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils xdg-utils gnome2 pax-utils python-r1 udev unpacker versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 5)"
+	MY_PV="${MY_PV/beta/BETA}"
+	MY_PV="${MY_PV/rc/RC}"
+else
+	MY_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(get_version_component_range 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 "${D}"/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 "${D}"/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 "${D}"/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 "${D}"${udevdir}/rules.d/10-virtualbox.rules || die
+	# move udev scripts into ${udevdir} (bug #372491)
+	mv "${D}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${D}"${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 fc4f1cc5232..42e8aaff756 100644
--- a/app-emulation/virtualbox-extpack-oracle/Manifest
+++ b/app-emulation/virtualbox-extpack-oracle/Manifest
@@ -1,2 +1,4 @@
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.32-120294.tar.gz 19589163 BLAKE2B b35d9bb90216a77706fe5f0de624affaff4177d4b6e561f7c76003efd1a386a1f5b5f6b1c6b559cddde6ffb55ab5f7eba3e4c9b2135f31c09313b473ba6579e5 SHA512 c1e13fc59b9556f980bec02bb2860e717f752d42c3d810f70267e5c07898bb1aba9d3f3403fa5aa388478aa609397da49dcf10311836d68093101715a6ae200d
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.34-121010.tar.gz 19591849 BLAKE2B 573afe3624a3eace4272a067f472e32dbe344755814aefaa8d6685da0ff31e04faa7f6a22a58974938067fce3a0ea3d66a0c5d02db999105029cc7c5c8fea24b SHA512 4f05bc7abe989fbc0928aba259ad60b09f5b085859c0ddc3e24c052fdb4becb055795c8f0038fc4dd95be7b9954a3034afd499798bb58fe16522602cfe91e7fa
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.6-120293.tar.gz 19468503 BLAKE2B 5e1e490352fb06ceee868171583e50f8ca634a53799237cd1a3632566b6ca14d526e714156ccbeae48bf01aa4372a89d8926601cf5c1d8d34127d2d1e6a53edb SHA512 f81715b5e89ae21080d9a1b23cfd9be30bc35b32963c1b710262c1ee88bedc405dd9d2ff96761b8725716bd98625eea58fc076de6d42a4728078ebe303e195af
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.8-121009.tar.gz 19469421 BLAKE2B 81651876802ad767339f3984a26375118f01e4b99b4247398e0cea8d749905431b40945f8a72d0c7802b2743080f01d3044aafd21600c4927773994c5a114a1f SHA512 2b69e2acab91ce95e9807006c79862fc0d1d10fdd269bd9cdf8f11b6704821823b103c7a4a76ad99c10e0868bd397ffe0e72b2eb2aa4fc2bd81ff968c71c2280

diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.34.121010.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.34.121010.ebuild
new file mode 100644
index 00000000000..7d7d5d2ea35
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.34.121010.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 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="$(get_version_component_range 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-extpack-oracle/virtualbox-extpack-oracle-5.2.8.121009.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.8.121009.ebuild
new file mode 100644
index 00000000000..7d7d5d2ea35
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.8.121009.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 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="$(get_version_component_range 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 4849fb9c5de..fc6326ed71e 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -1,4 +1,6 @@
 DIST VirtualBox-5.1.32.tar.bz2 117268301 BLAKE2B 336df054e3407d7e701d6719258cfcba9beec1439cbe94f137570cfcbdea02df3e34374ac36d3b4387c47ebafd17a0f05c2fb710eb4f140d8200117b505aba98 SHA512 052ac1672515a36c4138e2d52672a466d4c768f219f52eefe98e747a292ebebe04e7de35547eae6803654be5dc937b8e6f4d358a65fd4f49a8333eac8862d138
+DIST VirtualBox-5.1.34.tar.bz2 117291269 BLAKE2B 0eb9b3f778f2d677ac3635fa59dfa6861d0fec3c0331582e5961b78ab55b5ab26bbf286de05a3e87e8a64e2b54861613a8d2c93f70736a07c551dca834786abd SHA512 0f828e58d68678a0a94a39c12313425105f9255ca207d40dd04065d0072857cdc4fc886f944b852c3fb63fed04d70a3449aecd2aab9e27af7f13b506143a4b6f
 DIST VirtualBox-5.2.6.tar.bz2 118530572 BLAKE2B 19d32a9252e9594a4c09828bc2bc739c46daf409745c01f764fb54bc17faa667081a27534ac11666cbf1b417057cb99a416faa42e3986ce4d2c08378e7e7240c SHA512 ed6f801c055e9b8e152118a1ebfecdc15c310fac2b007ea3cd4a404d17cbbbc83782a3baa76b979c72b9399616844291576846d820f8aefb7c4b4ec2eaf36482
+DIST VirtualBox-5.2.8.tar.bz2 118500065 BLAKE2B 64d0cc0f928d224332f59e7966ee1bed8adcf097d27c577b6ecea5cbf203e170e38acca9f2371d6d7aa11f63b73e705b43a0516ccbe5993171f928406b8a3876 SHA512 49a3bd1c60d2c4cbd3799ece5fbfe15d9b6a00c5af9692478a1365a8eb4975228410e17dba24a388c0cf5387cb79fb7492feb4e6b2f531bc17322c3d61de7887
 DIST virtualbox-5.1.30-patches-02.tar.xz 2608 BLAKE2B 08b05a26622a7acec455f6d0dc72858f5f2758488e50d219f83c3d12606419d48e9d99302cde5a275929fe79af900c1b3ea3957fe9dfdaa952aaa0da9933291a SHA512 8a490f7cc44e40262fc47819736251c177adb635256794e9500f52729197c85211d5b0c0d000268089953a4c185872a8ba03c5d42df6b80f05eac8b81335320a
 DIST virtualbox-5.1.32-patches-01.tar.xz 2464 BLAKE2B 28f461634ac7f200b74d961e56f56aea486445bdb8d1490000bd34393b4873ee058d1dc9db6c32084921bd7d51a92be1e38b1b098385f443f41b9231c1489829 SHA512 08782c8eecc0cbb370f21fb3951af449ed1c8174a7184210de376a7d4ca5d64b14b2619d121aacef1c85982c8b485e545e260d3c0fc1f95769093efa23cd2cd2

diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.34.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.34.ebuild
new file mode 100644
index 00000000000..b85dda606c3
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.34.ebuild
@@ -0,0 +1,221 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils 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.1.32-patches-01.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
+		x11-proto/glproto )
+	sys-apps/dbus
+	!!x11-drivers/xf86-input-virtualbox"
+DEPEND="${RDEPEND}
+	>=dev-util/kbuild-0.1.9998_pre20131130
+	>=dev-lang/yasm-0.6.2
+	sys-devel/bin86
+	sys-libs/pam
+	sys-power/iasl
+	X? ( x11-proto/renderproto )
+	!X? ( x11-proto/xproto )"
+PDEPEND="X? ( ~x11-drivers/xf86-video-virtualbox-${PV} )"
+
+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=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}"
+	enewgroup vboxguest
+	enewuser vboxguest -1 /bin/sh /dev/null vboxguest
+	# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+	enewgroup vboxsf
+}
+
+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 "${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...
+	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"' \
+		>> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+		|| die
+	echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+		>> "${D}/${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_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-guest-additions/virtualbox-guest-additions-5.2.8.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.8.ebuild
new file mode 100644
index 00000000000..13cfeb79a1d
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.8.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils 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.1.30-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
+		x11-proto/glproto )
+	sys-apps/dbus
+	!!x11-drivers/xf86-input-virtualbox
+	!x11-drivers/xf86-video-virtualbox
+"
+DEPEND="
+	${RDEPEND}
+	>=dev-util/kbuild-0.1.9998.3127
+	>=dev-lang/yasm-0.6.2
+	sys-devel/bin86
+	sys-libs/pam
+	sys-power/iasl
+	X? ( x11-proto/renderproto )
+	!X? ( x11-proto/xproto )
+"
+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=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}"
+	enewgroup vboxguest
+	enewuser vboxguest -1 /bin/sh /dev/null vboxguest
+	# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+	enewgroup vboxsf
+}
+
+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...
+	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
+
+	rm "${WORKDIR}/patches/011_virtualbox-5.1.30-sysmacros.patch" || 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"' \
+		>> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+		|| die
+	echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+		>> "${D}/${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_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 51e286048f7..fba419847f6 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,2 +1,4 @@
 DIST vbox-kernel-module-src-5.1.32.tar.xz 626600 BLAKE2B eb3243d62d1a22f41f5ea2307b13a3f5ce17a19edcecb0340f94d34995e557b016195443a53edc9d68a313d064008e5af04c7fff28540ec513c6e9a5955e02e0 SHA512 10ead68e53ae6bd72e39b31d536fc36e0999fe506a6d7fd6a6f9e462d539213ad65deb56e2b926baa5cc4b16fb4071d89e105889e873fda0e4a1f20387a7cd39
+DIST vbox-kernel-module-src-5.1.34.tar.xz 627576 BLAKE2B c1bd2af511824e5a74c3b85b73b7bc1664dd3651db3c17bbcba06b5ef8d9ba11c1a5c92bf28f443fb17aee1d057310f20a62c1a4608ce84eb087de61cbe67c25 SHA512 6176036a22d316e15c6560c124cfce9e93c6508a78e189bbe8e431ccf006b74d5f34ea747c9ca307bbd90e0c6fa414056ae0b56a5aa8124c2263de3d0dbf97d1
 DIST vbox-kernel-module-src-5.2.6.tar.xz 635096 BLAKE2B 8c168b9e1d3de395ef663ca81edf63939cb7670f769995c20f9d4cb4f87194b22812707bfd62d52dd85e19de2562c27c182aad22f40928358cf07a0c5ac15d79 SHA512 c85f94e08357a11574af306b00e71c445b80ef6dea6c47d9cf1003c0d9f36d265ebadd2ae27b3dd96f41cc544e501d3eb0551559bebf25d35b9861a282f489bc
+DIST vbox-kernel-module-src-5.2.8.tar.xz 636172 BLAKE2B 0a0be16ee830dbf60e9bd8e0aa977ad020374d65c4ea19689bd20f7399da87633ac9ef57e2297963937e4d5eb82173a50beacd8ddd1b54943fe8d24fe723e3f4 SHA512 8875048d827ebbedec37864e219033305a228903b01d7ca22b371b02de9b23099d3bc76ddef4887b633f1215e73daa5db6e35c8d2e21f90200f439b15792d05f

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.34.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.34.ebuild
new file mode 100644
index 00000000000..cb21bd965ab
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.34.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Foundation
+# 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=6
+
+inherit eutils linux-mod user
+
+MY_P=vbox-kernel-module-src-${PV}
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="http://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
+
+	CONFIG_CHECK="!TRIM_UNUSED_KSYMS"
+	ERROR_TRIM_UNUSED_KSYMS="The kernel option CONFIG_TRIM_UNUSED_KSYMS removed kernel symbols that are needed by ${PN} to load correctly."
+
+	linux-mod_pkg_setup
+
+	BUILD_PARAMS="KERN_DIR=${KV_DIR} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
+}
+
+src_prepare() {
+	if kernel_is -ge 2 6 33 ; then
+		# evil patch for new kernels - header moved
+		grep -lR linux/autoconf.h *  | xargs sed -i -e 's:<linux/autoconf.h>:<generated/autoconf.h>:'
+	fi
+
+	if use pax_kernel && kernel_is -ge 3 0 0 ; then
+		eapply "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
+	fi
+
+	if kernel_is -ge 4 14 0 ; then
+		eapply "${FILESDIR}"/${PN}-5.1.30-udp.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-modules/virtualbox-modules-5.2.8.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.8.ebuild
new file mode 100644
index 00000000000..8bbaca49a8f
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.8.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2018 Gentoo Foundation
+# 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=6
+
+inherit eutils linux-mod user
+
+MY_P=vbox-kernel-module-src-${PV}
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="http://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
+
+	CONFIG_CHECK="!TRIM_UNUSED_KSYMS"
+	ERROR_TRIM_UNUSED_KSYMS="The kernel option CONFIG_TRIM_UNUSED_KSYMS removed kernel symbols that are needed by ${PN} to load correctly."
+
+	linux-mod_pkg_setup
+
+	BUILD_PARAMS="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 "${FILESDIR}"/${PN}-4.1.4-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 17a2f4cac81..1f7c7371fa4 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,4 +1,6 @@
 DIST VirtualBox-5.1.32.tar.bz2 117268301 BLAKE2B 336df054e3407d7e701d6719258cfcba9beec1439cbe94f137570cfcbdea02df3e34374ac36d3b4387c47ebafd17a0f05c2fb710eb4f140d8200117b505aba98 SHA512 052ac1672515a36c4138e2d52672a466d4c768f219f52eefe98e747a292ebebe04e7de35547eae6803654be5dc937b8e6f4d358a65fd4f49a8333eac8862d138
+DIST VirtualBox-5.1.34.tar.bz2 117291269 BLAKE2B 0eb9b3f778f2d677ac3635fa59dfa6861d0fec3c0331582e5961b78ab55b5ab26bbf286de05a3e87e8a64e2b54861613a8d2c93f70736a07c551dca834786abd SHA512 0f828e58d68678a0a94a39c12313425105f9255ca207d40dd04065d0072857cdc4fc886f944b852c3fb63fed04d70a3449aecd2aab9e27af7f13b506143a4b6f
 DIST VirtualBox-5.2.6.tar.bz2 118530572 BLAKE2B 19d32a9252e9594a4c09828bc2bc739c46daf409745c01f764fb54bc17faa667081a27534ac11666cbf1b417057cb99a416faa42e3986ce4d2c08378e7e7240c SHA512 ed6f801c055e9b8e152118a1ebfecdc15c310fac2b007ea3cd4a404d17cbbbc83782a3baa76b979c72b9399616844291576846d820f8aefb7c4b4ec2eaf36482
+DIST VirtualBox-5.2.8.tar.bz2 118500065 BLAKE2B 64d0cc0f928d224332f59e7966ee1bed8adcf097d27c577b6ecea5cbf203e170e38acca9f2371d6d7aa11f63b73e705b43a0516ccbe5993171f928406b8a3876 SHA512 49a3bd1c60d2c4cbd3799ece5fbfe15d9b6a00c5af9692478a1365a8eb4975228410e17dba24a388c0cf5387cb79fb7492feb4e6b2f531bc17322c3d61de7887
 DIST virtualbox-5.1.32-patches-01.tar.xz 2464 BLAKE2B 28f461634ac7f200b74d961e56f56aea486445bdb8d1490000bd34393b4873ee058d1dc9db6c32084921bd7d51a92be1e38b1b098385f443f41b9231c1489829 SHA512 08782c8eecc0cbb370f21fb3951af449ed1c8174a7184210de376a7d4ca5d64b14b2619d121aacef1c85982c8b485e545e260d3c0fc1f95769093efa23cd2cd2
 DIST virtualbox-5.2.0-patches-01.tar.xz 2460 BLAKE2B d3f973dc7ee0557c360f801c3bf84065a7e7bc9960984398b8f86d71fab32c59774e970c6cf873be07bcb9666af168570e8a78705a5999b1fc5d863dbbc6e538 SHA512 b91278dd81a50e412f5a281c72949f591a1c53303080549b74b28763cab9e3948948afb0256e0453d17736683cca3372a8e9c6d63f02f3eff3ef92c2a1ea332b

diff --git a/app-emulation/virtualbox/virtualbox-5.2.6.ebuild b/app-emulation/virtualbox/virtualbox-5.1.34.ebuild
similarity index 97%
copy from app-emulation/virtualbox/virtualbox-5.2.6.ebuild
copy to app-emulation/virtualbox/virtualbox-5.1.34.ebuild
index e40976f0165..e933a7f1041 100644
--- a/app-emulation/virtualbox/virtualbox-5.2.6.ebuild
+++ b/app-emulation/virtualbox/virtualbox-5.1.34.ebuild
@@ -11,9 +11,9 @@ MY_PV="${MY_PV/rc/RC}"
 MY_P=VirtualBox-${MY_PV}
 
 DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="http://www.virtualbox.org/"
+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.0-patches-01.tar.xz"
+	https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.1.32-patches-01.tar.xz"
 
 LICENSE="GPL-2"
 SLOT="0"
@@ -54,7 +54,7 @@ RDEPEND="!app-emulation/virtualbox-bin
 	udev? ( >=virtual/udev-171 )
 	vnc? ( >=net-libs/libvncserver-0.9.9 )"
 DEPEND="${RDEPEND}
-	>=dev-util/kbuild-0.1.9998.3127
+	>=dev-util/kbuild-0.1.9998_pre20131130-r1
 	>=dev-lang/yasm-0.6.2
 	sys-devel/bin86
 	sys-libs/libcap
@@ -440,11 +440,6 @@ pkg_postinst() {
 	elog "For advanced networking setups you should emerge:"
 	elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
 	elog ""
-	elog "IMPORTANT!"
-	elog "If you upgrade from app-emulation/virtualbox-ose make sure to run"
-	elog "\"env-update\" as root and logout and relogin as the user you wish"
-	elog "to run ${PN} as."
-	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"

diff --git a/app-emulation/virtualbox/virtualbox-5.2.6.ebuild b/app-emulation/virtualbox/virtualbox-5.2.6.ebuild
index e40976f0165..b1b10dbd411 100644
--- a/app-emulation/virtualbox/virtualbox-5.2.6.ebuild
+++ b/app-emulation/virtualbox/virtualbox-5.2.6.ebuild
@@ -11,7 +11,7 @@ MY_PV="${MY_PV/rc/RC}"
 MY_P=VirtualBox-${MY_PV}
 
 DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="http://www.virtualbox.org/"
+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.0-patches-01.tar.xz"
 

diff --git a/app-emulation/virtualbox/virtualbox-5.2.6.ebuild b/app-emulation/virtualbox/virtualbox-5.2.8.ebuild
similarity index 98%
copy from app-emulation/virtualbox/virtualbox-5.2.6.ebuild
copy to app-emulation/virtualbox/virtualbox-5.2.8.ebuild
index e40976f0165..608ae644b8f 100644
--- a/app-emulation/virtualbox/virtualbox-5.2.6.ebuild
+++ b/app-emulation/virtualbox/virtualbox-5.2.8.ebuild
@@ -11,7 +11,7 @@ MY_PV="${MY_PV/rc/RC}"
 MY_P=VirtualBox-${MY_PV}
 
 DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="http://www.virtualbox.org/"
+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.0-patches-01.tar.xz"
 
@@ -440,11 +440,6 @@ pkg_postinst() {
 	elog "For advanced networking setups you should emerge:"
 	elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
 	elog ""
-	elog "IMPORTANT!"
-	elog "If you upgrade from app-emulation/virtualbox-ose make sure to run"
-	elog "\"env-update\" as root and logout and relogin as the user you wish"
-	elog "to run ${PN} as."
-	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"

diff --git a/x11-drivers/xf86-video-virtualbox/Manifest b/x11-drivers/xf86-video-virtualbox/Manifest
index 8a95cceb93d..c3040492dc3 100644
--- a/x11-drivers/xf86-video-virtualbox/Manifest
+++ b/x11-drivers/xf86-video-virtualbox/Manifest
@@ -1 +1,2 @@
 DIST VirtualBox-5.1.32.tar.bz2 117268301 BLAKE2B 336df054e3407d7e701d6719258cfcba9beec1439cbe94f137570cfcbdea02df3e34374ac36d3b4387c47ebafd17a0f05c2fb710eb4f140d8200117b505aba98 SHA512 052ac1672515a36c4138e2d52672a466d4c768f219f52eefe98e747a292ebebe04e7de35547eae6803654be5dc937b8e6f4d358a65fd4f49a8333eac8862d138
+DIST VirtualBox-5.1.34.tar.bz2 117291269 BLAKE2B 0eb9b3f778f2d677ac3635fa59dfa6861d0fec3c0331582e5961b78ab55b5ab26bbf286de05a3e87e8a64e2b54861613a8d2c93f70736a07c551dca834786abd SHA512 0f828e58d68678a0a94a39c12313425105f9255ca207d40dd04065d0072857cdc4fc886f944b852c3fb63fed04d70a3449aecd2aab9e27af7f13b506143a4b6f

diff --git a/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.34.ebuild b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.34.ebuild
new file mode 100644
index 00000000000..932d9378fad
--- /dev/null
+++ b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.34.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils multilib python-single-r1 versionator toolchain-funcs
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+DESCRIPTION="VirtualBox X11 video driver for Gentoo guest"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dri"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+	>=x11-base/xorg-server-1.7:=[-minimal]
+	x11-libs/libXcomposite
+	${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+	>=dev-lang/yasm-0.6.2
+	>=dev-util/kbuild-0.1.9998_pre20131130
+	sys-power/iasl
+	x11-proto/fontsproto
+	x11-proto/randrproto
+	x11-proto/renderproto
+	x11-proto/resourceproto
+	x11-proto/scrnsaverproto
+	x11-proto/xextproto
+	x11-proto/xineramaproto
+	x11-proto/xproto
+	x11-libs/libXdmcp
+	x11-libs/libXau
+	x11-libs/libX11
+	x11-libs/libXfixes
+	x11-libs/libXext
+	dri? (  x11-proto/xf86driproto
+		>=x11-libs/libdrm-2.4.5 )"
+PDEPEND="dri? ( ~app-emulation/virtualbox-guest-additions-${PV} )"
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+S="${WORKDIR}/${MY_P}"
+MODULES_SRC_DIR="${S}/src/VBox/Additions/linux/drm"
+
+PATCHES=(
+	# Ugly hack to build the opengl part of the video driver
+	"${FILESDIR}/${PN}-2.2.0-enable-opengl.patch"
+
+	# unset useless/problematic checks in configure
+	"${FILESDIR}/${PN}-5.0.0_beta3-configure_checks.patch"
+
+	# xorg-1.19 patch from opensuse (bug #602784)
+	"${FILESDIR}/${PN}-5.1.10-xorg119.patch"
+)
+
+QA_TEXTRELS_x86="usr/lib/VBoxOGL.so"
+
+pkg_setup() {
+	if [ "${MERGE_TYPE}" != "binary" ]; then
+		version_is_at_least 4.9 $(gcc-version) || die "Please set gcc 4.9 or higher as active in gcc-config to build ${PN}"
+	fi
+
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	# Prepare the vboxvideo_drm Makefiles and build dir
+	eapply "${FILESDIR}"/${PN}-5.1.24-Makefile.module.kms.patch
+
+	# Remove shipped binaries (kBuild,yasm), see bug #232775
+	rm -r kBuild/bin tools || die
+
+	# Disable things unused or splitted into separate ebuilds
+	cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+
+	# Remove pointless GCC version check
+	sed -e '/^check_gcc$/d' -i configure || die
+
+	default
+
+	# link with lazy on hardened #394757
+	sed '/^TEMPLATE_VBOXR3EXE_LDFLAGS.linux/s/$/ -Wl,-z,lazy/' \
+		-i Config.kmk || die
+}
+
+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() {
+	local each targets=(
+		Runtime
+		Additions/common/VBoxGuestLib
+		GuestHost/OpenGL
+		Additions/x11/x11stubs
+		Additions/common/crOpenGL
+		Additions/x11/vboxvideo
+	)
+
+	# need to use the upstream build system to create necessary objects properly
+	use dri && targets+=( Additions/linux/drm )
+
+	for each in ${targets[@]} ; do
+		pushd "${S}"/src/VBox/${each} &>/dev/null || die
+		MAKE="kmk" \
+		emake TOOL_YASM_AS=yasm \
+		VBOX_USE_SYSTEM_XORG_HEADERS=1 \
+		KBUILD_PATH="${S}/kBuild" \
+		KBUILD_VERBOSE=2
+		popd &>/dev/null || die
+	done
+
+	if use dri; then
+		local objdir="out/linux.${ARCH}/release/obj/vboxvideo_drm"
+		# We need a Makefile, so use Makefile.module.kms
+		ln -s Makefile.module.kms "${MODULES_SRC_DIR}"/Makefile || die
+		# All of these are expected to be in $(KBUILD_EXTMOD)/ so symlink them into place
+		targets=(
+			include
+			src/VBox/Runtime/r0drv
+			src/VBox/Installer/linux/Makefile.include.{head,foot}er
+			out/linux.${ARCH}/release/{product,version,revision}-generated.h
+		)
+		for each in ${targets[@]} ; do
+			ln -s "${S}"/${each} \
+				"${MODULES_SRC_DIR}"/${each##*/} || die
+		done
+		# see the vboxvideo_drm_SOURCES list in Makefile.kmk for the below,
+		# and replace '..' with 'dt'
+		targets=(
+			dt/dt/common/VBoxVideo/HGSMIBase.o
+			dt/dt/common/VBoxVideo/Modesetting.o
+			dt/dt/common/VBoxVideo/VBVABase.o
+			dt/dt/dt/GuestHost/HGSMI/HGSMICommon.o
+			dt/dt/dt/GuestHost/HGSMI/HGSMIMemAlloc.o
+			dt/dt/dt/Runtime/common/alloc/heapoffset.o
+		)
+		for each in ${targets[@]} ; do
+			ln -s "${S}"/${objdir}/${each} \
+				"${MODULES_SRC_DIR}" || die
+			ln -s "${S}"/${objdir}/${each}.dep \
+				"${MODULES_SRC_DIR}" || die
+		done
+	fi
+}
+
+src_install() {
+	cd "${S}/out/linux.${ARCH}/release/bin/additions" || die
+	insinto /usr/$(get_libdir)/xorg/modules/drivers
+	newins vboxvideo_drv_system.so vboxvideo_drv.so
+
+	# Guest OpenGL driver
+	insinto /usr/$(get_libdir)
+	doins -r VBoxOGL*
+
+	if use dri ; then
+		dosym /usr/$(get_libdir)/VBoxOGL.so \
+			/usr/$(get_libdir)/dri/vboxvideo_dri.so
+	fi
+}
+
+pkg_postinst() {
+	elog "You need to edit the file /etc/X11/xorg.conf and set:"
+	elog ""
+	elog "  Driver  \"vboxvideo\""
+	elog ""
+	elog "in the Graphics device section (Section \"Device\")"
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-guest-additions/, app-emulation/virtualbox-additions/, ...
@ 2018-05-10 18:58 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2018-05-10 18:58 UTC (permalink / raw
  To: gentoo-commits

commit:     114e29ad58b3811641cb933ecb6c9e71f0df2be5
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu May 10 18:48:48 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu May 10 18:58:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=114e29ad

virtualbox packages: Bump to versions 5.1.38 and 5.2.12

Package-Manager: Portage-2.3.36, Repoman-2.3.9

 app-emulation/virtualbox-additions/Manifest        |   2 +
 .../virtualbox-additions-5.1.38.ebuild             |  35 ++
 .../virtualbox-additions-5.2.12.ebuild             |  35 ++
 app-emulation/virtualbox-bin/Manifest              |   8 +
 .../virtualbox-bin-5.1.38.122592.ebuild            | 287 +++++++++++++
 .../virtualbox-bin-5.2.12.122591.ebuild            | 287 +++++++++++++
 app-emulation/virtualbox-extpack-oracle/Manifest   |   2 +
 .../virtualbox-extpack-oracle-5.1.38.122592.ebuild |  42 ++
 .../virtualbox-extpack-oracle-5.2.12.122591.ebuild |  42 ++
 app-emulation/virtualbox-guest-additions/Manifest  |   2 +
 .../virtualbox-guest-additions-5.1.38.ebuild       | 219 ++++++++++
 .../virtualbox-guest-additions-5.2.12.ebuild       | 226 ++++++++++
 app-emulation/virtualbox-modules/Manifest          |   2 +
 .../virtualbox-modules-5.1.38.ebuild               |  56 +++
 .../virtualbox-modules-5.2.12.ebuild               |  51 +++
 app-emulation/virtualbox/Manifest                  |   2 +
 app-emulation/virtualbox/virtualbox-5.1.38.ebuild  | 468 +++++++++++++++++++++
 app-emulation/virtualbox/virtualbox-5.2.12.ebuild  | 468 +++++++++++++++++++++
 x11-drivers/xf86-video-virtualbox/Manifest         |   1 +
 .../xf86-video-virtualbox-5.1.38.ebuild            | 192 +++++++++
 20 files changed, 2427 insertions(+)

diff --git a/app-emulation/virtualbox-additions/Manifest b/app-emulation/virtualbox-additions/Manifest
index 4b88a900f11..50748f58f6c 100644
--- a/app-emulation/virtualbox-additions/Manifest
+++ b/app-emulation/virtualbox-additions/Manifest
@@ -1,5 +1,7 @@
 DIST VBoxGuestAdditions_5.1.32.iso 59512832 BLAKE2B 73fcbb3d1db1056970a86e9c1c1efe1f8ddc3566c327df5bb8e14b22b827fc603dcba580a6db60c75f3dff00f268313ac196d49355e184395793363c6d16df68 SHA512 073b103308f7cab18ca096bbb863d8cdea8efd8aa4896b2ab2a6326f549f1cf6afb70ccb55baa1dab85485879e522584a9f91adb4434c5f8bd649e73dae65900
 DIST VBoxGuestAdditions_5.1.34.iso 59619328 BLAKE2B e8e7786a82785c4d58c2206c3ede4119c435c2884eba470128cd12ad968077eea7a7850fb05c20ef18ec01fb27919ae29a706d4b059203a7a55dba94f7680564 SHA512 e8c376a558991d603fbb6554969d27c510621bfd8f53542126f57c3604d68f6da7f7732361369b6144794575f40c22e0df0a9b2b4190d3462d80c035b7f0451f
 DIST VBoxGuestAdditions_5.1.36.iso 59596800 BLAKE2B c735a88f534b27f1f2f29d125d0fdf881285f64f7ea3f49a0bc9211af4f562562cc321983c222e6106459f3be14af94a3514765607d1cd8edf6e6352398cfe8c SHA512 08049007589f6bf56c84355b908355289f37eac8cb01d970e46ebe3b44b43ff406c37d0ddad245dd007447a00927a2d2312524e3ac99f8b6bad8695b403ca846
+DIST VBoxGuestAdditions_5.1.38.iso 59611136 BLAKE2B cde4ceb59159827304c99ab00fac4cd3598600c252e7b5a410a5be6ea50866ed2efae4ead9e5c4c1a1462b1cd6db973bd4b35b56d426934e80898837c536e778 SHA512 e082e6363e1e6fa8a7b6b6b4847e9f2ed17655b0ac143467553150f910d71e4dfff55686c38464dc60f77c57292610d13dc25ee5423877173467a86cfe232a3b
 DIST VBoxGuestAdditions_5.2.10.iso 57974784 BLAKE2B 3e56448d46cfdbb264a6c606d548a0db86d40cac1428263de7d7f6e35602dc485138ac3574eab6bba78cccabb7ccd65f8c67ed78938524bc408d9d305949154d SHA512 fd84d41b5953c379b1a14380cb4ec67a8edd42caa4ce11a39f4dc0af77b3bbceeb717d9b9b9d25fd8b2446c2b1aa3bd4393e4a5c661c20bd07059f561d17ad8d
+DIST VBoxGuestAdditions_5.2.12.iso 57976832 BLAKE2B 3b1485da265a9d7bd659e846ceb9e3e8f3463816f2f8157654704875e9b7a91d6f610cfa6285d9d54b06e87ca4f3e5d4600b26ac622b592c90c42bde0cc0f2ee SHA512 276b6348942bb82f68dacdc957590130281c5b3818d47c60238e00e1015682b5a44f28091163297ea052d327f916ed2e79bc32820f39f8b8e5dab5bd0fccbe77
 DIST VBoxGuestAdditions_5.2.8.iso 57972736 BLAKE2B 4f78b5faa8379777f88be98af1c6e023863395004d5326a698801141ed939edbb04f5109967179e8777bdfae39a77ffa724c9f08f54a14a8898a074512318816 SHA512 29d1bd00e6f5f5ceb7fa50719dde6e05b17111583a0ada16f47cd1e38e9302a3d5d4d7708cef9c8c3f9c4eb2d5ccc276c792700e0733cec2dc611ba1e5bed098

diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-5.1.38.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-5.1.38.ebuild
new file mode 100644
index 00000000000..a28d6005cb4
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-5.1.38.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+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-additions/virtualbox-additions-5.2.12.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.12.ebuild
new file mode 100644
index 00000000000..a28d6005cb4
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.12.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+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 6c784b4b15e..9b0baf5889b 100644
--- a/app-emulation/virtualbox-bin/Manifest
+++ b/app-emulation/virtualbox-bin/Manifest
@@ -1,7 +1,9 @@
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.32-120294.tar.gz 19589163 BLAKE2B b35d9bb90216a77706fe5f0de624affaff4177d4b6e561f7c76003efd1a386a1f5b5f6b1c6b559cddde6ffb55ab5f7eba3e4c9b2135f31c09313b473ba6579e5 SHA512 c1e13fc59b9556f980bec02bb2860e717f752d42c3d810f70267e5c07898bb1aba9d3f3403fa5aa388478aa609397da49dcf10311836d68093101715a6ae200d
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.34-121010.tar.gz 19591849 BLAKE2B 573afe3624a3eace4272a067f472e32dbe344755814aefaa8d6685da0ff31e04faa7f6a22a58974938067fce3a0ea3d66a0c5d02db999105029cc7c5c8fea24b SHA512 4f05bc7abe989fbc0928aba259ad60b09f5b085859c0ddc3e24c052fdb4becb055795c8f0038fc4dd95be7b9954a3034afd499798bb58fe16522602cfe91e7fa
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.36-122089.tar.gz 19605234 BLAKE2B 4b263b27b130e5b5d7917f15f0dc782f28f7708cc10e22028ee27b33be6541df5211c4fb36951a6b293d19b8933182097cd0575da8c1d00b6a96e747c1962762 SHA512 e11b294da83b4605c40132f2ea5f95f2820f901d2ed1d438c22c4cc9f779baa3112b9334036717d1593d5f9ec8374d7d7bc826012e2019ef0ba79bacb1deb7b8
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.38-122592.tar.gz 19717251 BLAKE2B 90dcaa58284c6dc9101dbc8eb9ceda55d16c4a48fd58fb43c4a6b7d3d5c582c31930f6e773397ae9379e75771c88b40aad276436bb1d56a71a8e744353e04ec9 SHA512 ba44d53e06adababd0ac7c8a68ea025e1e7afd39fe648079bbb879e81130d45f00b944795cfd37f7f05c16d5a7723b85c49a8435c8399180af627dd3b3de00bc
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.10-122088.tar.gz 19482093 BLAKE2B ca02e9226b774340ecd31688f296304d7c963f20177d523058a1a2997cc287c59fc6e4df8bcc5024ec55cc7b79b1319f61bc9f3697cdb9c4c36423a77221cb82 SHA512 90e9d1c0235d14df9a305fa48102528b839c266abe18f97dcb945729cb9a0136cbf0686b69b82fcc76508cf7674c5b5dcb6563319af9ca0c294218802eaa9173
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.12-122591.tar.gz 19590585 BLAKE2B 433ae630e55f2320d48c06d0fd5120528ee10c04f2e471da3a72fb98ae826b2909fa5fcd2a4ad7c875a1785d07c0a3dc9ec3001fa7d16903037731dbe1e24a75 SHA512 3e55cb2c8a5adfdac988b81804650aa35e66e052a946b371d61a92d459e5dbb83495f80423f22cfa2a4c2196cf94d1146ff5aed621985f27f2e5069c13f5daee
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.8-121009.tar.gz 19469421 BLAKE2B 81651876802ad767339f3984a26375118f01e4b99b4247398e0cea8d749905431b40945f8a72d0c7802b2743080f01d3044aafd21600c4927773994c5a114a1f SHA512 2b69e2acab91ce95e9807006c79862fc0d1d10fdd269bd9cdf8f11b6704821823b103c7a4a76ad99c10e0868bd397ffe0e72b2eb2aa4fc2bd81ff968c71c2280
 DIST VirtualBox-5.1.32-120294-Linux_amd64.run 88360402 BLAKE2B f548855260467be536f2e5ff95ae110636b1fa824a78058cf9318b21592d9643bd780691984ff803c7b0ec998f8e1720d81731fb26df42718cfe3c7b56ad09e4 SHA512 3b7e722ee231ad087b4d2419406e46b6b33a7947d6dcc8ecc0456f04925fb551810c5f27a54d9c99b0d729c1bb0d5d79d17bb8720291c8210ab88c15215244ec
 DIST VirtualBox-5.1.32-120294-Linux_x86.run 87387598 BLAKE2B 657842740d52f046c969196ca776e5572e3bfde55587575bdcc2a957863bb890a40954c9fa014e9184ee77e1e5a81388eadbc5fcfcd22a21c0485e25074bb900 SHA512 38cb01d89edb1fcb44940bdd94c69af824577ebc9fa30a5a2c7c837142fc70848326325b9ee131ad878a9dce71e10b9762854ef0aa66c9060c159abc40c89241
@@ -9,12 +11,18 @@ DIST VirtualBox-5.1.34-121010-Linux_amd64.run 88309202 BLAKE2B 77b906e52f54926a3
 DIST VirtualBox-5.1.34-121010-Linux_x86.run 87377358 BLAKE2B 48a0011a8fe80604a660eeb833b5b406f19827d9e22a0ae1f7a1394951b554a3d141d2150640107ebbb3d381b783084b7f7a2c4265302727524b98ced947c756 SHA512 7866f35f315ad9207fe85e0cfdbff7e5fb19f55ec1bff07606cadf68a9f7f965169b7c95713599952db4c9ba346f0813169f944e0d69702c4f2c43f35ff6c61f
 DIST VirtualBox-5.1.36-122089-Linux_amd64.run 88329683 BLAKE2B 96e0296243056ebaecde4435fe68f82dacfc66a0d23b70365c7495112672b60be7682ef794851b68198d0d0f01ec84cb314f06b434726e5f75e47751771cbd3b SHA512 6c62c642da78561ec5130e18ebac24d52871b4c518ce507f1deb0a279c58dfc1b87c4afecf63236e7274da65d5d784575779ad39e17a4f8b1f05c29a3ca95d55
 DIST VirtualBox-5.1.36-122089-Linux_x86.run 87449039 BLAKE2B 826071838fdb7567ec7064eb6db216d9d695f3504b0c37b2db637df5757ece58b8c1c0b430cef1c1e6657bd9dc556c074891732cd4481243af72051f66ec6bec SHA512 c593483949a5389cddbe47fb3d07e7acc55868671d72ccd696e1c039ace24e7b88be9cf088c32b419c5f4ba76ceada6e388b63dbeac6376b13627543c472afe8
+DIST VirtualBox-5.1.38-122592-Linux_amd64.run 88329683 BLAKE2B 124b1a3d45b0aa213a63ccc225570158faa11adf51a9bc503c014a302ba6a9739e9b50780c93ca6b8704e4666f809b97d1548db74817020301f560252bf71182 SHA512 963ed0b5555bcc43a72dbf49d3d6d9a1a2b1118808ea601765ce102ce72a05439903247680d0b49df4d15cdca68b40a8c5a26df9340c24ed681c3353f2f8e072
+DIST VirtualBox-5.1.38-122592-Linux_x86.run 87449039 BLAKE2B a591a64422cd6e7bb292aaa0f35e5ed9a722b3d835800b2ce09814f2756f088e3a7adc0fc483f2a6ec36e265aeddf6ecfe1aa1bf60a78675696859bff1d0afb9 SHA512 41f9aebbb7c4ad6192cfef57ca956c5ec4b96c8547380abc3b56629c821094ccb28bac69645042e0ac22664db6c59aeff49ccc80d88e1eae5ffb95f55a467a07
 DIST VirtualBox-5.2.10-122088-Linux_amd64.run 88544723 BLAKE2B b460f2eb04854773a2cc908eed3e01bf3245f0273c94bb4a7a69b11b2e1506a8a4db81649e13ce94fa3771540cadf597f3c2d957fc873213ef734e6b4e1d932d SHA512 244dcb2c875d4d0bf37552a478074b052268973954e4ba81e2a82ebc8ffe40da74de484032a37f21291574a997ee67dd4057f75eef4d7ac77c4e0f0d7cfa12ce
 DIST VirtualBox-5.2.10-122088-Linux_x86.run 87684559 BLAKE2B 840efab030b66d561ada6bf999c076bdce0d064399e904f8ad0fffd3fbb72be1ed7131b77a4a79f56643d22e2029e9005b7e0d80ffdf941b4df2fee375ee3e81 SHA512 738b2d6810f056c0c6b7828e3f14746e2ed64d7169e7959f9022857a451476637ebcf628b5f6b3d4ab86ce9834fe87bf8f8c92dcb3fdd80a703ff5ec93adfc77
+DIST VirtualBox-5.2.12-122591-Linux_amd64.run 88677843 BLAKE2B 3fd56527c106193ea0bb46ad51968c59d1bb6453282ddfc84b08227e0f5ed4af941bc11030edb3a0c2d0845d602c036e033a48af020b80ba225d626a3514d321 SHA512 682e42ef3bb65f0e31e08fda2c2a9ce8b555ae8978692b22e9855c1725e5fd3e3db126501df37849b546a5022480a319db12470d1fed44463f2e49144a6383ac
+DIST VirtualBox-5.2.12-122591-Linux_x86.run 87827919 BLAKE2B 7efc88298b8e96f0d45cfac3d4fd3b24ffc725f14e1ae822dace092abf6a460cbad4349b907c08998dcdacdfdb915a2de6e8ae8db4edb1842c29941faa6acdd8 SHA512 e6f6890baddef29db0c103569d5abe7bdfb597840e8c9b023ba041b85a7c3ba7bf45f983826266722b43fcca95b2e93bfdc944c25ffcf6f0e386794f22eb5e8a
 DIST VirtualBox-5.2.8-121009-Linux_amd64.run 88493520 BLAKE2B 2986918bb2eda12447468fb642d3760d999d3af3e5595bf7260e94572f15a811655cd3f1348e1cf23a827011b1eebf84f07f13185f4eab3c353a957c58c105d4 SHA512 211f94910ef50a00b178482c0600be48ecddb48086846515b7705b111a36f81346efd4cbeb39255d85f3a0e778509e0dd7676e4c9bcbea49014988be8635910f
 DIST VirtualBox-5.2.8-121009-Linux_x86.run 87705037 BLAKE2B 8d6774d0be3a3e12cd258bb6799e6f3eb84a3cff670277c0b910671879014b513d1e2958ebf60f5aaa1ee4ef56be52cc0908b3cb5fa25fa78db77023fbbb3660 SHA512 ee75f64332a8d1df61b60a28661d7b7ef760c789dabca61b749f5cf33ffbe5ef09d64bde6da4255e659b1bf86d947eca8d18d697738e4de9f6b0b423ea647e9b
 DIST VirtualBoxSDK-5.1.32-120294.zip 9860157 BLAKE2B c9222bc865bdd70cc2ac516b27d1a1c91e0c05b04129a0c9793701ca8080c184ae2d8157bf687995c074aa03b8242e931164b03c5942e4d57589def16aa21b57 SHA512 aa2f0b647e177f95543c41beca64546a5d9b68f2081365ceb9a4494e500747de55fc71e899f31d65b96a9b5a1c8bfeaf8518ddb45791fb25e0ad992776c4c186
 DIST VirtualBoxSDK-5.1.34-121010.zip 9863604 BLAKE2B 63c7a28d509a910d4b63e7784a85a2cb125c6d5f6b6bf311c971235c706c4279266f40853f4c735ad41b483fd4febbf36bf9f07477e73675d39846b20e9105d7 SHA512 8a3931132e4eaffbcd82d64e9b34d6c2cce0c2971731b10af97f4e79e926baecd3ba3ead4b454512115e59c3f186d466ddbc9b13c83230f2b80743f5e0d0578c
 DIST VirtualBoxSDK-5.1.36-122089.zip 9864160 BLAKE2B 0db3d44c44f93a80607791f2ff5cbdf6aed2b324c207bb9bbc808b5cc836f01ade9c48ed3474c4f174a43b29969fe632b5ccd2b3ad0af197894d63887144bf0c SHA512 98f6e59a5e344bf23f6af6c0e791f28920940de907721981c99b66b8e7c20cb06a7e1211b2029a1279e583fb4ed456019005c2bf3a91b3d8b3fbd61e6e44c914
+DIST VirtualBoxSDK-5.1.38-122592.zip 9867112 BLAKE2B d3deeda2adafcb675370c7228f49a209e5f76986fc4c9ac5aa8ff2e809912f458c9cfc2d8f011404fb4bd7b45b80f0ff857dd85dd597d622971a2556c6b17bbf SHA512 e03fab6573e61f59fc4e017d8c6cfde08e734939efe6c2f8edc5e6e9da5a1d616012cae06d630a3e2a2b1d72775eb8f0a05eb230fa81321ec33ba1975ec34ce9
 DIST VirtualBoxSDK-5.2.10-122088.zip 10152815 BLAKE2B af856ffaeca244b2bfd14ef89ca10b4d607386c77aad3e8e0ce7a40291f6a74dfd12f3b33671d07a151e4bc75bbb05699a9845a3ae5ca7c16f4e1d3c49edcf9d SHA512 0e153b7b05fdc4ce18cf4dc7c110b0b9f05536df17f92b61417af9b497cdec5c2ad3ecd341bbdc43969d811b28f12dcdaaecd72bc5c33842cc1fdde25376c725
+DIST VirtualBoxSDK-5.2.12-122591.zip 10153856 BLAKE2B ea4fdc39744e5fcc2edcdcf521c795b2669344cec4be2b7d9f08d1e0917c24b5c06721d76d81966c611ee41d220095aeb6bbab211a0e1b52e6479e0c9595d97a SHA512 6d7e3968c9edb00b88aa5118ec9c74ae85e04d788f49741b68506b07307c4dd2c8cb7bb307c76f9d2908bc47c7683257f39395008b0a03eff72a1e77567f0e77
 DIST VirtualBoxSDK-5.2.8-121009.zip 10153749 BLAKE2B 0534f568f83d73f70f4192389e0f602bc4184d45a4a1aa82983692bf4e35fac0589eef21f5aa561c88c736aaa398986de0077dcdf3aa211df655788f5592b423 SHA512 386e38ee6e584ff8b0444b9285a67d259bb93f53d6e6b6e082cefd4121578da91ea56e2eb329b6848ff5476a14ad3055287b806cd25a21155aa6f708c58244a5

diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-5.1.38.122592.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-5.1.38.122592.ebuild
new file mode 100644
index 00000000000..94de7dd7a10
--- /dev/null
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-5.1.38.122592.ebuild
@@ -0,0 +1,287 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils xdg-utils gnome2 pax-utils python-r1 udev unpacker versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 5)"
+	MY_PV="${MY_PV/beta/BETA}"
+	MY_PV="${MY_PV/rc/RC}"
+else
+	MY_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(get_version_component_range 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 "${D}"/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 "${D}"/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 "${D}"/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 "${D}"${udevdir}/rules.d/10-virtualbox.rules || die
+	# move udev scripts into ${udevdir} (bug #372491)
+	mv "${D}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${D}"${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-bin/virtualbox-bin-5.2.12.122591.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.12.122591.ebuild
new file mode 100644
index 00000000000..94de7dd7a10
--- /dev/null
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.12.122591.ebuild
@@ -0,0 +1,287 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils xdg-utils gnome2 pax-utils python-r1 udev unpacker versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 5)"
+	MY_PV="${MY_PV/beta/BETA}"
+	MY_PV="${MY_PV/rc/RC}"
+else
+	MY_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(get_version_component_range 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 "${D}"/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 "${D}"/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 "${D}"/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 "${D}"${udevdir}/rules.d/10-virtualbox.rules || die
+	# move udev scripts into ${udevdir} (bug #372491)
+	mv "${D}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${D}"${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 307a7b53b3a..178ad9e4fab 100644
--- a/app-emulation/virtualbox-extpack-oracle/Manifest
+++ b/app-emulation/virtualbox-extpack-oracle/Manifest
@@ -1,5 +1,7 @@
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.32-120294.tar.gz 19589163 BLAKE2B b35d9bb90216a77706fe5f0de624affaff4177d4b6e561f7c76003efd1a386a1f5b5f6b1c6b559cddde6ffb55ab5f7eba3e4c9b2135f31c09313b473ba6579e5 SHA512 c1e13fc59b9556f980bec02bb2860e717f752d42c3d810f70267e5c07898bb1aba9d3f3403fa5aa388478aa609397da49dcf10311836d68093101715a6ae200d
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.34-121010.tar.gz 19591849 BLAKE2B 573afe3624a3eace4272a067f472e32dbe344755814aefaa8d6685da0ff31e04faa7f6a22a58974938067fce3a0ea3d66a0c5d02db999105029cc7c5c8fea24b SHA512 4f05bc7abe989fbc0928aba259ad60b09f5b085859c0ddc3e24c052fdb4becb055795c8f0038fc4dd95be7b9954a3034afd499798bb58fe16522602cfe91e7fa
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.36-122089.tar.gz 19605234 BLAKE2B 4b263b27b130e5b5d7917f15f0dc782f28f7708cc10e22028ee27b33be6541df5211c4fb36951a6b293d19b8933182097cd0575da8c1d00b6a96e747c1962762 SHA512 e11b294da83b4605c40132f2ea5f95f2820f901d2ed1d438c22c4cc9f779baa3112b9334036717d1593d5f9ec8374d7d7bc826012e2019ef0ba79bacb1deb7b8
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.1.38-122592.tar.gz 19717251 BLAKE2B 90dcaa58284c6dc9101dbc8eb9ceda55d16c4a48fd58fb43c4a6b7d3d5c582c31930f6e773397ae9379e75771c88b40aad276436bb1d56a71a8e744353e04ec9 SHA512 ba44d53e06adababd0ac7c8a68ea025e1e7afd39fe648079bbb879e81130d45f00b944795cfd37f7f05c16d5a7723b85c49a8435c8399180af627dd3b3de00bc
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.10-122088.tar.gz 19482093 BLAKE2B ca02e9226b774340ecd31688f296304d7c963f20177d523058a1a2997cc287c59fc6e4df8bcc5024ec55cc7b79b1319f61bc9f3697cdb9c4c36423a77221cb82 SHA512 90e9d1c0235d14df9a305fa48102528b839c266abe18f97dcb945729cb9a0136cbf0686b69b82fcc76508cf7674c5b5dcb6563319af9ca0c294218802eaa9173
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.12-122591.tar.gz 19590585 BLAKE2B 433ae630e55f2320d48c06d0fd5120528ee10c04f2e471da3a72fb98ae826b2909fa5fcd2a4ad7c875a1785d07c0a3dc9ec3001fa7d16903037731dbe1e24a75 SHA512 3e55cb2c8a5adfdac988b81804650aa35e66e052a946b371d61a92d459e5dbb83495f80423f22cfa2a4c2196cf94d1146ff5aed621985f27f2e5069c13f5daee
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.8-121009.tar.gz 19469421 BLAKE2B 81651876802ad767339f3984a26375118f01e4b99b4247398e0cea8d749905431b40945f8a72d0c7802b2743080f01d3044aafd21600c4927773994c5a114a1f SHA512 2b69e2acab91ce95e9807006c79862fc0d1d10fdd269bd9cdf8f11b6704821823b103c7a4a76ad99c10e0868bd397ffe0e72b2eb2aa4fc2bd81ff968c71c2280

diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.38.122592.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.38.122592.ebuild
new file mode 100644
index 00000000000..7d7d5d2ea35
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.38.122592.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 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="$(get_version_component_range 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-extpack-oracle/virtualbox-extpack-oracle-5.2.12.122591.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.12.122591.ebuild
new file mode 100644
index 00000000000..7d7d5d2ea35
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.12.122591.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils multilib versionator
+
+MAIN_PV="$(get_version_component_range 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+	MY_PV="${MAIN_PV}_$(get_version_component_range 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="$(get_version_component_range 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 ec7c61b37c9..9d3b3edb078 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -1,7 +1,9 @@
 DIST VirtualBox-5.1.32.tar.bz2 117268301 BLAKE2B 336df054e3407d7e701d6719258cfcba9beec1439cbe94f137570cfcbdea02df3e34374ac36d3b4387c47ebafd17a0f05c2fb710eb4f140d8200117b505aba98 SHA512 052ac1672515a36c4138e2d52672a466d4c768f219f52eefe98e747a292ebebe04e7de35547eae6803654be5dc937b8e6f4d358a65fd4f49a8333eac8862d138
 DIST VirtualBox-5.1.34.tar.bz2 117291269 BLAKE2B 0eb9b3f778f2d677ac3635fa59dfa6861d0fec3c0331582e5961b78ab55b5ab26bbf286de05a3e87e8a64e2b54861613a8d2c93f70736a07c551dca834786abd SHA512 0f828e58d68678a0a94a39c12313425105f9255ca207d40dd04065d0072857cdc4fc886f944b852c3fb63fed04d70a3449aecd2aab9e27af7f13b506143a4b6f
 DIST VirtualBox-5.1.36.tar.bz2 117244376 BLAKE2B 141048f4fcbb3ce63d236a4127b4bce377e87876c23dc3ff6437b2c0cca5b468bc6a5737899b308bc1ff3252d4e61f7d053ff7574c33c85b56fdd986c31f2af3 SHA512 d1a9322c97c68cc9c21247c3df8ce2084911aded66a63adf5510f9e0f4558b1304dfe924a0c44243adc1ae8f7c45c47782e882baac1bfe995ea6c0a1370fcbd1
+DIST VirtualBox-5.1.38.tar.bz2 117345233 BLAKE2B 15ed86a1f6730c781a0b4b055dcccfb56ff9c829c90dc4d2aa96cc2bb5bcfa8e442bdd471a7c70c5520bef994592e8f1a5b46831df4039efb5358c2e0ab83413 SHA512 6cf8536c24aa3a6e889214ef6133eb18fdbe1e7c371323cad07aa63b0e1f4414ba13d5fa7b63c12dfefe60e2e544488ced107571f678a06eb094a3e19b377ea8
 DIST VirtualBox-5.2.10.tar.bz2 118575607 BLAKE2B 46360d63cf6d1b8744016cbb2c1eee1d57ebafc45f8b32782c7216fc547f24af4c7205b4e7c34d24cd7faf7e8ce4ea8373ad4a310040a6ef9b043a8ce2300f94 SHA512 1e6d5e5c6ce45d9a3864860819f6301c192c83be154c674cfb37c98506db88a8f70526ec05d115c53e40c4c91d243513f0a3196261c7dee244a18091b2e5717e
+DIST VirtualBox-5.2.12.tar.bz2 118612426 BLAKE2B 685c400ef82de14891d9cc42e94e8c0de270a57d6e69820d45cf7fda0ef32d78d4c2670b4a2b89003d58035ee50d648d7906e58d99a96d40c24ee2fa51a317c9 SHA512 083219501d0103d1060cd470cad5a29a348341abf92c1caccf10e7fcfcf0db163e95d6624614d327dda7500d638d3038634fa8a3c1c441a6ee8de9e4f51325d2
 DIST VirtualBox-5.2.8.tar.bz2 118500065 BLAKE2B 64d0cc0f928d224332f59e7966ee1bed8adcf097d27c577b6ecea5cbf203e170e38acca9f2371d6d7aa11f63b73e705b43a0516ccbe5993171f928406b8a3876 SHA512 49a3bd1c60d2c4cbd3799ece5fbfe15d9b6a00c5af9692478a1365a8eb4975228410e17dba24a388c0cf5387cb79fb7492feb4e6b2f531bc17322c3d61de7887
 DIST virtualbox-5.1.30-patches-02.tar.xz 2608 BLAKE2B 08b05a26622a7acec455f6d0dc72858f5f2758488e50d219f83c3d12606419d48e9d99302cde5a275929fe79af900c1b3ea3957fe9dfdaa952aaa0da9933291a SHA512 8a490f7cc44e40262fc47819736251c177adb635256794e9500f52729197c85211d5b0c0d000268089953a4c185872a8ba03c5d42df6b80f05eac8b81335320a
 DIST virtualbox-5.1.32-patches-01.tar.xz 2464 BLAKE2B 28f461634ac7f200b74d961e56f56aea486445bdb8d1490000bd34393b4873ee058d1dc9db6c32084921bd7d51a92be1e38b1b098385f443f41b9231c1489829 SHA512 08782c8eecc0cbb370f21fb3951af449ed1c8174a7184210de376a7d4ca5d64b14b2619d121aacef1c85982c8b485e545e260d3c0fc1f95769093efa23cd2cd2

diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.38.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.38.ebuild
new file mode 100644
index 00000000000..97d4f9402e9
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.38.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils 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.1.32-patches-01.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
+	!!x11-drivers/xf86-input-virtualbox"
+DEPEND="${RDEPEND}
+	>=dev-util/kbuild-0.1.9998_pre20131130
+	>=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-virtualbox-${PV} )"
+
+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=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}"
+	enewgroup vboxguest
+	enewuser vboxguest -1 /bin/sh /dev/null vboxguest
+	# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+	enewgroup vboxsf
+}
+
+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 "${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...
+	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"' \
+		>> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+		|| die
+	echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+		>> "${D}/${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_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-guest-additions/virtualbox-guest-additions-5.2.12.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.12.ebuild
new file mode 100644
index 00000000000..9a895f357c2
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.12.ebuild
@@ -0,0 +1,226 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils 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.1.30-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
+	!!x11-drivers/xf86-input-virtualbox
+	!x11-drivers/xf86-video-virtualbox
+"
+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=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}"
+	enewgroup vboxguest
+	enewuser vboxguest -1 /bin/sh /dev/null vboxguest
+	# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+	enewgroup vboxsf
+}
+
+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...
+	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
+
+	rm "${WORKDIR}/patches/011_virtualbox-5.1.30-sysmacros.patch" || 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"' \
+		>> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+		|| die
+	echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+		>> "${D}/${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_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 262745281da..196ef7e8d70 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,5 +1,7 @@
 DIST vbox-kernel-module-src-5.1.32.tar.xz 626600 BLAKE2B eb3243d62d1a22f41f5ea2307b13a3f5ce17a19edcecb0340f94d34995e557b016195443a53edc9d68a313d064008e5af04c7fff28540ec513c6e9a5955e02e0 SHA512 10ead68e53ae6bd72e39b31d536fc36e0999fe506a6d7fd6a6f9e462d539213ad65deb56e2b926baa5cc4b16fb4071d89e105889e873fda0e4a1f20387a7cd39
 DIST vbox-kernel-module-src-5.1.34.tar.xz 627576 BLAKE2B c1bd2af511824e5a74c3b85b73b7bc1664dd3651db3c17bbcba06b5ef8d9ba11c1a5c92bf28f443fb17aee1d057310f20a62c1a4608ce84eb087de61cbe67c25 SHA512 6176036a22d316e15c6560c124cfce9e93c6508a78e189bbe8e431ccf006b74d5f34ea747c9ca307bbd90e0c6fa414056ae0b56a5aa8124c2263de3d0dbf97d1
 DIST vbox-kernel-module-src-5.1.36.tar.xz 628368 BLAKE2B 49a3dfc4ff573f793eefcfd9b645af6fa6fc63b54475921064be146d3d4bf4db61f48d82f62d65811597fa12b88331153f7491890527fde76f41426355552abb SHA512 c69739c72a5555fc3bca90186129fa4eeb5bd930c4396b416a8a88e6f84bcd9e7498a9bbc9381da648cf87d601d98249feac2e4de6d93d8b7aba46b22d3ec40f
+DIST vbox-kernel-module-src-5.1.38.tar.xz 628552 BLAKE2B 9faa4e837a48ac27be5c0183edcf2b39c08eeab210bd39811704a7a578a93b28f8b8ecf26a34483f2d135a8cb8817756120d7bef0b8de245c5a5e232cfebfff0 SHA512 36311c3ff947fa763db1fc0612c5a4c10ac3d586c3faab3a91e463723488510cedfc1a69696381158a167edfc86d7abf66c18b287ced75cbaba3f1797c4265a8
 DIST vbox-kernel-module-src-5.2.10.tar.xz 637080 BLAKE2B 303fd6191247df0560f161b12665b95f372de1a18755b937f7af8fecab6669337ccaf22f635219080953795cb9bc4c80bc21a8273e28b5cf8ba3ba9cf930e2cd SHA512 56e837f19a63856dbd57379dd78bf46b90ddeb3a60df9d18a46a6480c7021040b7674599fd0b48a9c3db241756539bfaa88becf6e42acf8725e2bc89e3879773
+DIST vbox-kernel-module-src-5.2.12.tar.xz 637292 BLAKE2B 31b54c8de560a30d228497f5a3f58f868ad09e18051f8fac2257200e324603c5fdfe127d530997f7dae728d13d93ced6321487f20571811352bfbbf1f9c6d646 SHA512 7408e8121bf278050728461d4f7ab4d4b6c502b24859573d4652a58d1058e9b12a4de4b582ce45f7d0b12bf369a7378107c2cab12a6e93b1b082a40d1f2e9712
 DIST vbox-kernel-module-src-5.2.8.tar.xz 636172 BLAKE2B 0a0be16ee830dbf60e9bd8e0aa977ad020374d65c4ea19689bd20f7399da87633ac9ef57e2297963937e4d5eb82173a50beacd8ddd1b54943fe8d24fe723e3f4 SHA512 8875048d827ebbedec37864e219033305a228903b01d7ca22b371b02de9b23099d3bc76ddef4887b633f1215e73daa5db6e35c8d2e21f90200f439b15792d05f

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.38.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.38.ebuild
new file mode 100644
index 00000000000..027b2333e33
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.38.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2018 Gentoo Foundation
+# 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=6
+
+inherit eutils 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} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
+}
+
+src_prepare() {
+	if kernel_is -ge 2 6 33 ; then
+		# evil patch for new kernels - header moved
+		grep -lR linux/autoconf.h *  | xargs sed -i -e 's:<linux/autoconf.h>:<generated/autoconf.h>:'
+	fi
+
+	if use pax_kernel && kernel_is -ge 3 0 0 ; then
+		eapply "${FILESDIR}"/${PN}-4.1.4-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-modules/virtualbox-modules-5.2.12.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.12.ebuild
new file mode 100644
index 00000000000..0fd483ae195
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.12.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2018 Gentoo Foundation
+# 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=6
+
+inherit eutils 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 33d22634338..f057d5b6d42 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,7 +1,9 @@
 DIST VirtualBox-5.1.32.tar.bz2 117268301 BLAKE2B 336df054e3407d7e701d6719258cfcba9beec1439cbe94f137570cfcbdea02df3e34374ac36d3b4387c47ebafd17a0f05c2fb710eb4f140d8200117b505aba98 SHA512 052ac1672515a36c4138e2d52672a466d4c768f219f52eefe98e747a292ebebe04e7de35547eae6803654be5dc937b8e6f4d358a65fd4f49a8333eac8862d138
 DIST VirtualBox-5.1.34.tar.bz2 117291269 BLAKE2B 0eb9b3f778f2d677ac3635fa59dfa6861d0fec3c0331582e5961b78ab55b5ab26bbf286de05a3e87e8a64e2b54861613a8d2c93f70736a07c551dca834786abd SHA512 0f828e58d68678a0a94a39c12313425105f9255ca207d40dd04065d0072857cdc4fc886f944b852c3fb63fed04d70a3449aecd2aab9e27af7f13b506143a4b6f
 DIST VirtualBox-5.1.36.tar.bz2 117244376 BLAKE2B 141048f4fcbb3ce63d236a4127b4bce377e87876c23dc3ff6437b2c0cca5b468bc6a5737899b308bc1ff3252d4e61f7d053ff7574c33c85b56fdd986c31f2af3 SHA512 d1a9322c97c68cc9c21247c3df8ce2084911aded66a63adf5510f9e0f4558b1304dfe924a0c44243adc1ae8f7c45c47782e882baac1bfe995ea6c0a1370fcbd1
+DIST VirtualBox-5.1.38.tar.bz2 117345233 BLAKE2B 15ed86a1f6730c781a0b4b055dcccfb56ff9c829c90dc4d2aa96cc2bb5bcfa8e442bdd471a7c70c5520bef994592e8f1a5b46831df4039efb5358c2e0ab83413 SHA512 6cf8536c24aa3a6e889214ef6133eb18fdbe1e7c371323cad07aa63b0e1f4414ba13d5fa7b63c12dfefe60e2e544488ced107571f678a06eb094a3e19b377ea8
 DIST VirtualBox-5.2.10.tar.bz2 118575607 BLAKE2B 46360d63cf6d1b8744016cbb2c1eee1d57ebafc45f8b32782c7216fc547f24af4c7205b4e7c34d24cd7faf7e8ce4ea8373ad4a310040a6ef9b043a8ce2300f94 SHA512 1e6d5e5c6ce45d9a3864860819f6301c192c83be154c674cfb37c98506db88a8f70526ec05d115c53e40c4c91d243513f0a3196261c7dee244a18091b2e5717e
+DIST VirtualBox-5.2.12.tar.bz2 118612426 BLAKE2B 685c400ef82de14891d9cc42e94e8c0de270a57d6e69820d45cf7fda0ef32d78d4c2670b4a2b89003d58035ee50d648d7906e58d99a96d40c24ee2fa51a317c9 SHA512 083219501d0103d1060cd470cad5a29a348341abf92c1caccf10e7fcfcf0db163e95d6624614d327dda7500d638d3038634fa8a3c1c441a6ee8de9e4f51325d2
 DIST VirtualBox-5.2.8.tar.bz2 118500065 BLAKE2B 64d0cc0f928d224332f59e7966ee1bed8adcf097d27c577b6ecea5cbf203e170e38acca9f2371d6d7aa11f63b73e705b43a0516ccbe5993171f928406b8a3876 SHA512 49a3bd1c60d2c4cbd3799ece5fbfe15d9b6a00c5af9692478a1365a8eb4975228410e17dba24a388c0cf5387cb79fb7492feb4e6b2f531bc17322c3d61de7887
 DIST virtualbox-5.1.32-patches-01.tar.xz 2464 BLAKE2B 28f461634ac7f200b74d961e56f56aea486445bdb8d1490000bd34393b4873ee058d1dc9db6c32084921bd7d51a92be1e38b1b098385f443f41b9231c1489829 SHA512 08782c8eecc0cbb370f21fb3951af449ed1c8174a7184210de376a7d4ca5d64b14b2619d121aacef1c85982c8b485e545e260d3c0fc1f95769093efa23cd2cd2
 DIST virtualbox-5.2.0-patches-01.tar.xz 2460 BLAKE2B d3f973dc7ee0557c360f801c3bf84065a7e7bc9960984398b8f86d71fab32c59774e970c6cf873be07bcb9666af168570e8a78705a5999b1fc5d863dbbc6e538 SHA512 b91278dd81a50e412f5a281c72949f591a1c53303080549b74b28763cab9e3948948afb0256e0453d17736683cca3372a8e9c6d63f02f3eff3ef92c2a1ea332b

diff --git a/app-emulation/virtualbox/virtualbox-5.1.38.ebuild b/app-emulation/virtualbox/virtualbox-5.1.38.ebuild
new file mode 100644
index 00000000000..73a8fc1d578
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-5.1.38.ebuild
@@ -0,0 +1,468 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit flag-o-matic java-pkg-opt-2 linux-info multilib 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.1.32-patches-01.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc headless java libressl lvm 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 )
+	udev? ( >=virtual/udev-171 )
+	vnc? ( >=net-libs/libvncserver-0.9.9 )"
+DEPEND="${RDEPEND}
+	>=dev-util/kbuild-0.1.9998_pre20131130-r1
+	>=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.1.24-nopie.patch"
+	fi
+
+	# Only add paxmark patch when we're on pax_kernel
+	if use pax_kernel ; then
+		eapply "${FILESDIR}"/virtualbox-5.1.4-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 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 "${D}"/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 "${D}"${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 "${D}"${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 "${D}"${vbox_inst_path}/VirtualBox
+
+			if use opengl ; then
+				vbox_inst VBoxTestOGL
+				pax-mark -m "${D}"${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
+
+			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 "${D}${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+			java-pkg_regso "${D}${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() {
+	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() {
+	xdg_desktop_database_update
+}

diff --git a/app-emulation/virtualbox/virtualbox-5.2.12.ebuild b/app-emulation/virtualbox/virtualbox-5.2.12.ebuild
new file mode 100644
index 00000000000..9286de0063a
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-5.2.12.ebuild
@@ -0,0 +1,468 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit flag-o-matic java-pkg-opt-2 linux-info multilib 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.0-patches-01.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc headless java libressl lvm 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 )
+	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 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 "${D}"/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 "${D}"${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 "${D}"${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 "${D}"${vbox_inst_path}/VirtualBox
+
+			if use opengl ; then
+				vbox_inst VBoxTestOGL
+				pax-mark -m "${D}"${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
+
+			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 "${D}${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+			java-pkg_regso "${D}${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() {
+	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() {
+	xdg_desktop_database_update
+}

diff --git a/x11-drivers/xf86-video-virtualbox/Manifest b/x11-drivers/xf86-video-virtualbox/Manifest
index 5337088a8bb..652a0023a3d 100644
--- a/x11-drivers/xf86-video-virtualbox/Manifest
+++ b/x11-drivers/xf86-video-virtualbox/Manifest
@@ -1,3 +1,4 @@
 DIST VirtualBox-5.1.32.tar.bz2 117268301 BLAKE2B 336df054e3407d7e701d6719258cfcba9beec1439cbe94f137570cfcbdea02df3e34374ac36d3b4387c47ebafd17a0f05c2fb710eb4f140d8200117b505aba98 SHA512 052ac1672515a36c4138e2d52672a466d4c768f219f52eefe98e747a292ebebe04e7de35547eae6803654be5dc937b8e6f4d358a65fd4f49a8333eac8862d138
 DIST VirtualBox-5.1.34.tar.bz2 117291269 BLAKE2B 0eb9b3f778f2d677ac3635fa59dfa6861d0fec3c0331582e5961b78ab55b5ab26bbf286de05a3e87e8a64e2b54861613a8d2c93f70736a07c551dca834786abd SHA512 0f828e58d68678a0a94a39c12313425105f9255ca207d40dd04065d0072857cdc4fc886f944b852c3fb63fed04d70a3449aecd2aab9e27af7f13b506143a4b6f
 DIST VirtualBox-5.1.36.tar.bz2 117244376 BLAKE2B 141048f4fcbb3ce63d236a4127b4bce377e87876c23dc3ff6437b2c0cca5b468bc6a5737899b308bc1ff3252d4e61f7d053ff7574c33c85b56fdd986c31f2af3 SHA512 d1a9322c97c68cc9c21247c3df8ce2084911aded66a63adf5510f9e0f4558b1304dfe924a0c44243adc1ae8f7c45c47782e882baac1bfe995ea6c0a1370fcbd1
+DIST VirtualBox-5.1.38.tar.bz2 117345233 BLAKE2B 15ed86a1f6730c781a0b4b055dcccfb56ff9c829c90dc4d2aa96cc2bb5bcfa8e442bdd471a7c70c5520bef994592e8f1a5b46831df4039efb5358c2e0ab83413 SHA512 6cf8536c24aa3a6e889214ef6133eb18fdbe1e7c371323cad07aa63b0e1f4414ba13d5fa7b63c12dfefe60e2e544488ced107571f678a06eb094a3e19b377ea8

diff --git a/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.38.ebuild b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.38.ebuild
new file mode 100644
index 00000000000..932d9378fad
--- /dev/null
+++ b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.38.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils multilib python-single-r1 versionator toolchain-funcs
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+DESCRIPTION="VirtualBox X11 video driver for Gentoo guest"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dri"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+	>=x11-base/xorg-server-1.7:=[-minimal]
+	x11-libs/libXcomposite
+	${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+	>=dev-lang/yasm-0.6.2
+	>=dev-util/kbuild-0.1.9998_pre20131130
+	sys-power/iasl
+	x11-proto/fontsproto
+	x11-proto/randrproto
+	x11-proto/renderproto
+	x11-proto/resourceproto
+	x11-proto/scrnsaverproto
+	x11-proto/xextproto
+	x11-proto/xineramaproto
+	x11-proto/xproto
+	x11-libs/libXdmcp
+	x11-libs/libXau
+	x11-libs/libX11
+	x11-libs/libXfixes
+	x11-libs/libXext
+	dri? (  x11-proto/xf86driproto
+		>=x11-libs/libdrm-2.4.5 )"
+PDEPEND="dri? ( ~app-emulation/virtualbox-guest-additions-${PV} )"
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+S="${WORKDIR}/${MY_P}"
+MODULES_SRC_DIR="${S}/src/VBox/Additions/linux/drm"
+
+PATCHES=(
+	# Ugly hack to build the opengl part of the video driver
+	"${FILESDIR}/${PN}-2.2.0-enable-opengl.patch"
+
+	# unset useless/problematic checks in configure
+	"${FILESDIR}/${PN}-5.0.0_beta3-configure_checks.patch"
+
+	# xorg-1.19 patch from opensuse (bug #602784)
+	"${FILESDIR}/${PN}-5.1.10-xorg119.patch"
+)
+
+QA_TEXTRELS_x86="usr/lib/VBoxOGL.so"
+
+pkg_setup() {
+	if [ "${MERGE_TYPE}" != "binary" ]; then
+		version_is_at_least 4.9 $(gcc-version) || die "Please set gcc 4.9 or higher as active in gcc-config to build ${PN}"
+	fi
+
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	# Prepare the vboxvideo_drm Makefiles and build dir
+	eapply "${FILESDIR}"/${PN}-5.1.24-Makefile.module.kms.patch
+
+	# Remove shipped binaries (kBuild,yasm), see bug #232775
+	rm -r kBuild/bin tools || die
+
+	# Disable things unused or splitted into separate ebuilds
+	cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+
+	# Remove pointless GCC version check
+	sed -e '/^check_gcc$/d' -i configure || die
+
+	default
+
+	# link with lazy on hardened #394757
+	sed '/^TEMPLATE_VBOXR3EXE_LDFLAGS.linux/s/$/ -Wl,-z,lazy/' \
+		-i Config.kmk || die
+}
+
+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() {
+	local each targets=(
+		Runtime
+		Additions/common/VBoxGuestLib
+		GuestHost/OpenGL
+		Additions/x11/x11stubs
+		Additions/common/crOpenGL
+		Additions/x11/vboxvideo
+	)
+
+	# need to use the upstream build system to create necessary objects properly
+	use dri && targets+=( Additions/linux/drm )
+
+	for each in ${targets[@]} ; do
+		pushd "${S}"/src/VBox/${each} &>/dev/null || die
+		MAKE="kmk" \
+		emake TOOL_YASM_AS=yasm \
+		VBOX_USE_SYSTEM_XORG_HEADERS=1 \
+		KBUILD_PATH="${S}/kBuild" \
+		KBUILD_VERBOSE=2
+		popd &>/dev/null || die
+	done
+
+	if use dri; then
+		local objdir="out/linux.${ARCH}/release/obj/vboxvideo_drm"
+		# We need a Makefile, so use Makefile.module.kms
+		ln -s Makefile.module.kms "${MODULES_SRC_DIR}"/Makefile || die
+		# All of these are expected to be in $(KBUILD_EXTMOD)/ so symlink them into place
+		targets=(
+			include
+			src/VBox/Runtime/r0drv
+			src/VBox/Installer/linux/Makefile.include.{head,foot}er
+			out/linux.${ARCH}/release/{product,version,revision}-generated.h
+		)
+		for each in ${targets[@]} ; do
+			ln -s "${S}"/${each} \
+				"${MODULES_SRC_DIR}"/${each##*/} || die
+		done
+		# see the vboxvideo_drm_SOURCES list in Makefile.kmk for the below,
+		# and replace '..' with 'dt'
+		targets=(
+			dt/dt/common/VBoxVideo/HGSMIBase.o
+			dt/dt/common/VBoxVideo/Modesetting.o
+			dt/dt/common/VBoxVideo/VBVABase.o
+			dt/dt/dt/GuestHost/HGSMI/HGSMICommon.o
+			dt/dt/dt/GuestHost/HGSMI/HGSMIMemAlloc.o
+			dt/dt/dt/Runtime/common/alloc/heapoffset.o
+		)
+		for each in ${targets[@]} ; do
+			ln -s "${S}"/${objdir}/${each} \
+				"${MODULES_SRC_DIR}" || die
+			ln -s "${S}"/${objdir}/${each}.dep \
+				"${MODULES_SRC_DIR}" || die
+		done
+	fi
+}
+
+src_install() {
+	cd "${S}/out/linux.${ARCH}/release/bin/additions" || die
+	insinto /usr/$(get_libdir)/xorg/modules/drivers
+	newins vboxvideo_drv_system.so vboxvideo_drv.so
+
+	# Guest OpenGL driver
+	insinto /usr/$(get_libdir)
+	doins -r VBoxOGL*
+
+	if use dri ; then
+		dosym /usr/$(get_libdir)/VBoxOGL.so \
+			/usr/$(get_libdir)/dri/vboxvideo_dri.so
+	fi
+}
+
+pkg_postinst() {
+	elog "You need to edit the file /etc/X11/xorg.conf and set:"
+	elog ""
+	elog "  Driver  \"vboxvideo\""
+	elog ""
+	elog "in the Graphics device section (Section \"Device\")"
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-guest-additions/, app-emulation/virtualbox-additions/, ...
@ 2019-07-17  8:16 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2019-07-17  8:16 UTC (permalink / raw
  To: gentoo-commits

commit:     04be81dcf8cc790dc66bb488b975337390c046fc
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 17 08:11:34 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Jul 17 08:16:29 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04be81dc

virtualbox packages: Bump to versions 5.2.32 and 6.0.10

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 app-emulation/virtualbox-additions/Manifest        |   2 +
 .../virtualbox-additions-5.2.32.ebuild             |  33 ++
 .../virtualbox-additions-6.0.10.ebuild             |  34 ++
 app-emulation/virtualbox-bin/Manifest              |   7 +
 .../virtualbox-bin-5.2.32.132073.ebuild            | 287 ++++++++++++
 .../virtualbox-bin-6.0.10.132072.ebuild            | 291 ++++++++++++
 app-emulation/virtualbox-extpack-oracle/Manifest   |   2 +
 .../virtualbox-extpack-oracle-5.2.32.132073.ebuild |  42 ++
 .../virtualbox-extpack-oracle-6.0.10.132072.ebuild |  43 ++
 app-emulation/virtualbox-guest-additions/Manifest  |   2 +
 .../virtualbox-guest-additions-5.2.32.ebuild       | 229 +++++++++
 .../virtualbox-guest-additions-6.0.10.ebuild       | 219 +++++++++
 app-emulation/virtualbox-modules/Manifest          |   2 +
 .../virtualbox-modules-5.2.32.ebuild               |  51 ++
 .../virtualbox-modules-6.0.10.ebuild               |  52 +++
 app-emulation/virtualbox/Manifest                  |   2 +
 app-emulation/virtualbox/virtualbox-5.2.32.ebuild  | 496 ++++++++++++++++++++
 app-emulation/virtualbox/virtualbox-6.0.10.ebuild  | 511 +++++++++++++++++++++
 18 files changed, 2305 insertions(+)

diff --git a/app-emulation/virtualbox-additions/Manifest b/app-emulation/virtualbox-additions/Manifest
index 55527ec3093..67bbfd71d1d 100644
--- a/app-emulation/virtualbox-additions/Manifest
+++ b/app-emulation/virtualbox-additions/Manifest
@@ -1,5 +1,7 @@
 DIST VBoxGuestAdditions_5.2.26.iso 58433536 BLAKE2B 1d7bae647923a57cdcee38a1609a07cd081d593a0852dcf67b549ed178508e93f7ee4d076ac700ab7e7ec828e660eb09cc8a55a0f2400b1ff0912cc2fafdff7f SHA512 fea91c442d3f05a35435155d3a3890e2c29e2523f1106cc8c7fb6513826263ff450e72b393796e0dff99b3bd85d85d8d55309e81f68ddfd39689df8f54bca1fe
 DIST VBoxGuestAdditions_5.2.28.iso 58568704 BLAKE2B cc7f0f0c18823f8c7dcae945d0e73b4b8c7d151a07be23bd8d21c44aa555f7964949857af817a9bc4e04d773a18cdc369dcbd8aadffe846ff7200477118aada8 SHA512 ccfdb2705a6c7daa79108fdb3bc6e6070e8de3f45eea308f821a0194e77c092b029119739239a2ccf9c5cb89045e919ba57950994668bc879443a55b53407c9c
 DIST VBoxGuestAdditions_5.2.30.iso 58578944 BLAKE2B 6a2565fa8e3b19363da82592ba4d93ddfb6d22e107e28e901aa4c0bce84aaa0bd63d781155e44462b90d9f491e4df589cfd346dd33fe8f016862e85d99c2092c SHA512 568312b26647f7932d94a42279f35b9a827145ef2bd0ea4ef00a865c355b1de55dee66e731a90d644ddd35cb301f61315edf684c9a321681882c1537c8159caa
+DIST VBoxGuestAdditions_5.2.32.iso 49620992 BLAKE2B 04853f4b9a95898263ca7238a78b5d8751882a21874e4745d675642185542eb617f2a74b3e55b4444067822511d33b6d358e37e179d1b1c6464d701a8ab45a54 SHA512 86f1d7071a9033b7826dcacbcf23822acc772d909af8a8a12345bd5fe68375677b522d0e1987f2908412d5a29369d0a1221fd099f8b692c8d25fe9cbe40fd11e
+DIST VBoxGuestAdditions_6.0.10.iso 77162496 BLAKE2B 71c95b89055a1eeaa38f650c2572d1fbabf4425d13e5473ae4a56a488125781a33e079c6390bcc5b2499b796221ef89e7373c641b8a75bbf31ffeede4f8f0ffc SHA512 d1d1602688ebdad4975b7b800012f6195774cfa29d00900fa49ded88f6cdfe4c1abdfd25ca55b08e2fc97a7f2f204511424dd561aebd68d4ee8222b9b0f0b8ff
 DIST VBoxGuestAdditions_6.0.6.iso 86321152 BLAKE2B d186d6c14500376b1721e084d9a4859bcbe3c64bfc22835a8e4b4425eee4a3a21c8dc4d48bfb072a793a8f2fb0d7f6ef83f53b1ebedbfb38c2e3fffbe3611d55 SHA512 ced893f8384b0ad74cce77f6d6f74fd748acf3acd18843a08c1b433b40ee73ce4c10d16ab8893aabba7fb3aac57e6faea599ed5733d4e91895bb78e7cf34c7ac
 DIST VBoxGuestAdditions_6.0.8.iso 86562816 BLAKE2B dddac0dff687982040543bff065719a6b900666886892247d6ca2e6968d601dfd7c01b0b4c79db28ca81f25ed15906ec65c3e77ac4128eeaaf9a8d6d16632336 SHA512 95396a04e436cf2b30f6897f4ee561acaaf3fd3b677bc2f2d58dc92649245f7b105bbf0ec1b8f5612f5465e2c46d8b55786863508192d0a68aa381ddc44a315c

diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-5.2.32.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.32.ebuild
new file mode 100644
index 00000000000..6faf7e7e8a0
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.32.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2019 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-additions/virtualbox-additions-6.0.10.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-6.0.10.ebuild
new file mode 100644
index 00000000000..5124a818a15
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-6.0.10.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2019 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 ~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 fafc8b22fcd..8598db15609 100644
--- a/app-emulation/virtualbox-bin/Manifest
+++ b/app-emulation/virtualbox-bin/Manifest
@@ -1,6 +1,8 @@
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.26-128414.tar.gz 19684009 BLAKE2B 81787dcf3b70211fa9c84a40c668100eda0dfd2ce3e1d35c226cb6913ef74027f3444be93069a5e881d8e60905477460a180cb98919050286978edf9c1edcdf3 SHA512 deb4c62d58e2071f4413f0ff769e9ecd756362920b29482a6a3d77566c327b075cb5ecafdc65985305b8b798dc56ca2104a0f8244651fca89c4e15ef879c121e
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.28-130011.tar.gz 19719444 BLAKE2B 4b70bb91f4309efbc9a3127e85aaab2175dee1bd3535dce17f3e36747c60ea4b2951958020c3b922b3f832e5cc2a40785ec7fdbe9be6af8a93513ac3d8012d20 SHA512 9da57baaa508cd86663e57b9c545532207fd8460bddb9fd92c3a0058da05cd81e782f99f7c6cc3bbbe1811ebff67e9e7455ccf4a7851d2c3025c4d4d98acf10d
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.30-130521.tar.gz 26914147 BLAKE2B f595f32a76649a803be490a9a6d46702e82cc835274973f0867f957d944724252b59e9844167b0038b9ba2b91854443f6eeaf084278534f4ab4249444fb8755a SHA512 f08fde658c7c1e916ce2c0ccebe9b05e7963168bbf945156c96f75acbd06ef1dca2088371fc3a6f75c84232bee9ebbed3b6bf92dbd0702cb5ff496cdc11227c5
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.32-132073.tar.gz 26917593 BLAKE2B e52c746299d32ae908892791d8fb9b4dda264875e66bf0459adfbc64381001e9be1800a8ac93bbea14dceb47a0e81cf79c29a4c0796f7c4a30021e4beb036cfa SHA512 382ed45a90981397da7d46925a73c5aa0cc870fe41992c87ccd3d3a33420b199e4a0a19761a6c6ebeacf93450e2937d81befb6fdaf7fb7961827e23f0f24c645
+DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.10-132072.tar.gz 23160596 BLAKE2B 5cd7d1490305236f99b759520b4c63afd207cab53e861aaca0b0c318fe96f991756db60652bf65b26b5b9690366b6a5df13c225b44df75a30c1cc04badc7dbb2 SHA512 2c99b9917c65b4287bd1b78e9b9312630850307becea526188f97de569f541fab6bfbc4d5cff2ea9aab784dc4bbb23ada3679f76116ba94169f9c73566cc6c09
 DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.6-130049.tar.gz 23309541 BLAKE2B 550dcee0893c820e3113344f5990528ec2ade766f0a3ff1efc0965c555f820224070bec1f4b4b8b835b2150a7279d1bf9b247433a42658f0e179326c7d78eb0c SHA512 e0b0061137f2e5db1cba0aaf287be2f06cc5379e8f9b562a661beae1f2cc8855f0a78e173473bf44906ca84d6a09c0afa82e0f4026cfb5fb64f9fe6267ab3044
 DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.8-130520.tar.gz 23309069 BLAKE2B bbb060e0e13e336ee445234d7a61ded3896a0948a6a24f3d4b1792da4a9003cfb5717b7f608ffd9c74b4bfe2b24ed918fa2e87cf90ec3aaa3a7b31a7ef33dee5 SHA512 f942c08dd905163cadf79897a0ad8e8a280c96a555bfb9b5d2fc50c25872e8fe69c2f30326bd6a074ed73ea2d6f99b02e143870c05c68c663ed32aee62abba1a
 DIST VirtualBox-5.2.26-128414-Linux_amd64.run 89220562 BLAKE2B d937e3a8f622ed1afc8ab7d2479401c6b41f6b1404197b2d86933d741a209071b1bc98de14ea4f25b2b0f2a22a328393908f85955f8879dbf8b28e2b981e4d04 SHA512 c8d7741408d234e7c05709dd0ed66d30b427b0f39976f232b1fe8a17160d36c4dda7d3adda46a38cbdd6626d34570805f582ac0aae2a975385a1f1d06e97f354
@@ -9,10 +11,15 @@ DIST VirtualBox-5.2.28-130011-Linux_amd64.run 89445843 BLAKE2B c5a91dad470ec1bf9
 DIST VirtualBox-5.2.28-130011-Linux_x86.run 88544719 BLAKE2B ed76962b9ddcd27136a4ced260cad88825542e690b633bd54a4aa8e877f47560ca93401ec67bb75224cd2a7247d5a477d7d532f78f11d341e69cab03240cbe9d SHA512 7c8292b898f7f701eeeeb7a27112f1350b7a255aaa095a7fb3a3037205d30948033acc368a28eeac70e9bd841f1032b946f802a7c9ab47b88105bbf343a14bb9
 DIST VirtualBox-5.2.30-130521-Linux_amd64.run 89855442 BLAKE2B ef1b8e2c83a8cc6404ccdc8cb446dfbe7ea827f88e857947779c916745f5058db33ef075c531914e4974d8abc00b4099fb531e0965a7116971d9a0560eb17a1f SHA512 36b5ee0e1815bebd5a75947004206c43c5f84341b7a967b33d37cf4b35fb6261594788859b636a918edaece4af9d08b1892db7c17e0a30a83bf9e69cd175b123
 DIST VirtualBox-5.2.30-130521-Linux_x86.run 88923599 BLAKE2B e8e5abf4b839c4edd4833c766824255675554cad2050f007d6459f28edc3f70bfd6346bbc893070630efdaf106a2e236974fe7fe09dc918e69dc1c9858edc369 SHA512 d6cddcab262422ee08ebbb796a4c2615dabad3ffde4fa5774a58a087cb14b2b813736053639dd132129a412fd68200d7666bdc110ce44d3ada864b9e7ebadaf5
+DIST VirtualBox-5.2.32-132073-Linux_amd64.run 83854803 BLAKE2B 3522df31f4f98efcd40adcaaf8ac458078adf0bbfed96c7d309d4726ddb8b8dd78eef830b3cfcb2f1fa6329bcc30ea2449f5c88cab66fa0c7d20818d7b5aa07a SHA512 aea9b27793f3363eba2ed627cc3b35ca51445946e6e9f20382fb3034afbb7470d27fdc476066c04acc595690a9e34109e8b8ce6dcab10fdc990b241b24ec47fb
+DIST VirtualBox-5.2.32-132073-Linux_x86.run 82943439 BLAKE2B 31a22e8b52a53d6948a5af533b5c8f374d703c44736678c0bbe6fd9b5298bed4817996c32902a69c2c59dbf751cea04f22beb7203deaeadf79d2424e123e9d37 SHA512 05f99b673224c2b3d94b0d568067ae5ee74200c88a3b7f6665988a9d0c35f69f81c07292b838d07c07fd6d5484979615fd255650b138387501a593f3833b9071
+DIST VirtualBox-6.0.10-132072-Linux_amd64.run 127108569 BLAKE2B f2313b8e797f1292975d6d0f214985b16541b4b05cd0efa3f9b417a02b85ad7affa8c1d4929f161f90548242541628000c3ef39acece29a376f11aaf4d3536e9 SHA512 026c9b5d5f24714293cafb522840c2c84b86ebaa903f7e402472a916bd549cf3b279ef6de02ff0c9c7cb6df74ea402568df64ed224c0173d445d80f04a2d93d1
 DIST VirtualBox-6.0.6-130049-Linux_amd64.run 132914648 BLAKE2B 720d98a3d271a545e1ff3357731c44d592c2f1e3a5c685f68b1daeecd9880c784f19de905c5ca73fa6a7be77ecc550e97f672b08198f90ead13c059edb4c59d1 SHA512 ee1156e940b1c1c2e4c82d77148f56495845731d73ef68f4a5da9c19f008c978c6ef3e7693b70e7d16ebf44202deeba30928674a26ad3090dad7f5ae2a242a88
 DIST VirtualBox-6.0.8-130520-Linux_amd64.run 133672408 BLAKE2B 62c8d51502c4b3a15ba2a79356227c9e932c87480b31f3f70a5c89881f757a2725f4c1800ac312866f0e1e2e2970f6288d4970b52428ce94e390dfc68872ea7c SHA512 ea9061f420c2fce424c98903c8f7845cbb60eab83722de2f7ccd5723df81365b8e8b6fe80d183b4b38a30c13432fa4c567ea05e799ee176111130c3060bc25b7
 DIST VirtualBoxSDK-5.2.26-128414.zip 10159276 BLAKE2B 32a9e0a70cc63c8e0daa7080f8e10ac8a514837be98a66b00161cd0c9bf2cc42ef0a11f3a69a742a2f6745b4c8b8fe9e946e18f81cd5ef3ab2f68d5e3c95c568 SHA512 f3d1cc622734ecb0f56fcdf5728fcc747e3b084cb2358d420c55c1acd98d2f24870f0fd18cea430f118f34bca10199526ba195a314d6ce7fb6c4bc8281d89f09
 DIST VirtualBoxSDK-5.2.28-130011.zip 10157910 BLAKE2B 793918a663027a1396706b3aa0573679526b9c02aaaaadfe7cf4448744fc3ee6ea0484cdd01b07cb03169583b91fb1567d9c2f30046fc4bcb113d709aed30242 SHA512 90b25a1dddc50efe29cc1bd70819ca945be5f474c89e9fea90b0aa2f3ace448ec961ee749b6e3f41f763c05edd824d4a5e3c1c227db8e9a59267f91b87c24770
 DIST VirtualBoxSDK-5.2.30-130521.zip 10153996 BLAKE2B d0c24220f3d9d10528e10dd65a884d7431bb54b3fe186500685f7ee228b74aae2ed81650e695f7a47d7b8769fc94d7c8d8dfda443fe3ee0f11fc4773f1b34a2c SHA512 6305c7884ede60090726d9f9e6628a20030537d121892d2005e13abce5233df85fcfc465faee199fd38901431e1d9f86c9985698ddd6b0594f80842f34b8b8b3
+DIST VirtualBoxSDK-5.2.32-132073.zip 10200195 BLAKE2B 0de34e166b94889c605014233142887e7a8857d1915866156a0cc63850937730ec063e63b550f0d39ad241259158f033b028dbab7eec3f6f38c3715139413b3a SHA512 ccbe2af819bff46055bd6f079a03d69e721a09286e83d4f650583bc7692f5d19ae1a725cf3a6eb1b75167a2c73ff2e020d1f932bf9cfeee9ee709d1174c4cabf
+DIST VirtualBoxSDK-6.0.10-132072.zip 10801181 BLAKE2B 9ad30a0db9e0e87594277c10d869f915a1981c8a7fef294c34bbc904714141bc69e9ad80b79fa61b418ab537f65ccb574f72b6a2985110b51c54d8bfeac9f42a SHA512 b1cf9d3d289a3ba765e3ef9af2491b9f785e241c2c1ff9606009d3983c8fa8660a80dbd37404c773aa57b76a06fd2d1136644565643a58d1d4e1700a7cc329fd
 DIST VirtualBoxSDK-6.0.6-130049.zip 10759233 BLAKE2B f5fbcdeacfa3d4843b62728ecd2406785355eecd396292502ae2ebdadcdb38c24d0565a1304e935a1b3cc390880c443f9e8e490ab18adcc13f4b461c9750441a SHA512 45c5450249ab5ac43eb5dbc4d6e2b61cd4cd5a22005f38fd019d909f9d4b98147b959ff836ea05cceb7d730196a14763472ac6fe4113d1de7c11fad76300ac82
 DIST VirtualBoxSDK-6.0.8-130520.zip 10758177 BLAKE2B 6d4f8fc33cb57ff5055775cc0e9f676eede2cc07d62c73ee66813e9aae71ce6a73c2c81699234d5b5eab8244d9f15374a0485cfed1bedec429088e2d82bfd91a SHA512 2a94359904869b228337eb754bf545d32981bdc16ecc33544f30a6ce67d3ee1cec2d0c5bd02ed510ecfc7779871a53dc391a39a37a29fd725a403fd68789a081

diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-5.2.32.132073.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.32.132073.ebuild
new file mode 100644
index 00000000000..e4f534871c4
--- /dev/null
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.32.132073.ebuild
@@ -0,0 +1,287 @@
+# Copyright 1999-2019 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-bin/virtualbox-bin-6.0.10.132072.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-6.0.10.132072.ebuild
new file mode 100644
index 00000000000..0d68ba80c9d
--- /dev/null
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-6.0.10.132072.ebuild
@@ -0,0 +1,291 @@
+# Copyright 1999-2019 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-6)"
+	MY_PV="${MY_PV/beta/BETA}"
+	MY_PV="${MY_PV/rc/RC}"
+else
+	MY_PV="${MAIN_PV}"
+	KEYWORDS="~amd64" #~x86
+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 )
+	https://download.virtualbox.org/virtualbox/${MY_PV}/${EXTP_P}.vbox-extpack -> ${EXTP_P}.tar.gz"
+	#x86? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
+
+LICENSE="GPL-2 PUEL"
+SLOT="0"
+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
+
+	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{,VM} 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,TestOGL,ExtPackHelperApp} $(usex headless '' VirtualBox) ; 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..
+	for each in VBoxNet{AdpCtl,DHCP,NAT} $(usex headless '' VirtualBoxVM) ; do
+		fowners root:vboxusers /opt/VirtualBox/${each}
+		fperms 4750 /opt/VirtualBox/${each}
+		pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+	done
+
+	if ! use headless ; then
+		# Hardened build: Mark selected binaries set-user-ID-on-execution
+		for each in VBox{SDL,Headless} ; 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_icon_cache_update
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_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_icon_cache_update
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+}

diff --git a/app-emulation/virtualbox-extpack-oracle/Manifest b/app-emulation/virtualbox-extpack-oracle/Manifest
index 5786b229f95..9a8c32291ae 100644
--- a/app-emulation/virtualbox-extpack-oracle/Manifest
+++ b/app-emulation/virtualbox-extpack-oracle/Manifest
@@ -1,5 +1,7 @@
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.26-128414.tar.gz 19684009 BLAKE2B 81787dcf3b70211fa9c84a40c668100eda0dfd2ce3e1d35c226cb6913ef74027f3444be93069a5e881d8e60905477460a180cb98919050286978edf9c1edcdf3 SHA512 deb4c62d58e2071f4413f0ff769e9ecd756362920b29482a6a3d77566c327b075cb5ecafdc65985305b8b798dc56ca2104a0f8244651fca89c4e15ef879c121e
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.28-130011.tar.gz 19719444 BLAKE2B 4b70bb91f4309efbc9a3127e85aaab2175dee1bd3535dce17f3e36747c60ea4b2951958020c3b922b3f832e5cc2a40785ec7fdbe9be6af8a93513ac3d8012d20 SHA512 9da57baaa508cd86663e57b9c545532207fd8460bddb9fd92c3a0058da05cd81e782f99f7c6cc3bbbe1811ebff67e9e7455ccf4a7851d2c3025c4d4d98acf10d
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.30-130521.tar.gz 26914147 BLAKE2B f595f32a76649a803be490a9a6d46702e82cc835274973f0867f957d944724252b59e9844167b0038b9ba2b91854443f6eeaf084278534f4ab4249444fb8755a SHA512 f08fde658c7c1e916ce2c0ccebe9b05e7963168bbf945156c96f75acbd06ef1dca2088371fc3a6f75c84232bee9ebbed3b6bf92dbd0702cb5ff496cdc11227c5
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.32-132073.tar.gz 26917593 BLAKE2B e52c746299d32ae908892791d8fb9b4dda264875e66bf0459adfbc64381001e9be1800a8ac93bbea14dceb47a0e81cf79c29a4c0796f7c4a30021e4beb036cfa SHA512 382ed45a90981397da7d46925a73c5aa0cc870fe41992c87ccd3d3a33420b199e4a0a19761a6c6ebeacf93450e2937d81befb6fdaf7fb7961827e23f0f24c645
+DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.10-132072.tar.gz 23160596 BLAKE2B 5cd7d1490305236f99b759520b4c63afd207cab53e861aaca0b0c318fe96f991756db60652bf65b26b5b9690366b6a5df13c225b44df75a30c1cc04badc7dbb2 SHA512 2c99b9917c65b4287bd1b78e9b9312630850307becea526188f97de569f541fab6bfbc4d5cff2ea9aab784dc4bbb23ada3679f76116ba94169f9c73566cc6c09
 DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.6-130049.tar.gz 23309541 BLAKE2B 550dcee0893c820e3113344f5990528ec2ade766f0a3ff1efc0965c555f820224070bec1f4b4b8b835b2150a7279d1bf9b247433a42658f0e179326c7d78eb0c SHA512 e0b0061137f2e5db1cba0aaf287be2f06cc5379e8f9b562a661beae1f2cc8855f0a78e173473bf44906ca84d6a09c0afa82e0f4026cfb5fb64f9fe6267ab3044
 DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.8-130520.tar.gz 23309069 BLAKE2B bbb060e0e13e336ee445234d7a61ded3896a0948a6a24f3d4b1792da4a9003cfb5717b7f608ffd9c74b4bfe2b24ed918fa2e87cf90ec3aaa3a7b31a7ef33dee5 SHA512 f942c08dd905163cadf79897a0ad8e8a280c96a555bfb9b5d2fc50c25872e8fe69c2f30326bd6a074ed73ea2d6f99b02e143870c05c68c663ed32aee62abba1a

diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.32.132073.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.32.132073.ebuild
new file mode 100644
index 00000000000..e598ba63811
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.32.132073.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2019 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-extpack-oracle/virtualbox-extpack-oracle-6.0.10.132072.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.0.10.132072.ebuild
new file mode 100644
index 00000000000..a260ead1a63
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.0.10.132072.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2019 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 ~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 8d4c030efe4..148440c25f9 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -1,6 +1,8 @@
 DIST VirtualBox-5.2.26.tar.bz2 118371765 BLAKE2B 32413b72e33f2f63835a2eb2d47dc75a7b63121934bdffd51ff58e9d63d68b77b4f8dac4605916ba8bd6896240d00024ccc3d7d002d4f6f92d6d9b1dc35995e3 SHA512 aee334c74bd02772ac5e0528d84d31661f61c775d0993c00febe125810efc78a2f779db41bf66283be51b19a35540fee14445bada59a8d3b7affa6ef6645005f
 DIST VirtualBox-5.2.28.tar.bz2 118655475 BLAKE2B 4e4e75b78de3cb3b6dc2fe2c2f306487cb924bf9ca2d1b0ffc6fc349774d3fa38886d386277a32067daaabfad6e8cd58ea058a78a70d16761d76f6ebed035d16 SHA512 085cfcab82851f98c757ea109ba420335d891a99df52a811e19815b3e55a92894cfb7b6fd4a5aaf15def71811f14e21527625adf885a394144cb5f971eb57782
 DIST VirtualBox-5.2.30.tar.bz2 118462289 BLAKE2B 87126b5af657815d0fcc8aadf49a23ce613ea0998b70f988f78e9d381138c414c7c73a0bf91955481cf484f5b71081ff1bab8dabe1b41fffde877e1003477625 SHA512 6230846ceda47b8ffe942aa8427f04f193095103371b7210d30e49cd9e384b9828d6917f75ef125e63e2c1810e8aa3b7c17b72f3ede7697c55d6de9da9d3f668
+DIST VirtualBox-5.2.32.tar.bz2 118262502 BLAKE2B f42de23ddbef1bb5472f6730b711452049331cf06c80420205844ea4a46ddb3352e0fd91564d94d018cb03921e7f894b30c79ddb684ad498d3f86dee88bf8994 SHA512 4e98d5df5e9e6445dde268d5eacea82e655ce9b96cd6579a9d470a08a0c066b7cd7e212b276e2671e936b4a73a53ecf9daa666cb3a8b9d7dc353c70c9283505e
+DIST VirtualBox-6.0.10.tar.bz2 154284088 BLAKE2B 6aeb2384a777bb39e7c2692c1e262914296650f1448e8db45a03b864a824d3e8b337208087fa7f4469b1ee15e39c8cdae3707f742eb229872e8cb681d118880c SHA512 96fa3c672790239163829b3c40ac0d75d717b29a7b947ec48709eb7811c5800e314a0fc90d87810e4a03da40b3a65914605f648b287314386b371489e5d974c9
 DIST VirtualBox-6.0.6.tar.bz2 155297550 BLAKE2B a886ed99da3aee7a52d8c0654c33e50ae4155077e3d5061e1888a0cb5760b12dd63fb1205b75ec04419d50261f81e56036bdba79d20b57c836f073af232c913a SHA512 eb71ca94220680ac6cba7af13eb9eef132c21e57b1b27d6bc3c564bba58b000e682d19e36b63660bfa4f4471cd0632d365659ef8c4e3e526931622901a432d1b
 DIST VirtualBox-6.0.8.tar.bz2 155404889 BLAKE2B 3eb6ebf713c32e301db1673b22c367a89ce1ffb25d12baab6c7335389ce17e08efd744139acc4114231c4d4b69c6370b6e5d5b18ce97fe5494ca7a192fa43f7d SHA512 df18d5df2c82761b8a77e509b2873cdeaa46d11bc50ca166af1e6c30d3042b0cf5640957b1d411333f5bd5be3f03f382550f1afaecf0651d847bc88c95863d83
 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.32.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.32.ebuild
new file mode 100644
index 00000000000..a16a06c6b19
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.32.ebuild
@@ -0,0 +1,229 @@
+# Copyright 1999-2019 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() {
+	export DISTCC_DISABLE=1 #674256
+	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
+
+	rm "${WORKDIR}/patches/008_virtualbox-4.3.14-missing_define.patch" || 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-guest-additions/virtualbox-guest-additions-6.0.10.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.10.ebuild
new file mode 100644
index 00000000000..8162053ffd7
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.10.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2019 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-6.0.0_beta2-patches-01.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+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}"
+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}"
+}
+
+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
+
+	rm "${WORKDIR}/patches/010_virtualbox-5.2.12-qt511.patch" || 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 7ffeaaa8b50..3f318e93b64 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,5 +1,7 @@
 DIST vbox-kernel-module-src-5.2.26.tar.xz 642096 BLAKE2B fa908b8dda4c49e880005f22d4ec159ba4e84b20d3cf8f514ec5ad0ea556499b0df25fb714bb5f9a3474e6fc1cba67f6d56fddaee748b9561bbe31a003dd0657 SHA512 7f37be1b35772d59cd3df9b61dec436450de3c038faf2cd22fb891fee7270aa7f87f146f72497ffeb63dfe869cccd3f2788562d23fc51afd83ca19159f2a6810
 DIST vbox-kernel-module-src-5.2.28.tar.xz 642000 BLAKE2B 65ffe2345e978e0afba079e9291d55dc0419853718831d4c47e8e3e4f9fa194957342683aec0f362aa3f3924dca90d73ac30d947dec69ff54106d8e229510889 SHA512 bef0601b295d1a5cc0387262a6c75ec33777edaeaa543218bc7ddea5ced3995511978abfb624d2547fc6339c41e638054fb173ee7e0aeb46c7356a24834b3d83
 DIST vbox-kernel-module-src-5.2.30.tar.xz 642476 BLAKE2B 497a381b10f813ee333f0ac0a0b9f7893b0cc3c842757e85f119bc28dec4ed978bab827df116c8f99bafb412b8bf5a97592a964cf61f7e813284b2e74e7e8a6d SHA512 80511d96c44294a1faae165e874b838f76449a898cdc01411eae0dbdc5f7ee79f75f8c6a52e9e0c9c1ad8bd054c64751f6be6f7790d0053933db8d786dfbc53e
+DIST vbox-kernel-module-src-5.2.32.tar.xz 642428 BLAKE2B 0dda5cb5608c1eed22bea209564d53c5f7eab58ca620db2cc441e3c1ba9ad66609c4ef13df07fd29b691f2941a070f9852e8729cd386081df6a82ede345f33c5 SHA512 fadedab690cb7dee8b9a6747ed711d924bf3bce8999b24e7b64cb8738c53c2fa7372b1a8e8535e7e4ef0235aec02d4a3f1f67cd07d7621934fab684c5163329e
+DIST vbox-kernel-module-src-6.0.10.tar.xz 669008 BLAKE2B 80250aeca8421aa0b88efb1d090f78d0bc6c7b4b2c3b7e0c5c7953d9ef5246ee25df6fa14b75b821e1e3d05cda3ff975560ede89dc482e34faa801a592405a9f SHA512 afab0130c14b86e822f2a9528373388a9eeee952deec9ff7158e4b788b64343235f3a3da10218bfabcb71dd4d89c8ace0031ea9b64d7385140f6c580b5087333
 DIST vbox-kernel-module-src-6.0.6.tar.xz 667936 BLAKE2B 5eca0167ad6c624bb56978c07c0184ef39d789ca5752fee3fcb00a2f5a7af4d20a69dde4288fc5233111ea821eab69d6970a86861459d09d6050d93f09f8f2ef SHA512 aff4b1f200abfdb7e249e6c725ab9c2a4c83010bd0c7b6d2d6595ae7d7bc6b2bd291f77c1597b3fb2c39de61867447c18e06d865a50565ccb07120de2c34d141
 DIST vbox-kernel-module-src-6.0.8.tar.xz 668380 BLAKE2B 06deabe0bae37503ec2b2df3cf1edb820b190c9e453aad8e211278a27c9ffaf229b98c08b2d7510b3721a30ca53833b43184636fde7ce3e5ac0bcbc588330486 SHA512 a4fb626c5a58637cfef7ebc44ccfcf82d6f2a7e91af665a8854d9fafb0c9b042d473c6767dad64497aed5110aefd23299461d39b43f8e57aa0c255cfcc94b448

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.32.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.32.ebuild
new file mode 100644
index 00000000000..c4b01a1b3f9
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.32.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2019 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-modules/virtualbox-modules-6.0.10.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.10.ebuild
new file mode 100644
index 00000000000..7257cb3b581
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.10.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2019 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"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+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 8d4c030efe4..148440c25f9 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,6 +1,8 @@
 DIST VirtualBox-5.2.26.tar.bz2 118371765 BLAKE2B 32413b72e33f2f63835a2eb2d47dc75a7b63121934bdffd51ff58e9d63d68b77b4f8dac4605916ba8bd6896240d00024ccc3d7d002d4f6f92d6d9b1dc35995e3 SHA512 aee334c74bd02772ac5e0528d84d31661f61c775d0993c00febe125810efc78a2f779db41bf66283be51b19a35540fee14445bada59a8d3b7affa6ef6645005f
 DIST VirtualBox-5.2.28.tar.bz2 118655475 BLAKE2B 4e4e75b78de3cb3b6dc2fe2c2f306487cb924bf9ca2d1b0ffc6fc349774d3fa38886d386277a32067daaabfad6e8cd58ea058a78a70d16761d76f6ebed035d16 SHA512 085cfcab82851f98c757ea109ba420335d891a99df52a811e19815b3e55a92894cfb7b6fd4a5aaf15def71811f14e21527625adf885a394144cb5f971eb57782
 DIST VirtualBox-5.2.30.tar.bz2 118462289 BLAKE2B 87126b5af657815d0fcc8aadf49a23ce613ea0998b70f988f78e9d381138c414c7c73a0bf91955481cf484f5b71081ff1bab8dabe1b41fffde877e1003477625 SHA512 6230846ceda47b8ffe942aa8427f04f193095103371b7210d30e49cd9e384b9828d6917f75ef125e63e2c1810e8aa3b7c17b72f3ede7697c55d6de9da9d3f668
+DIST VirtualBox-5.2.32.tar.bz2 118262502 BLAKE2B f42de23ddbef1bb5472f6730b711452049331cf06c80420205844ea4a46ddb3352e0fd91564d94d018cb03921e7f894b30c79ddb684ad498d3f86dee88bf8994 SHA512 4e98d5df5e9e6445dde268d5eacea82e655ce9b96cd6579a9d470a08a0c066b7cd7e212b276e2671e936b4a73a53ecf9daa666cb3a8b9d7dc353c70c9283505e
+DIST VirtualBox-6.0.10.tar.bz2 154284088 BLAKE2B 6aeb2384a777bb39e7c2692c1e262914296650f1448e8db45a03b864a824d3e8b337208087fa7f4469b1ee15e39c8cdae3707f742eb229872e8cb681d118880c SHA512 96fa3c672790239163829b3c40ac0d75d717b29a7b947ec48709eb7811c5800e314a0fc90d87810e4a03da40b3a65914605f648b287314386b371489e5d974c9
 DIST VirtualBox-6.0.6.tar.bz2 155297550 BLAKE2B a886ed99da3aee7a52d8c0654c33e50ae4155077e3d5061e1888a0cb5760b12dd63fb1205b75ec04419d50261f81e56036bdba79d20b57c836f073af232c913a SHA512 eb71ca94220680ac6cba7af13eb9eef132c21e57b1b27d6bc3c564bba58b000e682d19e36b63660bfa4f4471cd0632d365659ef8c4e3e526931622901a432d1b
 DIST VirtualBox-6.0.8.tar.bz2 155404889 BLAKE2B 3eb6ebf713c32e301db1673b22c367a89ce1ffb25d12baab6c7335389ce17e08efd744139acc4114231c4d4b69c6370b6e5d5b18ce97fe5494ca7a192fa43f7d SHA512 df18d5df2c82761b8a77e509b2873cdeaa46d11bc50ca166af1e6c30d3042b0cf5640957b1d411333f5bd5be3f03f382550f1afaecf0651d847bc88c95863d83
 DIST virtualbox-5.2.16-patches-02.tar.xz 3152 BLAKE2B c8d8f3872f544a465c7d1aa07291599307120ac9eabfb299ddd788a11f85ca6c2d84b8e7306ee4ad436270dad0dd39f101ee68a549eac15afd1e3cdc03f23c6c SHA512 85ee8c4045de562d71ab2d761695ea48b6726a6f0c4bcaa2562bb0d147542d3f1a1b5b47cf593a7f22dac1b86f87b59a56bef421dce3e1fa8e5260cd41998450

diff --git a/app-emulation/virtualbox/virtualbox-5.2.32.ebuild b/app-emulation/virtualbox/virtualbox-5.2.32.ebuild
new file mode 100644
index 00000000000..05f95844d59
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-5.2.32.ebuild
@@ -0,0 +1,496 @@
+# Copyright 1999-2019 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 dtrace? ( CDDL )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc dtrace 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/libxcb:=
+		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_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="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -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
+
+	rm "${WORKDIR}/patches/008_virtualbox-4.3.14-missing_define.patch" || die
+	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 --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
+	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_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
+
+	# 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
+
+	if use vnc ; then
+		insinto ${vbox_inst_path}/ExtensionPacks
+		doins -r ExtensionPacks/VNC
+	fi
+
+	if use dtrace ; then
+		insinto ${vbox_inst_path}/ExtensionPacks
+		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_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
+}

diff --git a/app-emulation/virtualbox/virtualbox-6.0.10.ebuild b/app-emulation/virtualbox/virtualbox-6.0.10.ebuild
new file mode 100644
index 00000000000..b5816819897
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-6.0.10.ebuild
@@ -0,0 +1,511 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
+inherit flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
+
+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}-6.0.0_beta2-patches-01.tar.xz"
+
+LICENSE="GPL-2 dtrace? ( CDDL )"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc dtrace headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
+
+CDEPEND="
+	!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/libxcb:=
+		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="
+	${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(-)] )
+	${PYTHON_DEPS}
+"
+BDEPEND="
+	>=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 )
+	${PYTHON_DEPS}
+"
+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_P}"
+
+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="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -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
+
+	rm "${WORKDIR}/patches/010_virtualbox-5.2.12-qt511.patch" || die
+	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_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() {
+	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
+
+	# *.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{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,Tunctl,VMMPreload,XPCOMIPCD} *so *r0 ${rcfiles} 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
+
+	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
+
+	# 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/${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
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-guest-additions/, app-emulation/virtualbox-additions/, ...
@ 2021-07-21  9:47 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2021-07-21  9:47 UTC (permalink / raw
  To: gentoo-commits

commit:     a3b158a36ef8cc038a9126b6cab7f7e3c6f9770a
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 21 08:59:17 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Jul 21 09:47:45 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3b158a3

app-emulation/virtualbox*: Bump to version 6.1.24

Bug: https://bugs.gentoo.org/803134
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 app-emulation/virtualbox-additions/Manifest        |   1 +
 .../virtualbox-additions-6.1.24.ebuild             |  34 ++
 app-emulation/virtualbox-extpack-oracle/Manifest   |   1 +
 .../virtualbox-extpack-oracle-6.1.24.ebuild        |  41 ++
 app-emulation/virtualbox-guest-additions/Manifest  |   1 +
 .../virtualbox-guest-additions-6.1.24.ebuild       | 221 +++++++++
 app-emulation/virtualbox-modules/Manifest          |   1 +
 .../virtualbox-modules-6.1.24.ebuild               |  55 +++
 app-emulation/virtualbox/Manifest                  |   1 +
 app-emulation/virtualbox/virtualbox-6.1.24.ebuild  | 502 +++++++++++++++++++++
 10 files changed, 858 insertions(+)

diff --git a/app-emulation/virtualbox-additions/Manifest b/app-emulation/virtualbox-additions/Manifest
index 4e04ab4fe0b..893ae767187 100644
--- a/app-emulation/virtualbox-additions/Manifest
+++ b/app-emulation/virtualbox-additions/Manifest
@@ -1,3 +1,4 @@
 DIST VBoxGuestAdditions_6.1.18.iso 61157376 BLAKE2B e022cfbc70fa45889c1db7592f30814faf88d7614c30ebd3fccd0127732d7fec51423904a160797ac199315dcbe4791f025e2dc4754141bfef0862b11510626c SHA512 07be8be75feb2d7d9bfc984ce34b955339d391580192817c2eb216b7577576a003dde310cc09f18c6b6bcf2e30ad548e1ee8bde0af420e4d1d43a3486861cf19
 DIST VBoxGuestAdditions_6.1.20.iso 61018112 BLAKE2B feb6a292b05e861a90fdc5db80bc15e9df593a365a866a31ab7afce704511463012c18d76dc928dc5ecd0d2a23bc518c37ad9cdc8b4b72397af3ddd4b3eb97d8 SHA512 122bd5d31ab5cac2fe0582d1d541b5e9d0e8e544e1b3c5afb2b2e2c8b26fbfa964d15053ccc256575753d31206bffc09380dabc79d93946b0e56b743d82e40fe
 DIST VBoxGuestAdditions_6.1.22.iso 61020160 BLAKE2B e6b79942ed905654ac98323fe5c960afe7467e4ee9da168f7a7b4856a001fa973418e979da57b6e75eedd801bd71f15700ac62a2dfac28b660b36b11287fab57 SHA512 826a4b7d714d1dcb3e7c5c3c95e2a47d2fef728172f2db0e9c983150d7cc335ca7ffd2c87c09e1ca3d0fb1342f4c6c03993f5fc8cff19f28e1f519dec0f3f96b
+DIST VBoxGuestAdditions_6.1.24.iso 61081600 BLAKE2B 66427a961c83f2de1a0b8671066154133795e8e4f50ac82e927e82e05594c520b155f29f7f19373e5846c36a1e3f6e5d2f5d17db1cebc1996c4d1737d5b45862 SHA512 8753558fcf467805bff801be43281597ef6738f90f8f7a62f6acbba2753e57f44bc72cb66411f0a0f413135026ddf683b0330b49ccad77676ec67b7bf3faf06e

diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-6.1.24.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-6.1.24.ebuild
new file mode 100644
index 00000000000..eaf1cf6fc9e
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-6.1.24.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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/$(ver_cut 1-2)"
+[[ "${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 7086ec7842b..a6a0b3d13f9 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-6.1.18-142142.tar.gz 11157510 BLAKE2B d9ee20abac79ed5de03c39d1e6af3a5f18c5416149e9e64ebe9dfc4a937bd72b6590a2daaccc820e3ee6c6efcfd0c1c8e29bf3844cbbb929f13052415e16f2bb SHA512 3686b1c5dbdc5b28c172b4885c30ca9a444bc10dc7984df14a17e1dcc571456b06e80ad38e1409de8692c483c56f397162a53bd3dc6956d9ca91875fda0bda4e
 DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.20-143896.tar.gz 11132930 BLAKE2B a26e05d9869a52187b379b24ed556c6296772d1360b6f7d61afe17c2818351b5ee2256398e0d53a16d2b6014540f343f7f13539c3d5529f079ac363b48ea0d6e SHA512 85cd8327860c253ce2f871dd1138d18d97b8706f64a3dafaaf340a43d8f44f7ee696a1f845761e7c8d6dcf11c7afd1618798194482b6e09cbe7e2657d980116a
 DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.22-144080.tar.gz 11133865 BLAKE2B f0db84695d94d914afd22086ced2a2ca73f860a0bc91bc11744e2cc4a3203584b06f7c855053e33c5f775bc7f6db08b7400f5eeea89566b9146dd144ccf1a2f9 SHA512 71dc1a82b9b88f615ecc7172df344042366a9303115cf44685ea96e3e729b8280edd36377b207fdbbf8adb388d1ec9b21c3ee709cf44aeb52d6811b26fa69a80
+DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.24.tar.gz 11135003 BLAKE2B 53bb6dc35eb8ab1a58492ca3b67b63885ffa1ad3ed3a51a9e7e8c522845b082c420fb39a31a379ee56b45c9b02452acc5be4d72c5a5d9bddaa428bf7c9a3a086 SHA512 e2af2213e99c8c35a3090f5e36d05b1ef27c920cd31a2bf97b0368a89f27a5e2d0e0e0dced5e4e7bacda50fe4b57738924f13a933f5307ff2c8c4015ecc030ae

diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.24.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.24.ebuild
new file mode 100644
index 00000000000..0634acf398d
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.24.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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/$(ver_cut 1-2)"
+[[ "${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 80355a69d5f..ae03708e4fd 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -1,4 +1,5 @@
 DIST VirtualBox-6.1.18.tar.bz2 165507486 BLAKE2B 3cf18f30671426f533838eb0579928b08ce022b832d509e70274978efce2e3e0e14dc8fbf258ef9a1ce8a3d666081863aa6971340e04600434f58136fe5c221a SHA512 41cb4bd42429b09836c59ef9867dd3d35d0d5512ff6e515a7f8688ed444c079ce353a84f0d45b607ccf08424782d5de09b264f51b2c41a9ec34eb834458c293c
 DIST VirtualBox-6.1.20.tar.bz2 165569564 BLAKE2B cf8c110e78e7d7bef3e3243a8966f4d816dacc8dad6cc44737023a13f1b89dfb50661f6dabc742f328e5c03556ec82e7a22f5c1b97cfef774652ec901e733e5d SHA512 b5af4e04e1a52c85b20226a274fac93712b79d426c0268cce3f2a337616a03161a55522ecddd13844bfc24a6808ba3d651366e74ce657cc6f8fd64c34ae745a4
 DIST VirtualBox-6.1.22.tar.bz2 165560989 BLAKE2B 871c2189827174561a2abce4d52056db892e596bcff76274770b43157cca93d2be9a3458ad3d41cca81d73d95f1db37e2d15fdbc192f4d5a59e3cc9b6365d3f6 SHA512 ab0fc7cea455f74598d5da18528404405221e9c96a34f0355a39187524240596db4b54e1b1af5f152d5329b8e7977218819c0605f0d0ba0d83a1fb8f8487548d
+DIST VirtualBox-6.1.24.tar.bz2 165754851 BLAKE2B 65bbc130281a745a00eee2a055dd59893e2f4b701cbdb31f4c45e2b7389f85f59d8a78ce1e03c83734a49b76fa61f56ea083a588874fa4023b723694f75ee8fb SHA512 cf2c5f58d2f160f8a22d94b7e30bcdaabd907661e05a72341bee93f5092b96c0c84d2291005f433040235227e3d6595ce0e66759c44c24eaedc6c9614646b3d6
 DIST virtualbox-6.1.12-patches-01.tar.xz 2528 BLAKE2B a5d7cde0daea41bee2e40e46569c725769927a31865d99d13b8b13c4903e59b4097f85da15dc592b9c7e8baf8ff805397af827620f107ba09a468b4d1198ecab SHA512 f71d10a9fbce99c3f631ef30bcfa9d0e017e702ac509541b039e08ccbcd024beb93fde09c43d90af5d9d28f6842a7947f20e7950d3897da3e6d57859657e1123

diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.24.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.24.ebuild
new file mode 100644
index 00000000000..d767c7658dd
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.24.ebuild
@@ -0,0 +1,221 @@
+# Copyright 1999-2021 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/$(ver_cut 1-2)"
+[[ "${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-r1 ${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 2871538bdb4..a93c6745f5c 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,3 +1,4 @@
 DIST vbox-kernel-module-src-6.1.18.tar.xz 672004 BLAKE2B 7199ba2a5020e5ab51d82735df16aee78ece74db232733b932c380f90dffd589a72613120bbd5c580381ab6f6308abb8d12f69855b9c0a8345bfb8587d022019 SHA512 49b54898b2701774fdeec0cd99dd51a1dd71ffd9be38e125fde73f0c64a697138d13bddbb0ed0e9582d354fa0394608084effb68bd35b266c87f6e3b44c6f342
 DIST vbox-kernel-module-src-6.1.20.tar.xz 672188 BLAKE2B 0b2ef1e02ce6f55211703946dc53df0fe949a94bac2caf050d31a78e674c2934d5cfaf788da2246000d1dc99218a572cb02272a1a92f4df913fcf7635b65a98b SHA512 4fdc16258ec03c720c81b62c680addcbde8257a58a94b3bca8eefd378c126833d84f7f4fa7bb76fcd7c761983f8626d121b2d31d761f608ca7cce6a689ec0469
 DIST vbox-kernel-module-src-6.1.22.tar.xz 672348 BLAKE2B 331f81c370c24487f4966c745a72329065df2cc22918d03edefdf546d8e4ff0a36404ce98f1012faaacc301cd2c507b055db69b9125f91ad87fa5fde14d3abe0 SHA512 b50d7699db8909ea4e9126715152336a2c46e06f9fc24b5ef0624e7d26de1c83b2a57b0387dab0a46a9e50f9906126cfdcae4f290599de88a980adaff7fba180
+DIST vbox-kernel-module-src-6.1.24.tar.xz 674584 BLAKE2B 3a20f615426a7b788bc4bce00e416fa3822cbec3f00691651acd53b7c7bda8b43d3669195cececa83f1fc50a792e417adcd709d859497da143c4d93a2b414912 SHA512 220d57ab33a41464cd9e506d38390e60b9e67ca8262b1a13732f3d40820e038365c129eb7144f1932b8c2d3fdcea828de3070dd927788015301bf4aa59c1cc48

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.24.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.24.ebuild
new file mode 100644
index 00000000000..0a6e70d5825
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.24.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2021 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/$(ver_cut 1-2)"
+[[ "${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 80355a69d5f..ae03708e4fd 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,4 +1,5 @@
 DIST VirtualBox-6.1.18.tar.bz2 165507486 BLAKE2B 3cf18f30671426f533838eb0579928b08ce022b832d509e70274978efce2e3e0e14dc8fbf258ef9a1ce8a3d666081863aa6971340e04600434f58136fe5c221a SHA512 41cb4bd42429b09836c59ef9867dd3d35d0d5512ff6e515a7f8688ed444c079ce353a84f0d45b607ccf08424782d5de09b264f51b2c41a9ec34eb834458c293c
 DIST VirtualBox-6.1.20.tar.bz2 165569564 BLAKE2B cf8c110e78e7d7bef3e3243a8966f4d816dacc8dad6cc44737023a13f1b89dfb50661f6dabc742f328e5c03556ec82e7a22f5c1b97cfef774652ec901e733e5d SHA512 b5af4e04e1a52c85b20226a274fac93712b79d426c0268cce3f2a337616a03161a55522ecddd13844bfc24a6808ba3d651366e74ce657cc6f8fd64c34ae745a4
 DIST VirtualBox-6.1.22.tar.bz2 165560989 BLAKE2B 871c2189827174561a2abce4d52056db892e596bcff76274770b43157cca93d2be9a3458ad3d41cca81d73d95f1db37e2d15fdbc192f4d5a59e3cc9b6365d3f6 SHA512 ab0fc7cea455f74598d5da18528404405221e9c96a34f0355a39187524240596db4b54e1b1af5f152d5329b8e7977218819c0605f0d0ba0d83a1fb8f8487548d
+DIST VirtualBox-6.1.24.tar.bz2 165754851 BLAKE2B 65bbc130281a745a00eee2a055dd59893e2f4b701cbdb31f4c45e2b7389f85f59d8a78ce1e03c83734a49b76fa61f56ea083a588874fa4023b723694f75ee8fb SHA512 cf2c5f58d2f160f8a22d94b7e30bcdaabd907661e05a72341bee93f5092b96c0c84d2291005f433040235227e3d6595ce0e66759c44c24eaedc6c9614646b3d6
 DIST virtualbox-6.1.12-patches-01.tar.xz 2528 BLAKE2B a5d7cde0daea41bee2e40e46569c725769927a31865d99d13b8b13c4903e59b4097f85da15dc592b9c7e8baf8ff805397af827620f107ba09a468b4d1198ecab SHA512 f71d10a9fbce99c3f631ef30bcfa9d0e017e702ac509541b039e08ccbcd024beb93fde09c43d90af5d9d28f6842a7947f20e7950d3897da3e6d57859657e1123

diff --git a/app-emulation/virtualbox/virtualbox-6.1.24.ebuild b/app-emulation/virtualbox/virtualbox-6.1.24.ebuild
new file mode 100644
index 00000000000..0749d1ebaa9
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-6.1.24.ebuild
@@ -0,0 +1,502 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+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/$(ver_cut 1-2)"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64"
+IUSE="alsa debug doc dtrace headless java 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
+		)
+	)
+	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
+		opengl? ( virtual/opengl )
+	)
+	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.8 )
+"
+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
+		einfo "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"
+
+	default
+}
+
+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
+		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_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
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-07-21  9:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-20 12:30 [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-guest-additions/, app-emulation/virtualbox-additions/, Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2021-07-21  9:47 Lars Wendler
2019-07-17  8:16 Lars Wendler
2018-05-10 18:58 Lars Wendler
2018-02-28 10:39 Lars Wendler
2017-12-19  0:37 Lars Wendler
2015-11-11 12:20 Lars Wendler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox