virtualbox packages: Security bump to ver 5.2.40, 6.0.20 and 6.1.6
authorLars Wendler <polynomial-c@gentoo.org>
Sat, 18 Apr 2020 14:58:56 +0000 (16:58 +0200)
committerLars Wendler <polynomial-c@gentoo.org>
Sat, 18 Apr 2020 15:42:02 +0000 (17:42 +0200)
Bug: https://bugs.gentoo.org/717626
Closes: https://bugs.gentoo.org/715726
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
24 files changed:
app-emulation/virtualbox-additions/Manifest
app-emulation/virtualbox-additions/virtualbox-additions-5.2.40.ebuild [new file with mode: 0644]
app-emulation/virtualbox-additions/virtualbox-additions-6.0.20.ebuild [new file with mode: 0644]
app-emulation/virtualbox-additions/virtualbox-additions-6.1.6.ebuild [new file with mode: 0644]
app-emulation/virtualbox-bin/Manifest
app-emulation/virtualbox-bin/virtualbox-bin-5.2.40.137108.ebuild [new file with mode: 0644]
app-emulation/virtualbox-bin/virtualbox-bin-6.0.20.137117.ebuild [new file with mode: 0644]
app-emulation/virtualbox-bin/virtualbox-bin-6.1.6.137129.ebuild [new file with mode: 0644]
app-emulation/virtualbox-extpack-oracle/Manifest
app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.40.137108.ebuild [new file with mode: 0644]
app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.0.20.137117.ebuild [new file with mode: 0644]
app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.6.137129.ebuild [new file with mode: 0644]
app-emulation/virtualbox-guest-additions/Manifest
app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.40.ebuild [new file with mode: 0644]
app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.20.ebuild [new file with mode: 0644]
app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.6.ebuild [new file with mode: 0644]
app-emulation/virtualbox-modules/Manifest
app-emulation/virtualbox-modules/virtualbox-modules-5.2.40.ebuild [new file with mode: 0644]
app-emulation/virtualbox-modules/virtualbox-modules-6.0.20.ebuild [new file with mode: 0644]
app-emulation/virtualbox-modules/virtualbox-modules-6.1.6.ebuild [new file with mode: 0644]
app-emulation/virtualbox/Manifest
app-emulation/virtualbox/virtualbox-5.2.40.ebuild [new file with mode: 0644]
app-emulation/virtualbox/virtualbox-6.0.20.ebuild [new file with mode: 0644]
app-emulation/virtualbox/virtualbox-6.1.6.ebuild [new file with mode: 0644]

index b2205397ad61ad36f776667d499ac34de88ae2a9..f2f50e735e4d448fe5f60b31fa28f10a028cf862 100644 (file)
@@ -1,5 +1,8 @@
 DIST VBoxGuestAdditions_5.2.32.iso 49620992 BLAKE2B 04853f4b9a95898263ca7238a78b5d8751882a21874e4745d675642185542eb617f2a74b3e55b4444067822511d33b6d358e37e179d1b1c6464d701a8ab45a54 SHA512 86f1d7071a9033b7826dcacbcf23822acc772d909af8a8a12345bd5fe68375677b522d0e1987f2908412d5a29369d0a1221fd099f8b692c8d25fe9cbe40fd11e
 DIST VBoxGuestAdditions_5.2.36.iso 49661952 BLAKE2B 181c26b5362ebdd8508bcc5b3f75993fc6ab7036093004a614c5153a8c772e2bdaab309adc452cfe78ee09fbd528c00a875193f4183b75e3cb6ce169b4f68507 SHA512 4be8e943f61b17445b17d092db84ddd6841d933bf2b8dd1fad7cc0095d31932347f861e110917ca6d0ebec2ee62b2afa7e5977123830e50a4e0e4a6c1872e28e
+DIST VBoxGuestAdditions_5.2.40.iso 49770496 BLAKE2B 4d9ca6cde78da325575f56f0b12d7beccfd09a564b98c808495ac8425f47bd0ce1b86a5cfb79c30256b36b109032013a0677ff07c45808324ca3b85efe5b7f51 SHA512 a2ea5539de454bb062dffa0b61ac4962c8932539ab0cdaae98f7703528c201bc856b0597b92c20e83fab5b97981be3811061386022ca3687d8c102983e05ec7b
 DIST VBoxGuestAdditions_6.0.16.iso 77201408 BLAKE2B 713381429cbef6685c4890c47dc0896571ca24cacc96d73903cdd91220a6b5ba7c6012c69d62489eaabd1fe75dd0000a3415d7d316fbc79b3b8ac2cf45cba75a SHA512 d17de374714023b02fef76bad53a15fe4d5d4bc752e900843419e9c3ba4988bd9bdc8fd6797bb4fdfa722d0f41ff144ed6865a0778609a7aea5e96de34c7beb8
+DIST VBoxGuestAdditions_6.0.20.iso 77297664 BLAKE2B 72c3e6b3c757d866bbf94cb2593b81d05362dcb1485db8412c8c3a95a7619754eeeaa75f8d813bd26bb3c27a718e3f687fb5904dd2574d29eb96988f48fcc67b SHA512 16c69ddee28650ac35ee25bead96568cdfe269042ed6a4138b5870322ff9dab405ea844d75886a0b52c44f0c47a34814a30d48734a6683df6b6ad042b1bea68d
 DIST VBoxGuestAdditions_6.1.2.iso 59539456 BLAKE2B 904105943fb4004d3f91ef48cf8999bb1e4a8d4658e99b8d815f8f7031cedb870a1ae5825473cabbaedb38d2e9e2df12e4e8ed52c33a7e4595e0a37f6d51ade4 SHA512 c0d916c50f7377feade9a00417c759666442dd881f9e863d9704e12dda274e14bd84313a5bd340192a8e1d634eab4d69379bfee06324207e1025fe7af1a8c07c
 DIST VBoxGuestAdditions_6.1.4.iso 59688960 BLAKE2B e7c86bbb2eddfc1e9dd555a5d9e5b808194a0124f0cf3bfb09aa226a89cd348cf979f523361fbd0cc400912709310592f938e56ef410a9f81c1bb514db58c2e7 SHA512 a1e8f404c3d58adc60adb6a14cecc3e56f0705bd810891038d2fd6691e9f54f61daa4ffe804c77005b2764cb7c7c8d97fb67077e05aca94cf21c4afa89cd7f4a
+DIST VBoxGuestAdditions_6.1.6.iso 59760640 BLAKE2B dac4f92c851d37ad995ff631f1b7ecda702c3dce5b299232fc7ec956009fb13e09fc0e5d6980d09c4a9f1b58ab5fcff93c791ecc0fb184cefa701f072e68b87c SHA512 b87cc85d46ffcbf6ae8b21ef5932144b956f59925a1c5a87bbcc81dd9dbd845b1f3f282b92cea3dcc15d3e338e676dd58f81762e27019c1fb6736c541b1fdd9a
diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-5.2.40.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.40.ebuild
new file mode 100644 (file)
index 0000000..89a7f0a
--- /dev/null
@@ -0,0 +1,33 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN=VBoxGuestAdditions
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=${MY_PN}_${MY_PV}
+
+DESCRIPTION="CD image containing guest additions for VirtualBox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.iso"
+
+LICENSE="GPL-2+ LGPL-2.1+ MIT SGI-B-2.0 CDDL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror"
+
+RDEPEND="!app-emulation/virtualbox-bin
+       !=app-emulation/virtualbox-9999"
+
+S="${WORKDIR}"
+
+src_unpack() {
+       return 0
+}
+
+src_install() {
+       insinto /usr/share/${PN/-additions}
+       newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
+}
diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-6.0.20.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-6.0.20.ebuild
new file mode 100644 (file)
index 0000000..1afb82d
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN=VBoxGuestAdditions
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=${MY_PN}_${MY_PV}
+
+DESCRIPTION="CD image containing guest additions for VirtualBox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.iso"
+
+LICENSE="GPL-2+ LGPL-2.1+ MIT SGI-B-2.0 CDDL"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror"
+
+RDEPEND="!app-emulation/virtualbox-bin
+       !=app-emulation/virtualbox-9999"
+
+S="${WORKDIR}"
+
+src_unpack() {
+       return 0
+}
+
+src_install() {
+       insinto /usr/share/${PN/-additions}
+       newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
+}
diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-6.1.6.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-6.1.6.ebuild
new file mode 100644 (file)
index 0000000..9726489
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN=VBoxGuestAdditions
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=${MY_PN}_${MY_PV}
+
+DESCRIPTION="CD image containing guest additions for VirtualBox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.iso"
+
+LICENSE="GPL-2+ LGPL-2.1+ MIT SGI-B-2.0 CDDL"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="mirror"
+
+RDEPEND="!app-emulation/virtualbox-bin
+       !=app-emulation/virtualbox-9999"
+
+S="${WORKDIR}"
+
+src_unpack() {
+       return 0
+}
+
+src_install() {
+       insinto /usr/share/${PN/-additions}
+       newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
+}
index 14ad7b074746545bc8a3e3d1a6132c9587aacb46..cc2247c9f8da90a011a2e1723b667790ef127642 100644 (file)
@@ -1,17 +1,27 @@
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.32-132073.tar.gz 26917593 BLAKE2B e52c746299d32ae908892791d8fb9b4dda264875e66bf0459adfbc64381001e9be1800a8ac93bbea14dceb47a0e81cf79c29a4c0796f7c4a30021e4beb036cfa SHA512 382ed45a90981397da7d46925a73c5aa0cc870fe41992c87ccd3d3a33420b199e4a0a19761a6c6ebeacf93450e2937d81befb6fdaf7fb7961827e23f0f24c645
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.36-135684.tar.gz 26989444 BLAKE2B fae15190bb434918e1ee15582c261b0bf33fbffa0ada922708892cc63ef8ca007decc7611394b056207df4f3ceb9fef781ace6f05e357e4849ae619ccc810b84 SHA512 c2a8f905ddde2c75a852e0391cfef252d45c6582994be53de8198c5c6276fe1827610620ae7e515c7cd7358ae8c9ab49766a8d968ea371895e7553955fd9cdec
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.40-137108.tar.gz 26737982 BLAKE2B 4a050067c0111929fe73695ec4f057e6b33cb224c034ca564beb65cc4fb73491b2c03e0b88ddb77ede5fbd392b0e0c9eae3226f937998b2c06484ff083b4a714 SHA512 5e3e528707b7f3eab19db5358258a69518996a98364e57df9853a549d7310b8db58b40041470f263b212fe6e2bb163e745a3b9b7567c681834d99442289407f4
 DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.16-135674.tar.gz 23164167 BLAKE2B 59885f2710e8169c28cc1f5e0e9edb3b761030aee1eeeb645bed1085e145a02fb2e518108cf4426620a369b17b6ce7ff4b5c442ef69b29b33257993603874d7c SHA512 de4732d1c3ef5589c3af388c71003a1a1b4b48c7c47f26ab8b5950ccd2b906c3785af2e310df27e8f9b83ecf572857c4178c8f7cb96d3a3bca103da4fbc036ea
+DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.20-137117.tar.gz 23238318 BLAKE2B 160e92cb889c765ae28eccb535478af81377d6ce2cadde53e572c41e52f230ca266975b8fe37db0743450bb9e90b23d2fe6d1974496bbb93280381de1379cdd6 SHA512 26f81b5ca3aa5c8423ea42cd1d650657351114f46373d9ca7fa08895865229008d1dff225b9caae6a603758da1c15d2b025da6add86fded377a2700bdbf9b65c
 DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.2-135662.tar.gz 10925771 BLAKE2B dee75544489c467873c7cd46456be3ece0119d68947f05ac3f4163322b8023dfc9066377794d18b2662b34ff9adee11fa8afb70628e0b9014ee0b127ae0087c2 SHA512 0d86696179ccda05583fb0c876567751734904677e13bfdd8f922751dfe949bbd12753d31048fc5f32df75d89b6cb59a662c2d1f524582adab8eb90b10da1b23
 DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.4-136177.tar.gz 10997977 BLAKE2B 066a0302b53a62ef27f5c0fafc499e8fd8f253807bc8808e88c32a4b71872c0cc8a57ffc6727f9e2bf7f6ba1b4e1d41c3001b8e9b3e490acfd4339bf8b02dfdd SHA512 373aa70182c4f86de14c40026f1d435832f2f377a8fe422fcbc3644b5e6a5f7abfc56df3f4b9acf1fa70cccb0bc483f12b6f70f6009a725ca0fa1b7e38dbfeab
+DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.6-137129.tar.gz 10999815 BLAKE2B f7c0e3ec1ba3c2eb991f76a574c1605eebc0a2a40751f6c822f37cbff743b642c9c09ce8dcebc725bdf51f2099dc044aed6486909ab7dd9d62335a1dd483bfb1 SHA512 938564a68e7b18a83022329217c2304470a3682ccd5a837be3caa1b802d3c7bed450428c1d3176fac571eb8a53dca2405ca53853163ad613ef056bc3b3beef68
 DIST VirtualBox-5.2.32-132073-Linux_amd64.run 83854803 BLAKE2B 3522df31f4f98efcd40adcaaf8ac458078adf0bbfed96c7d309d4726ddb8b8dd78eef830b3cfcb2f1fa6329bcc30ea2449f5c88cab66fa0c7d20818d7b5aa07a SHA512 aea9b27793f3363eba2ed627cc3b35ca51445946e6e9f20382fb3034afbb7470d27fdc476066c04acc595690a9e34109e8b8ce6dcab10fdc990b241b24ec47fb
 DIST VirtualBox-5.2.32-132073-Linux_x86.run 82943439 BLAKE2B 31a22e8b52a53d6948a5af533b5c8f374d703c44736678c0bbe6fd9b5298bed4817996c32902a69c2c59dbf751cea04f22beb7203deaeadf79d2424e123e9d37 SHA512 05f99b673224c2b3d94b0d568067ae5ee74200c88a3b7f6665988a9d0c35f69f81c07292b838d07c07fd6d5484979615fd255650b138387501a593f3833b9071
 DIST VirtualBox-5.2.36-135684-Linux_amd64.run 83885521 BLAKE2B 6940d009069a80f46f0e568732e81e0151e18f7c24c5ff44dab3b305e5f21d4cf729ce162f67b21b4f034b8dc7ab4df4a07a24ab00a7349083bb15d3af27c0c4 SHA512 288a4ec1ba2f245771c87034876e1cfa59ea3eaed124bd77ffed20fadc54dbf3071624a94fefeb26a7d356fb55fe206d11510136194e15b10fa9585c8d5efe73
 DIST VirtualBox-5.2.36-135684-Linux_x86.run 82974158 BLAKE2B d2c44159f00111438c51c60d4356247693c6773e8b244fcdf24cd2029b423c36edbea20e2130cf414ca5f076d04b1c085e9fac9a6b8504a991dcf76e61feb2c0 SHA512 888fafda0986066edf32c208503857ce58f220251d142ac0a327989d0d24987b2d69798143142e749c49cf37fddec23b3fe624503914327d0c53e3794db2d688
+DIST VirtualBox-5.2.40-137108-Linux_amd64.run 83865043 BLAKE2B d44f3ee6b05446fbe36b5672ec00d2ffcf5b8592ebfdfc6d091dd1bf92d821644976bad55ca390ad834d274dbe738341457888fb78030de9ddadd680362c4b11 SHA512 1f068f776ef65ed930eed0ecc6304a374ea36339c21dfc7b41a61b6e82d61f5c8de13f4b93f19500f9eccbe9e3d0f1a816c46b7b7b4d5ed195ce1ddc45c57e7f
+DIST VirtualBox-5.2.40-137108-Linux_x86.run 82994639 BLAKE2B 4f90a72d5d8952ae05bff9c50262e377c0ffbc134741eddc0aa6dccd9a575de746bcdcf0e0fc2db8f5ee36e730bcf814e0fd1291a739dd33260be7219f11c44a SHA512 580f8a6c7a1fe04132789b60ce4cb4db39f980590731e18b9c2cd7727d59efdd5250fbe80704a4542f8876d8fdc89cc048b669259e8170a28350157901bc14c4
 DIST VirtualBox-6.0.16-135674-Linux_amd64.run 127251928 BLAKE2B a0aa634be851ba5620ae89b0c324204aa4a069c1480fe0d7effcb3796900b688d39f1204778e16e407c266d06583d3531e7831b789de238bab380160a9821036 SHA512 d3cdd40a5f7d2bc1537244db1dd5c5cb58a5b7df527952c1abcd5bd701afd59dd77ec1aa90489cd7640fe88a01aac9b20cc8522750f534a5d11af6f7e125482c
+DIST VirtualBox-6.0.20-137117-Linux_amd64.run 127231448 BLAKE2B 2fa6307add56b318708cdb88615aa15e39577f43c0d65e74037d6f184a3937144ae8f5abcf217809776dd19e4f3141e5bb78adadebc0be63d47bc69786cfa0c7 SHA512 9ac9b893c7cad4dc58833f6132ec0da6564a11112d8bef881bf1dab584abf046e167513c2e4c4ed3c5ce2e4b845c9cf99721fda657b2993b5692eb4ca15d2f5b
 DIST VirtualBox-6.1.2-135662-Linux_amd64.run 117165515 BLAKE2B cb2aeda9997d8b5f6cfc353e95532fe687362efde03256d6136b8546a74b0a87b9fdc0e9e273c1cde7f226951af7cf5d02218c68b962573ccc80ae94be987c0d SHA512 0775a5085b4eeba5244df3896afe270c79873da2e87038566bfab63f1552b90e235e20dff5703c6faac44f1c5c4ecbfac64c29608edd8b217bf34fb08cdc1999
 DIST VirtualBox-6.1.4-136177-Linux_amd64.run 117185995 BLAKE2B 4ce483efd27c3183024f7baa3e07c1d6484767ba957582cad3111359c9d5b24b293f3b860ea566eb1bbc383710cb81b27b4e39c2aa24c9cc56dc6ba593fd1adb SHA512 14609ff7c76e93b561763456fc92dc3d3ed8d0c556af1ea0906abfb88a8fce9b8da6f392f3146945d03c7874f78d3f1f61df563c9f0160ef3315f30c286316e6
