summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/virtualbox-additions/Manifest2
-rw-r--r--app-emulation/virtualbox-additions/virtualbox-additions-5.2.26.ebuild33
-rw-r--r--app-emulation/virtualbox-additions/virtualbox-additions-6.0.4.ebuild34
-rw-r--r--app-emulation/virtualbox-bin/Manifest7
-rw-r--r--app-emulation/virtualbox-bin/virtualbox-bin-5.2.26.128414.ebuild287
-rw-r--r--app-emulation/virtualbox-bin/virtualbox-bin-6.0.4.128413.ebuild289
-rw-r--r--app-emulation/virtualbox-extpack-oracle/Manifest2
-rw-r--r--app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.26.128414.ebuild42
-rw-r--r--app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.0.4.128413.ebuild43
-rw-r--r--app-emulation/virtualbox-guest-additions/Manifest2
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.26.ebuild228
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.4.ebuild229
-rw-r--r--app-emulation/virtualbox-modules/Manifest2
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-5.2.26.ebuild51
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-6.0.4.ebuild52
-rw-r--r--app-emulation/virtualbox/Manifest2
-rw-r--r--app-emulation/virtualbox/virtualbox-5.2.26.ebuild480
-rw-r--r--app-emulation/virtualbox/virtualbox-6.0.4.ebuild485
18 files changed, 2270 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-additions/Manifest b/app-emulation/virtualbox-additions/Manifest
index d8aaa0e67158..3b1485cc62d5 100644
--- a/app-emulation/virtualbox-additions/Manifest
+++ b/app-emulation/virtualbox-additions/Manifest
@@ -1,4 +1,6 @@
DIST VBoxGuestAdditions_5.2.22.iso 58013696 BLAKE2B 196f0048b685200328bcf753f3df23eac6477ce863885e93a54951795368bf62bdaa497589001ec203d75809b1f74ebbaa80419406d26bc7db43a131f5b9d698 SHA512 b320174b2f2ef796ac2c9c920579be38f0cedaa037d21992863ac355ecf6e99ae2aea56c70fb2034e9e03afac2cd7297f7717b447a6981701755593110164d37
DIST VBoxGuestAdditions_5.2.24.iso 58429440 BLAKE2B ee5b2751238da4372c4164c02e96c5bc6a1dbfb6670f7cd8912415680e99118e65c8f4c765c7d5f9dcf521644a011540e289357fe38e715d6264fa84b5d7ef1b SHA512 e05f75f3a5974efba6f64606d255a03ddf104deec3c300a9369c06d603aa3cbf70b73cdfeda2ce1fcd1c36da472bc190da0ed4e908bd6dbcf857104c99a61b05
+DIST VBoxGuestAdditions_5.2.26.iso 58433536 BLAKE2B 1d7bae647923a57cdcee38a1609a07cd081d593a0852dcf67b549ed178508e93f7ee4d076ac700ab7e7ec828e660eb09cc8a55a0f2400b1ff0912cc2fafdff7f SHA512 fea91c442d3f05a35435155d3a3890e2c29e2523f1106cc8c7fb6513826263ff450e72b393796e0dff99b3bd85d85d8d55309e81f68ddfd39689df8f54bca1fe
DIST VBoxGuestAdditions_6.0.0.iso 79245312 BLAKE2B 413501b62bb6c8a0b1cef8255c631d4bc6c919b3a9c15e0fd780f6196e299f72ede083d51ca8f32bb83ec6d9384f1959c619bc5df67495a23bce503cf45c39e8 SHA512 4064bab634e8ebd75bc80c47ebd9a2596701505e15ebe872e1b599a42588ece307f90febfd474e429cd7e5e4ecf063bc7e37d666c6ae369f8f97b36a0e0ed81d
DIST VBoxGuestAdditions_6.0.2.iso 85905408 BLAKE2B c5ce6d2cc3c15032f5d6733df72f938f2e5b0e996d467464e0229cfd8b8a2ba57f4f3878d94f769f0dfda48b14e426815925d883add6934a2c3f72ac1a41d6cb SHA512 53e82fbec7f1e04f473f0add3a0e03e2abfb9e88b57d7501d28310c36ae26af835d52a76104b31a8a4dc69ff31b6826c7c391622cdf3977df7ab7c4181d0e7dd
+DIST VBoxGuestAdditions_6.0.4.iso 85917696 BLAKE2B 2fa419ef8524b46afb327bd1f5e53bec6df7fa53d6608bb25e5d986d8be9eaf2e0e7a37523beb56981380e8f4ad41ae48eb5ec23505a382c57fda737ec999caf SHA512 ad9afd9941cac771a156071df3a054225643e39059c84abc0c0c2525d0fa32d5bc5a144b1fef367f92e0216f8f9fc73ef961eeead648421ea30465650516bc88
diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-5.2.26.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.26.ebuild
new file mode 100644
index 000000000000..6faf7e7e8a0d
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-5.2.26.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN=VBoxGuestAdditions
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=${MY_PN}_${MY_PV}
+
+DESCRIPTION="CD image containing guest additions for VirtualBox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.iso"
+
+LICENSE="GPL-2+ LGPL-2.1+ MIT SGI-B-2.0 CDDL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror"
+
+RDEPEND="!app-emulation/virtualbox-bin
+ !=app-emulation/virtualbox-9999"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ return 0
+}
+
+src_install() {
+ insinto /usr/share/${PN/-additions}
+ newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
+}
diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-6.0.4.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-6.0.4.ebuild
new file mode 100644
index 000000000000..5124a818a150
--- /dev/null
+++ b/app-emulation/virtualbox-additions/virtualbox-additions-6.0.4.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN=VBoxGuestAdditions
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=${MY_PN}_${MY_PV}
+
+DESCRIPTION="CD image containing guest additions for VirtualBox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.iso"
+
+LICENSE="GPL-2+ LGPL-2.1+ MIT SGI-B-2.0 CDDL"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror"
+
+RDEPEND="!app-emulation/virtualbox-bin
+ !=app-emulation/virtualbox-9999"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ return 0
+}
+
+src_install() {
+ insinto /usr/share/${PN/-additions}
+ newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
+}
diff --git a/app-emulation/virtualbox-bin/Manifest b/app-emulation/virtualbox-bin/Manifest
index 3cb7a5e910da..2ea1d554670a 100644
--- a/app-emulation/virtualbox-bin/Manifest
+++ b/app-emulation/virtualbox-bin/Manifest
@@ -1,14 +1,21 @@
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.22-126460.tar.gz 19640932 BLAKE2B 162ab40da6b2cd30d00e020666a1f4fb026e29af2ca9d6c36c294e5fa299b61ab8fd147f24d2b500426c768808db2c7693c30e88519e695d7759f8eedf1c52c5 SHA512 85b8552668b6580bea24f051ad861c82b9ba32177fb7fa37fe2980d8bab32a84325d02bfa9c8f55c2021a4000ef2546d8996ca8b99ca7fc19f8281a92108dfb0
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.24-128163.tar.gz 19683939 BLAKE2B ce05e159172e34e1d520b3783d77db06aa8f91067cc743beb1eeafaf01508e830f5fe9501cb1f3a6d99492e3046ec2dd2fec94ffd39a237ef4679352492aaa1a SHA512 035103e420d773201ad24093910d7175a5d548f19de4a58900e78e2ebfac711851c99375977ba9fd47fced234346437164d226592b7070a867a1d13fd534a3b5
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.26-128414.tar.gz 19684009 BLAKE2B 81787dcf3b70211fa9c84a40c668100eda0dfd2ce3e1d35c226cb6913ef74027f3444be93069a5e881d8e60905477460a180cb98919050286978edf9c1edcdf3 SHA512 deb4c62d58e2071f4413f0ff769e9ecd756362920b29482a6a3d77566c327b075cb5ecafdc65985305b8b798dc56ca2104a0f8244651fca89c4e15ef879c121e
DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.0-127566.tar.gz 23284806 BLAKE2B 4b34e1640ac74be3acc4cddc6140f77a2e5456ec29c6523fc2fe27c5e7c4652dd28f523b85a6cb17aab52e3594e68ee64cbe2c4cb8edd68f7deda05ed8b9e05d SHA512 cd8cd82bf9cea29f50101c8cccd0b8f699dcc4c4e7e720fe80df82154339b787d154a6376adc9d0f4a3015ec1ee2d67d6575ac5197dfda63af3f758294c165b8
DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.2-128162.tar.gz 23289693 BLAKE2B 13e1ad30b40676ed2e11cf26957377696a9f30a7a92bda0ca5f69039ffebe4abf3bb0224844609a29ac217b227e4d1906c70cd404d3967a26dc0ace3bf4d2ccd SHA512 29b682bf8130f73b25a82e97053847077d9eb48f0510db7fb0cf2e817e1e6b9a6e7ded54ede7447c56aa7b219d32a2d6ee19cb0efbe5c7e0a984c5e137fada51
+DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.4-128413.tar.gz 23290549 BLAKE2B f9ac1a560d5e8b9b73efa21e3623c9f6f0d7769eb4cad7b01d8f68a135a74573659a0a9b092f7ab35beb348ed2722fcf7862aa66e47987b33038f488b88b1129 SHA512 ee54cbdf58de8d37ba84fffd2baec2c9d3915feeab715767515fd6d6ec3032dad2f02509b08cea24754cfce0974a7c1b29c6050bff466af53c1ac6589f4c0215
DIST VirtualBox-5.2.22-126460-Linux_amd64.run 88821201 BLAKE2B 1b0433844247ee9531af915dcbb740183fa29fb296f8c78b4165cc3b48300da71f7d329026983da581ffff0d7b8976a2e5e32d5e948861a557ddfa2437813ea0 SHA512 22b20a68884a114818fcdfe9a459a7c3b1b3598526a74cc66407f5bcdc6eb6bcbe022b820477ccdc081e22349777b73fac9d6126585ee3c8fa0d3d24624006f3
DIST VirtualBox-5.2.22-126460-Linux_x86.run 87817677 BLAKE2B 5f11e5f92386c9524869082cf1a5af413c69fe5b36b1ace58887076000c7b928267eb7c3be22282885d6871ccdcee981ec79a526c71f281f0e8ada5858194851 SHA512 32d44b6d691e33a1ee1426cb7a3cb3648722709c588d177951b8be802546faadfd612567981bbbfed3d782b18260e6e638e7879813f3b06bb5a8387b052b0227
DIST VirtualBox-5.2.24-128163-Linux_amd64.run 89282001 BLAKE2B affd8768878cf25209b7a53dc024ff1798d2c2e007031d40b39c5245df608cc09fdb19c216075b0ec7a4fd63ff580731b1b04838d5d6dc81bd126fed005ea355 SHA512 f22e3c71e5c3f923edc14fbae0191a5d1262426166984e19c784e2b0a332296f949d2a9eeca6972c1f16a0f9573c1f9807c556d4dab2bd500d5b73e22485c7e1
DIST VirtualBox-5.2.24-128163-Linux_x86.run 88391118 BLAKE2B ffc44c55f664e4bc2c2e8bf09d95fda3631541b4b4b1dca7735dd5fcbf12da8258065fa13466ce23229126fb84b0193eee7cd794cf09f631ce124c4fd6558f16 SHA512 a7350a8266c6b3522be91158d765ce31b69acbfd67b6056a96361e0cb48926cee115c8f3df4d1965fd7b082d3f487f9f655253620a8357dbfadfbd2320ad6a3b
+DIST VirtualBox-5.2.26-128414-Linux_amd64.run 89220562 BLAKE2B d937e3a8f622ed1afc8ab7d2479401c6b41f6b1404197b2d86933d741a209071b1bc98de14ea4f25b2b0f2a22a328393908f85955f8879dbf8b28e2b981e4d04 SHA512 c8d7741408d234e7c05709dd0ed66d30b427b0f39976f232b1fe8a17160d36c4dda7d3adda46a38cbdd6626d34570805f582ac0aae2a975385a1f1d06e97f354
+DIST VirtualBox-5.2.26-128414-Linux_x86.run 88339918 BLAKE2B 0fe177a8d9ab4c4cb894151a00f9554713dee27af1fe3036591a0e7865c8869eef17368ab42270d5a9081c849e6550ebef809c3f8f09a9238e2f5a5f0c9e76e5 SHA512 6a809cf29a2cd70bddeca0443955ea10044553ef85744949b604f92a8bca96b9deb1c37f723388d1f27f903c9469e7cb853a0bf7d6928bb18ba61cb19b216fba
DIST VirtualBox-6.0.0-127566-Linux_amd64.run 148766154 BLAKE2B 2e23341dc798aabc1fd696422073516b6f2f70b9bee525ef22528b72abf38acf24599442e5c56d52c24af48f5ae6e2e6cdee981293fc644fac965cc34041a101 SHA512 19b11f7cf62288624739547755a7732b7d355ba61040c7e951ecbaf0ce75252075e8168aa41054e31fa36d45998f1ae1136b65d09981475a3052c4da7fd3021b
DIST VirtualBox-6.0.2-128162-Linux_amd64.run 155114954 BLAKE2B 0159383d2bd3ed0e454e03db61d7466e06b63222da364ae8c8964ac418c2a5de6b78c320c989bc497e6fc98051434d3e480d1bd16e0f92f8ac2fde8a60af088e SHA512 10b0971b81158f80de918f5ae9e0261eaec23ac7b5b3a8117c7d757a3044559648860b70d5688b58bcda1d0bdd36b1df70d5d0c8c1a65c53e1a65112beba1fff
+DIST VirtualBox-6.0.4-128413-Linux_amd64.run 154920406 BLAKE2B 518ef3ee6a5b8d066b9238ea3660cce5898b15471805cdcc508471a8a7b1003d5b4d894a8de5be4e70a67abe77dd05ce7d463603081749836d1e6b58aa43aa04 SHA512 a35cbc5d726acde31939d8729695cb041c8e962af3f4894153e5779af4efa1b260f0f021de9c5a3edc651271e7adfa1818d6b9c1e081155f483cb148555e52b5
DIST VirtualBoxSDK-5.2.22-126460.zip 10154660 BLAKE2B e0a0106f695ca7198d4b2ac5c62bb435fe7934858115dcb3aed57b40d82655bd54cbbae63b279132c23762a227c53affe68131a0bf9452c69dcaf2162b1e4ebf SHA512 1d34b8f7f32602b5656fdb6184e6c35cc54d6ecb36bc41d7df3e154f18c27ea5938635969feb69defe86a53897eee87792514967f15810224ee89e8e523d2b29
DIST VirtualBoxSDK-5.2.24-128163.zip 10153218 BLAKE2B e0a86462396eaa3fb9aa475ab40ee810874f61d3e9f37050b4aba36e6b5150e3699303b7f9989e32e794b9f67de4340ff008fa67339a3c45678005d126a17c27 SHA512 fbc12076ee968a6066f6ac81ff1555e10710d10d7821be24a4b4371a4f4b0409bed2d209904daa2b3f98a7998357558ca158bd76b87c5449815843312b669627
+DIST VirtualBoxSDK-5.2.26-128414.zip 10159276 BLAKE2B 32a9e0a70cc63c8e0daa7080f8e10ac8a514837be98a66b00161cd0c9bf2cc42ef0a11f3a69a742a2f6745b4c8b8fe9e946e18f81cd5ef3ab2f68d5e3c95c568 SHA512 f3d1cc622734ecb0f56fcdf5728fcc747e3b084cb2358d420c55c1acd98d2f24870f0fd18cea430f118f34bca10199526ba195a314d6ce7fb6c4bc8281d89f09
DIST VirtualBoxSDK-6.0.0-127566.zip 10749531 BLAKE2B 98a9d1d85a5d835e9a6d1ed121f6650d795a695bf40fb05af235eba6454237a79487f801d6351f3c446b523001271faac8cc09880522f97cae73360c1179edf5 SHA512 1f25b9249c5e1e0a7caee867b1508f517e16afd23055decfe27a513d1199ebc72bfcd391a8e750403ddb80a4087df7cfd928604b827976d7075829c7e3d82e00
DIST VirtualBoxSDK-6.0.2-128162.zip 10753904 BLAKE2B 52824830e3d816df57932d8812a959dc3590eeabe8b7ba1dc8927d7eac7bea0c4584e0f2d62b405fdb8d5833fc93792dfcd7c2cfc2714237ecb8dbf26be36f11 SHA512 d7d1d60c7ffc4022de16dccc7786bbc4d481cef26e105932158955cc4350d65a6ac5bffa01a319baee5a64f4ae7d016ba50f82128bef6e11e54e72e82e73c168
+DIST VirtualBoxSDK-6.0.4-128413.zip 10755635 BLAKE2B 60333b130adbacc85a84c65ee638effcb6d1a226957c48907df342853b0a9ba4d5632d93858e539fafe2ec28befaa7de584538b46ee83a05789b065a05c3107c SHA512 de2c3e979fe35cda8b433c27f4ce52d5c86e7c0bdfb061a758fce642d4aab908c7c6808c3110ec81d4967977768de95ee8be5cd330d634d3dc9711dd77f17867
diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-5.2.26.128414.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.26.128414.ebuild
new file mode 100644
index 000000000000..e4f534871c4c
--- /dev/null
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-5.2.26.128414.ebuild
@@ -0,0 +1,287 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit xdg-utils gnome2 pax-utils python-r1 udev unpacker eapi7-ver
+
+MAIN_PV="$(ver_cut 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+ MY_PV="${MAIN_PV}_$(ver_cut 5)"
+ MY_PV="${MY_PV/beta/BETA}"
+ MY_PV="${MY_PV/rc/RC}"
+else
+ MY_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(ver_cut 4)"
+VBOX_PV="${MY_PV}-${VBOX_BUILD_ID}"
+MY_P="VirtualBox-${VBOX_PV}-Linux"
+# needed as sometimes the extpack gets another build ID
+EXTP_PV="${VBOX_PV}"
+EXTP_PN="Oracle_VM_VirtualBox_Extension_Pack"
+EXTP_P="${EXTP_PN}-${EXTP_PV}"
+# needed as sometimes the SDK gets another build ID
+SDK_PV="${VBOX_PV}"
+SDK_P="VirtualBoxSDK-${SDK_PV}"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="amd64? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
+ x86? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
+ https://download.virtualbox.org/virtualbox/${MY_PV}/${EXTP_P}.vbox-extpack -> ${EXTP_P}.tar.gz"
+
+LICENSE="GPL-2 PUEL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+additions +chm headless python vboxwebsrv rdesktop-vrdp"
+RESTRICT="mirror"
+
+if [[ "${PV}" != *beta* ]] ; then
+ SRC_URI+="
+ sdk? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${SDK_P}.zip )"
+ IUSE+=" sdk"
+fi
+
+DEPEND="app-arch/unzip
+ ${PYTHON_DEPS}"
+
+RDEPEND="!!app-emulation/virtualbox
+ !app-emulation/virtualbox-additions
+ ~app-emulation/virtualbox-modules-${MAIN_PV}
+ !headless? (
+ dev-libs/glib
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/libpng
+ media-libs/libsdl[X]
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXft
+ x11-libs/libXi
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ chm? ( dev-libs/expat )
+ )
+ dev-libs/libxml2
+ sys-fs/lvm2
+ x11-libs/libXau
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXmu
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libXdmcp
+ ${PYTHON_DEPS}"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+S="${WORKDIR}"
+
+QA_PREBUILT="opt/VirtualBox/*"
+
+PYTHON_UPDATER_IGNORE="1"
+
+src_unpack() {
+ unpack_makeself ${MY_P}_${ARCH}.run
+ unpack ./VirtualBox.tar.bz2
+
+ mkdir "${S}"/${EXTP_PN} || die
+ pushd "${S}"/${EXTP_PN} &>/dev/null || die
+ unpack ${EXTP_P}.tar.gz
+ popd &>/dev/null || die
+
+ if [[ "${PV}" != *beta* ]] && use sdk ; then
+ unpack VirtualBoxSDK-${SDK_PV}.zip
+ fi
+}
+
+src_configure() {
+ :;
+}
+
+src_compile() {
+ :;
+}
+
+src_install() {
+ # create virtualbox configurations files
+ insinto /etc/vbox
+ newins "${FILESDIR}/${PN}-config" vbox.cfg
+
+ if ! use headless ; then
+ newmenu "${FILESDIR}"/${PN}.desktop-2 ${PN}.desktop
+
+ # set up symlinks (bug #572012)
+ dosym ../../../../opt/VirtualBox/virtualbox.xml /usr/share/mime/packages/virtualbox.xml
+
+ local size ico icofile
+ for size in 16 24 32 48 64 72 96 128 256 ; do
+ pushd "${S}"/icons/${size}x${size} &>/dev/null || die
+ if [[ -f "virtualbox.png" ]] ; then
+ doicon -s ${size} virtualbox.png
+ fi
+ for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+ icofile="virtualbox-${ico}.png"
+ if [[ -f "${icofile}" ]] ; then
+ doicon -s ${size} ${icofile}
+ fi
+ done
+ popd &>/dev/null || die
+ done
+ doicon -s scalable "${S}"/icons/scalable/virtualbox.svg
+ insinto /usr/share/pixmaps
+ newins "${S}"/icons/48x48/virtualbox.png ${PN}.png
+ fi
+
+ pushd "${S}"/${EXTP_PN} &>/dev/null || die
+ insinto /opt/VirtualBox/ExtensionPacks/${EXTP_PN}
+ doins -r linux.${ARCH}
+ doins ExtPack* PXE-Intel.rom
+ popd &>/dev/null || die
+ rm -rf "${S}"/${EXTP_PN}
+
+ insinto /opt/VirtualBox
+ dodir /opt/bin
+
+ doins UserManual.pdf
+
+ if [[ "${PV}" != *beta* ]] && use sdk ; then
+ doins -r sdk
+ fi
+
+ if use additions; then
+ doins -r additions
+ fi
+
+ if use vboxwebsrv; then
+ doins vboxwebsrv
+ fowners root:vboxusers /opt/VirtualBox/vboxwebsrv
+ fperms 0750 /opt/VirtualBox/vboxwebsrv
+ dosym ../../opt/VirtualBox/VBox.sh /opt/bin/vboxwebsrv
+ newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+ newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+ fi
+
+ if use rdesktop-vrdp; then
+ doins rdesktop-vrdp
+ doins -r rdesktop-vrdp-keymaps
+ fperms 0750 /opt/VirtualBox/rdesktop-vrdp
+ dosym ../../opt/VirtualBox/rdesktop-vrdp /opt/bin/rdesktop-vrdp
+ fi
+
+ if ! use headless && use chm; then
+ doins kchmviewer VirtualBox.chm
+ fowners root:vboxusers /opt/VirtualBox/kchmviewer
+ fperms 0750 /opt/VirtualBox/kchmviewer
+ fi
+
+ # This ebuild / package supports only py2.7. When py3 comes is unknown.
+ # The compile phase makes VBoxPython2_7.so.
+ # py3 support would presumably require a binary pre-compiled by py3.
+ use python && doins VBoxPython.so VBoxPython2_7.so
+
+ rm -rf src rdesktop* deffiles install* routines.sh runlevel.sh \
+ vboxdrv.sh VBox.sh VBox.png vboxnet.sh additions VirtualBox.desktop \
+ VirtualBox.tar.bz2 LICENSE VBoxSysInfo.sh rdesktop* vboxwebsrv \
+ webtest kchmviewer VirtualBox.chm vbox-create-usb-node.sh \
+ 90-vbox-usb.fdi uninstall.sh vboxshell.py vboxdrv-pardus.py \
+ VBoxPython?_*.so
+
+ if use headless ; then
+ rm -rf VBoxSDL VirtualBox VBoxKeyboard.so
+ fi
+
+ doins -r * || die
+
+ # create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid)
+ dosym ../VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so
+ dosym ../VBoxREM.so /opt/VirtualBox/components/VBoxREM.so
+ dosym ../VBoxRT.so /opt/VirtualBox/components/VBoxRT.so
+ dosym ../VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so
+ dosym ../VBoxXPCOM.so /opt/VirtualBox/components/VBoxXPCOM.so
+
+ local each
+ for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,NetAdpCtl,NetDHCP,NetNAT,TestOGL,ExtPackHelperApp}; do
+ fowners root:vboxusers /opt/VirtualBox/${each}
+ fperms 0750 /opt/VirtualBox/${each}
+ pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+ done
+ # VBoxNetAdpCtl and VBoxNetDHCP binaries need to be suid root in any case..
+ fperms 4750 /opt/VirtualBox/VBoxNetAdpCtl
+ fperms 4750 /opt/VirtualBox/VBoxNetDHCP
+ fperms 4750 /opt/VirtualBox/VBoxNetNAT
+
+ if ! use headless ; then
+ # Hardened build: Mark selected binaries set-user-ID-on-execution
+ for each in VBox{SDL,Headless} VirtualBox; do
+ fowners root:vboxusers /opt/VirtualBox/${each}
+ fperms 4510 /opt/VirtualBox/${each}
+ pax-mark -m "${ED%/}"/opt/VirtualBox/${each}
+ done
+
+ dosym ../VirtualBox/VBox.sh /opt/bin/VirtualBox
+ dosym ../VirtualBox/VBox.sh /opt/bin/VBoxSDL
+ else
+ # Hardened build: Mark selected binaries set-user-ID-on-execution
+ fowners root:vboxusers /opt/VirtualBox/VBoxHeadless
+ fperms 4510 /opt/VirtualBox/VBoxHeadless
+ pax-mark -m "${ED%/}"/opt/VirtualBox/VBoxHeadless
+ fi
+
+ exeinto /opt/VirtualBox
+ newexe "${FILESDIR}/${PN}-3-wrapper" "VBox.sh"
+ fowners root:vboxusers /opt/VirtualBox/VBox.sh
+ fperms 0750 /opt/VirtualBox/VBox.sh
+
+ dosym ../VirtualBox/VBox.sh /opt/bin/VBoxManage
+ dosym ../VirtualBox/VBox.sh /opt/bin/VBoxVRDP
+ dosym ../VirtualBox/VBox.sh /opt/bin/VBoxHeadless
+ dosym ../VirtualBox/VBoxTunctl /opt/bin/VBoxTunctl
+
+ # set an env-variable for 3rd party tools
+ echo -n "VBOX_APP_HOME=/opt/VirtualBox" > "${T}/90virtualbox"
+ doenvd "${T}/90virtualbox"
+
+ local udevdir="$(get_udevdir)"
+ insinto ${udevdir}/rules.d
+ doins "${FILESDIR}"/10-virtualbox.rules
+ sed "s@%UDEVDIR%@${udevdir}@" \
+ -i "${ED%/}"${udevdir}/rules.d/10-virtualbox.rules || die
+ # move udev scripts into ${udevdir} (bug #372491)
+ mv "${ED%/}"/opt/VirtualBox/VBoxCreateUSBNode.sh "${ED%/}"${udevdir} || die
+ fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+
+ gnome2_icon_cache_update
+
+ udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
+
+ elog ""
+ if ! use headless ; then
+ elog "To launch VirtualBox just type: \"VirtualBox\""
+ elog ""
+ fi
+ elog "You must be in the vboxusers group to use VirtualBox."
+ elog ""
+ elog "For advanced networking setups you should emerge:"
+ elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
+ elog ""
+ elog "Please visit http://www.virtualbox.org/wiki/Editions for"
+ elog "an overview about the different features of ${PN}"
+ elog "and virtualbox-ose"
+ if [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
+ elog ""
+ elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
+ elog "or else USB in ${PN} won't work."
+ fi
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+}
diff --git a/app-emulation/virtualbox-bin/virtualbox-bin-6.0.4.128413.ebuild b/app-emulation/virtualbox-bin/virtualbox-bin-6.0.4.128413.ebuild
new file mode 100644
index 000000000000..871816079601
--- /dev/null
+++ b/app-emulation/virtualbox-bin/virtualbox-bin-6.0.4.128413.ebuild
@@ -0,0 +1,289 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit xdg-utils gnome2 pax-utils python-r1 udev unpacker eapi7-ver
+
+MAIN_PV="$(ver_cut 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+ MY_PV="${MAIN_PV}_$(ver_cut 5-6)"
+ MY_PV="${MY_PV/beta/BETA}"
+ MY_PV="${MY_PV/rc/RC}"
+else
+ MY_PV="${MAIN_PV}"
+ KEYWORDS="~amd64" #~x86
+fi
+VBOX_BUILD_ID="$(ver_cut 4)"
+VBOX_PV="${MY_PV}-${VBOX_BUILD_ID}"
+MY_P="VirtualBox-${VBOX_PV}-Linux"
+# needed as sometimes the extpack gets another build ID
+EXTP_PV="${VBOX_PV}"
+EXTP_PN="Oracle_VM_VirtualBox_Extension_Pack"
+EXTP_P="${EXTP_PN}-${EXTP_PV}"
+# needed as sometimes the SDK gets another build ID
+SDK_PV="${VBOX_PV}"
+SDK_P="VirtualBoxSDK-${SDK_PV}"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="amd64? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_amd64.run )
+ https://download.virtualbox.org/virtualbox/${MY_PV}/${EXTP_P}.vbox-extpack -> ${EXTP_P}.tar.gz"
+ #x86? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}_x86.run )
+
+LICENSE="GPL-2 PUEL"
+SLOT="0"
+IUSE="+additions +chm headless python vboxwebsrv rdesktop-vrdp"
+RESTRICT="mirror"
+
+if [[ "${PV}" != *beta* ]] ; then
+ SRC_URI+="
+ sdk? ( https://download.virtualbox.org/virtualbox/${MY_PV}/${SDK_P}.zip )"
+ IUSE+=" sdk"
+fi
+
+DEPEND="app-arch/unzip
+ ${PYTHON_DEPS}"
+
+RDEPEND="!!app-emulation/virtualbox
+ !app-emulation/virtualbox-additions
+ ~app-emulation/virtualbox-modules-${MAIN_PV}
+ !headless? (
+ dev-libs/glib
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/libpng
+ media-libs/libsdl[X]
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXft
+ x11-libs/libXi
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ chm? ( dev-libs/expat )
+ )
+ dev-libs/libxml2
+ sys-fs/lvm2
+ x11-libs/libXau
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXmu
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libXdmcp
+ ${PYTHON_DEPS}"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+S="${WORKDIR}"
+
+QA_PREBUILT="opt/VirtualBox/*"
+
+PYTHON_UPDATER_IGNORE="1"
+
+src_unpack() {
+ unpack_makeself ${MY_P}_${ARCH}.run
+ unpack ./VirtualBox.tar.bz2
+
+ mkdir "${S}"/${EXTP_PN} || die
+ pushd "${S}"/${EXTP_PN} &>/dev/null || die
+ unpack ${EXTP_P}.tar.gz
+ popd &>/dev/null || die
+
+ if [[ "${PV}" != *beta* ]] && use sdk ; then
+ unpack VirtualBoxSDK-${SDK_PV}.zip
+ fi
+}
+
+src_configure() {
+ :;
+}
+
+src_compile() {
+ :;
+}
+
+src_install() {
+ # create virtualbox configurations files
+ insinto /etc/vbox
+ newins "${FILESDIR}/${PN}-config" vbox.cfg
+
+ if ! use headless ; then
+ newmenu "${FILESDIR}"/${PN}.desktop-2 ${PN}.desktop
+
+ # set up symlinks (bug #572012)
+ dosym ../../../../opt/VirtualBox/virtualbox.xml /usr/share/mime/packages/virtualbox.xml
+
+ local size ico icofile
+ for size in 16 24 32 48 64 72 96 128 256 ; do
+ pushd "${S}"/icons/${size}x${size} &>/dev/null || die
+ if [[ -f "virtualbox.png" ]] ; then
+ doicon -s ${size} virtualbox.png
+ fi
+ for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+ icofile="virtualbox-${ico}.png"
+ if [[ -f "${icofile}" ]] ; then
+ doicon -s ${size} ${icofile}
+ fi
+ done
+ popd &>/dev/null || die
+ done
+ doicon -s scalable "${S}"/icons/scalable/virtualbox.svg
+ insinto /usr/share/pixmaps
+ newins "${S}"/icons/48x48/virtualbox.png ${PN}.png
+ fi
+
+ pushd "${S}"/${EXTP_PN} &>/dev/null || die
+ insinto /opt/VirtualBox/ExtensionPacks/${EXTP_PN}
+ doins -r linux.${ARCH}
+ doins ExtPack* PXE-Intel.rom
+ popd &>/dev/null || die
+ rm -rf "${S}"/${EXTP_PN}
+
+ insinto /opt/VirtualBox
+ dodir /opt/bin
+
+ doins UserManual.pdf
+
+ if [[ "${PV}" != *beta* ]] && use sdk ; then
+ doins -r sdk
+ fi
+
+ if use additions; then
+ doins -r additions
+ fi
+
+ if use vboxwebsrv; then
+ doins vboxwebsrv
+ fowners root:vboxusers /opt/VirtualBox/vboxwebsrv
+ fperms 0750 /opt/VirtualBox/vboxwebsrv
+ dosym ../../opt/VirtualBox/VBox.sh /opt/bin/vboxwebsrv
+ newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+ newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+ fi
+
+ if use rdesktop-vrdp; then
+ doins rdesktop-vrdp
+ doins -r rdesktop-vrdp-keymaps
+ fperms 0750 /opt/VirtualBox/rdesktop-vrdp
+ dosym ../../opt/VirtualBox/rdesktop-vrdp /opt/bin/rdesktop-vrdp
+ fi
+
+ if ! use headless && use chm; then
+ doins kchmviewer VirtualBox.chm
+ fowners root:vboxusers /opt/VirtualBox/kchmviewer
+ fperms 0750 /opt/VirtualBox/kchmviewer
+ fi
+
+ # This ebuild / package supports only py2.7. When py3 comes is unknown.
+ # The compile phase makes VBoxPython2_7.so.
+ # py3 support would presumably require a binary pre-compiled by py3.
+ use python && doins VBoxPython.so
+
+ rm -rf src rdesktop* deffiles install* routines.sh runlevel.sh \
+ vboxdrv.sh VBox.sh VBox.png vboxnet.sh additions VirtualBox.desktop \
+ VirtualBox.tar.bz2 LICENSE VBoxSysInfo.sh rdesktop* vboxwebsrv \
+ webtest kchmviewer VirtualBox.chm vbox-create-usb-node.sh \
+ 90-vbox-usb.fdi uninstall.sh vboxshell.py vboxdrv-pardus.py \
+ VBoxPython?_*.so
+
+ if use headless ; then
+ rm -rf VBoxSDL VirtualBox{,VM} VBoxKeyboard.so
+ fi
+
+ doins -r * || die
+
+ # create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid)
+ dosym ../VBoxVMM.so /opt/VirtualBox/components/VBoxVMM.so
+ dosym ../VBoxREM.so /opt/VirtualBox/components/VBoxREM.so
+ dosym ../VBoxRT.so /opt/VirtualBox/components/VBoxRT.so
+ dosym ../VBoxDDU.so /opt/VirtualBox/components/VBoxDDU.so
+ dosym ../VBoxXPCOM.so /opt/VirtualBox/components/VBoxXPCOM.so
+
+ local each
+ for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,TestOGL,ExtPackHelperApp} 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} 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_desktop_database_update
+
+ gnome2_icon_cache_update
+
+ udevadm control --reload-rules && udevadm trigger --subsystem-match=usb
+
+ elog ""
+ if ! use headless ; then
+ elog "To launch VirtualBox just type: \"VirtualBox\""
+ elog ""
+ fi
+ elog "You must be in the vboxusers group to use VirtualBox."
+ elog ""
+ elog "For advanced networking setups you should emerge:"
+ elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
+ elog ""
+ elog "Please visit http://www.virtualbox.org/wiki/Editions for"
+ elog "an overview about the different features of ${PN}"
+ elog "and virtualbox-ose"
+ if [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
+ elog ""
+ elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
+ elog "or else USB in ${PN} won't work."
+ fi
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+}
diff --git a/app-emulation/virtualbox-extpack-oracle/Manifest b/app-emulation/virtualbox-extpack-oracle/Manifest
index 289cf7488345..5193f42c7408 100644
--- a/app-emulation/virtualbox-extpack-oracle/Manifest
+++ b/app-emulation/virtualbox-extpack-oracle/Manifest
@@ -1,4 +1,6 @@
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.22-126460.tar.gz 19640932 BLAKE2B 162ab40da6b2cd30d00e020666a1f4fb026e29af2ca9d6c36c294e5fa299b61ab8fd147f24d2b500426c768808db2c7693c30e88519e695d7759f8eedf1c52c5 SHA512 85b8552668b6580bea24f051ad861c82b9ba32177fb7fa37fe2980d8bab32a84325d02bfa9c8f55c2021a4000ef2546d8996ca8b99ca7fc19f8281a92108dfb0
DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.24-128163.tar.gz 19683939 BLAKE2B ce05e159172e34e1d520b3783d77db06aa8f91067cc743beb1eeafaf01508e830f5fe9501cb1f3a6d99492e3046ec2dd2fec94ffd39a237ef4679352492aaa1a SHA512 035103e420d773201ad24093910d7175a5d548f19de4a58900e78e2ebfac711851c99375977ba9fd47fced234346437164d226592b7070a867a1d13fd534a3b5
+DIST Oracle_VM_VirtualBox_Extension_Pack-5.2.26-128414.tar.gz 19684009 BLAKE2B 81787dcf3b70211fa9c84a40c668100eda0dfd2ce3e1d35c226cb6913ef74027f3444be93069a5e881d8e60905477460a180cb98919050286978edf9c1edcdf3 SHA512 deb4c62d58e2071f4413f0ff769e9ecd756362920b29482a6a3d77566c327b075cb5ecafdc65985305b8b798dc56ca2104a0f8244651fca89c4e15ef879c121e
DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.0-127566.tar.gz 23284806 BLAKE2B 4b34e1640ac74be3acc4cddc6140f77a2e5456ec29c6523fc2fe27c5e7c4652dd28f523b85a6cb17aab52e3594e68ee64cbe2c4cb8edd68f7deda05ed8b9e05d SHA512 cd8cd82bf9cea29f50101c8cccd0b8f699dcc4c4e7e720fe80df82154339b787d154a6376adc9d0f4a3015ec1ee2d67d6575ac5197dfda63af3f758294c165b8
DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.2-128162.tar.gz 23289693 BLAKE2B 13e1ad30b40676ed2e11cf26957377696a9f30a7a92bda0ca5f69039ffebe4abf3bb0224844609a29ac217b227e4d1906c70cd404d3967a26dc0ace3bf4d2ccd SHA512 29b682bf8130f73b25a82e97053847077d9eb48f0510db7fb0cf2e817e1e6b9a6e7ded54ede7447c56aa7b219d32a2d6ee19cb0efbe5c7e0a984c5e137fada51
+DIST Oracle_VM_VirtualBox_Extension_Pack-6.0.4-128413.tar.gz 23290549 BLAKE2B f9ac1a560d5e8b9b73efa21e3623c9f6f0d7769eb4cad7b01d8f68a135a74573659a0a9b092f7ab35beb348ed2722fcf7862aa66e47987b33038f488b88b1129 SHA512 ee54cbdf58de8d37ba84fffd2baec2c9d3915feeab715767515fd6d6ec3032dad2f02509b08cea24754cfce0974a7c1b29c6050bff466af53c1ac6589f4c0215
diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.26.128414.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.26.128414.ebuild
new file mode 100644
index 000000000000..e598ba638113
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-5.2.26.128414.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib
+
+MAIN_PV="$(ver_cut 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+ MY_PV="${MAIN_PV}_$(ver_cut 5)"
+ DEP_PV="${MY_PV}"
+ MY_PV="${MY_PV/beta/BETA}"
+ MY_PV="${MY_PV/rc/RC}"
+else
+ MY_PV="${MAIN_PV}"
+ DEP_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(ver_cut 4)"
+MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
+MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
+
+DESCRIPTION="PUEL extensions for VirtualBox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.vbox-extpack -> ${MY_P}.tar.gz"
+
+LICENSE="PUEL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror strip"
+
+RDEPEND="~app-emulation/virtualbox-${DEP_PV}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/usr/lib*/virtualbox/ExtensionPacks/${MY_PN}/.*"
+
+src_install() {
+ insinto /usr/$(get_libdir)/virtualbox/ExtensionPacks/${MY_PN}
+ doins -r linux.${ARCH}
+ doins ExtPack* PXE-Intel.rom
+}
diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.0.4.128413.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.0.4.128413.ebuild
new file mode 100644
index 000000000000..a260ead1a63b
--- /dev/null
+++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.0.4.128413.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib
+
+MAIN_PV="$(ver_cut 1-3)"
+if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
+ MY_PV="${MAIN_PV}_$(ver_cut 5-6)"
+ DEP_PV="${MY_PV}"
+ MY_PV="${MY_PV/beta/BETA}"
+ MY_PV="${MY_PV/rc/RC}"
+else
+ MY_PV="${MAIN_PV}"
+ DEP_PV="${MAIN_PV}"
+fi
+VBOX_BUILD_ID="$(ver_cut 4)"
+MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
+MY_P="${MY_PN}-${MY_PV}-${VBOX_BUILD_ID}"
+
+DESCRIPTION="PUEL extensions for VirtualBox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.vbox-extpack -> ${MY_P}.tar.gz"
+
+LICENSE="PUEL"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="mirror strip"
+
+RDEPEND="~app-emulation/virtualbox-${DEP_PV}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/usr/lib*/virtualbox/ExtensionPacks/${MY_PN}/.*"
+
+src_install() {
+ insinto /usr/$(get_libdir)/virtualbox/ExtensionPacks/${MY_PN}
+ doins -r linux.${ARCH}
+ doins ExtPack* PXE-Intel.rom
+}
diff --git a/app-emulation/virtualbox-guest-additions/Manifest b/app-emulation/virtualbox-guest-additions/Manifest
index f15d100c7ab2..1402276ac647 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -1,6 +1,8 @@
DIST VirtualBox-5.2.22.tar.bz2 118757134 BLAKE2B be795cdbfb09d3d443f63e190b63898239622f5a57aefdd90f382d9a849d09cc1abc2624071fbc60b2c04a12f33376184540cc362c19225733f99a3bcc8ff6a3 SHA512 4f6c4611a3114778f45419587dc1519ca07410c1ea6474cdb18ecd3b068639a4fdac3f25146fe9b8e006e30f19eba134ce9f665182008b033f6f78497e1ea722
DIST VirtualBox-5.2.24.tar.bz2 118369194 BLAKE2B 2073ec85a641ae80113d41e8363401da5afaf6ea442c2a3c537341f39e06a03a7175463605133e642988f72c4adde4f987905c08f4ba58460953af7169cb4ca0 SHA512 2de5a19ff6aff56a4f7e7b9d7d39b3e787d2ac30d448e3313e915b1cde4b2eedccab44c7a195412efb9e9a6de3c1fb3ee96bde57af93f9ef8f317ffa8b7d4410
+DIST VirtualBox-5.2.26.tar.bz2 118371765 BLAKE2B 32413b72e33f2f63835a2eb2d47dc75a7b63121934bdffd51ff58e9d63d68b77b4f8dac4605916ba8bd6896240d00024ccc3d7d002d4f6f92d6d9b1dc35995e3 SHA512 aee334c74bd02772ac5e0528d84d31661f61c775d0993c00febe125810efc78a2f779db41bf66283be51b19a35540fee14445bada59a8d3b7affa6ef6645005f
DIST VirtualBox-6.0.0.tar.bz2 154322106 BLAKE2B 952e857e5bd6f612272b7bc399af5596d4eb4f13c429c93be7f9e6c4b58e535fe0492806fd51fd5a3f22653f0a42abb2a25ce6b67b5b4712d7e88e34b68eb8cf SHA512 fbe193a3c4dfef943bd75e894452cc684e794e5fa2b25d0292f7fb3e84d5f1a890fe0a3a91dbae9a9b90ec87f12cb3d868457e1767a5841964568cf13a189561
DIST VirtualBox-6.0.2.tar.bz2 155125777 BLAKE2B 2d902fd1963305883eebba85daa03bd17fe8a9ba20e7a6482508879068a809ee80c4a5caffeb26acd0fd4ad29f6f60cf963e1d314e4b01f137ede5b589a74cb9 SHA512 9cfc03eae073ada47c050d2a5eeefa6f724ad2094f2bc3717aa010553ab0dd5af0ed0860bf120727491c7798cdff9219e53cdc3d629f61e3cd12c55068e7401b
+DIST VirtualBox-6.0.4.tar.bz2 155233564 BLAKE2B 6bc4d450e275e8aac5dc62ab05d9ba1450e13965f3eba64819315d121bd0e515319be2ad92ab429f2e598e157e89660561de69a2aac87e14792284669bcec7e8 SHA512 c2e5418bafd5d50b46e1bc70280753c2fdfbf7248d782fc398771839950fb575eaea437e9699d56f4d8c92ea4dc9ba8bed74379565dac6114f7e9c45aecc9fdb
DIST virtualbox-5.2.16-patches-02.tar.xz 3152 BLAKE2B c8d8f3872f544a465c7d1aa07291599307120ac9eabfb299ddd788a11f85ca6c2d84b8e7306ee4ad436270dad0dd39f101ee68a549eac15afd1e3cdc03f23c6c SHA512 85ee8c4045de562d71ab2d761695ea48b6726a6f0c4bcaa2562bb0d147542d3f1a1b5b47cf593a7f22dac1b86f87b59a56bef421dce3e1fa8e5260cd41998450
DIST virtualbox-6.0.0_beta2-patches-01.tar.xz 2732 BLAKE2B a138e715d99f135f16ca21c92781bf6cd8913f7f766bb598eddcd63e98280e568e646f56bbd0a3714f273457ca90db0b77ec7940ba25028506a22891f1af7b2d SHA512 954e4b40d6e272efe756ee0965adb4110d45f764433a89080fda7ebaebbc20031f86a3e0027dfdaa1c6a7d6379a1af557cea71512504e4b57b5f5adbfc86b56e
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.26.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.26.ebuild
new file mode 100644
index 000000000000..5780804c8c4e
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.26.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-mod systemd user toolchain-funcs
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P="VirtualBox-${MY_PV}"
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-5.2.16-patches-02.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+RDEPEND="
+ X? ( x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libXmu
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXext
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libSM
+ x11-libs/libICE )
+ sys-apps/dbus
+"
+DEPEND="
+ ${RDEPEND}
+ >=dev-util/kbuild-0.1.9998.3127
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-libs/pam
+ sys-power/iasl
+ x11-base/xorg-proto
+"
+PDEPEND="
+ X? ( x11-drivers/xf86-video-vboxvideo )
+"
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest)
+ vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)"
+ use X && MODULE_NAMES+=" vboxvideo(misc:${WORKDIR}/vboxvideo::${WORKDIR}/vboxvideo)"
+
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # Create and unpack a tarball with the sources of the Linux guest
+ # kernel modules, to include all the needed files
+ "${S}"/src/VBox/Additions/linux/export_modules.sh "${WORKDIR}/vbox-kmod.tar.gz"
+ unpack ./vbox-kmod.tar.gz
+
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ cd "${S}"
+ rm -rf kBuild/bin tools
+}
+
+src_prepare() {
+ # PaX fixes (see bug #298988)
+ pushd "${WORKDIR}" &>/dev/null || die
+ eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch
+ popd &>/dev/null || die
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+ use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
+
+ # stupid new header references...
+ local vboxheader mdir
+ for vboxheader in {product,revision,version}-generated.h ; do
+ for mdir in vbox{guest,sf} ; do
+ ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
+ "${WORKDIR}/${mdir}/${vboxheader}"
+ done
+ done
+
+ # Remove pointless GCC version check
+ sed -e '/^check_gcc$/d' -i configure || die
+
+ rm "${WORKDIR}/patches/008_virtualbox-4.3.14-missing_define.patch" || die
+ eapply "${WORKDIR}/patches"
+
+ eapply_user
+}
+
+src_configure() {
+ # build the user-space tools, warnings are harmless
+ local cmd=(
+ ./configure
+ --nofatal
+ --disable-xpcom
+ --disable-sdl-ttf
+ --disable-pulse
+ --disable-alsa
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+ --target-arch=${ARCH}
+ --with-linux="${KV_OUT_DIR}"
+ --build-headless
+ )
+ echo "${cmd[@]}"
+ "${cmd[@]}" || die "configure failed"
+ source ./env.sh
+ export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_compile() {
+ MAKE="kmk" \
+ emake TOOL_YASM_AS=yasm \
+ VBOX_ONLY_ADDITIONS=1 \
+ KBUILD_VERBOSE=2
+
+ # Now creating the kernel modules. We must do this _after_
+ # we compiled the user-space tools as we need two of the
+ # automatically generated header files. (>=3.2.0)
+ linux-mod_src_compile
+}
+
+src_install() {
+ linux-mod_src_install
+
+ cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
+
+ insinto /sbin
+ newins mount.vboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
+
+ insinto /usr/sbin/
+ newins VBoxService vboxguest-service
+ fperms 0755 /usr/sbin/vboxguest-service
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 0755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use X ; then
+ doins VBoxClient
+ fperms 0755 /usr/bin/VBoxClient
+
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
+ || die
+ newins 98vboxadd-xclient VBoxClient-all
+ fperms 0755 /usr/bin/VBoxClient-all
+ popd &>/dev/null || die
+ fi
+
+ # udev rule for vboxdrv
+ local udev_rules_dir="/lib/udev/rules.d"
+ dodir ${udev_rules_dir}
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED%/}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED%/}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+
+ # VBoxClient autostart file
+ insinto /etc/xdg/autostart
+ doins "${FILESDIR}"/vboxclient.desktop
+
+ # sample xorg.conf
+ insinto /usr/share/doc/${PF}
+ doins "${FILESDIR}"/xorg.conf.vbox
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_preinst() {
+ enewgroup vboxguest
+ enewuser vboxguest -1 /bin/sh /dev/null vboxguest
+ # automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+ enewgroup vboxsf
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ if ! use X ; then
+ elog "use flag X is off, enable it to install the"
+ elog "X Window System video driver."
+ fi
+ elog ""
+ elog "Please add users to the \"vboxguest\" group so they can"
+ elog "benefit from seamless mode, auto-resize and clipboard."
+ elog ""
+ elog "The vboxsf group has been added to make automount services work."
+ elog "These services are part of the shared folders support."
+ elog ""
+ elog "Please add:"
+ elog "/etc/init.d/${PN}"
+ elog "to the default runlevel in order to start"
+ elog "needed services."
+ elog "To use the VirtualBox X driver, use the following"
+ elog "file as your /etc/X11/xorg.conf:"
+ elog " /usr/share/doc/${PF}/xorg.conf.vbox"
+ elog ""
+ elog "Also make sure you use the Mesa library for OpenGL:"
+ elog " eselect opengl set xorg-x11"
+ elog ""
+ elog "An autostart .desktop file has been installed to start"
+ elog "VBoxClient in desktop sessions."
+ elog ""
+ elog "You can mount shared folders with:"
+ elog " mount -t vboxsf <shared_folder_name> <mount_point>"
+ elog ""
+ elog "Warning:"
+ elog "this ebuild is only needed if you are running gentoo"
+ elog "inside a VirtualBox Virtual Machine, you don't need"
+ elog "it to run VirtualBox itself."
+ elog ""
+}
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.4.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.4.ebuild
new file mode 100644
index 000000000000..1cda2a1f29f4
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.4.ebuild
@@ -0,0 +1,229 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-mod systemd user toolchain-funcs
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P="VirtualBox-${MY_PV}"
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-6.0.0_beta2-patches-01.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+RDEPEND="
+ X? ( x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libXmu
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXext
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libSM
+ x11-libs/libICE )
+ sys-apps/dbus
+"
+DEPEND="
+ ${RDEPEND}
+ >=dev-util/kbuild-0.1.9998.3127
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-libs/pam
+ sys-power/iasl
+ x11-base/xorg-proto
+"
+PDEPEND="
+ X? ( x11-drivers/xf86-video-vboxvideo )
+"
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest)
+ vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)"
+ use X && MODULE_NAMES+=" vboxvideo(misc:${WORKDIR}/vboxvideo::${WORKDIR}/vboxvideo)"
+
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # Create and unpack a tarball with the sources of the Linux guest
+ # kernel modules, to include all the needed files
+ "${S}"/src/VBox/Additions/linux/export_modules.sh "${WORKDIR}/vbox-kmod.tar.gz"
+ unpack ./vbox-kmod.tar.gz
+
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ cd "${S}"
+ rm -rf kBuild/bin tools
+}
+
+src_prepare() {
+ # PaX fixes (see bug #298988)
+ pushd "${WORKDIR}" &>/dev/null || die
+ eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch
+ popd &>/dev/null || die
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+ use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
+
+ # stupid new header references...
+ local vboxheader mdir
+ for vboxheader in {product,revision,version}-generated.h ; do
+ for mdir in vbox{guest,sf} ; do
+ ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
+ "${WORKDIR}/${mdir}/${vboxheader}"
+ done
+ done
+
+ # Remove pointless GCC version check
+ sed -e '/^check_gcc$/d' -i configure || die
+
+ rm "${WORKDIR}/patches/010_virtualbox-5.2.12-qt511.patch" || die
+ eapply "${WORKDIR}/patches"
+
+ eapply_user
+}
+
+src_configure() {
+ # build the user-space tools, warnings are harmless
+ local cmd=(
+ ./configure
+ --nofatal
+ --disable-xpcom
+ --disable-sdl-ttf
+ --disable-pulse
+ --disable-alsa
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+ --target-arch=${ARCH}
+ --with-linux="${KV_OUT_DIR}"
+ --build-headless
+ )
+ echo "${cmd[@]}"
+ "${cmd[@]}" || die "configure failed"
+ source ./env.sh
+ export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_compile() {
+ MAKE="kmk" \
+ emake TOOL_YASM_AS=yasm \
+ VBOX_ONLY_ADDITIONS=1 \
+ KBUILD_VERBOSE=2
+
+ # Now creating the kernel modules. We must do this _after_
+ # we compiled the user-space tools as we need two of the
+ # automatically generated header files. (>=3.2.0)
+ linux-mod_src_compile
+}
+
+src_install() {
+ linux-mod_src_install
+
+ cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
+
+ insinto /sbin
+ newins mount.vboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
+
+ insinto /usr/sbin/
+ newins VBoxService vboxguest-service
+ fperms 0755 /usr/sbin/vboxguest-service
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 0755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use X ; then
+ doins VBoxClient
+ fperms 0755 /usr/bin/VBoxClient
+
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
+ || die
+ newins 98vboxadd-xclient VBoxClient-all
+ fperms 0755 /usr/bin/VBoxClient-all
+ popd &>/dev/null || die
+ fi
+
+ # udev rule for vboxdrv
+ local udev_rules_dir="/lib/udev/rules.d"
+ dodir ${udev_rules_dir}
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED%/}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED%/}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+
+ # VBoxClient autostart file
+ insinto /etc/xdg/autostart
+ doins "${FILESDIR}"/vboxclient.desktop
+
+ # sample xorg.conf
+ insinto /usr/share/doc/${PF}
+ doins "${FILESDIR}"/xorg.conf.vbox
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_preinst() {
+ enewgroup vboxguest
+ enewuser vboxguest -1 /bin/sh /dev/null vboxguest
+ # automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+ enewgroup vboxsf
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+ if ! use X ; then
+ elog "use flag X is off, enable it to install the"
+ elog "X Window System video driver."
+ fi
+ elog ""
+ elog "Please add users to the \"vboxguest\" group so they can"
+ elog "benefit from seamless mode, auto-resize and clipboard."
+ elog ""
+ elog "The vboxsf group has been added to make automount services work."
+ elog "These services are part of the shared folders support."
+ elog ""
+ elog "Please add:"
+ elog "/etc/init.d/${PN}"
+ elog "to the default runlevel in order to start"
+ elog "needed services."
+ elog "To use the VirtualBox X driver, use the following"
+ elog "file as your /etc/X11/xorg.conf:"
+ elog " /usr/share/doc/${PF}/xorg.conf.vbox"
+ elog ""
+ elog "Also make sure you use the Mesa library for OpenGL:"
+ elog " eselect opengl set xorg-x11"
+ elog ""
+ elog "An autostart .desktop file has been installed to start"
+ elog "VBoxClient in desktop sessions."
+ elog ""
+ elog "You can mount shared folders with:"
+ elog " mount -t vboxsf <shared_folder_name> <mount_point>"
+ elog ""
+ elog "Warning:"
+ elog "this ebuild is only needed if you are running gentoo"
+ elog "inside a VirtualBox Virtual Machine, you don't need"
+ elog "it to run VirtualBox itself."
+ elog ""
+}
diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest
index 5a6e05cde213..6277b66860c8 100644
--- a/app-emulation/virtualbox-modules/Manifest
+++ b/app-emulation/virtualbox-modules/Manifest
@@ -1,4 +1,6 @@
DIST vbox-kernel-module-src-5.2.22.tar.xz 638492 BLAKE2B 71aba29b056bb3dfeffbf4632fbf7f15d89b988267ba24c766b78b1d9c50a4d27fb1b8e699108b973af68024f9f77ca0a8ad787355d7342fe1400f14189487ff SHA512 3361bb536af8e8d490377be04d1b1b9af478538e23ec409d3e0205ad930c16e5228c57ae7d92d214ac533ae64298d9eaff3c9284ff9bb308108d1ad7d69fb507
DIST vbox-kernel-module-src-5.2.24.tar.xz 642124 BLAKE2B fbf077b1d94f0b2f6ccb1a9a9f2e9b6f2b02153659f60a28bf3905bbd9aca762bcdbbe1a96ff602048a4d43eb61b8195c1c511bea7248d0593efd7972a17fc5b SHA512 ba0dc0ba4964eb17c421f624e321369a96564f08daa7e6949db9cbde2a182cd29a51f7b0a3215938789bb61e2427cbd38e318e5d909fd54d243ef764f51eb0e4
+DIST vbox-kernel-module-src-5.2.26.tar.xz 642096 BLAKE2B fa908b8dda4c49e880005f22d4ec159ba4e84b20d3cf8f514ec5ad0ea556499b0df25fb714bb5f9a3474e6fc1cba67f6d56fddaee748b9561bbe31a003dd0657 SHA512 7f37be1b35772d59cd3df9b61dec436450de3c038faf2cd22fb891fee7270aa7f87f146f72497ffeb63dfe869cccd3f2788562d23fc51afd83ca19159f2a6810
DIST vbox-kernel-module-src-6.0.0.tar.xz 666352 BLAKE2B 51309dd9fddb1e26e8fce55bae018d96569a28ce1d6850e2b13b47829d0336671d23962191ff4eda0f846c073a94a1d30fa67bb5e5b73f1fda63b6f06acc1225 SHA512 c0c26f2544580e16c525db997a5a3b2cbe1b84b0418cf099d12c67bc72ff7c79b30fe74793d10c710db6a03640ccb5935fbb9df55c2d8aea435beafe0de94385
DIST vbox-kernel-module-src-6.0.2.tar.xz 665352 BLAKE2B 703291334afb8662211dfc5223d66dafa496612ca917637b2d34f6d38475287a1eed00e484965c670da236fdfcc558e0c7ebd081be1f6674603af2c0b6bda549 SHA512 c05f3e89b2fc5a504e77f0617dbe9ccde8de6d9b06e4c2f6d59d90f362b2d5a8207d64b16a8c767e63066a04236934664dfd452b23f4c5a2c4a3b301e07212c9
+DIST vbox-kernel-module-src-6.0.4.tar.xz 666200 BLAKE2B b7a6911a8534ae9e7db5a90fecfaf58394bf61ff1ee925302fdea46443e603535d1508b638c7c3f2440c0fe1176ca85d2f063f99632eb1a9093a9367f2e49fdc SHA512 565d635683f8a5f32c18b1bbf41b38bcab549a019cf0977c8dfbb53310494fb261e485ac11eb48e546c3c4b6ed13b3fb1628013dbc101f042ee9a61b8168122a
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.26.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.26.ebuild
new file mode 100644
index 000000000000..c4b01a1b3f96
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.26.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+# package that comes from virtualbox-bin
+
+EAPI=7
+
+inherit linux-mod user
+
+MY_P="vbox-kernel-module-src-${PV}"
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="pax_kernel"
+
+RDEPEND="!=app-emulation/virtualbox-9999"
+
+S="${WORKDIR}"
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
+
+pkg_setup() {
+ enewgroup vboxusers
+ linux-mod_pkg_setup
+ BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
+}
+
+src_prepare() {
+ if use pax_kernel && kernel_is -ge 3 0 0 ; then
+ eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch
+ fi
+
+ default
+}
+
+src_install() {
+ linux-mod_src_install
+ insinto /usr/lib/modules-load.d/
+ doins "${FILESDIR}"/virtualbox.conf
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+}
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.0.4.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.4.ebuild
new file mode 100644
index 000000000000..7257cb3b5812
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.4.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# XXX: the tarball here is just the kernel modules split out of the binary
+# package that comes from virtualbox-bin
+
+EAPI=7
+
+inherit linux-mod user
+
+MY_P="vbox-kernel-module-src-${PV}"
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="pax_kernel"
+
+RDEPEND="!=app-emulation/virtualbox-9999"
+
+S="${WORKDIR}"
+
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
+
+pkg_setup() {
+ enewgroup vboxusers
+ linux-mod_pkg_setup
+ BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
+}
+
+src_prepare() {
+ if use pax_kernel && kernel_is -ge 3 0 0 ; then
+ eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch
+ fi
+
+ default
+}
+
+src_install() {
+ linux-mod_src_install
+ insinto /usr/lib/modules-load.d/
+ doins "${FILESDIR}"/virtualbox.conf
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+}
diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index f15d100c7ab2..1402276ac647 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,6 +1,8 @@
DIST VirtualBox-5.2.22.tar.bz2 118757134 BLAKE2B be795cdbfb09d3d443f63e190b63898239622f5a57aefdd90f382d9a849d09cc1abc2624071fbc60b2c04a12f33376184540cc362c19225733f99a3bcc8ff6a3 SHA512 4f6c4611a3114778f45419587dc1519ca07410c1ea6474cdb18ecd3b068639a4fdac3f25146fe9b8e006e30f19eba134ce9f665182008b033f6f78497e1ea722
DIST VirtualBox-5.2.24.tar.bz2 118369194 BLAKE2B 2073ec85a641ae80113d41e8363401da5afaf6ea442c2a3c537341f39e06a03a7175463605133e642988f72c4adde4f987905c08f4ba58460953af7169cb4ca0 SHA512 2de5a19ff6aff56a4f7e7b9d7d39b3e787d2ac30d448e3313e915b1cde4b2eedccab44c7a195412efb9e9a6de3c1fb3ee96bde57af93f9ef8f317ffa8b7d4410
+DIST VirtualBox-5.2.26.tar.bz2 118371765 BLAKE2B 32413b72e33f2f63835a2eb2d47dc75a7b63121934bdffd51ff58e9d63d68b77b4f8dac4605916ba8bd6896240d00024ccc3d7d002d4f6f92d6d9b1dc35995e3 SHA512 aee334c74bd02772ac5e0528d84d31661f61c775d0993c00febe125810efc78a2f779db41bf66283be51b19a35540fee14445bada59a8d3b7affa6ef6645005f
DIST VirtualBox-6.0.0.tar.bz2 154322106 BLAKE2B 952e857e5bd6f612272b7bc399af5596d4eb4f13c429c93be7f9e6c4b58e535fe0492806fd51fd5a3f22653f0a42abb2a25ce6b67b5b4712d7e88e34b68eb8cf SHA512 fbe193a3c4dfef943bd75e894452cc684e794e5fa2b25d0292f7fb3e84d5f1a890fe0a3a91dbae9a9b90ec87f12cb3d868457e1767a5841964568cf13a189561
DIST VirtualBox-6.0.2.tar.bz2 155125777 BLAKE2B 2d902fd1963305883eebba85daa03bd17fe8a9ba20e7a6482508879068a809ee80c4a5caffeb26acd0fd4ad29f6f60cf963e1d314e4b01f137ede5b589a74cb9 SHA512 9cfc03eae073ada47c050d2a5eeefa6f724ad2094f2bc3717aa010553ab0dd5af0ed0860bf120727491c7798cdff9219e53cdc3d629f61e3cd12c55068e7401b
+DIST VirtualBox-6.0.4.tar.bz2 155233564 BLAKE2B 6bc4d450e275e8aac5dc62ab05d9ba1450e13965f3eba64819315d121bd0e515319be2ad92ab429f2e598e157e89660561de69a2aac87e14792284669bcec7e8 SHA512 c2e5418bafd5d50b46e1bc70280753c2fdfbf7248d782fc398771839950fb575eaea437e9699d56f4d8c92ea4dc9ba8bed74379565dac6114f7e9c45aecc9fdb
DIST virtualbox-5.2.16-patches-02.tar.xz 3152 BLAKE2B c8d8f3872f544a465c7d1aa07291599307120ac9eabfb299ddd788a11f85ca6c2d84b8e7306ee4ad436270dad0dd39f101ee68a549eac15afd1e3cdc03f23c6c SHA512 85ee8c4045de562d71ab2d761695ea48b6726a6f0c4bcaa2562bb0d147542d3f1a1b5b47cf593a7f22dac1b86f87b59a56bef421dce3e1fa8e5260cd41998450
DIST virtualbox-6.0.0_beta2-patches-01.tar.xz 2732 BLAKE2B a138e715d99f135f16ca21c92781bf6cd8913f7f766bb598eddcd63e98280e568e646f56bbd0a3714f273457ca90db0b77ec7940ba25028506a22891f1af7b2d SHA512 954e4b40d6e272efe756ee0965adb4110d45f764433a89080fda7ebaebbc20031f86a3e0027dfdaa1c6a7d6379a1af557cea71512504e4b57b5f5adbfc86b56e
diff --git a/app-emulation/virtualbox/virtualbox-5.2.26.ebuild b/app-emulation/virtualbox/virtualbox-5.2.26.ebuild
new file mode 100644
index 000000000000..4464ccc84a0a
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-5.2.26.ebuild
@@ -0,0 +1,480 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit flag-o-matic gnome2-utils java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.16-patches-02.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
+
+RDEPEND="!app-emulation/virtualbox-bin
+ ~app-emulation/virtualbox-modules-${PV}
+ dev-libs/libIDL
+ >=dev-libs/libxslt-1.1.19
+ net-misc/curl
+ dev-libs/libxml2
+ media-libs/libpng:0=
+ media-libs/libvpx:0=
+ sys-libs/zlib:=
+ !headless? (
+ media-libs/libsdl:0[X,video]
+ x11-libs/libX11
+ x11-libs/libxcb:=
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ opengl? ( virtual/opengl media-libs/freeglut )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ opengl? ( dev-qt/qtopengl:5 )
+ x11-libs/libXinerama
+ )
+ )
+ libressl? ( dev-libs/libressl:= )
+ !libressl? ( dev-libs/openssl:0= )
+ lvm? ( sys-fs/lvm2 )
+ opus? ( media-libs/opus )
+ udev? ( >=virtual/udev-171 )
+ vnc? ( >=net-libs/libvncserver-0.9.9 )"
+DEPEND="${RDEPEND}
+ >=dev-util/kbuild-0.1.9998.3127
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-libs/libcap
+ sys-power/iasl
+ virtual/pkgconfig
+ alsa? ( >=media-libs/alsa-lib-1.0.13 )
+ doc? (
+ app-text/docbook-sgml-dtd:4.4
+ dev-texlive/texlive-basic
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexrecommended
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-fontsrecommended
+ dev-texlive/texlive-fontsextra
+ )
+ !headless? ( x11-libs/libXinerama )
+ java? ( >=virtual/jdk-1.6 )
+ pam? ( sys-libs/pam )
+ pax_kernel? ( sys-apps/elfix )
+ pulseaudio? ( media-sound/pulseaudio )
+ qt5? ( dev-qt/linguist-tools:5 )
+ vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
+ ${PYTHON_DEPS}"
+RDEPEND="${RDEPEND}
+ java? ( >=virtual/jre-1.6 )"
+
+QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
+ usr/lib/virtualbox/VBoxSDL.so
+ usr/lib/virtualbox/VBoxSharedFolders.so
+ usr/lib/virtualbox/VBoxDD2.so
+ usr/lib/virtualbox/VBoxOGLrenderspu.so
+ usr/lib/virtualbox/VBoxPython.so
+ usr/lib/virtualbox/VBoxDD.so
+ usr/lib/virtualbox/VBoxDDU.so
+ usr/lib/virtualbox/VBoxREM64.so
+ usr/lib/virtualbox/VBoxSharedClipboard.so
+ usr/lib/virtualbox/VBoxHeadless.so
+ usr/lib/virtualbox/VBoxRT.so
+ usr/lib/virtualbox/VBoxREM.so
+ usr/lib/virtualbox/VBoxSettings.so
+ usr/lib/virtualbox/VBoxKeyboard.so
+ usr/lib/virtualbox/VBoxSharedCrOpenGL.so
+ usr/lib/virtualbox/VBoxVMM.so
+ usr/lib/virtualbox/VirtualBox.so
+ usr/lib/virtualbox/VBoxOGLhosterrorspu.so
+ usr/lib/virtualbox/components/VBoxC.so
+ usr/lib/virtualbox/components/VBoxSVCM.so
+ usr/lib/virtualbox/components/VBoxDDU.so
+ usr/lib/virtualbox/components/VBoxRT.so
+ usr/lib/virtualbox/components/VBoxREM.so
+ usr/lib/virtualbox/components/VBoxVMM.so
+ usr/lib/virtualbox/VBoxREM32.so
+ usr/lib/virtualbox/VBoxPython2_7.so
+ usr/lib/virtualbox/VBoxXPCOMC.so
+ usr/lib/virtualbox/VBoxOGLhostcrutil.so
+ usr/lib/virtualbox/VBoxNetDHCP.so
+ usr/lib/virtualbox/VBoxNetNAT.so"
+
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ java? ( sdk )
+ python? ( sdk )
+ vboxwebsrv? ( java )
+ ${PYTHON_REQUIRED_USE}
+"
+
+pkg_pretend() {
+ if ! use headless && ! use qt5 ; then
+ einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend."
+ elif use headless && use qt5 ; then
+ einfo "You selected USE=\"headless qt5\", defaulting to"
+ einfo "USE=\"headless\", this build will not include any X11/Qt frontend."
+ fi
+
+ if ! use opengl ; then
+ einfo "No USE=\"opengl\" selected, this build will lack"
+ einfo "the OpenGL feature."
+ fi
+ if ! use python ; then
+ einfo "You have disabled the \"python\" USE flag. This will only"
+ einfo "disable the python bindings being installed."
+ fi
+}
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ tc-ld-disable-gold #bug 488176
+ tc-export CC CXX LD AR RANLIB
+ export HOST_CC="$(tc-getBUILD_CC)"
+}
+
+src_prepare() {
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Replace pointless GCC version check with something less stupid.
+ # This is needed for the qt5 version check.
+ sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' \
+ -i configure || die
+
+ # Disable things unused or split into separate ebuilds
+ sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+ "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
+
+ # Respect LDFLAGS
+ sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+ -i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+ # Do not use hard-coded ld (related to bug #488176)
+ sed -e '/QUIET)ld /s@ld @$(LD) @' \
+ -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+ # Use PAM only when pam USE flag is enbaled (bug #376531)
+ if ! use pam ; then
+ elog "Disabling PAM removes the possibility to use the VRDP features."
+ sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+ sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+ src/VBox/HostServices/Makefile.kmk || die
+ fi
+
+ # add correct java path
+ if use java ; then
+ sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+ -i "${S}"/Config.kmk || die
+ java-pkg-opt-2_src_prepare
+ fi
+
+ # Only add nopie patch when we're on hardened
+ if gcc-specs-pie ; then
+ eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
+ fi
+
+ # Only add paxmark patch when we're on pax_kernel
+ if use pax_kernel ; then
+ eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
+ fi
+
+ rm "${WORKDIR}/patches/008_virtualbox-4.3.14-missing_define.patch" || die
+ eapply "${WORKDIR}/patches"
+
+ eapply_user
+}
+
+doecho() {
+ echo "$@"
+ "$@" || die
+}
+
+src_configure() {
+ local myconf=(
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+ --disable-dbus
+ --disable-kmods
+ $(usex alsa '' --disable-alsa)
+ $(usex debug --build-debug '')
+ $(usex doc '' --disable-docs)
+ $(usex java '' --disable-java)
+ $(usex lvm '' --disable-devmapper)
+ $(usex opus --build-libopus '')
+ $(usex pulseaudio '' --disable-pulse)
+ $(usex python '' --disable-python)
+ $(usex vboxwebsrv --enable-webservice '')
+ $(usex vnc --enable-vnc '')
+ )
+ if ! use headless ; then
+ myconf+=(
+ $(usex opengl '' --disable-opengl)
+ $(usex qt5 '' --disable-qt)
+ )
+ else
+ myconf+=(
+ --build-headless
+ --disable-opengl
+ )
+ fi
+ if use amd64 && ! has_multilib_profile ; then
+ myconf+=( --disable-vmmraw )
+ fi
+ # not an autoconf script
+ doecho ./configure ${myconf[@]}
+}
+
+src_compile() {
+ source ./env.sh || die
+
+ # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+ MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
+ MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
+ MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+ MAKE="kmk" emake \
+ VBOX_BUILD_PUBLISHER=_Gentoo \
+ TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
+ TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
+ TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
+ TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
+ VBOX_GCC_OPT="${CXXFLAGS}" \
+ TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
+ all
+}
+
+src_install() {
+ local binpath="release"
+ use debug && binpath="debug"
+ cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die
+
+ local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile
+
+ vbox_inst() {
+ local binary="${1}"
+ local perms="${2:-0750}"
+ local path="${3:-${vbox_inst_path}}"
+
+ [[ -n "${binary}" ]] || die "vbox_inst: No binray given!"
+ [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+ insinto ${path}
+ doins ${binary}
+ fowners root:vboxusers ${path}/${binary}
+ fperms ${perms} ${path}/${binary}
+ }
+
+ # Create configuration files
+ insinto /etc/vbox
+ newins "${FILESDIR}/${PN}-4-config" vbox.cfg
+
+ # Set the correct libdir
+ sed \
+ -e "s@MY_LIBDIR@$(get_libdir)@" \
+ -i "${ED%/}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+ # Install the wrapper script
+ exeinto ${vbox_inst_path}
+ newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox"
+ fowners root:vboxusers ${vbox_inst_path}/VBox
+ fperms 0750 ${vbox_inst_path}/VBox
+
+ # Install binaries and libraries
+ insinto ${vbox_inst_path}
+ doins -r components
+
+ # *.rc files for x86_64 are only available on multilib systems
+ local rcfiles="*.rc"
+ if use amd64 && ! has_multilib_profile ; then
+ rcfiles=""
+ fi
+ for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do
+ vbox_inst ${each}
+ done
+
+ # These binaries need to be suid root.
+ for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+ vbox_inst ${each} 4750
+ done
+
+ # Install EFI Firmware files (bug #320757)
+ pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die
+ for fwfile in VBoxEFI{32,64}.fd ; do
+ vbox_inst ${fwfile} 0644
+ done
+ popd &>/dev/null || die
+
+ # VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+ # VBoxXPCOMIPCD (bug #524202)
+ for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
+ pax-mark -m "${ED%/}"${vbox_inst_path}/${each}
+ done
+
+ # Symlink binaries to the shipped wrapper
+ for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do
+ dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+ done
+ dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
+
+ if use pam ; then
+ # VRDPAuth only works with this (bug #351949)
+ dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+ fi
+
+ # set an env-variable for 3rd party tools
+ echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
+ doenvd "${T}/90virtualbox"
+
+ if ! use headless ; then
+ vbox_inst VBoxSDL 4750
+ pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxSDL
+
+ for each in vboxsdl VBoxSDL ; do
+ dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+ done
+
+ if use qt5 ; then
+ vbox_inst VirtualBox 4750
+ pax-mark -m "${ED%/}"${vbox_inst_path}/VirtualBox
+
+ if use opengl ; then
+ vbox_inst VBoxTestOGL
+ pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxTestOGL
+ fi
+
+ for each in virtualbox VirtualBox ; do
+ dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+ done
+
+ insinto /usr/share/${PN}
+ doins -r nls
+ doins -r UnattendedTemplates
+
+ newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop
+ fi
+
+ pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+ for size in 16 32 48 64 128 ; do
+ newicon -s ${size} ${PN}-${size}px.png ${PN}.png
+ done
+ newicon ${PN}-48px.png ${PN}.png
+ doicon -s scalable ${PN}.svg
+ popd &>/dev/null || die
+ pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+ for size in 16 24 32 48 64 72 96 128 256 512 ; do
+ for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+ icofile="${PN}-${ico}-${size}px.png"
+ if [[ -f "${icofile}" ]] ; then
+ newicon -s ${size} ${icofile} ${PN}-${ico}.png
+ fi
+ done
+ done
+ popd &>/dev/null || die
+ fi
+
+ if use lvm ; then
+ vbox_inst VBoxVolInfo 4750
+ dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+ fi
+
+ if use sdk ; then
+ insinto ${vbox_inst_path}
+ doins -r sdk
+
+ if use java ; then
+ java-pkg_regjar "${ED%/}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+ java-pkg_regso "${ED%/}/${vbox_inst_path}/libvboxjxpcom.so"
+ fi
+ fi
+
+ if use udev ; then
+ # New way of handling USB device nodes for VBox (bug #356215)
+ local udevdir="$(get_udevdir)"
+ insinto ${udevdir}
+ doins VBoxCreateUSBNode.sh
+ fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
+ fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+ insinto ${udevdir}/rules.d
+ sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
+ > "${T}"/10-virtualbox.rules || die
+ doins "${T}"/10-virtualbox.rules
+ fi
+
+ if use vboxwebsrv ; then
+ vbox_inst vboxwebsrv
+ dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+ newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+ newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+ fi
+
+ 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.4.ebuild b/app-emulation/virtualbox/virtualbox-6.0.4.ebuild
new file mode 100644
index 000000000000..32183eb05b9f
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-6.0.4.ebuild
@@ -0,0 +1,485 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit flag-o-matic gnome2-utils java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-6.0.0_beta2-patches-01.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
+
+RDEPEND="!app-emulation/virtualbox-bin
+ ~app-emulation/virtualbox-modules-${PV}
+ dev-libs/libIDL
+ >=dev-libs/libxslt-1.1.19
+ net-misc/curl
+ dev-libs/libxml2
+ media-libs/libpng:0=
+ media-libs/libvpx:0=
+ sys-libs/zlib:=
+ !headless? (
+ media-libs/libsdl:0[X,video]
+ x11-libs/libX11
+ x11-libs/libxcb:=
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ opengl? ( virtual/opengl media-libs/freeglut )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ opengl? ( dev-qt/qtopengl:5 )
+ x11-libs/libXinerama
+ )
+ )
+ libressl? ( dev-libs/libressl:= )
+ !libressl? ( dev-libs/openssl:0= )
+ lvm? ( sys-fs/lvm2 )
+ opus? ( media-libs/opus )
+ udev? ( >=virtual/udev-171 )
+ vnc? ( >=net-libs/libvncserver-0.9.9 )"
+DEPEND="${RDEPEND}
+ >=dev-util/kbuild-0.1.9998.3127
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-libs/libcap
+ sys-power/iasl
+ virtual/pkgconfig
+ alsa? ( >=media-libs/alsa-lib-1.0.13 )
+ doc? (
+ app-text/docbook-sgml-dtd:4.4
+ dev-texlive/texlive-basic
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexrecommended
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-fontsrecommended
+ dev-texlive/texlive-fontsextra
+ )
+ !headless? ( x11-libs/libXinerama )
+ java? ( >=virtual/jdk-1.6 )
+ pam? ( sys-libs/pam )
+ pax_kernel? ( sys-apps/elfix )
+ pulseaudio? ( media-sound/pulseaudio )
+ qt5? ( dev-qt/linguist-tools:5 )
+ vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
+ ${PYTHON_DEPS}"
+RDEPEND="${RDEPEND}
+ java? ( >=virtual/jre-1.6 )"
+
+QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
+ usr/lib/virtualbox/VBoxSDL.so
+ usr/lib/virtualbox/VBoxSharedFolders.so
+ usr/lib/virtualbox/VBoxDD2.so
+ usr/lib/virtualbox/VBoxOGLrenderspu.so
+ usr/lib/virtualbox/VBoxPython.so
+ usr/lib/virtualbox/VBoxDD.so
+ usr/lib/virtualbox/VBoxDDU.so
+ usr/lib/virtualbox/VBoxREM64.so
+ usr/lib/virtualbox/VBoxSharedClipboard.so
+ usr/lib/virtualbox/VBoxHeadless.so
+ usr/lib/virtualbox/VBoxRT.so
+ usr/lib/virtualbox/VBoxREM.so
+ usr/lib/virtualbox/VBoxSettings.so
+ usr/lib/virtualbox/VBoxKeyboard.so
+ usr/lib/virtualbox/VBoxSharedCrOpenGL.so
+ usr/lib/virtualbox/VBoxVMM.so
+ usr/lib/virtualbox/VirtualBox.so
+ usr/lib/virtualbox/VBoxOGLhosterrorspu.so
+ usr/lib/virtualbox/components/VBoxC.so
+ usr/lib/virtualbox/components/VBoxSVCM.so
+ usr/lib/virtualbox/components/VBoxDDU.so
+ usr/lib/virtualbox/components/VBoxRT.so
+ usr/lib/virtualbox/components/VBoxREM.so
+ usr/lib/virtualbox/components/VBoxVMM.so
+ usr/lib/virtualbox/VBoxREM32.so
+ usr/lib/virtualbox/VBoxPython2_7.so
+ usr/lib/virtualbox/VBoxXPCOMC.so
+ usr/lib/virtualbox/VBoxOGLhostcrutil.so
+ usr/lib/virtualbox/VBoxNetDHCP.so
+ usr/lib/virtualbox/VBoxNetNAT.so"
+
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ java? ( sdk )
+ python? ( sdk )
+ vboxwebsrv? ( java )
+ ${PYTHON_REQUIRED_USE}
+"
+
+pkg_pretend() {
+ if ! use headless && ! use qt5 ; then
+ einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend."
+ elif use headless && use qt5 ; then
+ einfo "You selected USE=\"headless qt5\", defaulting to"
+ einfo "USE=\"headless\", this build will not include any X11/Qt frontend."
+ fi
+
+ if ! use opengl ; then
+ einfo "No USE=\"opengl\" selected, this build will lack"
+ einfo "the OpenGL feature."
+ fi
+ if ! use python ; then
+ einfo "You have disabled the \"python\" USE flag. This will only"
+ einfo "disable the python bindings being installed."
+ fi
+}
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ tc-ld-disable-gold #bug 488176
+ tc-export CC CXX LD AR RANLIB
+ export HOST_CC="$(tc-getBUILD_CC)"
+}
+
+src_prepare() {
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Replace pointless GCC version check with something less stupid.
+ # This is needed for the qt5 version check.
+ sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' \
+ -i configure || die
+
+ # Disable things unused or split into separate ebuilds
+ sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+ "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
+
+ # Respect LDFLAGS
+ sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+ -i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+ # Do not use hard-coded ld (related to bug #488176)
+ sed -e '/QUIET)ld /s@ld @$(LD) @' \
+ -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+ # Use PAM only when pam USE flag is enbaled (bug #376531)
+ if ! use pam ; then
+ elog "Disabling PAM removes the possibility to use the VRDP features."
+ sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+ sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+ src/VBox/HostServices/Makefile.kmk || die
+ fi
+
+ # add correct java path
+ if use java ; then
+ sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+ -i "${S}"/Config.kmk || die
+ java-pkg-opt-2_src_prepare
+ fi
+
+ # Only add nopie patch when we're on hardened
+ if gcc-specs-pie ; then
+ eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
+ fi
+
+ # Only add paxmark patch when we're on pax_kernel
+ if use pax_kernel ; then
+ eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
+ fi
+
+ rm "${WORKDIR}/patches/010_virtualbox-5.2.12-qt511.patch" || die
+ eapply "${WORKDIR}/patches"
+ eapply "${FILESDIR}"/${PN}-6.0.0-libressl.patch #673800
+
+ 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() {
+ local binpath="release"
+ use debug && binpath="debug"
+ cd "${S}"/out/linux.${ARCH}/${binpath}/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
+ 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
+
+ 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
+
+ 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
+}