summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-05-10 20:48:48 +0200
committerLars Wendler <polynomial-c@gentoo.org>2018-05-10 20:58:18 +0200
commit114e29ad58b3811641cb933ecb6c9e71f0df2be5 (patch)
tree4e157ee89ba847c5bb3342c2d7a7659440093414 /app-emulation
parentapp-emulation/virtualbox-modules: remove superfluous TRIM_UNUSED_KSYMS check (diff)
downloadgentoo-114e29ad58b3811641cb933ecb6c9e71f0df2be5.tar.gz
gentoo-114e29ad58b3811641cb933ecb6c9e71f0df2be5.tar.bz2
gentoo-114e29ad58b3811641cb933ecb6c9e71f0df2be5.zip
virtualbox packages: Bump to versions 5.1.38 and 5.2.12
Package-Manager: Portage-2.3.36, Repoman-2.3.9
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/virtualbox-additions/Manifest2
-rw-r--r--app-emulation/virtualbox-additions/virtualbox-additions-5.1.38.ebuild35
-rw-r--r--app-emulation/virtualbox-additions/virtualbox-additions-5.2.12.ebuild35
-rw-r--r--app-emulation/virtualbox-bin/Manifest8
-rw-r--r--app-emulation/virtualbox-bin/virtualbox-bin-5.1.38.122592.ebuild287
-rw-r--r--app-emulation/virtualbox-bin/virtualbox-bin-5.2.12.122591.ebuild287
-rw-r--r--app-emulation/virtualbox-extpack-oracle/Manifest2
-rw-r--r--app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.1.38.122592.ebuild42
-rw-r--r--app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.12.122591.ebuild42
-rw-r--r--app-emulation/virtualbox-guest-additions/Manifest2
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.38.ebuild219
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.12.ebuild226
-rw-r--r--app-emulation/virtualbox-modules/Manifest2
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-5.1.38.ebuild56
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-5.2.12.ebuild51
-rw-r--r--app-emulation/virtualbox/Manifest2
-rw-r--r--app-emulation/virtualbox/virtualbox-5.1.38.ebuild468
-rw-r--r--app-emulation/virtualbox/virtualbox-5.2.12.ebuild468
18 files changed, 2234 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-additions/Manifest b/app-emulation/virtualbox-additions/Manifest
index 4b88a900f117..50748f58f6cd 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 000000000000..a28d6005cb4f
--- /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 000000000000..a28d6005cb4f
--- /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 6c784b4b15ee..9b0baf5889b2 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 000000000000..94de7dd7a102
--- /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 000000000000..94de7dd7a102
--- /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 307a7b53b3a8..178ad9e4fab9 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 000000000000..7d7d5d2ea35c
--- /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 000000000000..7d7d5d2ea35c
--- /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 ec7c61b37c98..9d3b3edb0781 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 000000000000..97d4f9402e9b
--- /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 000000000000..9a895f357c2a
--- /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 262745281da7..196ef7e8d706 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 000000000000..027b2333e334
--- /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 000000000000..0fd483ae195e
--- /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 33d226343380..f057d5b6d426 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 000000000000..73a8fc1d5787
--- /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 000000000000..9286de0063a6
--- /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
+}