+DIST VirtualBox-6.1.6-137129-Linux_amd64.run 110530008 BLAKE2B 9f2f2e65ace7bc5919dcaba23b0a979a1b246af65722fd955dfb6110bda0fc119f9388e8d404bbdbf00bd8a96c25c505dc7a3589fc98680cdb115f1c1327936d SHA512 a4ea1a37bcbc70a9be3bf201dac06e31bb5d8e4dd9d9f04fb8f2fc6387c6ae165c0812d357062e1593a2d5a6d7902ba068984bc8658750df49d991025b96dc05
 DIST VirtualBoxSDK-5.2.32-132073.zip 10200195 BLAKE2B 0de34e166b94889c605014233142887e7a8857d1915866156a0cc63850937730ec063e63b550f0d39ad241259158f033b028dbab7eec3f6f38c3715139413b3a SHA512 ccbe2af819bff46055bd6f079a03d69e721a09286e83d4f650583bc7692f5d19ae1a725cf3a6eb1b75167a2c73ff2e020d1f932bf9cfeee9ee709d1174c4cabf
 DIST VirtualBoxSDK-5.2.36-135684.zip 10203411 BLAKE2B 241dca39482d620063476b86514d3b71d69b3187be15fdf8774ee3fc34ff98ac66ba97baebe4cc107727a07594d3c124c05867a7f62661cf11bc6bd43528cdba SHA512 646bc84b605c236ecf9c38fd14cfc5f2d1ddf72a874482dd9a0f799bc099e3c2ca11512607d988c411495fcf12495ea49e0fabea2ca04a22e73efecb94928190
+DIST VirtualBoxSDK-5.2.40-137108.zip 10201020 BLAKE2B db4a2fd69fdc3ab4201c086c15f14144dd1f75e87d13c4493aaeaf2b69e06a599623416e17a3715c9836b7b7bf36aaba34c06e27ddd70900ca6c5fdd43e311e1 SHA512 15bf89ca622396a5b2f66fb42762959548e8d0b2e0bd3b63223bcccff449f5c094af0315deecae167e105276915fb6b2e61a1f71465be4e85b52a58e313a2830
 DIST VirtualBoxSDK-6.0.16-135674.zip 10803791 BLAKE2B 2b8507cf5143370ab753f55b27c1890ded25b1ed28457bb8ba094f2b2fa7e813d0605a25c5adbcbe828aec34c9fe7526e7a60c2e1cfc1085a611959474016280 SHA512 c7b811b89d6fa892c86c60e41922051d75ff079c9868eaf3b454aca73b3de77aa9361422216668203d105c910fffa94bd7b4bae4243c769660209c979009d7fe
+DIST VirtualBoxSDK-6.0.20-137117.zip 10803680 BLAKE2B aaec9c6b9f0d758528f8490920bc98c594e8aa2bd241f941e9093553d5353b4999f4041519198740344da92af3d7fb7992dcb6945a55d5471d9952a76daea4f5 SHA512 b2574f7d93c3d92a09a2cd18f68db3ac78d5c51d454cc322800b0d8555c4fdb541b5c797e11795dda51f5998f98dc9ed4839b836f4c64f8f95211b6ae71c198d
 DIST VirtualBoxSDK-6.1.2-135662.zip 11174224 BLAKE2B 54ca9c127b15ab2917d9150313ae3c779efa80e07440f8e24694f14440120a415b35aa0b906de4b03330dd9c73c9dcb978bb0a1b39e438f39f46da4dfa4ddc3a SHA512 4011690019ae7804d85cdbf2c1649588472ef0db019c54507f30cb319cb28ffe27a36bc8ee59d4f1cba60c9a04f0f52096ac0596c826e8a5bb4bba1a7941e134
 DIST VirtualBoxSDK-6.1.4-136177.zip 11173848 BLAKE2B 816b18bcfe2cde169dca3c5f3e89854b61f2bb7b59d28749f994c8f9a60e18c5f1cbe659c53c7a3b49a0bcb90959c0cd0b36c2254879f735e835b463927b2190 SHA512 e7b2a0dc892a9989cd0142edad131d0cf4240029d98f80a230e3e401be3a6f1d8c82c810b19b7e865946145b77cd87d91602adc640c182a2dfbdae1c21821a48
