summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2020-01-15 17:41:32 +0100
committerLars Wendler <polynomial-c@gentoo.org>2020-01-16 09:51:01 +0100
commitd018e151698ae35918c0c06aad59fbc22986175a (patch)
tree0d53c378a14c2d1586a009319f6e9807b17d26d1 /app-emulation/virtualbox-guest-additions
parentdev-embedded/sdcc: avoid makeinfo depend (diff)
downloadgentoo-d018e151698ae35918c0c06aad59fbc22986175a.tar.gz
gentoo-d018e151698ae35918c0c06aad59fbc22986175a.tar.bz2
gentoo-d018e151698ae35918c0c06aad59fbc22986175a.zip
virtualbox packages: Bump to versions 5.2.36, 6.0.16 and 6.1.2
Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-emulation/virtualbox-guest-additions')
-rw-r--r--app-emulation/virtualbox-guest-additions/Manifest6
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.36.ebuild229
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.16.ebuild219
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.2.ebuild219
4 files changed, 673 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-guest-additions/Manifest b/app-emulation/virtualbox-guest-additions/Manifest
index 88650e4bb958..ff05da6dfb28 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -1,8 +1,14 @@
DIST VirtualBox-5.2.32.tar.bz2 118262502 BLAKE2B f42de23ddbef1bb5472f6730b711452049331cf06c80420205844ea4a46ddb3352e0fd91564d94d018cb03921e7f894b30c79ddb684ad498d3f86dee88bf8994 SHA512 4e98d5df5e9e6445dde268d5eacea82e655ce9b96cd6579a9d470a08a0c066b7cd7e212b276e2671e936b4a73a53ecf9daa666cb3a8b9d7dc353c70c9283505e
DIST VirtualBox-5.2.34.tar.bz2 118268064 BLAKE2B 2ac0359e35012662e850e16e6ee74c4c00898a02eaa9a3dcf4299c444efaf56c17e02b33f165c37a22598ab3967169d32c03c383ca253aaaaa3d9d5bafc9b50f SHA512 a5f8771ddcdf2271006f2ce7de497cfb73cee46c51b0c761c9e79d03bbdf44441e3f1e4ce569967de5c33c469b7b664901c998ca9107acee7fe0ea83896bf0c2
+DIST VirtualBox-5.2.36.tar.bz2 118253892 BLAKE2B 6b54a8c4aa996bc595b163bce501b97d543d4335507723cf3f6f9fd723f1d9ed42bddc90a8d3028688c0ac4918bbd4a32ab94f81daa867b99d0f0ce9cc9a4c59 SHA512 3437ef3300a706c2b4a4cdabdb3b100786f727e2052659d74cde955a88363052bce48820aa92f2eea9029c08bd23a2473ff080a754dfe0671ab0a6392d887071
DIST VirtualBox-6.0.12.tar.bz2 154250538 BLAKE2B 1c0da29a1d4f4a9ce57280593b219d1fe507fa31dd419d5ef7e62fa8b76bc8b7b21a414edec79ce03b7b4471176e322cb5a0a592a7f61c1f6096c59ca16072ce SHA512 a2182750c6b7e2f7fe8548a923829c05167b739ad84ed025e6cfd85ce787aaa43d41c72c5a93f17e6b976561bae0aa538d81830c52c1d326b75f5a32ba3d441c
DIST VirtualBox-6.0.14.tar.bz2 154236138 BLAKE2B 18cd508269b2a809ec03b5bacc197131ebd775354e16b9141573ddd037de9ba180e3186347e77067a1767169d2ab1e9ff21590a2702b7705c87cf326204d3424 SHA512 e1a64c6633987e178b368dc17e738c6fbef4ab262c574188819f1186bf33f38d8c5accd6a566279a12ccd3544bab4ee5a1f8dce7c8c56d7373489c5ff7f8556d
+DIST VirtualBox-6.0.16.tar.bz2 154406073 BLAKE2B 8d0c9c1e6c675c5e2c7f01802072370fded7c5d7f7f581c6570b111c4aa4ac327fb74370ac36e4a4e31c6627640f8eb697a43b32fd2818f78e6b119f063d560f SHA512 ff9b726a5a865ed3fc5436e778da434ce532113898ed50434e2a561150410eabeee7194320eb115552542ecfd7c332f46f2d04fba782509dda8e66511e2a1a61
DIST VirtualBox-6.1.0.tar.bz2 165322453 BLAKE2B ecd15bf1f454dd975562ce27fec9c87d266fcb509952492bd98e77101318149efbcf46b1e025157d569cf511e66b7b8d83dd0cfe5ff288b67010796064dd7685 SHA512 3709d54861e75efc5b4998bda82ebb868790228f4e19f5e64221322efd8f17916872afa89cc2494faa445fed9ae01ef97af16e4ad111a0a04552f0fac5db3618
+DIST VirtualBox-6.1.2.tar.bz2 165400546 BLAKE2B 38eec6064896a250f4b7079f4bd52f23e43a6482d94bd8bba0a1102bd1cfaf00bd227f8dd2cc8382194c7d18509c6412440b8deb0d283e1e26550eb8a4cc96cc SHA512 476dedd9dd7a213bd70920f4cdf594b5336555f31e5becb15b5c01d88fa7bed917258831af31600514362384401fd7040cb748a7c76896e4a027bef05026b585
DIST virtualbox-5.2.16-patches-02.tar.xz 3152 BLAKE2B c8d8f3872f544a465c7d1aa07291599307120ac9eabfb299ddd788a11f85ca6c2d84b8e7306ee4ad436270dad0dd39f101ee68a549eac15afd1e3cdc03f23c6c SHA512 85ee8c4045de562d71ab2d761695ea48b6726a6f0c4bcaa2562bb0d147542d3f1a1b5b47cf593a7f22dac1b86f87b59a56bef421dce3e1fa8e5260cd41998450
DIST virtualbox-5.2.34-patches-01.tar.xz 2960 BLAKE2B e62ab64939e9251a715b3b54b479bc51315acf561ce3d542a4b1358cefb2158353a046003cb0a62e78015f01b626719afb39590090662dd58bfc587bd63cb994 SHA512 25f402c0f96ac25c4d1afdf5d9fff60292caabd2af032a7e2f3e1f70e85bb24f03bbe3625b8bdb7618f77d2890e4c0b9fa7ade2eed590f6658361cca3db4a4b9
+DIST virtualbox-5.2.36-patches-01.tar.xz 3440 BLAKE2B 66749efba87d82ed4a11ff09444c68f86f82a360e9dbb44fa6072d6c28120f3c23cff8c15bacbd38bce8b69b3d8f35c4d3d493684df962ea6e353eec413dcc38 SHA512 3cf2526d209a54e94cd94840793769fd96fa988e21555d76eda2207a7f87e04b446a28ac6c8a2954e7c00a35107c144cadaec276d171214acdcc2900eb41306c
DIST virtualbox-6.0.0_beta2-patches-01.tar.xz 2732 BLAKE2B a138e715d99f135f16ca21c92781bf6cd8913f7f766bb598eddcd63e98280e568e646f56bbd0a3714f273457ca90db0b77ec7940ba25028506a22891f1af7b2d SHA512 954e4b40d6e272efe756ee0965adb4110d45f764433a89080fda7ebaebbc20031f86a3e0027dfdaa1c6a7d6379a1af557cea71512504e4b57b5f5adbfc86b56e
+DIST virtualbox-6.0.16-patches-01.tar.xz 3520 BLAKE2B 1ca10c5902ece4657c6a9a03fe28c80a364d999e181cc46fc52d7dac0f0272faca6d6b19cb12d126bb0f4f6014b8c391b2b0f82ca016625410287fcc0c240778 SHA512 33b14fa1ce5526be88d6d5b72b5c86c68c37f565074a764b9d7a65f5c0a39e3d81533f9923087add71783556c1e51e816b674ce46d2800eb678846f65226fb69
+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.36.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.36.ebuild
new file mode 100644
index 000000000000..2678fa2fdca7
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.36.ebuild
@@ -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.16.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.16.ebuild
new file mode 100644
index 000000000000..d62a598fce9c
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.16.ebuild
@@ -0,0 +1,219 @@
+# 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-6.0.16-patches-01.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+RDEPEND="
+ X? ( x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libXmu
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXext
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libSM
+ x11-libs/libICE )
+ sys-apps/dbus
+"
+DEPEND="
+ ${RDEPEND}
+ >=dev-util/kbuild-0.1.9998.3127
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-libs/pam
+ sys-power/iasl
+ x11-base/xorg-proto
+"
+PDEPEND="
+ X? ( x11-drivers/xf86-video-vboxvideo )
+"
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+
+S="${WORKDIR}/${MY_P}"
+VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src"
+
+pkg_setup() {
+ export DISTCC_DISABLE=1 #674256
+ MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest)
+ vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)"
+ use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)"
+
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
+}
+
+src_prepare() {
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Provide kernel sources
+ pushd src/VBox/Additions &>/dev/null || die
+ ebegin "Extracting guest kernel module sources"
+ kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null || die
+ eend
+ popd &>/dev/null || die
+
+ # PaX fixes (see bug #298988)
+ pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
+ eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch
+ popd &>/dev/null || die
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+ use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
+
+ # Remove pointless GCC version check
+ sed -e '/^check_gcc$/d' -i configure || die
+
+ rm "${WORKDIR}/patches/010_virtualbox-5.2.12-qt511.patch" || die
+ eapply "${WORKDIR}/patches"
+
+ eapply_user
+}
+
+src_configure() {
+ # build the user-space tools, warnings are harmless
+ local cmd=(
+ ./configure
+ --nofatal
+ --disable-xpcom
+ --disable-sdl-ttf
+ --disable-pulse
+ --disable-alsa
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+ --target-arch=${ARCH}
+ --with-linux="${KV_OUT_DIR}"
+ --build-headless
+ )
+ echo "${cmd[@]}"
+ "${cmd[@]}" || die "configure failed"
+ source ./env.sh
+ export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_compile() {
+ MAKE="kmk" \
+ emake TOOL_YASM_AS=yasm \
+ VBOX_ONLY_ADDITIONS=1 \
+ KBUILD_VERBOSE=2
+
+ # Now creating the kernel modules. We must do this _after_
+ # we compiled the user-space tools as we need two of the
+ # automatically generated header files. (>=3.2.0)
+ linux-mod_src_compile
+}
+
+src_install() {
+ linux-mod_src_install
+
+ cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
+
+ insinto /sbin
+ newins mount.vboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
+
+ insinto /usr/sbin/
+ newins VBoxService vboxguest-service
+ fperms 0755 /usr/sbin/vboxguest-service
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 0755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use X ; then
+ doins VBoxClient
+ fperms 0755 /usr/bin/VBoxClient
+
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
+ || die
+ newins 98vboxadd-xclient VBoxClient-all
+ fperms 0755 /usr/bin/VBoxClient-all
+ popd &>/dev/null || die
+ fi
+
+ # udev rule for vboxdrv
+ local udev_rules_dir="/lib/udev/rules.d"
+ dodir ${udev_rules_dir}
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+
+ # VBoxClient autostart file
+ insinto /etc/xdg/autostart
+ doins "${FILESDIR}"/vboxclient.desktop
+
+ # sample xorg.conf
+ 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.1.2.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.2.ebuild
new file mode 100644
index 000000000000..f8665c267102
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.2.ebuild
@@ -0,0 +1,219 @@
+# 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-6.1.0_rc1-patches-01.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+RDEPEND="
+ X? ( x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libXmu
+ x11-libs/libX11
+ x11-libs/libXt
+ x11-libs/libXext
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libSM
+ x11-libs/libICE )
+ sys-apps/dbus
+"
+DEPEND="
+ ${RDEPEND}
+ >=dev-util/kbuild-0.1.9998.3127
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-libs/pam
+ sys-power/iasl
+ x11-base/xorg-proto
+"
+PDEPEND="
+ X? ( x11-drivers/xf86-video-vboxvideo )
+"
+BUILD_TARGETS="all"
+BUILD_TARGET_ARCH="${ARCH}"
+
+S="${WORKDIR}/${MY_P}"
+VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src"
+
+pkg_setup() {
+ export DISTCC_DISABLE=1 #674256
+ MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest)
+ vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)"
+ use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)"
+
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}"
+}
+
+src_prepare() {
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Provide kernel sources
+ pushd src/VBox/Additions &>/dev/null || die
+ ebegin "Extracting guest kernel module sources"
+ kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null || die
+ eend
+ popd &>/dev/null || die
+
+ # PaX fixes (see bug #298988)
+ pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
+ eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch
+ popd &>/dev/null || die
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+ use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
+
+ # Remove pointless GCC version check
+ sed -e '/^check_gcc$/d' -i configure || die
+
+ rm "${WORKDIR}/patches/010_virtualbox-5.2.12-qt511.patch" || die
+ eapply "${WORKDIR}/patches"
+
+ eapply_user
+}
+
+src_configure() {
+ # build the user-space tools, warnings are harmless
+ local cmd=(
+ ./configure
+ --nofatal
+ --disable-xpcom
+ --disable-sdl-ttf
+ --disable-pulse
+ --disable-alsa
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+ --target-arch=${ARCH}
+ --with-linux="${KV_OUT_DIR}"
+ --build-headless
+ )
+ echo "${cmd[@]}"
+ "${cmd[@]}" || die "configure failed"
+ source ./env.sh
+ export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_compile() {
+ MAKE="kmk" \
+ emake TOOL_YASM_AS=yasm \
+ VBOX_ONLY_ADDITIONS=1 \
+ KBUILD_VERBOSE=2
+
+ # Now creating the kernel modules. We must do this _after_
+ # we compiled the user-space tools as we need two of the
+ # automatically generated header files. (>=3.2.0)
+ linux-mod_src_compile
+}
+
+src_install() {
+ linux-mod_src_install
+
+ cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
+
+ insinto /sbin
+ newins mount.vboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
+
+ insinto /usr/sbin/
+ newins VBoxService vboxguest-service
+ fperms 0755 /usr/sbin/vboxguest-service
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 0755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use X ; then
+ doins VBoxClient
+ fperms 0755 /usr/bin/VBoxClient
+
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
+ || die
+ newins 98vboxadd-xclient VBoxClient-all
+ fperms 0755 /usr/bin/VBoxClient-all
+ popd &>/dev/null || die
+ fi
+
+ # udev rule for vboxdrv
+ local udev_rules_dir="/lib/udev/rules.d"
+ dodir ${udev_rules_dir}
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+
+ # VBoxClient autostart file
+ insinto /etc/xdg/autostart
+ doins "${FILESDIR}"/vboxclient.desktop
+
+ # sample xorg.conf
+ 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 ""
+}