+DIST VirtualBoxSDK-6.1.6-137129.zip 11176791 BLAKE2B 9ad2592604e9b007c8d302d8efb67a3b5e069549bca7e6330a417d1c719e2de533e0f429909f95cfb77a5633eb806955c4ae4113ad6707af33854b7605215531 SHA512 d46549657fd8f2eb95196c310a9d81163fb231ce663ac7e24e1e8ac15b5830b25188c547db91fdca5b9524c2ba340f0b638e34863f8e26b4d118bf832b7f99bf
diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-5.2.40.137108.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.40.137108.ebuild
new file mode 100644 (file)
index 0000000..07efd35
--- /dev/null
@@ -0,0 +1,287 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit xdg-utils gnome2 pax-utils python-r1 udev unpacker eapi7-ver
+
+MAIN_PV="$(ver_cut 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+       MY_PV="${MAIN_PV}_$(ver_cut 5)"
+       MY_PV="${MY_PV/beta/BETA}"
+       MY_PV="${MY_PV/rc/RC}"
+else
+       MY_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(ver_cut 4)"
+VBOX_PV="${MY_PV}-${VBOX_BUILD_ID}"
+MY_P="VirtualBox-${VBOX_PV}-Linux"
+# needed as sometimes the extpack gets another build ID
+EXTP_PV="${VBOX_PV}"
+EXTP_PN="Oracle_VM_VirtualBox_Extension_Pack"
+EXTP_P="${EXTP_PN}-${EXTP_PV}"
+# needed as sometimes the SDK gets another build ID
+SDK_PV="${VBOX_PV}"
+SDK_P="VirtualBoxSDK-${SDK_PV}"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="amd64? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
+       x86? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
+       https://download.virtualbox.org/virtualbox/${MY_PV}/${EXTP_P}.vbox-extpack -> ${EXTP_P}.tar.gz"
+
+LICENSE="GPL-2 PUEL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+additions +chm headless python vboxwebsrv rdesktop-vrdp"
+RESTRICT="bindist 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 *
+
+       # create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid)
+       dosym ../VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so
+       dosym ../VBoxREM.so /opt/VirtualBox/components/VBoxREM.so
+       dosym ../VBoxRT.so /opt/VirtualBox/components/VBoxRT.so
+       dosym ../VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so
+       dosym ../VBoxXPCOM.so /opt/VirtualBox/components/VBoxXPCOM.so
+
+       local each
+       for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,NetAdpCtl,NetDHCP,NetNAT,TestOGL,ExtPackHelperApp}; do
+               fowners root:vboxusers /opt/VirtualBox/${each}
+               fperms 0750 /opt/VirtualBox/${each}
+               pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+       done
+       # VBoxNetAdpCtl and VBoxNetDHCP binaries need to be suid root in any case..
+       fperms 4750 /opt/VirtualBox/VBoxNetAdpCtl
+       fperms 4750 /opt/VirtualBox/VBoxNetDHCP
+       fperms 4750 /opt/VirtualBox/VBoxNetNAT
+
+       if ! use headless ; then
+               # Hardened build: Mark selected binaries set-user-ID-on-execution
+               for each in VBox{SDL,Headless} VirtualBox; do
+                       fowners root:vboxusers /opt/VirtualBox/${each}
+                       fperms 4510 /opt/VirtualBox/${each}
+                       pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+               done
+
+               dosym ../VirtualBox/VBox.sh /opt/bin/VirtualBox
+               dosym ../VirtualBox/VBox.sh /opt/bin/VBoxSDL
+       else
+               # Hardened build: Mark selected binaries set-user-ID-on-execution
+               fowners root:vboxusers /opt/VirtualBox/VBoxHeadless
+               fperms 4510 /opt/VirtualBox/VBoxHeadless
+               pax-mark -m "${ED%/}"/opt/VirtualBox/VBoxHeadless
+       fi
+
+       exeinto /opt/VirtualBox
+       newexe "${FILESDIR}/${PN}-3-wrapper" "VBox.sh"
+       fowners root:vboxusers /opt/VirtualBox/VBox.sh
+       fperms 0750 /opt/VirtualBox/VBox.sh
+
+       dosym ../VirtualBox/VBox.sh /opt/bin/VBoxManage
+       dosym ../VirtualBox/VBox.sh /opt/bin/VBoxVRDP
+       dosym ../VirtualBox/VBox.sh /opt/bin/VBoxHeadless
+       dosym ../VirtualBox/VBoxTunctl /opt/bin/VBoxTunctl
+
+       # set an env-variable for 3rd party tools
+       echo -n "VBOX_APP_HOME=/opt/VirtualBox" > "${T}/90virtualbox"
+       doenvd "${T}/90virtualbox"
+
+       local udevdir="$(get_udevdir)"
+       insinto ${udevdir}/rules.d
+       doins "${FILESDIR}"/10-virtualbox.rules
+       sed "s@%UDEVDIR%@${udevdir}@" \
+               -i "${ED%/}"${udevdir}/rules.d/10-virtualbox.rules || die
+       # move udev scripts into ${udevdir} (bug #372491)
+       mv "${ED%/}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${ED%/}"${udevdir} || die
+       fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+}
+
+pkg_postinst() {
+       xdg_desktop_database_update
+
+       gnome2_icon_cache_update
+
+       udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
+
+       elog ""
+       if ! use headless ; then
+               elog "To launch VirtualBox just type: \"VirtualBox\""
+               elog ""
+       fi
+       elog "You must be in the vboxusers group to use VirtualBox."
+       elog ""
+       elog "For advanced networking setups you should emerge:"
+       elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
+       elog ""
+       elog "Please visit http://www.virtualbox.org/wiki/Editions for"
+       elog "an overview about the different features of ${PN}"
+       elog "and virtualbox-ose"
+       if [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
+               elog ""
+               elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
+               elog "or else USB in ${PN} won't work."
+       fi
+}
+
+pkg_postrm() {
+       xdg_desktop_database_update
+}
diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-6.0.20.137117.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-6.0.20.137117.ebuild
new file mode 100644 (file)
index 0000000..0b44094
--- /dev/null
@@ -0,0 +1,292 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit xdg-utils gnome2 pax-utils python-r1 udev unpacker eapi7-ver
+
+MAIN_PV="$(ver_cut 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+       MY_PV="${MAIN_PV}_$(ver_cut 5-6)"
+       MY_PV="${MY_PV/beta/BETA}"
+       MY_PV="${MY_PV/rc/RC}"
+else
+       MY_PV="${MAIN_PV}"
+       KEYWORDS="~amd64" #~x86
+fi
+VBOX_BUILD_ID="$(ver_cut 4)"
+VBOX_PV="${MY_PV}-${VBOX_BUILD_ID}"
+MY_P="VirtualBox-${VBOX_PV}-Linux"
+# needed as sometimes the extpack gets another build ID
+EXTP_PV="${VBOX_PV}"
+EXTP_PN="Oracle_VM_VirtualBox_Extension_Pack"
+EXTP_P="${EXTP_PN}-${EXTP_PV}"
+# needed as sometimes the SDK gets another build ID
+SDK_PV="${VBOX_PV}"
+SDK_P="VirtualBoxSDK-${SDK_PV}"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="amd64? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
+       https://download.virtualbox.org/virtualbox/${MY_PV}/${EXTP_P}.vbox-extpack -> ${EXTP_P}.tar.gz"
+       #x86? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
+
+LICENSE="GPL-2 PUEL"
+SLOT="0"
+IUSE="+additions +chm headless python vboxwebsrv rdesktop-vrdp"
+RESTRICT="bindist 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
+       acct-group/vboxusers
+       ~app-emulation/virtualbox-modules-${MAIN_PV}
+       !headless? (
+               dev-libs/glib
+               media-libs/fontconfig
+               media-libs/freetype
+               media-libs/libpng
+               media-libs/libsdl[X]
+               x11-libs/libXcursor
+               x11-libs/libXext
+               x11-libs/libXfixes
+               x11-libs/libXft
+               x11-libs/libXi
+               x11-libs/libXinerama
+               x11-libs/libXrandr
+               x11-libs/libXrender
+               chm? ( dev-libs/expat )
+       )
+       dev-libs/libxml2
+       sys-fs/lvm2
+       x11-libs/libXau
+       x11-libs/libX11
+       x11-libs/libXt
+       x11-libs/libXmu
+       x11-libs/libSM
+       x11-libs/libICE
+       x11-libs/libXdmcp
+       ${PYTHON_DEPS}"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+S="${WORKDIR}"
+
+QA_PREBUILT="opt/VirtualBox/*"
+
+PYTHON_UPDATER_IGNORE="1"
+
+src_unpack() {
+       unpack_makeself ${MY_P}_${ARCH}.run
+       unpack ./VirtualBox.tar.bz2
+
+       mkdir "${S}"/${EXTP_PN} || die
+       pushd "${S}"/${EXTP_PN} &>/dev/null || die
+       unpack ${EXTP_P}.tar.gz
+       popd &>/dev/null || die
+
+       if [[ "${PV}" != *beta* ]] && use sdk ; then
+               unpack VirtualBoxSDK-${SDK_PV}.zip
+       fi
+}
+
+src_configure() {
+       :;
+}
+
+src_compile() {
+       :;
+}
+
+src_install() {
+       # create virtualbox configurations files
+       insinto /etc/vbox
+       newins "${FILESDIR}/${PN}-config" vbox.cfg
+
+       if ! use headless ; then
+               newmenu "${FILESDIR}"/${PN}.desktop-2 ${PN}.desktop
+
+               # set up symlinks (bug #572012)
+               dosym ../../../../opt/VirtualBox/virtualbox.xml /usr/share/mime/packages/virtualbox.xml
+
+               local size ico icofile
+               for size in 16 24 32 48 64 72 96 128 256 ; do
+                       pushd "${S}"/icons/${size}x${size} &>/dev/null || die
+                       if [[ -f "virtualbox.png" ]] ; then
+                               doicon -s ${size} virtualbox.png
+                       fi
+                       for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+                               icofile="virtualbox-${ico}.png"
+                               if [[ -f "${icofile}" ]] ; then
+                                       doicon -s ${size} ${icofile}
+                               fi
+                       done
+                       popd &>/dev/null || die
+               done
+               doicon -s scalable "${S}"/icons/scalable/virtualbox.svg
+               insinto /usr/share/pixmaps
+               newins "${S}"/icons/48x48/virtualbox.png ${PN}.png
+       fi
+
+       pushd "${S}"/${EXTP_PN} &>/dev/null || die
+       insinto /opt/VirtualBox/ExtensionPacks/${EXTP_PN}
+       doins -r linux.${ARCH}
+       doins ExtPack* PXE-Intel.rom
+       popd &>/dev/null || die
+       rm -rf "${S}"/${EXTP_PN}
+
+       insinto /opt/VirtualBox
+       dodir /opt/bin
+
+       doins UserManual.pdf
+
+       if [[ "${PV}" != *beta* ]] && use sdk ; then
+               doins -r sdk
+       fi
+
+       if use additions; then
+               doins -r additions
+       fi
+
+       if use vboxwebsrv; then
+               doins vboxwebsrv
+               fowners root:vboxusers /opt/VirtualBox/vboxwebsrv
+               fperms 0750 /opt/VirtualBox/vboxwebsrv
+               dosym ../../opt/VirtualBox/VBox.sh /opt/bin/vboxwebsrv
+               newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+               newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+       fi
+
+       if use rdesktop-vrdp; then
+               doins rdesktop-vrdp
+               doins -r rdesktop-vrdp-keymaps
+               fperms 0750 /opt/VirtualBox/rdesktop-vrdp
+               dosym ../../opt/VirtualBox/rdesktop-vrdp /opt/bin/rdesktop-vrdp
+       fi
+
+       if ! use headless && use chm; then
+               doins kchmviewer VirtualBox.chm
+               fowners root:vboxusers /opt/VirtualBox/kchmviewer
+               fperms 0750 /opt/VirtualBox/kchmviewer
+       fi
+
+       # This ebuild / package supports only py2.7.  When py3 comes is unknown.
+       # The compile phase makes VBoxPython2_7.so.
+       # py3 support would presumably require a binary pre-compiled by py3.
+       use python && doins VBoxPython.so
+
+       rm -rf src rdesktop* deffiles install* routines.sh runlevel.sh \
+               vboxdrv.sh VBox.sh VBox.png vboxnet.sh additions VirtualBox.desktop \
+               VirtualBox.tar.bz2 LICENSE VBoxSysInfo.sh rdesktop* vboxwebsrv \
+               webtest kchmviewer VirtualBox.chm vbox-create-usb-node.sh \
+               90-vbox-usb.fdi uninstall.sh vboxshell.py vboxdrv-pardus.py \
+               VBoxPython?_*.so
+
+       if use headless ; then
+               rm -rf VBoxSDL VirtualBox{,VM} VBoxKeyboard.so
+       fi
+
+       doins -r *
+
+       # create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid)
+       dosym ../VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so
+       dosym ../VBoxREM.so /opt/VirtualBox/components/VBoxREM.so
+       dosym ../VBoxRT.so /opt/VirtualBox/components/VBoxRT.so
+       dosym ../VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so
+       dosym ../VBoxXPCOM.so /opt/VirtualBox/components/VBoxXPCOM.so
+
+       local each
+       for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,TestOGL,ExtPackHelperApp} $(usex headless '' VirtualBox) ; do
+               fowners root:vboxusers /opt/VirtualBox/${each}
+               fperms 0750 /opt/VirtualBox/${each}
+               pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+       done
+       # VBoxNetAdpCtl and VBoxNetDHCP binaries need to be suid root in any case..
+       for each in VBoxNet{AdpCtl,DHCP,NAT} $(usex headless '' VirtualBoxVM) ; do
+               fowners root:vboxusers /opt/VirtualBox/${each}
+               fperms 4750 /opt/VirtualBox/${each}
+               pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+       done
+
+       if ! use headless ; then
+               # Hardened build: Mark selected binaries set-user-ID-on-execution
+               for each in VBox{SDL,Headless} ; do
+                       fowners root:vboxusers /opt/VirtualBox/${each}
+                       fperms 4510 /opt/VirtualBox/${each}
+                       pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+               done
+
+               dosym ../VirtualBox/VBox.sh /opt/bin/VirtualBox
+               dosym ../VirtualBox/VBox.sh /opt/bin/VBoxSDL
+       else
+               # Hardened build: Mark selected binaries set-user-ID-on-execution
+               fowners root:vboxusers /opt/VirtualBox/VBoxHeadless
+               fperms 4510 /opt/VirtualBox/VBoxHeadless
+               pax-mark -m "${ED%/}"/opt/VirtualBox/VBoxHeadless
+       fi
+
+       exeinto /opt/VirtualBox
+       newexe "${FILESDIR}/${PN}-3-wrapper" "VBox.sh"
+       fowners root:vboxusers /opt/VirtualBox/VBox.sh
+       fperms 0750 /opt/VirtualBox/VBox.sh
+
+       dosym ../VirtualBox/VBox.sh /opt/bin/VBoxManage
+       dosym ../VirtualBox/VBox.sh /opt/bin/VBoxVRDP
+       dosym ../VirtualBox/VBox.sh /opt/bin/VBoxHeadless
+       dosym ../VirtualBox/VBoxTunctl /opt/bin/VBoxTunctl
+
+       # set an env-variable for 3rd party tools
+       echo -n "VBOX_APP_HOME=/opt/VirtualBox" > "${T}/90virtualbox"
+       doenvd "${T}/90virtualbox"
+
+       local udevdir="$(get_udevdir)"
+       insinto ${udevdir}/rules.d
+       doins "${FILESDIR}"/10-virtualbox.rules
+       sed "s@%UDEVDIR%@${udevdir}@" \
+               -i "${ED%/}"${udevdir}/rules.d/10-virtualbox.rules || die
+       # move udev scripts into ${udevdir} (bug #372491)
+       mv "${ED%/}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${ED%/}"${udevdir} || die
+       fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+}
+
+pkg_postinst() {
+       xdg_icon_cache_update
+       xdg_desktop_database_update
+       xdg_mimeinfo_database_update
+
+       udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
+
+       elog ""
+       if ! use headless ; then
+               elog "To launch VirtualBox just type: \"VirtualBox\""
+               elog ""
+       fi
+       elog "You must be in the vboxusers group to use VirtualBox."
+       elog ""
+       elog "For advanced networking setups you should emerge:"
+       elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
+       elog ""
+       elog "Please visit http://www.virtualbox.org/wiki/Editions for"
+       elog "an overview about the different features of ${PN}"
+       elog "and virtualbox-ose"
+       if [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
+               elog ""
+               elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
+               elog "or else USB in ${PN} won't work."
+       fi
+}
+
+pkg_postrm() {
+       xdg_icon_cache_update
+       xdg_desktop_database_update
+       xdg_mimeinfo_database_update
+}
diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-6.1.6.137129.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-6.1.6.137129.ebuild
new file mode 100644 (file)
index 0000000..067dfba
--- /dev/null
@@ -0,0 +1,292 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit xdg-utils gnome2 pax-utils python-r1 udev unpacker eapi7-ver
+
+MAIN_PV="$(ver_cut 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+       MY_PV="${MAIN_PV}_$(ver_cut 5-6)"
+       MY_PV="${MY_PV/beta/BETA}"
+       MY_PV="${MY_PV/rc/RC}"
+else
+       MY_PV="${MAIN_PV}"
+       KEYWORDS="~amd64" #~x86
+fi
+VBOX_BUILD_ID="$(ver_cut 4)"
+VBOX_PV="${MY_PV}-${VBOX_BUILD_ID}"
+MY_P="VirtualBox-${VBOX_PV}-Linux"
+# needed as sometimes the extpack gets another build ID
+EXTP_PV="${VBOX_PV}"
+EXTP_PN="Oracle_VM_VirtualBox_Extension_Pack"
+EXTP_P="${EXTP_PN}-${EXTP_PV}"
+# needed as sometimes the SDK gets another build ID
+SDK_PV="${VBOX_PV}"
+SDK_P="VirtualBoxSDK-${SDK_PV}"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="amd64? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
+       https://download.virtualbox.org/virtualbox/${MY_PV}/${EXTP_P}.vbox-extpack -> ${EXTP_P}.tar.gz"
+       #x86? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
+
+LICENSE="GPL-2 PUEL"
+SLOT="0"
+IUSE="+additions +chm headless python vboxwebsrv rdesktop-vrdp"
+RESTRICT="bindist 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
+       acct-group/vboxusers
+       ~app-emulation/virtualbox-modules-${MY_PV,,}
+       !headless? (
+               dev-libs/glib
+               media-libs/fontconfig
+               media-libs/freetype
+               media-libs/libpng
+               media-libs/libsdl[X]
+               x11-libs/libXcursor
+               x11-libs/libXext
+               x11-libs/libXfixes
+               x11-libs/libXft
+               x11-libs/libXi
+               x11-libs/libXinerama
+               x11-libs/libXrandr
+               x11-libs/libXrender
+               chm? ( dev-libs/expat )
+       )
+       dev-libs/libxml2
+       sys-fs/lvm2
+       x11-libs/libXau
+       x11-libs/libX11
+       x11-libs/libXt
+       x11-libs/libXmu
+       x11-libs/libSM
+       x11-libs/libICE
+       x11-libs/libXdmcp
+       ${PYTHON_DEPS}"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+S="${WORKDIR}"
+
+QA_PREBUILT="opt/VirtualBox/*"
+
+PYTHON_UPDATER_IGNORE="1"
+
+src_unpack() {
+       unpack_makeself ${MY_P}_${ARCH}.run
+       unpack ./VirtualBox.tar.bz2
+
+       mkdir "${S}"/${EXTP_PN} || die
+       pushd "${S}"/${EXTP_PN} &>/dev/null || die
+       unpack ${EXTP_P}.tar.gz
+       popd &>/dev/null || die
+
+       if [[ "${PV}" != *beta* ]] && use sdk ; then
+               unpack VirtualBoxSDK-${SDK_PV}.zip
+       fi
+}
+
+src_configure() {
+       :;
+}
+
+src_compile() {
+       :;
+}
+
+src_install() {
+       # create virtualbox configurations files
+       insinto /etc/vbox
+       newins "${FILESDIR}/${PN}-config" vbox.cfg
+
+       if ! use headless ; then
+               newmenu "${FILESDIR}"/${PN}.desktop-2 ${PN}.desktop
+
+               # set up symlinks (bug #572012)
+               dosym ../../../../opt/VirtualBox/virtualbox.xml /usr/share/mime/packages/virtualbox.xml
+
+               local size ico icofile
+               for size in 16 24 32 48 64 72 96 128 256 ; do
+                       pushd "${S}"/icons/${size}x${size} &>/dev/null || die
+                       if [[ -f "virtualbox.png" ]] ; then
+                               doicon -s ${size} virtualbox.png
+                       fi
+                       for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+                               icofile="virtualbox-${ico}.png"
+                               if [[ -f "${icofile}" ]] ; then
+                                       doicon -s ${size} ${icofile}
+                               fi
+                       done
+                       popd &>/dev/null || die
+               done
+               doicon -s scalable "${S}"/icons/scalable/virtualbox.svg
+               insinto /usr/share/pixmaps
+               newins "${S}"/icons/48x48/virtualbox.png ${PN}.png
+       fi
+
+       pushd "${S}"/${EXTP_PN} &>/dev/null || die
+       insinto /opt/VirtualBox/ExtensionPacks/${EXTP_PN}
+       doins -r linux.${ARCH}
+       doins ExtPack* PXE-Intel.rom
+       popd &>/dev/null || die
+       rm -rf "${S}"/${EXTP_PN}
+
+       insinto /opt/VirtualBox
+       dodir /opt/bin
+
+       doins UserManual.pdf
+
+       if [[ "${PV}" != *beta* ]] && use sdk ; then
+               doins -r sdk
+       fi
+
+       if use additions; then
+               doins -r additions
+       fi
+
+       if use vboxwebsrv; then
+               doins vboxwebsrv
+               fowners root:vboxusers /opt/VirtualBox/vboxwebsrv
+               fperms 0750 /opt/VirtualBox/vboxwebsrv
+               dosym ../../opt/VirtualBox/VBox.sh /opt/bin/vboxwebsrv
+               newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+               newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+       fi
+
+       if use rdesktop-vrdp; then
+               doins rdesktop-vrdp
+               doins -r rdesktop-vrdp-keymaps
+               fperms 0750 /opt/VirtualBox/rdesktop-vrdp
+               dosym ../../opt/VirtualBox/rdesktop-vrdp /opt/bin/rdesktop-vrdp
+       fi
+
+       if ! use headless && use chm; then
+               doins kchmviewer VirtualBox.chm
+               fowners root:vboxusers /opt/VirtualBox/kchmviewer
+               fperms 0750 /opt/VirtualBox/kchmviewer
+       fi
+
+       # This ebuild / package supports only py2.7.  When py3 comes is unknown.
+       # The compile phase makes VBoxPython2_7.so.
+       # py3 support would presumably require a binary pre-compiled by py3.
+       use python && doins VBoxPython.so
+
+       rm -rf src rdesktop* deffiles install* routines.sh runlevel.sh \
+               vboxdrv.sh VBox.sh VBox.png vboxnet.sh additions VirtualBox.desktop \
+               VirtualBox.tar.bz2 LICENSE VBoxSysInfo.sh rdesktop* vboxwebsrv \
+               webtest kchmviewer VirtualBox.chm vbox-create-usb-node.sh \
+               90-vbox-usb.fdi uninstall.sh vboxshell.py vboxdrv-pardus.py \
+               VBoxPython?_*.so
+
+       if use headless ; then
+               rm -rf VBoxSDL VirtualBox{,VM} VBoxKeyboard.so
+       fi
+
+       doins -r *
+
+       # create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid)
+       dosym ../VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so
+       dosym ../VBoxREM.so /opt/VirtualBox/components/VBoxREM.so
+       dosym ../VBoxRT.so /opt/VirtualBox/components/VBoxRT.so
+       dosym ../VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so
+       dosym ../VBoxXPCOM.so /opt/VirtualBox/components/VBoxXPCOM.so
+
+       local each
+       for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,TestOGL,ExtPackHelperApp} $(usex headless '' VirtualBox) ; do
+               fowners root:vboxusers /opt/VirtualBox/${each}
+               fperms 0750 /opt/VirtualBox/${each}
+               pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+       done
+       # VBoxNetAdpCtl and VBoxNetDHCP binaries need to be suid root in any case..
+       for each in VBoxNet{AdpCtl,DHCP,NAT} $(usex headless '' VirtualBoxVM) ; do
+               fowners root:vboxusers /opt/VirtualBox/${each}
+               fperms 4750 /opt/VirtualBox/${each}
+               pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+       done
+
+       if ! use headless ; then
+               # Hardened build: Mark selected binaries set-user-ID-on-execution
+               for each in VBox{SDL,Headless} ; do
+                       fowners root:vboxusers /opt/VirtualBox/${each}
+                       fperms 4510 /opt/VirtualBox/${each}
+                       pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+               done
+
+               dosym ../VirtualBox/VBox.sh /opt/bin/VirtualBox
+               dosym ../VirtualBox/VBox.sh /opt/bin/VBoxSDL
+       else
+               # Hardened build: Mark selected binaries set-user-ID-on-execution
+               fowners root:vboxusers /opt/VirtualBox/VBoxHeadless
+               fperms 4510 /opt/VirtualBox/VBoxHeadless
+               pax-mark -m "${ED%/}"/opt/VirtualBox/VBoxHeadless
+       fi
+
+       exeinto /opt/VirtualBox
+       newexe "${FILESDIR}/${PN}-3-wrapper" "VBox.sh"
+       fowners root:vboxusers /opt/VirtualBox/VBox.sh
+       fperms 0750 /opt/VirtualBox/VBox.sh
+
+       dosym ../VirtualBox/VBox.sh /opt/bin/VBoxManage
+       dosym ../VirtualBox/VBox.sh /opt/bin/VBoxVRDP
+       dosym ../VirtualBox/VBox.sh /opt/bin/VBoxHeadless
+       dosym ../VirtualBox/VBoxTunctl /opt/bin/VBoxTunctl
+
+       # set an env-variable for 3rd party tools
+       echo -n "VBOX_APP_HOME=/opt/VirtualBox" > "${T}/90virtualbox"
+       doenvd "${T}/90virtualbox"
+
+       local udevdir="$(get_udevdir)"
+       insinto ${udevdir}/rules.d
+       doins "${FILESDIR}"/10-virtualbox.rules
+       sed "s@%UDEVDIR%@${udevdir}@" \
+               -i "${ED%/}"${udevdir}/rules.d/10-virtualbox.rules || die
+       # move udev scripts into ${udevdir} (bug #372491)
+       mv "${ED%/}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${ED%/}"${udevdir} || die
+       fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+}
+
+pkg_postinst() {
+       xdg_icon_cache_update
+       xdg_desktop_database_update
+       xdg_mimeinfo_database_update
+
+       udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
+
+       elog ""
+       if ! use headless ; then
+               elog "To launch VirtualBox just type: \"VirtualBox\""
+               elog ""
+       fi
+       elog "You must be in the vboxusers group to use VirtualBox."
+       elog ""
+       elog "For advanced networking setups you should emerge:"
+       elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
+       elog ""
+       elog "Please visit http://www.virtualbox.org/wiki/Editions for"
+       elog "an overview about the different features of ${PN}"
+       elog "and virtualbox-ose"
+       if [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
+               elog ""
+               elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
+               elog "or else USB in ${PN} won't work."
+       fi
+}
+
+pkg_postrm() {
+       xdg_icon_cache_update
+       xdg_desktop_database_update
+       xdg_mimeinfo_database_update
+}
index af1572ba11cd6377aa14e2f52303154abde9e2b8..558285dc9870933334991e9f2d297f0b047bfc77 100644 (file)
@@ -1,5 +1,8 @@
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.32-132073.tar.gz 26917593 BLAKE2B e52c746299d32ae908892791d8fb9b4dda264875e66bf0459adfbc64381001e9be1800a8ac93bbea14dceb47a0e81cf79c29a4c0796f7c4a30021e4beb036cfa SHA512 382ed45a90981397da7d46925a73c5aa0cc870fe41992c87ccd3d3a33420b199e4a0a19761a6c6ebeacf93450e2937d81befb6fdaf7fb7961827e23f0f24c645
 DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.36-135684.tar.gz 26989444 BLAKE2B fae15190bb434918e1ee15582c261b0bf33fbffa0ada922708892cc63ef8ca007decc7611394b056207df4f3ceb9fef781ace6f05e357e4849ae619ccc810b84 SHA512 c2a8f905ddde2c75a852e0391cfef252d45c6582994be53de8198c5c6276fe1827610620ae7e515c7cd7358ae8c9ab49766a8d968ea371895e7553955fd9cdec
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.40-137108.tar.gz 26737982 BLAKE2B 4a050067c0111929fe73695ec4f057e6b33cb224c034ca564beb65cc4fb73491b2c03e0b88ddb77ede5fbd392b0e0c9eae3226f937998b2c06484ff083b4a714 SHA512 5e3e528707b7f3eab19db5358258a69518996a98364e57df9853a549d7310b8db58b40041470f263b212fe6e2bb163e745a3b9b7567c681834d99442289407f4
 DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.16-135674.tar.gz 23164167 BLAKE2B 59885f2710e8169c28cc1f5e0e9edb3b761030aee1eeeb645bed1085e145a02fb2e518108cf4426620a369b17b6ce7ff4b5c442ef69b29b33257993603874d7c SHA512 de4732d1c3ef5589c3af388c71003a1a1b4b48c7c47f26ab8b5950ccd2b906c3785af2e310df27e8f9b83ecf572857c4178c8f7cb96d3a3bca103da4fbc036ea
+DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.20-137117.tar.gz 23238318 BLAKE2B 160e92cb889c765ae28eccb535478af81377d6ce2cadde53e572c41e52f230ca266975b8fe37db0743450bb9e90b23d2fe6d1974496bbb93280381de1379cdd6 SHA512 26f81b5ca3aa5c8423ea42cd1d650657351114f46373d9ca7fa08895865229008d1dff225b9caae6a603758da1c15d2b025da6add86fded377a2700bdbf9b65c
 DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.2-135662.tar.gz 10925771 BLAKE2B dee75544489c467873c7cd46456be3ece0119d68947f05ac3f4163322b8023dfc9066377794d18b2662b34ff9adee11fa8afb70628e0b9014ee0b127ae0087c2 SHA512 0d86696179ccda05583fb0c876567751734904677e13bfdd8f922751dfe949bbd12753d31048fc5f32df75d89b6cb59a662c2d1f524582adab8eb90b10da1b23
 DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.4-136177.tar.gz 10997977 BLAKE2B 066a0302b53a62ef27f5c0fafc499e8fd8f253807bc8808e88c32a4b71872c0cc8a57ffc6727f9e2bf7f6ba1b4e1d41c3001b8e9b3e490acfd4339bf8b02dfdd SHA512 373aa70182c4f86de14c40026f1d435832f2f377a8fe422fcbc3644b5e6a5f7abfc56df3f4b9acf1fa70cccb0bc483f12b6f70f6009a725ca0fa1b7e38dbfeab
+DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.6-137129.tar.gz 10999815 BLAKE2B f7c0e3ec1ba3c2eb991f76a574c1605eebc0a2a40751f6c822f37cbff743b642c9c09ce8dcebc725bdf51f2099dc044aed6486909ab7dd9d62335a1dd483bfb1 SHA512 938564a68e7b18a83022329217c2304470a3682ccd5a837be3caa1b802d3c7bed450428c1d3176fac571eb8a53dca2405ca53853163ad613ef056bc3b3beef68
diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.40.137108.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.40.137108.ebuild
new file mode 100644 (file)
index 0000000..2fc240e
--- /dev/null
@@ -0,0 +1,42 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib
+
+MAIN_PV="$(ver_cut 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+       MY_PV="${MAIN_PV}_$(ver_cut 5)"
+       DEP_PV="${MY_PV}"
+       MY_PV="${MY_PV/beta/BETA}"
+       MY_PV="${MY_PV/rc/RC}"
+else
+       MY_PV="${MAIN_PV}"
+       DEP_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(ver_cut 4)"
+MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
+MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
+
+DESCRIPTION="PUEL extensions for VirtualBox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.vbox-extpack -> ${MY_P}.tar.gz"
+
+LICENSE="PUEL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="bindist mirror strip"
+
+RDEPEND="~app-emulation/virtualbox-${DEP_PV}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/usr/lib*/virtualbox/ExtensionPacks/${MY_PN}/.*"
+
+src_install() {
+       insinto /usr/$(get_libdir)/virtualbox/ExtensionPacks/${MY_PN}
+       doins -r linux.${ARCH}
+       doins ExtPack* PXE-Intel.rom
+}
diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.0.20.137117.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.0.20.137117.ebuild
new file mode 100644 (file)
index 0000000..f47c45c
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib
+
+MAIN_PV="$(ver_cut 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+       MY_PV="${MAIN_PV}_$(ver_cut 5-6)"
+       DEP_PV="${MY_PV}"
+       MY_PV="${MY_PV/beta/BETA}"
+       MY_PV="${MY_PV/rc/RC}"
+else
+       MY_PV="${MAIN_PV}"
+       DEP_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(ver_cut 4)"
+MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
+MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
+
+DESCRIPTION="PUEL extensions for VirtualBox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.vbox-extpack -> ${MY_P}.tar.gz"
+
+LICENSE="PUEL"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="bindist mirror strip"
+
+RDEPEND="~app-emulation/virtualbox-${DEP_PV}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/usr/lib*/virtualbox/ExtensionPacks/${MY_PN}/.*"
+
+src_install() {
+       insinto /usr/$(get_libdir)/virtualbox/ExtensionPacks/${MY_PN}
+       doins -r linux.${ARCH}
+       doins ExtPack* PXE-Intel.rom
+}
diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.6.137129.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.6.137129.ebuild
new file mode 100644 (file)
index 0000000..80cbd84
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib
+
+MAIN_PV="$(ver_cut 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+       MY_PV="${MAIN_PV}_$(ver_cut 5-6)"
+       DEP_PV="${MY_PV}"
+       MY_PV="${MY_PV/beta/BETA}"
+       MY_PV="${MY_PV/rc/RC}"
+else
+       MY_PV="${MAIN_PV}"
+       DEP_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(ver_cut 4)"
+MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
+MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
+
+DESCRIPTION="PUEL extensions for VirtualBox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.vbox-extpack -> ${MY_P}.tar.gz"
+
+LICENSE="PUEL"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="bindist mirror strip"
+
+RDEPEND="~app-emulation/virtualbox-${DEP_PV}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/usr/lib*/virtualbox/ExtensionPacks/${MY_PN}/.*"
+
+src_install() {
+       insinto /usr/$(get_libdir)/virtualbox/ExtensionPacks/${MY_PN}
+       doins -r linux.${ARCH}
+       doins ExtPack* PXE-Intel.rom
+}
index 106a593f42315c8b028004f7faf2aa5ba39b7d7a..834be7f50301ad6b9e487b79bfaec120b4ca9803 100644 (file)
@@ -1,9 +1,13 @@
 DIST VirtualBox-5.2.32.tar.bz2 118262502 BLAKE2B f42de23ddbef1bb5472f6730b711452049331cf06c80420205844ea4a46ddb3352e0fd91564d94d018cb03921e7f894b30c79ddb684ad498d3f86dee88bf8994 SHA512 4e98d5df5e9e6445dde268d5eacea82e655ce9b96cd6579a9d470a08a0c066b7cd7e212b276e2671e936b4a73a53ecf9daa666cb3a8b9d7dc353c70c9283505e
 DIST VirtualBox-5.2.36.tar.bz2 118253892 BLAKE2B 6b54a8c4aa996bc595b163bce501b97d543d4335507723cf3f6f9fd723f1d9ed42bddc90a8d3028688c0ac4918bbd4a32ab94f81daa867b99d0f0ce9cc9a4c59 SHA512 3437ef3300a706c2b4a4cdabdb3b100786f727e2052659d74cde955a88363052bce48820aa92f2eea9029c08bd23a2473ff080a754dfe0671ab0a6392d887071
+DIST VirtualBox-5.2.40.tar.bz2 118285273 BLAKE2B 5d1fa572522c0a4d0124b49d68ec6f2bf240431bbe9ebd3dcf34252cc4710ec158c295c3cdb9628f045ce672a840b251b644cd92131cd4ff5ec9eab958609bc6 SHA512 3632c7184593350e484b055f85040f2a1883db4c228b04dc41e36d60de6e3123284cc9eb89ee0eba68bcd317dfdf1a5bb8594738108ea642528cafba965f3a18
 DIST VirtualBox-6.0.16.tar.bz2 154406073 BLAKE2B 8d0c9c1e6c675c5e2c7f01802072370fded7c5d7f7f581c6570b111c4aa4ac327fb74370ac36e4a4e31c6627640f8eb697a43b32fd2818f78e6b119f063d560f SHA512 ff9b726a5a865ed3fc5436e778da434ce532113898ed50434e2a561150410eabeee7194320eb115552542ecfd7c332f46f2d04fba782509dda8e66511e2a1a61
+DIST VirtualBox-6.0.20.tar.bz2 154286741 BLAKE2B e5000919dd21ebca52a508e88a54d404c0cbceb9c101d47d146b45af2509f1e922403e0ea05753dac7293870f64f8c3e478fa0c0a77611f35a3f3ce52b1fa4c1 SHA512 0ecfcc68514ca89f9bee818c43e19e999561798cba72afa27f44a46bf53c7e45e05371d973fc76b7af003e85528b19b3156531fd9bf9a0d5f30dc53665e2f48f
 DIST VirtualBox-6.1.2.tar.bz2 165400546 BLAKE2B 38eec6064896a250f4b7079f4bd52f23e43a6482d94bd8bba0a1102bd1cfaf00bd227f8dd2cc8382194c7d18509c6412440b8deb0d283e1e26550eb8a4cc96cc SHA512 476dedd9dd7a213bd70920f4cdf594b5336555f31e5becb15b5c01d88fa7bed917258831af31600514362384401fd7040cb748a7c76896e4a027bef05026b585
 DIST VirtualBox-6.1.4.tar.bz2 165450190 BLAKE2B acb99e64b095d414556d129ee96ef00d59900d8bb4f20f4fdfd4415d027eb0b1df9656b56940656c19074ea088dcca2e6e13372d38bcc30fb3a8372293a36117 SHA512 021592629614b9f8a57474b9a0cd110af7b63a3bc98b00806f4ce57b64f020fda313fdaef5cec546ad302f98093427818e176decbc026dffaa47faae574bf167
+DIST VirtualBox-6.1.6.tar.bz2 159389496 BLAKE2B 00a5dd823e3136417b075aac2f526f954b5bcaad828cb6abcbd5b3ad7412c4afe8d499e0fb2a8897f4cdab7e7084e848fde69a0d8e355c14767eafde21ebac46 SHA512 4a94417fe69c40755b55526cee67068ca8d32e71e5b6ebe0cccf46062dfb4ee76b33ac92f8b8f4748d438eda1714129360fdbaa39c16df3877b20109a7c6439a
 DIST virtualbox-5.2.16-patches-02.tar.xz 3152 BLAKE2B c8d8f3872f544a465c7d1aa07291599307120ac9eabfb299ddd788a11f85ca6c2d84b8e7306ee4ad436270dad0dd39f101ee68a549eac15afd1e3cdc03f23c6c SHA512 85ee8c4045de562d71ab2d761695ea48b6726a6f0c4bcaa2562bb0d147542d3f1a1b5b47cf593a7f22dac1b86f87b59a56bef421dce3e1fa8e5260cd41998450
 DIST virtualbox-5.2.36-patches-01.tar.xz 3440 BLAKE2B 66749efba87d82ed4a11ff09444c68f86f82a360e9dbb44fa6072d6c28120f3c23cff8c15bacbd38bce8b69b3d8f35c4d3d493684df962ea6e353eec413dcc38 SHA512 3cf2526d209a54e94cd94840793769fd96fa988e21555d76eda2207a7f87e04b446a28ac6c8a2954e7c00a35107c144cadaec276d171214acdcc2900eb41306c
 DIST virtualbox-6.0.16-patches-01.tar.xz 3520 BLAKE2B 1ca10c5902ece4657c6a9a03fe28c80a364d999e181cc46fc52d7dac0f0272faca6d6b19cb12d126bb0f4f6014b8c391b2b0f82ca016625410287fcc0c240778 SHA512 33b14fa1ce5526be88d6d5b72b5c86c68c37f565074a764b9d7a65f5c0a39e3d81533f9923087add71783556c1e51e816b674ce46d2800eb678846f65226fb69
+DIST virtualbox-6.0.20-patches-01.tar.xz 3464 BLAKE2B dbfd15322edf178e752139c6f82be966422ff0d3c5d914fe8d4b6980f5805d27552dc813e97ea17665004d5f6cc3486461732edaaeabdd59cd1799b2ee85af06 SHA512 04f0c9d0565c77bca334cbcfd8ac439dff1a1d8246dbea3f5e06035eff6f6dd72b54f2227d6197e2851e418ad74bb4feeef07e442f3441bc75d80a72d0d0e00d
 DIST virtualbox-6.1.0_rc1-patches-01.tar.xz 2152 BLAKE2B 5ca1aa008d0a4bd2d8ff4e8b02e506f2bdd68d41b1ae6a733362925b12a82e4f26b4040817800342c69be8e1eec73477d1731e05eb677d09948ed59881be190c SHA512 31f5b77cc86e7fe83e08df956639f50b9936aeab32d98d8f8800c4fa762245a7e6784189409006f82f8ed4bbdadbad7249e2663063448f3f0b0e157acfba6c42
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.40.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.40.ebuild
new file mode 100644 (file)
index 0000000..2678fa2
--- /dev/null
@@ -0,0 +1,229 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-mod systemd user toolchain-funcs
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P="VirtualBox-${MY_PV}"
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+       https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-5.2.36-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
+"
+DEPEND="
+       ${RDEPEND}
+       >=dev-util/kbuild-0.1.9998.3127
+       >=dev-lang/yasm-0.6.2
+       sys-devel/bin86
+       sys-libs/pam
+       sys-power/iasl
+       x11-base/xorg-proto
+"
+PDEPEND="
+       X? ( x11-drivers/xf86-video-vboxvideo )
+"
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+       export DISTCC_DISABLE=1 #674256
+       MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest)
+               vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)"
+       use X && MODULE_NAMES+=" vboxvideo(misc:${WORKDIR}/vboxvideo::${WORKDIR}/vboxvideo)"
+
+       linux-mod_pkg_setup
+       BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
+}
+
+src_unpack() {
+       unpack ${A}
+
+       # Create and unpack a tarball with the sources of the Linux guest
+       # kernel modules, to include all the needed files
+       "${S}"/src/VBox/Additions/linux/export_modules.sh "${WORKDIR}/vbox-kmod.tar.gz"
+       unpack ./vbox-kmod.tar.gz
+
+       # Remove shipped binaries (kBuild,yasm), see bug #232775
+       cd "${S}"
+       rm -rf kBuild/bin tools
+}
+
+src_prepare() {
+       # PaX fixes (see bug #298988)
+       pushd "${WORKDIR}" &>/dev/null || die
+       eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch
+       popd &>/dev/null || die
+
+       # Disable things unused or splitted into separate ebuilds
+       cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+       use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
+
+       # stupid new header references...
+       local vboxheader mdir
+       for vboxheader in {product,revision,version}-generated.h ; do
+               for mdir in vbox{guest,sf} ; do
+                       ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
+                               "${WORKDIR}/${mdir}/${vboxheader}"
+               done
+       done
+
+       # Remove pointless GCC version check
+       sed -e '/^check_gcc$/d' -i configure || die
+
+       rm "${WORKDIR}/patches/008_virtualbox-4.3.14-missing_define.patch" || die
+       eapply "${WORKDIR}/patches"
+
+       eapply_user
+}
+
+src_configure() {
+       # build the user-space tools, warnings are harmless
+       local cmd=(
+               ./configure
+               --nofatal
+               --disable-xpcom
+               --disable-sdl-ttf
+               --disable-pulse
+               --disable-alsa
+               --with-gcc="$(tc-getCC)"
+               --with-g++="$(tc-getCXX)"
+               --target-arch=${ARCH}
+               --with-linux="${KV_OUT_DIR}"
+               --build-headless
+       )
+       echo "${cmd[@]}"
+       "${cmd[@]}" || die "configure failed"
+       source ./env.sh
+       export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_compile() {
+       MAKE="kmk" \
+       emake TOOL_YASM_AS=yasm \
+       VBOX_ONLY_ADDITIONS=1 \
+       KBUILD_VERBOSE=2
+
+       # Now creating the kernel modules. We must do this _after_
+       # we compiled the user-space tools as we need two of the
+       # automatically generated header files. (>=3.2.0)
+       linux-mod_src_compile
+}
+
+src_install() {
+       linux-mod_src_install
+
+       cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
+
+       insinto /sbin
+       newins mount.vboxsf mount.vboxsf
+       fperms 4755 /sbin/mount.vboxsf
+
+       newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
+
+       insinto /usr/sbin/
+       newins VBoxService vboxguest-service
+       fperms 0755 /usr/sbin/vboxguest-service
+
+       insinto /usr/bin
+       doins VBoxControl
+       fperms 0755 /usr/bin/VBoxControl
+
+       # VBoxClient user service and xrandr wrapper
+       if use X ; then
+               doins VBoxClient
+               fperms 0755 /usr/bin/VBoxClient
+
+               pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
+                       || die
+               newins 98vboxadd-xclient VBoxClient-all
+               fperms 0755 /usr/bin/VBoxClient-all
+               popd &>/dev/null || die
+       fi
+
+       # udev rule for vboxdrv
+       local udev_rules_dir="/lib/udev/rules.d"
+       dodir ${udev_rules_dir}
+       echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+               >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+               || die
+       echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+               >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+               || die
+
+       # VBoxClient autostart file
+       insinto /etc/xdg/autostart
+       doins "${FILESDIR}"/vboxclient.desktop
+
+       # sample xorg.conf
+       dodoc "${FILESDIR}"/xorg.conf.vbox
+       docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
+
+       systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_preinst() {
+       enewgroup vboxguest
+       enewuser vboxguest -1 /bin/sh /dev/null vboxguest
+       # automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+       enewgroup vboxsf
+}
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+       if ! use X ; then
+               elog "use flag X is off, enable it to install the"
+               elog "X Window System video driver."
+       fi
+       elog ""
+       elog "Please add users to the \"vboxguest\" group so they can"
+       elog "benefit from seamless mode, auto-resize and clipboard."
+       elog ""
+       elog "The vboxsf group has been added to make automount services work."
+       elog "These services are part of the shared folders support."
+       elog ""
+       elog "Please add:"
+       elog "/etc/init.d/${PN}"
+       elog "to the default runlevel in order to start"
+       elog "needed services."
+       elog "To use the VirtualBox X driver, use the following"
+       elog "file as your /etc/X11/xorg.conf:"
+       elog "    /usr/share/doc/${PF}/xorg.conf.vbox"
+       elog ""
+       elog "Also make sure you use the Mesa library for OpenGL:"
+       elog "    eselect opengl set xorg-x11"
+       elog ""
+       elog "An autostart .desktop file has been installed to start"
+       elog "VBoxClient in desktop sessions."
+       elog ""
+       elog "You can mount shared folders with:"
+       elog "    mount -t vboxsf <shared_folder_name> <mount_point>"
+       elog ""
+       elog "Warning:"
+       elog "this ebuild is only needed if you are running gentoo"
+       elog "inside a VirtualBox Virtual Machine, you don't need"
+       elog "it to run VirtualBox itself."
+       elog ""
+}
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.20.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.20.ebuild
new file mode 100644 (file)
index 0000000..c4a0a45
--- /dev/null
@@ -0,0 +1,216 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-mod systemd toolchain-funcs
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P="VirtualBox-${MY_PV}"
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+       https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-6.0.20-patches-01.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+RDEPEND="
+       acct-group/vboxguest
+       acct-group/vboxsf
+       acct-user/vboxguest
+       X? ( x11-apps/xrandr
+               x11-apps/xrefresh
+               x11-libs/libXmu
+               x11-libs/libX11
+               x11-libs/libXt
+               x11-libs/libXext
+               x11-libs/libXau
+               x11-libs/libXdmcp
+               x11-libs/libSM
+               x11-libs/libICE )
+       sys-apps/dbus
+"
+DEPEND="
+       ${RDEPEND}
+       >=dev-util/kbuild-0.1.9998.3127
+       >=dev-lang/yasm-0.6.2
+       sys-devel/bin86
+       sys-libs/pam
+       sys-power/iasl
+       x11-base/xorg-proto
+"
+PDEPEND="
+       X? ( x11-drivers/xf86-video-vboxvideo )
+"
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+
+S="${WORKDIR}/${MY_P}"
+VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src"
+
+pkg_setup() {
+       export DISTCC_DISABLE=1 #674256
+       MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest)
+               vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)"
+       use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)"
+
+       linux-mod_pkg_setup
+       BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
+}
+
+src_prepare() {
+       # Remove shipped binaries (kBuild,yasm), see bug #232775
+       rm -r kBuild/bin tools || die
+
+       # Provide kernel sources
+       pushd src/VBox/Additions &>/dev/null || die
+       ebegin "Extracting guest kernel module sources"
+       kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null || die
+       eend
+       popd &>/dev/null || die
+
+       # PaX fixes (see bug #298988)
+       pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
+       eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch
+       popd &>/dev/null || die
+
+       # Disable things unused or splitted into separate ebuilds
+       cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+       use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
+
+       # Remove pointless GCC version check
+       sed -e '/^check_gcc$/d' -i configure || die
+
+       rm "${WORKDIR}/patches/010_virtualbox-5.2.12-qt511.patch" || die
+       eapply "${WORKDIR}/patches"
+
+       eapply_user
+}
+
+src_configure() {
+       # build the user-space tools, warnings are harmless
+       local cmd=(
+               ./configure
+               --nofatal
+               --disable-xpcom
+               --disable-sdl-ttf
+               --disable-pulse
+               --disable-alsa
+               --with-gcc="$(tc-getCC)"
+               --with-g++="$(tc-getCXX)"
+               --target-arch=${ARCH}
+               --with-linux="${KV_OUT_DIR}"
+               --build-headless
+       )
+       echo "${cmd[@]}"
+       "${cmd[@]}" || die "configure failed"
+       source ./env.sh
+       export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_compile() {
+       MAKE="kmk" \
+       emake TOOL_YASM_AS=yasm \
+       VBOX_ONLY_ADDITIONS=1 \
+       KBUILD_VERBOSE=2
+
+       # Now creating the kernel modules. We must do this _after_
+       # we compiled the user-space tools as we need two of the
+       # automatically generated header files. (>=3.2.0)
+       linux-mod_src_compile
+}
+
+src_install() {
+       linux-mod_src_install
+
+       cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
+
+       insinto /sbin
+       newins mount.vboxsf mount.vboxsf
+       fperms 4755 /sbin/mount.vboxsf
+
+       newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
+
+       insinto /usr/sbin/
+       newins VBoxService vboxguest-service
+       fperms 0755 /usr/sbin/vboxguest-service
+
+       insinto /usr/bin
+       doins VBoxControl
+       fperms 0755 /usr/bin/VBoxControl
+
+       # VBoxClient user service and xrandr wrapper
+       if use X ; then
+               doins VBoxClient
+               fperms 0755 /usr/bin/VBoxClient
+
+               pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
+                       || die
+               newins 98vboxadd-xclient VBoxClient-all
+               fperms 0755 /usr/bin/VBoxClient-all
+               popd &>/dev/null || die
+       fi
+
+       # udev rule for vboxdrv
+       local udev_rules_dir="/lib/udev/rules.d"
+       dodir ${udev_rules_dir}
+       echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+               >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+               || die
+       echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+               >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+               || die
+
+       # VBoxClient autostart file
+       insinto /etc/xdg/autostart
+       doins "${FILESDIR}"/vboxclient.desktop
+
+       # sample xorg.conf
+       dodoc "${FILESDIR}"/xorg.conf.vbox
+       docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
+
+       systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+       if ! use X ; then
+               elog "use flag X is off, enable it to install the"
+               elog "X Window System video driver."
+       fi
+       elog ""
+       elog "Please add users to the \"vboxguest\" group so they can"
+       elog "benefit from seamless mode, auto-resize and clipboard."
+       elog ""
+       elog "The vboxsf group has been added to make automount services work."
+       elog "These services are part of the shared folders support."
+       elog ""
+       elog "Please add:"
+       elog "/etc/init.d/${PN}"
+       elog "to the default runlevel in order to start"
+       elog "needed services."
+       elog "To use the VirtualBox X driver, use the following"
+       elog "file as your /etc/X11/xorg.conf:"
+       elog "    /usr/share/doc/${PF}/xorg.conf.vbox"
+       elog ""
+       elog "Also make sure you use the Mesa library for OpenGL:"
+       elog "    eselect opengl set xorg-x11"
+       elog ""
+       elog "An autostart .desktop file has been installed to start"
+       elog "VBoxClient in desktop sessions."
+       elog ""
+       elog "You can mount shared folders with:"
+       elog "    mount -t vboxsf <shared_folder_name> <mount_point>"
+       elog ""
+       elog "Warning:"
+       elog "this ebuild is only needed if you are running gentoo"
+       elog "inside a VirtualBox Virtual Machine, you don't need"
+       elog "it to run VirtualBox itself."
+       elog ""
+}
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.6.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.6.ebuild
new file mode 100644 (file)
index 0000000..6779b7c
--- /dev/null
@@ -0,0 +1,215 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-mod systemd toolchain-funcs
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P="VirtualBox-${MY_PV}"
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+       https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-6.1.0_rc1-patches-01.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+RDEPEND="
+       acct-group/vboxguest
+       acct-group/vboxsf
+       acct-user/vboxguest
+       X? ( x11-apps/xrandr
+               x11-apps/xrefresh
+               x11-libs/libXmu
+               x11-libs/libX11
+               x11-libs/libXt
+               x11-libs/libXext
+               x11-libs/libXau
+               x11-libs/libXdmcp
+               x11-libs/libSM
+               x11-libs/libICE )
+       sys-apps/dbus
+"
+DEPEND="
+       ${RDEPEND}
+       >=dev-util/kbuild-0.1.9998.3127
+       >=dev-lang/yasm-0.6.2
+       sys-devel/bin86
+       sys-libs/pam
+       sys-power/iasl
+       x11-base/xorg-proto
+"
+PDEPEND="
+       X? ( x11-drivers/xf86-video-vboxvideo )
+"
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+
+S="${WORKDIR}/${MY_P}"
+VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src"
+
+pkg_setup() {
+       export DISTCC_DISABLE=1 #674256
+       MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest)
+               vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)"
+       use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)"
+
+       linux-mod_pkg_setup
+       BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
+}
+
+src_prepare() {
+       # Remove shipped binaries (kBuild,yasm), see bug #232775
+       rm -r kBuild/bin tools || die
+
+       # Provide kernel sources
+       pushd src/VBox/Additions &>/dev/null || die
+       ebegin "Extracting guest kernel module sources"
+       kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null || die
+       eend
+       popd &>/dev/null || die
+
+       # PaX fixes (see bug #298988)
+       pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
+       eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch
+       popd &>/dev/null || die
+
+       # Disable things unused or splitted into separate ebuilds
+       cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+       use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
+
+       # Remove pointless GCC version check
+       sed -e '/^check_gcc$/d' -i configure || die
+
+       eapply "${WORKDIR}/patches"
+
+       eapply_user
+}
+
+src_configure() {
+       # build the user-space tools, warnings are harmless
+       local cmd=(
+               ./configure
+               --nofatal
+               --disable-xpcom
+               --disable-sdl-ttf
+               --disable-pulse
+               --disable-alsa
+               --with-gcc="$(tc-getCC)"
+               --with-g++="$(tc-getCXX)"
+               --target-arch=${ARCH}
+               --with-linux="${KV_OUT_DIR}"
+               --build-headless
+       )
+       echo "${cmd[@]}"
+       "${cmd[@]}" || die "configure failed"
+       source ./env.sh
+       export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_compile() {
+       MAKE="kmk" \
+       emake TOOL_YASM_AS=yasm \
+       VBOX_ONLY_ADDITIONS=1 \
+       KBUILD_VERBOSE=2
+
+       # Now creating the kernel modules. We must do this _after_
+       # we compiled the user-space tools as we need two of the
+       # automatically generated header files. (>=3.2.0)
+       linux-mod_src_compile
+}
+
+src_install() {
+       linux-mod_src_install
+
+       cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
+
+       insinto /sbin
+       newins mount.vboxsf mount.vboxsf
+       fperms 4755 /sbin/mount.vboxsf
+
+       newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
+
+       insinto /usr/sbin/
+       newins VBoxService vboxguest-service
+       fperms 0755 /usr/sbin/vboxguest-service
+
+       insinto /usr/bin
+       doins VBoxControl
+       fperms 0755 /usr/bin/VBoxControl
+
+       # VBoxClient user service and xrandr wrapper
+       if use X ; then
+               doins VBoxClient
+               fperms 0755 /usr/bin/VBoxClient
+
+               pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
+                       || die
+               newins 98vboxadd-xclient VBoxClient-all
+               fperms 0755 /usr/bin/VBoxClient-all
+               popd &>/dev/null || die
+       fi
+
+       # udev rule for vboxdrv
+       local udev_rules_dir="/lib/udev/rules.d"
+       dodir ${udev_rules_dir}
+       echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+               >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+               || die
+       echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+               >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+               || die
+
+       # VBoxClient autostart file
+       insinto /etc/xdg/autostart
+       doins "${FILESDIR}"/vboxclient.desktop
+
+       # sample xorg.conf
+       dodoc "${FILESDIR}"/xorg.conf.vbox
+       docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
+
+       systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+       if ! use X ; then
+               elog "use flag X is off, enable it to install the"
+               elog "X Window System video driver."
+       fi
+       elog ""
+       elog "Please add users to the \"vboxguest\" group so they can"
+       elog "benefit from seamless mode, auto-resize and clipboard."
+       elog ""
+       elog "The vboxsf group has been added to make automount services work."
+       elog "These services are part of the shared folders support."
+       elog ""
+       elog "Please add:"
+       elog "/etc/init.d/${PN}"
+       elog "to the default runlevel in order to start"
+       elog "needed services."
+       elog "To use the VirtualBox X driver, use the following"
+       elog "file as your /etc/X11/xorg.conf:"
+       elog "    /usr/share/doc/${PF}/xorg.conf.vbox"
+       elog ""
+       elog "Also make sure you use the Mesa library for OpenGL:"
+       elog "    eselect opengl set xorg-x11"
+       elog ""
+       elog "An autostart .desktop file has been installed to start"
+       elog "VBoxClient in desktop sessions."
+       elog ""
+       elog "You can mount shared folders with:"
+       elog "    mount -t vboxsf <shared_folder_name> <mount_point>"
+       elog ""
+       elog "Warning:"
+       elog "this ebuild is only needed if you are running gentoo"
+       elog "inside a VirtualBox Virtual Machine, you don't need"
+       elog "it to run VirtualBox itself."
+       elog ""
+}
index 81e0ee56ea3f688291e94cd06b2885d612325b12..6aea311a2b6a83d283467a05ee9d51ecd88679ff 100644 (file)
@@ -1,5 +1,8 @@
 DIST vbox-kernel-module-src-5.2.32.tar.xz 642428 BLAKE2B 0dda5cb5608c1eed22bea209564d53c5f7eab58ca620db2cc441e3c1ba9ad66609c4ef13df07fd29b691f2941a070f9852e8729cd386081df6a82ede345f33c5 SHA512 fadedab690cb7dee8b9a6747ed711d924bf3bce8999b24e7b64cb8738c53c2fa7372b1a8e8535e7e4ef0235aec02d4a3f1f67cd07d7621934fab684c5163329e
 DIST vbox-kernel-module-src-5.2.36.tar.xz 643160 BLAKE2B 50f1aee4d56c8b78a5e7512cb843b4e36137c38b160ca0419b2061892f29a98edaa266afb8f94ee0952e4c8af57b41da24a7d70b43a5adf5c5a15b2a4ac867b9 SHA512 b8aa3e8de1573ac728dc00d85ffbb0c25cdb118af92f16f7a4c1a7d394526b8f3005aab1b4422af6251bdafb958c6dc86b31f13c1f35116c8ff39a9288aed277
+DIST vbox-kernel-module-src-5.2.40.tar.xz 644200 BLAKE2B 0083423831bcec17f4960747c3ae939a8b4a5d2f89d6f09ad88308b078035bc6f068314d2c74182c9bb7ea0007e9c6a5b3eaa8f48ce58330294a78f66ed3faa5 SHA512 b62359104fdd0a1fd2b506cec2e4b71fa9582f1a89088d3a45791835981e1cd2e0895861b688cfbd7306454aa66c18bcd1444b26181f084b7af69f43d3e9b499
 DIST vbox-kernel-module-src-6.0.16.tar.xz 669392 BLAKE2B 19e718097ee4da75c8dc3b565735f0a378d94547911ec89af52d8dccb36d67391a2f6700575c374552cd4fc4eb8a7e3d6618a800380e473429bd3759e0d1f9c0 SHA512 8979da4cba07c9095778864af0fd29c0acf10d71ea587819954a349e8c193a03b2268bf80dca9004803d8cf2a40974994fcd1f2c6e2ac657b5032f6c04977793
+DIST vbox-kernel-module-src-6.0.20.tar.xz 670656 BLAKE2B ccd4130272545e57fa64f56adcc3b16d96dac2e6e44f8057a447fddb9c51e3be7729298b835b7e335a7d0e58e0603d96ee084547375a331209cf6fa3751868cd SHA512 fa7fd8dbff39bf65852522481c4725be7aeedb3052f7a628f15defd78dd8353ae3466a294f25bc51b555db9da774ad8ca756fa8d01f45af250ab57f7e2ce7193
 DIST vbox-kernel-module-src-6.1.2.tar.xz 664844 BLAKE2B 4fbdbac98558309c4dd1a25e44f061e2c7386c418f40b0da364914d58cf69048d9c3b1693fb75ce590c63280e79a124433ce7ff4f8f08e327ab67c5d55a163cf SHA512 f26e38a35b0cbf3ca51d98299ea2018641a35c17df5b1bc8a50352738afaafcc95efc9e61efc7d7406e203f3e514125b8afd8ed4406c190f82fe83934a042158
 DIST vbox-kernel-module-src-6.1.4.tar.xz 664412 BLAKE2B b4cfe5b2792c8f5dc2bf6038f69e32d07aaead358b144e154806f404bcc0ffbb72d470db265b96f41ca714edc0588ce06748054b8358675c24848614253a7cfb SHA512 bb247a8d2450694937095bc9c263554f805c51676e2da726f124ce4f775c69bedab95286e8d00686e04c1d8fff67f6335aa29f51a0c0ec00b862ad4e56fe290c
+DIST vbox-kernel-module-src-6.1.6.tar.xz 667048 BLAKE2B 00cdddc108d54cb829e771eac1c95f254e97465960b50f6f95595cf4f25485146d9d807de903152f3472a9e57246379f15ea82f6464fc00053e4b6b6e9dbeebe SHA512 5fb91051d6f41c25f4ac642249f2dac289c06134d3815578c094db089dc36903a573913933c34d32e8bbf5d704f7225eabb849fd559430247a89a713f059012e
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.40.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.40.ebuild
new file mode 100644 (file)
index 0000000..b19665b
--- /dev/null
@@ -0,0 +1,59 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+#      package that comes from virtualbox-bin
+
+EAPI=7
+
+inherit linux-mod toolchain-funcs 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"
+MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
+MODULESD_VBOXDRV_ENABLED="yes"
+MODULESD_VBOXNETADP_ENABLED="no"
+MODULESD_VBOXNETFLT_ENABLED="no"
+# The following is a security measure that comes directly from usptream.
+# Do NOT remove this!!!
+MODULESD_VBOXPCI_ADDITIONS=(
+       "blacklist vboxpci"
+       "install vboxpci /bin/true"
+)
+
+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/
+       newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
+}
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+}
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.0.20.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.20.ebuild
new file mode 100644 (file)
index 0000000..0dac94c
--- /dev/null
@@ -0,0 +1,55 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+#      package that comes from virtualbox-bin
+
+EAPI=7
+
+inherit linux-mod toolchain-funcs
+
+MY_P="vbox-kernel-module-src-${PV}"
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="pax_kernel"
+
+RDEPEND="!=app-emulation/virtualbox-9999"
+
+S="${WORKDIR}"
+
+BUILD_TARGETS="all"
+MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
+MODULESD_VBOXDRV_ENABLED="yes"
+MODULESD_VBOXNETADP_ENABLED="no"
+MODULESD_VBOXNETFLT_ENABLED="no"
+# The following is a security measure that comes directly from usptream.
+# Do NOT remove this!!!
+MODULESD_VBOXPCI_ADDITIONS=(
+       "blacklist vboxpci"
+       "install vboxpci /bin/true"
+)
+
+pkg_setup() {
+       linux-mod_pkg_setup
+       BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
+}
+
+src_prepare() {
+       if use pax_kernel && kernel_is -ge 3 0 0 ; then
+               eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch
+       fi
+
+       default
+}
+
+src_install() {
+       linux-mod_src_install
+       insinto /usr/lib/modules-load.d/
+       newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
+}
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.6.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.6.ebuild
new file mode 100644 (file)
index 0000000..6ad5644
--- /dev/null
@@ -0,0 +1,55 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+#      package that comes from virtualbox-bin
+
+EAPI=7
+
+inherit linux-mod toolchain-funcs
+
+MY_P="vbox-kernel-module-src-${PV}"
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64"
+IUSE="pax_kernel"
+
+RDEPEND="!=app-emulation/virtualbox-9999"
+
+S="${WORKDIR}"
+
+BUILD_TARGETS="all"
+MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})"
+MODULESD_VBOXDRV_ENABLED="yes"
+MODULESD_VBOXNETADP_ENABLED="no"
+MODULESD_VBOXNETFLT_ENABLED="no"
+
+pkg_setup() {
+       linux-mod_pkg_setup
+       BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
+}
+
+src_prepare() {
+       if use pax_kernel && kernel_is -ge 3 0 0 ; then
+               eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch
+       fi
+
+       default
+}
+
+src_install() {
+       linux-mod_src_install
+       insinto /usr/lib/modules-load.d/
+       newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
+}
+
+pkg_postinst() {
+       # Remove vboxpci.ko from current running kernel
+       find /lib/modules/${KV_FULL}/misc -type f -name "vboxpci.ko" -delete
+       linux-mod_pkg_postinst
+}
index 1851a80aeff7a47608a69518728175bac7bbbf8c..acadbd8fa2f76dc0158eccc82247ec3711555c24 100644 (file)
@@ -1,10 +1,14 @@
 DIST VirtualBox-5.2.32.tar.bz2 118262502 BLAKE2B f42de23ddbef1bb5472f6730b711452049331cf06c80420205844ea4a46ddb3352e0fd91564d94d018cb03921e7f894b30c79ddb684ad498d3f86dee88bf8994 SHA512 4e98d5df5e9e6445dde268d5eacea82e655ce9b96cd6579a9d470a08a0c066b7cd7e212b276e2671e936b4a73a53ecf9daa666cb3a8b9d7dc353c70c9283505e
 DIST VirtualBox-5.2.36.tar.bz2 118253892 BLAKE2B 6b54a8c4aa996bc595b163bce501b97d543d4335507723cf3f6f9fd723f1d9ed42bddc90a8d3028688c0ac4918bbd4a32ab94f81daa867b99d0f0ce9cc9a4c59 SHA512 3437ef3300a706c2b4a4cdabdb3b100786f727e2052659d74cde955a88363052bce48820aa92f2eea9029c08bd23a2473ff080a754dfe0671ab0a6392d887071
+DIST VirtualBox-5.2.40.tar.bz2 118285273 BLAKE2B 5d1fa572522c0a4d0124b49d68ec6f2bf240431bbe9ebd3dcf34252cc4710ec158c295c3cdb9628f045ce672a840b251b644cd92131cd4ff5ec9eab958609bc6 SHA512 3632c7184593350e484b055f85040f2a1883db4c228b04dc41e36d60de6e3123284cc9eb89ee0eba68bcd317dfdf1a5bb8594738108ea642528cafba965f3a18
 DIST VirtualBox-6.0.16.tar.bz2 154406073 BLAKE2B 8d0c9c1e6c675c5e2c7f01802072370fded7c5d7f7f581c6570b111c4aa4ac327fb74370ac36e4a4e31c6627640f8eb697a43b32fd2818f78e6b119f063d560f SHA512 ff9b726a5a865ed3fc5436e778da434ce532113898ed50434e2a561150410eabeee7194320eb115552542ecfd7c332f46f2d04fba782509dda8e66511e2a1a61
+DIST VirtualBox-6.0.20.tar.bz2 154286741 BLAKE2B e5000919dd21ebca52a508e88a54d404c0cbceb9c101d47d146b45af2509f1e922403e0ea05753dac7293870f64f8c3e478fa0c0a77611f35a3f3ce52b1fa4c1 SHA512 0ecfcc68514ca89f9bee818c43e19e999561798cba72afa27f44a46bf53c7e45e05371d973fc76b7af003e85528b19b3156531fd9bf9a0d5f30dc53665e2f48f
 DIST VirtualBox-6.1.2.tar.bz2 165400546 BLAKE2B 38eec6064896a250f4b7079f4bd52f23e43a6482d94bd8bba0a1102bd1cfaf00bd227f8dd2cc8382194c7d18509c6412440b8deb0d283e1e26550eb8a4cc96cc SHA512 476dedd9dd7a213bd70920f4cdf594b5336555f31e5becb15b5c01d88fa7bed917258831af31600514362384401fd7040cb748a7c76896e4a027bef05026b585
 DIST VirtualBox-6.1.4.tar.bz2 165450190 BLAKE2B acb99e64b095d414556d129ee96ef00d59900d8bb4f20f4fdfd4415d027eb0b1df9656b56940656c19074ea088dcca2e6e13372d38bcc30fb3a8372293a36117 SHA512 021592629614b9f8a57474b9a0cd110af7b63a3bc98b00806f4ce57b64f020fda313fdaef5cec546ad302f98093427818e176decbc026dffaa47faae574bf167
+DIST VirtualBox-6.1.6.tar.bz2 159389496 BLAKE2B 00a5dd823e3136417b075aac2f526f954b5bcaad828cb6abcbd5b3ad7412c4afe8d499e0fb2a8897f4cdab7e7084e848fde69a0d8e355c14767eafde21ebac46 SHA512 4a94417fe69c40755b55526cee67068ca8d32e71e5b6ebe0cccf46062dfb4ee76b33ac92f8b8f4748d438eda1714129360fdbaa39c16df3877b20109a7c6439a
 DIST virtualbox-5.2.16-patches-02.tar.xz 3152 BLAKE2B c8d8f3872f544a465c7d1aa07291599307120ac9eabfb299ddd788a11f85ca6c2d84b8e7306ee4ad436270dad0dd39f101ee68a549eac15afd1e3cdc03f23c6c SHA512 85ee8c4045de562d71ab2d761695ea48b6726a6f0c4bcaa2562bb0d147542d3f1a1b5b47cf593a7f22dac1b86f87b59a56bef421dce3e1fa8e5260cd41998450
 DIST virtualbox-5.2.36-patches-01.tar.xz 3440 BLAKE2B 66749efba87d82ed4a11ff09444c68f86f82a360e9dbb44fa6072d6c28120f3c23cff8c15bacbd38bce8b69b3d8f35c4d3d493684df962ea6e353eec413dcc38 SHA512 3cf2526d209a54e94cd94840793769fd96fa988e21555d76eda2207a7f87e04b446a28ac6c8a2954e7c00a35107c144cadaec276d171214acdcc2900eb41306c
 DIST virtualbox-6.0.16-patches-01.tar.xz 3520 BLAKE2B 1ca10c5902ece4657c6a9a03fe28c80a364d999e181cc46fc52d7dac0f0272faca6d6b19cb12d126bb0f4f6014b8c391b2b0f82ca016625410287fcc0c240778 SHA512 33b14fa1ce5526be88d6d5b72b5c86c68c37f565074a764b9d7a65f5c0a39e3d81533f9923087add71783556c1e51e816b674ce46d2800eb678846f65226fb69
+DIST virtualbox-6.0.20-patches-01.tar.xz 3464 BLAKE2B dbfd15322edf178e752139c6f82be966422ff0d3c5d914fe8d4b6980f5805d27552dc813e97ea17665004d5f6cc3486461732edaaeabdd59cd1799b2ee85af06 SHA512 04f0c9d0565c77bca334cbcfd8ac439dff1a1d8246dbea3f5e06035eff6f6dd72b54f2227d6197e2851e418ad74bb4feeef07e442f3441bc75d80a72d0d0e00d
 DIST virtualbox-6.1.0_rc1-patches-01.tar.xz 2152 BLAKE2B 5ca1aa008d0a4bd2d8ff4e8b02e506f2bdd68d41b1ae6a733362925b12a82e4f26b4040817800342c69be8e1eec73477d1731e05eb677d09948ed59881be190c SHA512 31f5b77cc86e7fe83e08df956639f50b9936aeab32d98d8f8800c4fa762245a7e6784189409006f82f8ed4bbdadbad7249e2663063448f3f0b0e157acfba6c42
 DIST virtualbox-6.1.14-patches-01.tar.xz 2344 BLAKE2B cb89af8ffe0ecaa54929349abfb1541ca8630063d8282e773e4c66c3eec3ed108328b1ee81247d997981e5d49792b4019e1358b270c3622508b62e647c544ae4 SHA512 b08c2f66a050270a5c8b4d7264b1cf0afaf7809c3888c48a9b55ac75f0906bdb6bc28eef136ce032c777a810f2ce0a3cf6bb3df0259e5a6737f9ecc3ea708bba
diff --git a/app-emulation/virtualbox/virtualbox-5.2.40.ebuild b/app-emulation/virtualbox/virtualbox-5.2.40.ebuild
new file mode 100644 (file)
index 0000000..0b3a7ae
--- /dev/null
@@ -0,0 +1,496 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_{6,7,8}} )
+inherit flag-o-matic gnome2-utils java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+       https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.36-patches-01.tar.xz"
+
+LICENSE="GPL-2 dtrace? ( CDDL )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc dtrace 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=
+       media-libs/opus
+       sys-libs/zlib:=
+       !headless? (
+               media-libs/libsdl:0[X,video]
+               x11-libs/libX11
+               x11-libs/libxcb:=
+               x11-libs/libXcursor
+               x11-libs/libXext
+               x11-libs/libXmu
+               x11-libs/libXt
+               opengl? ( virtual/opengl media-libs/freeglut )
+               qt5? (
+                       dev-qt/qtcore:5
+                       dev-qt/qtgui:5
+                       dev-qt/qtprintsupport:5
+                       dev-qt/qtwidgets:5
+                       dev-qt/qtx11extras:5
+                       opengl? ( dev-qt/qtopengl:5 )
+                       x11-libs/libXinerama
+               )
+       )
+       libressl? ( dev-libs/libressl:= )
+       !libressl? ( dev-libs/openssl:0= )
+       lvm? ( sys-fs/lvm2 )
+       udev? ( >=virtual/udev-171 )
+       vnc? ( >=net-libs/libvncserver-0.9.9 )
+       ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+       >=dev-util/kbuild-0.1.9998.3127
+       >=dev-lang/yasm-0.6.2
+       sys-devel/bin86
+       sys-libs/libcap
+       sys-power/iasl
+       virtual/pkgconfig
+       alsa? ( >=media-libs/alsa-lib-1.0.13 )
+       doc? (
+               app-text/docbook-sgml-dtd:4.4
+               dev-texlive/texlive-basic
+               dev-texlive/texlive-latex
+               dev-texlive/texlive-latexrecommended
+               dev-texlive/texlive-latexextra
+               dev-texlive/texlive-fontsrecommended
+               dev-texlive/texlive-fontsextra
+       )
+       !headless? ( x11-libs/libXinerama )
+       java? ( >=virtual/jdk-1.6 )
+       pam? ( sys-libs/pam )
+       pax_kernel? ( sys-apps/elfix )
+       pulseaudio? ( media-sound/pulseaudio )
+       qt5? ( dev-qt/linguist-tools:5 )
+       vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
+       ${PYTHON_DEPS}"
+RDEPEND="${RDEPEND}
+       java? ( >=virtual/jre-1.6 )"
+
+QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
+       usr/lib/virtualbox/VBoxSDL.so
+       usr/lib/virtualbox/VBoxSharedFolders.so
+       usr/lib/virtualbox/VBoxDD2.so
+       usr/lib/virtualbox/VBoxOGLrenderspu.so
+       usr/lib/virtualbox/VBoxPython.so
+       usr/lib/virtualbox/VBoxDD.so
+       usr/lib/virtualbox/VBoxDDU.so
+       usr/lib/virtualbox/VBoxREM64.so
+       usr/lib/virtualbox/VBoxSharedClipboard.so
+       usr/lib/virtualbox/VBoxHeadless.so
+       usr/lib/virtualbox/VBoxRT.so
+       usr/lib/virtualbox/VBoxREM.so
+       usr/lib/virtualbox/VBoxSettings.so
+       usr/lib/virtualbox/VBoxKeyboard.so
+       usr/lib/virtualbox/VBoxSharedCrOpenGL.so
+       usr/lib/virtualbox/VBoxVMM.so
+       usr/lib/virtualbox/VirtualBox.so
+       usr/lib/virtualbox/VBoxOGLhosterrorspu.so
+       usr/lib/virtualbox/components/VBoxC.so
+       usr/lib/virtualbox/components/VBoxSVCM.so
+       usr/lib/virtualbox/components/VBoxDDU.so
+       usr/lib/virtualbox/components/VBoxRT.so
+       usr/lib/virtualbox/components/VBoxREM.so
+       usr/lib/virtualbox/components/VBoxVMM.so
+       usr/lib/virtualbox/VBoxREM32.so
+       usr/lib/virtualbox/VBoxPython2_7.so
+       usr/lib/virtualbox/VBoxXPCOMC.so
+       usr/lib/virtualbox/VBoxOGLhostcrutil.so
+       usr/lib/virtualbox/VBoxNetDHCP.so
+       usr/lib/virtualbox/VBoxNetNAT.so"
+
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+       java? ( sdk )
+       python? ( sdk )
+       vboxwebsrv? ( java )
+       ${PYTHON_REQUIRED_USE}
+"
+
+pkg_pretend() {
+       if ! use headless && ! use qt5 ; then
+               einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend."
+       elif use headless && use qt5 ; then
+               einfo "You selected USE=\"headless qt5\", defaulting to"
+               einfo "USE=\"headless\", this build will not include any X11/Qt frontend."
+       fi
+
+       if ! use opengl ; then
+               einfo "No USE=\"opengl\" selected, this build will lack"
+               einfo "the OpenGL feature."
+       fi
+       if ! use python ; then
+               einfo "You have disabled the \"python\" USE flag. This will only"
+               einfo "disable the python bindings being installed."
+       fi
+}
+
+pkg_setup() {
+       java-pkg-opt-2_pkg_setup
+       python-single-r1_pkg_setup
+
+       tc-ld-disable-gold #bug 488176
+       tc-export CC CXX LD AR RANLIB
+       export HOST_CC="$(tc-getBUILD_CC)"
+}
+
+src_prepare() {
+       # Remove shipped binaries (kBuild,yasm), see bug #232775
+       rm -r kBuild/bin tools || die
+
+       # Replace pointless GCC version check with something less stupid.
+       # This is needed for the qt5 version check.
+       sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' \
+               -i configure || die
+
+       # Disable things unused or split into separate ebuilds
+       sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+               "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
+
+       # Respect LDFLAGS
+       sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+               -i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+       # Do not use hard-coded ld (related to bug #488176)
+       sed -e '/QUIET)ld /s@ld @$(LD) @' \
+               -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+       # Use PAM only when pam USE flag is enbaled (bug #376531)
+       if ! use pam ; then
+               elog "Disabling PAM removes the possibility to use the VRDP features."
+               sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+               sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+                       src/VBox/HostServices/Makefile.kmk || die
+       fi
+
+       # add correct java path
+       if use java ; then
+               sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+                       -i "${S}"/Config.kmk || die
+               java-pkg-opt-2_src_prepare
+       fi
+
+       # Only add nopie patch when we're on hardened
+       if  gcc-specs-pie ; then
+               eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
+       fi
+
+       # Only add paxmark patch when we're on pax_kernel
+       if use pax_kernel ; then
+               eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
+       fi
+
+       rm "${WORKDIR}/patches/008_virtualbox-4.3.14-missing_define.patch" || die
+       eapply "${WORKDIR}/patches"
+
+       eapply_user
+}
+
+doecho() {
+       echo "$@"
+       "$@" || die
+}
+
+src_configure() {
+       local myconf=(
+               --with-gcc="$(tc-getCC)"
+               --with-g++="$(tc-getCXX)"
+               --disable-dbus
+               --disable-kmods
+               $(usex alsa '' --disable-alsa)
+               $(usex debug --build-debug '')
+               $(usex doc '' --disable-docs)
+               $(usex java '' --disable-java)
+               $(usex lvm '' --disable-devmapper)
+               $(usex pulseaudio '' --disable-pulse)
+               $(usex python '' --disable-python)
+               $(usex vboxwebsrv --enable-webservice '')
+               $(usex vnc --enable-vnc '')
+       )
+       if ! use headless ; then
+               myconf+=(
+                       $(usex opengl '' --disable-opengl)
+                       $(usex qt5 '' --disable-qt)
+               )
+       else
+               myconf+=(
+                       --build-headless
+                       --disable-opengl
+               )
+       fi
+       if use amd64 && ! has_multilib_profile ; then
+               myconf+=( --disable-vmmraw )
+       fi
+       # not an autoconf script
+       doecho ./configure ${myconf[@]}
+}
+
+src_compile() {
+       source ./env.sh || die
+
+       # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+       MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
+       MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
+       MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+       MAKE="kmk" emake \
+               VBOX_BUILD_PUBLISHER=_Gentoo \
+               TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
+               TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
+               TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
+               TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
+               VBOX_GCC_OPT="${CXXFLAGS}" \
+               TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
+               all
+}
+
+src_install() {
+       local binpath="release"
+       use debug && binpath="debug"
+       cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die
+
+       local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile
+
+       vbox_inst() {
+               local binary="${1}"
+               local perms="${2:-0750}"
+               local path="${3:-${vbox_inst_path}}"
+
+               [[ -n "${binary}" ]] || die "vbox_inst: No binray given!"
+               [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+               insinto ${path}
+               doins ${binary}
+               fowners root:vboxusers ${path}/${binary}
+               fperms ${perms} ${path}/${binary}
+       }
+
+       # Create configuration files
+       insinto /etc/vbox
+       newins "${FILESDIR}/${PN}-4-config" vbox.cfg
+
+       # Set the correct libdir
+       sed \
+               -e "s@MY_LIBDIR@$(get_libdir)@" \
+               -i "${ED%/}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+       # Install the wrapper script
+       exeinto ${vbox_inst_path}
+       newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox"
+       fowners root:vboxusers ${vbox_inst_path}/VBox
+       fperms 0750 ${vbox_inst_path}/VBox
+
+       # Install binaries and libraries
+       insinto ${vbox_inst_path}
+       doins -r components
+
+       # *.rc files for x86_64 are only available on multilib systems
+       local rcfiles="*.rc"
+       if use amd64 && ! has_multilib_profile ; then
+               rcfiles=""
+       fi
+       for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do
+               vbox_inst ${each}
+       done
+
+       # These binaries need to be suid root.
+       for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+               vbox_inst ${each} 4750
+       done
+
+       # Install EFI Firmware files (bug #320757)
+       pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die
+       for fwfile in VBoxEFI{32,64}.fd ; do
+               vbox_inst ${fwfile} 0644
+       done
+       popd &>/dev/null || die
+
+       # VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+       # VBoxXPCOMIPCD (bug #524202)
+       for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
+               pax-mark -m "${ED%/}"${vbox_inst_path}/${each}
+       done
+
+       # Symlink binaries to the shipped wrapper
+       for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do
+               dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+       done
+       dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
+
+       if use pam ; then
+               # VRDPAuth only works with this (bug #351949)
+               dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+       fi
+
+       # set an env-variable for 3rd party tools
+       echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
+       doenvd "${T}/90virtualbox"
+
+       if ! use headless ; then
+               vbox_inst VBoxSDL 4750
+               pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxSDL
+
+               for each in vboxsdl VBoxSDL ; do
+                       dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+               done
+
+               if use qt5 ; then
+                       vbox_inst VirtualBox 4750
+                       pax-mark -m "${ED%/}"${vbox_inst_path}/VirtualBox
+
+                       if use opengl ; then
+                               vbox_inst VBoxTestOGL
+                               pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxTestOGL
+                       fi
+
+                       for each in virtualbox VirtualBox ; do
+                               dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+                       done
+
+                       insinto /usr/share/${PN}
+                       doins -r nls
+                       doins -r UnattendedTemplates
+
+                       newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop
+               fi
+
+               pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+               for size in 16 32 48 64 128 ; do
+                       newicon -s ${size} ${PN}-${size}px.png ${PN}.png
+               done
+               newicon ${PN}-48px.png ${PN}.png
+               doicon -s scalable ${PN}.svg
+               popd &>/dev/null || die
+               pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+               for size in 16 24 32 48 64 72 96 128 256 512 ; do
+                       for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+                               icofile="${PN}-${ico}-${size}px.png"
+                               if [[ -f "${icofile}" ]] ; then
+                                       newicon -s ${size} ${icofile} ${PN}-${ico}.png
+                               fi
+                       done
+               done
+               popd &>/dev/null || die
+       fi
+
+       if use lvm ; then
+               vbox_inst VBoxVolInfo 4750
+               dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+       fi
+
+       if use sdk ; then
+               insinto ${vbox_inst_path}
+               doins -r sdk
+
+               if use java ; then
+                       java-pkg_regjar "${ED%/}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+                       java-pkg_regso "${ED%/}/${vbox_inst_path}/libvboxjxpcom.so"
+               fi
+       fi
+
+       if use udev ; then
+               # New way of handling USB device nodes for VBox (bug #356215)
+               local udevdir="$(get_udevdir)"
+               insinto ${udevdir}
+               doins VBoxCreateUSBNode.sh
+               fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
+               fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+               insinto ${udevdir}/rules.d
+               sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
+                       > "${T}"/10-virtualbox.rules || die
+               doins "${T}"/10-virtualbox.rules
+       fi
+
+       if use vboxwebsrv ; then
+               vbox_inst vboxwebsrv
+               dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+               newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+               newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+       fi
+
+       # Fix version string in extensions or else they don't get accepted
+       # by the virtualbox host process (see bug #438930)
+       find ExtensionPacks -type f -name "ExtPack.xml" -print0 \
+               | xargs --no-run-if-empty --null sed -i '/Version/s@_Gentoo@@' \
+               || die
+
+       if use vnc ; then
+               insinto ${vbox_inst_path}/ExtensionPacks
+               doins -r ExtensionPacks/VNC
+       fi
+
+       if use dtrace ; then
+               insinto ${vbox_inst_path}/ExtensionPacks
+               doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
+       fi
+
+       if use doc ; then
+               dodoc UserManual.pdf
+       fi
+
+       newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
+}
+
+pkg_postinst() {
+       gnome2_icon_cache_update
+       xdg_desktop_database_update
+
+       if use udev ; then
+               udevadm control --reload-rules \
+                       && udevadm trigger --subsystem-match=usb
+       fi
+
+       tmpfiles_process /usr/lib/tmpfiles.d/virtualbox-vboxusb.conf
+
+       if ! use headless && use qt5 ; then
+               elog "To launch VirtualBox just type: \"virtualbox\"."
+       fi
+       elog "You must be in the vboxusers group to use VirtualBox."
+       elog ""
+       elog "The latest user manual is available for download at:"
+       elog "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
+       elog ""
+       elog "For advanced networking setups you should emerge:"
+       elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
+       elog ""
+       elog "Starting with version 4.0.0, ${PN} has USB-1 support."
+       elog "For USB-2 support, PXE-boot ability and VRDP support please emerge"
+       elog "  app-emulation/virtualbox-extpack-oracle"
+       elog "package."
+       elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and"
+       elog "the \"extension\" USE flag. For installation of the guest additions ISO"
+       elog "image, please emerge"
+       elog "  app-emulation/virtualbox-additions"
+       elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge"
+       elog "  app-emulation/virtualbox-extpack-oracle"
+       if ! use udev ; then
+               elog ""
+               elog "WARNING!"
+               elog "Without USE=udev, USB devices will likely not work in ${PN}."
+       elif [ -e "${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
+               elog ""
+               elog "Please remove \"${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules\""
+               elog "or else USB in ${PN} won't work."
+       fi
+}
+
+pkg_postrm() {
+       gnome2_icon_cache_update
+       xdg_desktop_database_update
+}
diff --git a/app-emulation/virtualbox/virtualbox-6.0.20.ebuild b/app-emulation/virtualbox/virtualbox-6.0.20.ebuild
new file mode 100644 (file)
index 0000000..73d3981
--- /dev/null
@@ -0,0 +1,511 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{6,7,8}} )
+inherit desktop flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+       https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-6.0.20-patches-01.tar.xz"
+
+LICENSE="GPL-2 dtrace? ( CDDL )"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc dtrace headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
+
+CDEPEND="
+       ${PYTHON_DEPS}
+       !app-emulation/virtualbox-bin
+       acct-group/vboxusers
+       ~app-emulation/virtualbox-modules-${PV}
+       dev-libs/libIDL
+       >=dev-libs/libxslt-1.1.19
+       net-misc/curl
+       dev-libs/libxml2
+       media-libs/libpng:0=
+       media-libs/libvpx:0=
+       sys-libs/zlib:=
+       !headless? (
+               media-libs/libsdl:0[X,video]
+               x11-libs/libX11
+               x11-libs/libxcb:=
+               x11-libs/libXcursor
+               x11-libs/libXext
+               x11-libs/libXmu
+               x11-libs/libXt
+               opengl? ( virtual/opengl media-libs/freeglut )
+               qt5? (
+                       dev-qt/qtcore:5
+                       dev-qt/qtgui:5
+                       dev-qt/qtprintsupport:5
+                       dev-qt/qtwidgets:5
+                       dev-qt/qtx11extras:5
+                       opengl? ( dev-qt/qtopengl:5 )
+                       x11-libs/libXinerama
+               )
+       )
+       libressl? ( dev-libs/libressl:= )
+       !libressl? ( dev-libs/openssl:0= )
+       lvm? ( sys-fs/lvm2 )
+       opus? ( media-libs/opus )
+       udev? ( >=virtual/udev-171 )
+       vnc? ( >=net-libs/libvncserver-0.9.9 )
+"
+DEPEND="
+       ${CDEPEND}
+       alsa? ( >=media-libs/alsa-lib-1.0.13 )
+       !headless? ( x11-libs/libXinerama )
+       pam? ( sys-libs/pam )
+       pax_kernel? ( sys-apps/elfix )
+       pulseaudio? ( media-sound/pulseaudio )
+       qt5? ( dev-qt/linguist-tools:5 )
+       vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
+"
+BDEPEND="
+       ${PYTHON_DEPS}
+       >=dev-util/kbuild-0.1.9998.3127
+       >=dev-lang/yasm-0.6.2
+       sys-devel/bin86
+       sys-libs/libcap
+       sys-power/iasl
+       virtual/pkgconfig
+       doc? (
+               app-text/docbook-sgml-dtd:4.4
+               dev-texlive/texlive-basic
+               dev-texlive/texlive-latex
+               dev-texlive/texlive-latexrecommended
+               dev-texlive/texlive-latexextra
+               dev-texlive/texlive-fontsrecommended
+               dev-texlive/texlive-fontsextra
+       )
+       java? ( >=virtual/jdk-1.6 )
+"
+RDEPEND="
+       ${CDEPEND}
+       java? ( >=virtual/jre-1.6 )
+"
+
+QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
+       usr/lib/virtualbox/VBoxSDL.so
+       usr/lib/virtualbox/VBoxSharedFolders.so
+       usr/lib/virtualbox/VBoxDD2.so
+       usr/lib/virtualbox/VBoxOGLrenderspu.so
+       usr/lib/virtualbox/VBoxPython.so
+       usr/lib/virtualbox/VBoxDD.so
+       usr/lib/virtualbox/VBoxDDU.so
+       usr/lib/virtualbox/VBoxREM64.so
+       usr/lib/virtualbox/VBoxSharedClipboard.so
+       usr/lib/virtualbox/VBoxHeadless.so
+       usr/lib/virtualbox/VBoxRT.so
+       usr/lib/virtualbox/VBoxREM.so
+       usr/lib/virtualbox/VBoxSettings.so
+       usr/lib/virtualbox/VBoxKeyboard.so
+       usr/lib/virtualbox/VBoxSharedCrOpenGL.so
+       usr/lib/virtualbox/VBoxVMM.so
+       usr/lib/virtualbox/VirtualBox.so
+       usr/lib/virtualbox/VBoxOGLhosterrorspu.so
+       usr/lib/virtualbox/components/VBoxC.so
+       usr/lib/virtualbox/components/VBoxSVCM.so
+       usr/lib/virtualbox/components/VBoxDDU.so
+       usr/lib/virtualbox/components/VBoxRT.so
+       usr/lib/virtualbox/components/VBoxREM.so
+       usr/lib/virtualbox/components/VBoxVMM.so
+       usr/lib/virtualbox/VBoxREM32.so
+       usr/lib/virtualbox/VBoxPython2_7.so
+       usr/lib/virtualbox/VBoxXPCOMC.so
+       usr/lib/virtualbox/VBoxOGLhostcrutil.so
+       usr/lib/virtualbox/VBoxNetDHCP.so
+       usr/lib/virtualbox/VBoxNetNAT.so"
+
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+       java? ( sdk )
+       python? ( sdk )
+       vboxwebsrv? ( java )
+       ${PYTHON_REQUIRED_USE}
+"
+
+pkg_pretend() {
+       if ! use headless && ! use qt5 ; then
+               einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend."
+       elif use headless && use qt5 ; then
+               einfo "You selected USE=\"headless qt5\", defaulting to"
+               einfo "USE=\"headless\", this build will not include any X11/Qt frontend."
+       fi
+
+       if ! use opengl ; then
+               einfo "No USE=\"opengl\" selected, this build will lack"
+               einfo "the OpenGL feature."
+       fi
+       if ! use python ; then
+               einfo "You have disabled the \"python\" USE flag. This will only"
+               einfo "disable the python bindings being installed."
+       fi
+}
+
+pkg_setup() {
+       java-pkg-opt-2_pkg_setup
+       python-single-r1_pkg_setup
+
+       tc-ld-disable-gold #bug 488176
+       tc-export CC CXX LD AR RANLIB
+       export HOST_CC="$(tc-getBUILD_CC)"
+}
+
+src_prepare() {
+       # Remove shipped binaries (kBuild,yasm), see bug #232775
+       rm -r kBuild/bin tools || die
+
+       # Replace pointless GCC version check with something less stupid.
+       # This is needed for the qt5 version check.
+       sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' \
+               -i configure || die
+
+       # Disable things unused or split into separate ebuilds
+       sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+               "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
+
+       # Respect LDFLAGS
+       sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+               -i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+       # Do not use hard-coded ld (related to bug #488176)
+       sed -e '/QUIET)ld /s@ld @$(LD) @' \
+               -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+       # Use PAM only when pam USE flag is enbaled (bug #376531)
+       if ! use pam ; then
+               elog "Disabling PAM removes the possibility to use the VRDP features."
+               sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+               sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+                       src/VBox/HostServices/Makefile.kmk || die
+       fi
+
+       # add correct java path
+       if use java ; then
+               sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+                       -i "${S}"/Config.kmk || die
+               java-pkg-opt-2_src_prepare
+       fi
+
+       # Only add nopie patch when we're on hardened
+       if gcc-specs-pie ; then
+               eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
+       fi
+
+       # Only add paxmark patch when we're on pax_kernel
+       if use pax_kernel ; then
+               eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
+       fi
+
+       rm "${WORKDIR}/patches/010_virtualbox-5.2.12-qt511.patch" || die
+       eapply "${WORKDIR}/patches"
+
+       eapply_user
+}
+
+doecho() {
+       echo "$@"
+       "$@" || die
+}
+
+src_configure() {
+       local myconf=(
+               --with-gcc="$(tc-getCC)"
+               --with-g++="$(tc-getCXX)"
+               --disable-dbus
+               --disable-kmods
+               $(usex alsa '' --disable-alsa)
+               $(usex debug --build-debug '')
+               $(usex doc '' --disable-docs)
+               $(usex java '' --disable-java)
+               $(usex lvm '' --disable-devmapper)
+               $(usex opus '' --disable-libopus)
+               $(usex pulseaudio '' --disable-pulse)
+               $(usex python '' --disable-python)
+               $(usex vboxwebsrv --enable-webservice '')
+               $(usex vnc --enable-vnc '')
+       )
+       if ! use headless ; then
+               myconf+=(
+                       $(usex opengl '' --disable-opengl)
+                       $(usex qt5 '' --disable-qt)
+               )
+       else
+               myconf+=(
+                       --build-headless
+                       --disable-opengl
+               )
+       fi
+       if use amd64 && ! has_multilib_profile ; then
+               myconf+=( --disable-vmmraw )
+       fi
+       # not an autoconf script
+       doecho ./configure ${myconf[@]}
+}
+
+src_compile() {
+       source ./env.sh || die
+
+       # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+       MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
+       MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
+       MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+       MAKE="kmk" emake \
+               VBOX_BUILD_PUBLISHER=_Gentoo \
+               TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
+               TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
+               TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
+               TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
+               VBOX_GCC_OPT="${CXXFLAGS}" \
+               TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
+               all
+}
+
+src_install() {
+       cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
+
+       local vbox_inst_path="/usr/$(get_libdir)/${PN}" each size ico icofile
+
+       vbox_inst() {
+               local binary="${1}"
+               local perms="${2:-0750}"
+               local path="${3:-${vbox_inst_path}}"
+
+               [[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
+               [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+               insinto ${path}
+               doins ${binary}
+               fowners root:vboxusers ${path}/${binary}
+               fperms ${perms} ${path}/${binary}
+       }
+
+       # Create configuration files
+       insinto /etc/vbox
+       newins "${FILESDIR}/${PN}-4-config" vbox.cfg
+
+       # Set the correct libdir
+       sed \
+               -e "s@MY_LIBDIR@$(get_libdir)@" \
+               -i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+       # Install the wrapper script
+       exeinto ${vbox_inst_path}
+       newexe "${FILESDIR}/${PN}-ose-6-wrapper" "VBox"
+       fowners root:vboxusers ${vbox_inst_path}/VBox
+       fperms 0750 ${vbox_inst_path}/VBox
+
+       # Install binaries and libraries
+       insinto ${vbox_inst_path}
+       doins -r components
+
+       # *.rc files for x86_64 are only available on multilib systems
+       local rcfiles="*.rc"
+       if use amd64 && ! has_multilib_profile ; then
+               rcfiles=""
+       fi
+       for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,Tunctl,VMMPreload,XPCOMIPCD} *so *r0 ${rcfiles} iPxeBaseBin ; do
+               vbox_inst ${each}
+       done
+
+       # These binaries need to be suid root.
+       for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+               vbox_inst ${each} 4750
+       done
+
+       # Install EFI Firmware files (bug #320757)
+       for each in VBoxEFI{32,64}.fd ; do
+               vbox_inst ${each} 0644
+       done
+
+       # VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+       # VBoxXPCOMIPCD (bug #524202)
+       for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
+               pax-mark -m "${ED}"${vbox_inst_path}/${each}
+       done
+
+       # Symlink binaries to the shipped wrapper
+       for each in vbox{autostart,balloonctrl,bugreport,headless,manage} VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
+               dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+       done
+       dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
+
+       if use pam ; then
+               # VRDPAuth only works with this (bug #351949)
+               dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+       fi
+
+       # set an env-variable for 3rd party tools
+       echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
+       doenvd "${T}/90virtualbox"
+
+       if ! use headless ; then
+               vbox_inst rdesktop-vrdp
+               vbox_inst VBoxSDL 4750
+               pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
+
+               for each in vboxsdl VBoxSDL ; do
+                       dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+               done
+
+               if use qt5 ; then
+                       vbox_inst VirtualBox
+                       vbox_inst VirtualBoxVM 4750
+                       for each in VirtualBox{,VM} ; do
+                               pax-mark -m "${ED}"${vbox_inst_path}/${each}
+                       done
+
+                       if use opengl ; then
+                               vbox_inst VBoxTestOGL
+                               pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
+                       fi
+
+                       for each in virtualbox{,vm} VirtualBox{,VM} ; do
+                               dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+                       done
+
+                       insinto /usr/share/${PN}
+                       doins -r nls
+                       doins -r UnattendedTemplates
+
+                       domenu ${PN}.desktop
+               fi
+
+               pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+               for size in 16 32 48 64 128 ; do
+                       newicon -s ${size} ${PN}-${size}px.png ${PN}.png
+               done
+               newicon ${PN}-48px.png ${PN}.png
+               doicon -s scalable ${PN}.svg
+               popd &>/dev/null || die
+               pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+               for size in 16 24 32 48 64 72 96 128 256 512 ; do
+                       for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+                               icofile="${PN}-${ico}-${size}px.png"
+                               if [[ -f "${icofile}" ]] ; then
+                                       newicon -s ${size} ${icofile} ${PN}-${ico}.png
+                               fi
+                       done
+               done
+               popd &>/dev/null || die
+       fi
+
+       if use lvm ; then
+               vbox_inst VBoxVolInfo 4750
+               dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+       fi
+
+       if use sdk ; then
+               insinto ${vbox_inst_path}
+               doins -r sdk
+
+               if use java ; then
+                       java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+                       java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
+               fi
+       fi
+
+       if use udev ; then
+               # New way of handling USB device nodes for VBox (bug #356215)
+               local udevdir="$(get_udevdir)"
+               insinto ${udevdir}
+               doins VBoxCreateUSBNode.sh
+               fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
+               fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+               insinto ${udevdir}/rules.d
+               sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
+                       > "${T}"/10-virtualbox.rules || die
+               doins "${T}"/10-virtualbox.rules
+       fi
+
+       if use vboxwebsrv ; then
+               vbox_inst vboxwebsrv
+               dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+               newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+               newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+       fi
+
+       # Fix version string in extensions or else they don't get accepted
+       # by the virtualbox host process (see bug #438930)
+       find ExtensionPacks -type f -name "ExtPack.xml" -print0 \
+               | xargs --no-run-if-empty --null sed -i '/Version/s@_Gentoo@@' \
+               || die
+
+       local extensions_dir="${vbox_inst_path}/ExtensionPacks"
+
+       if use vnc ; then
+               insinto ${extensions_dir}
+               doins -r ExtensionPacks/VNC
+       fi
+
+       if use dtrace ; then
+               insinto ${extensions_dir}
+               doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
+       fi
+
+       if use doc ; then
+               dodoc UserManual.pdf
+       fi
+
+       newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
+}
+
+pkg_preinst() {
+       xdg_pkg_preinst
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       if use udev ; then
+               udevadm control --reload-rules \
+                       && udevadm trigger --subsystem-match=usb
+       fi
+
+       tmpfiles_process /usr/lib/tmpfiles.d/virtualbox-vboxusb.conf
+
+       if ! use headless && use qt5 ; then
+               elog "To launch VirtualBox just type: \"virtualbox\"."
+       fi
+       elog "You must be in the vboxusers group to use VirtualBox."
+       elog ""
+       elog "The latest user manual is available for download at:"
+       elog "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
+       elog ""
+       elog "For advanced networking setups you should emerge:"
+       elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
+       elog ""
+       elog "Starting with version 4.0.0, ${PN} has USB-1 support."
+       elog "For USB-2 support, PXE-boot ability and VRDP support please emerge"
+       elog "  app-emulation/virtualbox-extpack-oracle"
+       elog "package."
+       elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and"
+       elog "the \"extension\" USE flag. For installation of the guest additions ISO"
+       elog "image, please emerge"
+       elog "  app-emulation/virtualbox-additions"
+       elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge"
+       elog "  app-emulation/virtualbox-extpack-oracle"
+       if ! use udev ; then
+               elog ""
+               elog "WARNING!"
+               elog "Without USE=udev, USB devices will likely not work in ${PN}."
+       elif [[ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ]] ; then
+               elog ""
+               elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
+               elog "or else USB in ${PN} won't work."
+       fi
+}
+
+pkg_postrm() {
+       xdg_pkg_postrm
+}
diff --git a/app-emulation/virtualbox/virtualbox-6.1.6.ebuild b/app-emulation/virtualbox/virtualbox-6.1.6.ebuild
new file mode 100644 (file)
index 0000000..7ddbfdc
--- /dev/null
@@ -0,0 +1,507 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+inherit desktop flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+       https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-6.1.14-patches-01.tar.xz"
+
+LICENSE="GPL-2 dtrace? ( CDDL )"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64"
+IUSE="alsa debug doc dtrace headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
+
+CDEPEND="
+       ${PYTHON_DEPS}
+       !app-emulation/virtualbox-bin
+       acct-group/vboxusers
+       ~app-emulation/virtualbox-modules-${PV}
+       dev-libs/libIDL
+       >=dev-libs/libxslt-1.1.19
+       net-misc/curl
+       dev-libs/libxml2
+       media-libs/libpng:0=
+       media-libs/libvpx:0=
+       sys-libs/zlib:=
+       !headless? (
+               media-libs/libsdl:0[X,video]
+               x11-libs/libX11
+               x11-libs/libxcb:=
+               x11-libs/libXcursor
+               x11-libs/libXext
+               x11-libs/libXmu
+               x11-libs/libXt
+               opengl? ( virtual/opengl media-libs/freeglut )
+               qt5? (
+                       dev-qt/qtcore:5
+                       dev-qt/qtgui:5
+                       dev-qt/qtprintsupport:5
+                       dev-qt/qtwidgets:5
+                       dev-qt/qtx11extras:5
+                       opengl? ( dev-qt/qtopengl:5 )
+                       x11-libs/libXinerama
+               )
+       )
+       libressl? ( dev-libs/libressl:= )
+       !libressl? ( dev-libs/openssl:0= )
+       lvm? ( sys-fs/lvm2 )
+       opus? ( media-libs/opus )
+       udev? ( >=virtual/udev-171 )
+       vnc? ( >=net-libs/libvncserver-0.9.9 )
+"
+DEPEND="
+       ${CDEPEND}
+       alsa? ( >=media-libs/alsa-lib-1.0.13 )
+       !headless? ( x11-libs/libXinerama )
+       pam? ( sys-libs/pam )
+       pax_kernel? ( sys-apps/elfix )
+       pulseaudio? ( media-sound/pulseaudio )
+       qt5? ( dev-qt/linguist-tools:5 )
+       vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
+"
+BDEPEND="
+       ${PYTHON_DEPS}
+       >=dev-util/kbuild-0.1.9998.3127
+       >=dev-lang/yasm-0.6.2
+       sys-devel/bin86
+       sys-libs/libcap
+       sys-power/iasl
+       virtual/pkgconfig
+       doc? (
+               app-text/docbook-sgml-dtd:4.4
+               dev-texlive/texlive-basic
+               dev-texlive/texlive-latex
+               dev-texlive/texlive-latexrecommended
+               dev-texlive/texlive-latexextra
+               dev-texlive/texlive-fontsrecommended
+               dev-texlive/texlive-fontsextra
+       )
+       java? ( >=virtual/jdk-1.6 )
+"
+RDEPEND="
+       ${CDEPEND}
+       java? ( >=virtual/jre-1.6 )
+"
+
+QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
+       usr/lib/virtualbox/VBoxSDL.so
+       usr/lib/virtualbox/VBoxSharedFolders.so
+       usr/lib/virtualbox/VBoxDD2.so
+       usr/lib/virtualbox/VBoxOGLrenderspu.so
+       usr/lib/virtualbox/VBoxPython.so
+       usr/lib/virtualbox/VBoxDD.so
+       usr/lib/virtualbox/VBoxDDU.so
+       usr/lib/virtualbox/VBoxREM64.so
+       usr/lib/virtualbox/VBoxSharedClipboard.so
+       usr/lib/virtualbox/VBoxHeadless.so
+       usr/lib/virtualbox/VBoxRT.so
+       usr/lib/virtualbox/VBoxREM.so
+       usr/lib/virtualbox/VBoxSettings.so
+       usr/lib/virtualbox/VBoxKeyboard.so
+       usr/lib/virtualbox/VBoxSharedCrOpenGL.so
+       usr/lib/virtualbox/VBoxVMM.so
+       usr/lib/virtualbox/VirtualBox.so
+       usr/lib/virtualbox/VBoxOGLhosterrorspu.so
+       usr/lib/virtualbox/components/VBoxC.so
+       usr/lib/virtualbox/components/VBoxSVCM.so
+       usr/lib/virtualbox/components/VBoxDDU.so
+       usr/lib/virtualbox/components/VBoxRT.so
+       usr/lib/virtualbox/components/VBoxREM.so
+       usr/lib/virtualbox/components/VBoxVMM.so
+       usr/lib/virtualbox/VBoxREM32.so
+       usr/lib/virtualbox/VBoxPython2_7.so
+       usr/lib/virtualbox/VBoxXPCOMC.so
+       usr/lib/virtualbox/VBoxOGLhostcrutil.so
+       usr/lib/virtualbox/VBoxNetDHCP.so
+       usr/lib/virtualbox/VBoxNetNAT.so"
+
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+       java? ( sdk )
+       python? ( sdk )
+       vboxwebsrv? ( java )
+       ${PYTHON_REQUIRED_USE}
+"
+
+pkg_pretend() {
+       if ! use headless && ! use qt5 ; then
+               einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend."
+       elif use headless && use qt5 ; then
+               einfo "You selected USE=\"headless qt5\", defaulting to"
+               einfo "USE=\"headless\", this build will not include any X11/Qt frontend."
+       fi
+
+       if ! use opengl ; then
+               einfo "No USE=\"opengl\" selected, this build will lack"
+               einfo "the OpenGL feature."
+       fi
+       if ! use python ; then
+               einfo "You have disabled the \"python\" USE flag. This will only"
+               einfo "disable the python bindings being installed."
+       fi
+}
+
+pkg_setup() {
+       java-pkg-opt-2_pkg_setup
+       python-single-r1_pkg_setup
+
+       tc-ld-disable-gold #bug 488176
+       tc-export CC CXX LD AR RANLIB
+       export HOST_CC="$(tc-getBUILD_CC)"
+}
+
+src_prepare() {
+       # Remove shipped binaries (kBuild,yasm), see bug #232775
+       rm -r kBuild/bin tools || die
+
+       # Replace pointless GCC version check with something less stupid.
+       # This is needed for the qt5 version check.
+       sed -e 's@^check_gcc$@cc_maj="$(${CC} -dumpversion | cut -d. -f1)" ; cc_min="$(${CC} -dumpversion | cut -d. -f2)"@' \
+               -i configure || die
+
+       # Disable things unused or split into separate ebuilds
+       sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+               "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
+
+       # Respect LDFLAGS
+       sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+               -i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+       # Do not use hard-coded ld (related to bug #488176)
+       sed -e '/QUIET)ld /s@ld @$(LD) @' \
+               -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+       # Use PAM only when pam USE flag is enbaled (bug #376531)
+       if ! use pam ; then
+               elog "Disabling PAM removes the possibility to use the VRDP features."
+               sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+               sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+                       src/VBox/HostServices/Makefile.kmk || die
+       fi
+
+       # add correct java path
+       if use java ; then
+               sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+                       -i "${S}"/Config.kmk || die
+               java-pkg-opt-2_src_prepare
+       fi
+
+       # Only add nopie patch when we're on hardened
+       if gcc-specs-pie ; then
+               eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
+       fi
+
+       # Only add paxmark patch when we're on pax_kernel
+       if use pax_kernel ; then
+               eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
+       fi
+
+       eapply "${WORKDIR}/patches"
+
+       eapply_user
+}
+
+doecho() {
+       echo "$@"
+       "$@" || die
+}
+
+src_configure() {
+       local myconf=(
+               --with-gcc="$(tc-getCC)"
+               --with-g++="$(tc-getCXX)"
+               --disable-dbus
+               --disable-kmods
+               $(usex alsa '' --disable-alsa)
+               $(usex debug --build-debug '')
+               $(usex doc '' --disable-docs)
+               $(usex java '' --disable-java)
+               $(usex lvm '' --disable-devmapper)
+               $(usex opus '' --disable-libopus)
+               $(usex pulseaudio '' --disable-pulse)
+               $(usex python '' --disable-python)
+               $(usex vboxwebsrv --enable-webservice '')
+               $(usex vnc --enable-vnc '')
+       )
+       if ! use headless ; then
+               myconf+=(
+                       $(usex opengl '' --disable-opengl)
+                       $(usex qt5 '' --disable-qt)
+               )
+       else
+               myconf+=(
+                       --build-headless
+                       --disable-opengl
+               )
+       fi
+       if use amd64 && ! has_multilib_profile ; then
+               myconf+=( --disable-vmmraw )
+       fi
+       # not an autoconf script
+       doecho ./configure ${myconf[@]}
+}
+
+src_compile() {
+       source ./env.sh || die
+
+       # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+       MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
+       MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
+       MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+       MAKE="kmk" emake \
+               VBOX_BUILD_PUBLISHER=_Gentoo \
+               TOOL_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 \
+               VBOX_WITH_VBOXIMGMOUNT=1 \
+               all
+}
+
+src_install() {
+       cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
+
+       local vbox_inst_path="/usr/$(get_libdir)/${PN}" each size ico icofile
+
+       vbox_inst() {
+               local binary="${1}"
+               local perms="${2:-0750}"
+               local path="${3:-${vbox_inst_path}}"
+
+               [[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
+               [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+               insinto ${path}
+               doins ${binary}
+               fowners root:vboxusers ${path}/${binary}
+               fperms ${perms} ${path}/${binary}
+       }
+
+       # Create configuration files
+       insinto /etc/vbox
+       newins "${FILESDIR}/${PN}-4-config" vbox.cfg
+
+       # Set the correct libdir
+       sed \
+               -e "s@MY_LIBDIR@$(get_libdir)@" \
+               -i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+       # Install the wrapper script
+       exeinto ${vbox_inst_path}
+       newexe "${FILESDIR}/${PN}-ose-6-wrapper" "VBox"
+       fowners root:vboxusers ${vbox_inst_path}/VBox
+       fperms 0750 ${vbox_inst_path}/VBox
+
+       # Install binaries and libraries
+       insinto ${vbox_inst_path}
+       doins -r components
+
+       for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,Tunctl,VMMPreload,XPCOMIPCD} vboximg-mount *so *r0 iPxeBaseBin ; do
+               vbox_inst ${each}
+       done
+
+       # These binaries need to be suid root.
+       for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+               vbox_inst ${each} 4750
+       done
+
+       # Install EFI Firmware files (bug #320757)
+       for each in VBoxEFI{32,64}.fd ; do
+               vbox_inst ${each} 0644
+       done
+
+       # VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+       # VBoxXPCOMIPCD (bug #524202)
+       for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
+               pax-mark -m "${ED}"${vbox_inst_path}/${each}
+       done
+
+       # Symlink binaries to the shipped wrapper
+       for each in vbox{autostart,balloonctrl,bugreport,headless,manage} VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
+               dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+       done
+       dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
+       dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
+
+       if use pam ; then
+               # VRDPAuth only works with this (bug #351949)
+               dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+       fi
+
+       # set an env-variable for 3rd party tools
+       echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
+       doenvd "${T}/90virtualbox"
+
+       if ! use headless ; then
+               vbox_inst rdesktop-vrdp
+               vbox_inst VBoxSDL 4750
+               pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
+
+               for each in vboxsdl VBoxSDL ; do
+                       dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+               done
+
+               if use qt5 ; then
+                       vbox_inst VirtualBox
+                       vbox_inst VirtualBoxVM 4750
+                       for each in VirtualBox{,VM} ; do
+                               pax-mark -m "${ED}"${vbox_inst_path}/${each}
+                       done
+
+                       if use opengl ; then
+                               vbox_inst VBoxTestOGL
+                               pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
+                       fi
+
+                       for each in virtualbox{,vm} VirtualBox{,VM} ; do
+                               dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+                       done
+
+                       insinto /usr/share/${PN}
+                       doins -r nls
+                       doins -r UnattendedTemplates
+
+                       domenu ${PN}.desktop
+               fi
+
+               pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+               for size in 16 32 48 64 128 ; do
+                       newicon -s ${size} ${PN}-${size}px.png ${PN}.png
+               done
+               newicon ${PN}-48px.png ${PN}.png
+               doicon -s scalable ${PN}.svg
+               popd &>/dev/null || die
+               pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+               for size in 16 24 32 48 64 72 96 128 256 512 ; do
+                       for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+                               icofile="${PN}-${ico}-${size}px.png"
+                               if [[ -f "${icofile}" ]] ; then
+                                       newicon -s ${size} ${icofile} ${PN}-${ico}.png
+                               fi
+                       done
+               done
+               popd &>/dev/null || die
+       fi
+
+       if use lvm ; then
+               vbox_inst VBoxVolInfo 4750
+               dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+       fi
+
+       if use sdk ; then
+               insinto ${vbox_inst_path}
+               doins -r sdk
+
+               if use java ; then
+                       java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+                       java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
+               fi
+       fi
+
+       if use udev ; then
+               # New way of handling USB device nodes for VBox (bug #356215)
+               local udevdir="$(get_udevdir)"
+               insinto ${udevdir}
+               doins VBoxCreateUSBNode.sh
+               fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
+               fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+               insinto ${udevdir}/rules.d
+               sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
+                       > "${T}"/10-virtualbox.rules || die
+               doins "${T}"/10-virtualbox.rules
+       fi
+
+       if use vboxwebsrv ; then
+               vbox_inst vboxwebsrv
+               dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+               newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+               newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+       fi
+
+       # Fix version string in extensions or else they don't get accepted
+       # by the virtualbox host process (see bug #438930)
+       find ExtensionPacks -type f -name "ExtPack.xml" -print0 \
+               | xargs --no-run-if-empty --null sed -i '/Version/s@_Gentoo@@' \
+               || die
+
+       local extensions_dir="${vbox_inst_path}/ExtensionPacks"
+
+       if use vnc ; then
+               insinto ${extensions_dir}
+               doins -r ExtensionPacks/VNC
+       fi
+
+       if use dtrace ; then
+               insinto ${extensions_dir}
+               doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
+       fi
+
+       if use doc ; then
+               dodoc UserManual.pdf
+       fi
+
+       newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
+}
+
+pkg_preinst() {
+       xdg_pkg_preinst
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       if use udev ; then
+               udevadm control --reload-rules \
+                       && udevadm trigger --subsystem-match=usb
+       fi
+
+       tmpfiles_process /usr/lib/tmpfiles.d/virtualbox-vboxusb.conf
+
+       if ! use headless && use qt5 ; then
+               elog "To launch VirtualBox just type: \"virtualbox\"."
+       fi
+       elog "You must be in the vboxusers group to use VirtualBox."
+       elog ""
+       elog "The latest user manual is available for download at:"
+       elog "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
+       elog ""
+       elog "For advanced networking setups you should emerge:"
+       elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
+       elog ""
+       elog "Starting with version 4.0.0, ${PN} has USB-1 support."
+       elog "For USB-2 support, PXE-boot ability and VRDP support please emerge"
+       elog "  app-emulation/virtualbox-extpack-oracle"
+       elog "package."
+       elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and"
+       elog "the \"extension\" USE flag. For installation of the guest additions ISO"
+       elog "image, please emerge"
+       elog "  app-emulation/virtualbox-additions"
+       elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge"
+       elog "  app-emulation/virtualbox-extpack-oracle"
+       if ! use udev ; then
+               elog ""
+               elog "WARNING!"
+               elog "Without USE=udev, USB devices will likely not work in ${PN}."
+       elif [[ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ]] ; then
+               elog ""
+               elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
+               elog "or else USB in ${PN} won't work."
+       fi
+}
+
+pkg_postrm() {
+       xdg_pkg_postrm
+}