From e1d696c11700dbd3307cadcf2d6c609eff5ff1bb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 23 Jan 2017 23:35:02 +0000 Subject: update all virtualbox packages to 5.1.14 --- app-emulation/virtualbox-guest-additions/Manifest | 2 +- .../files/virtualbox-guest-additions-3-localconfig | 30 ++ .../virtualbox-guest-additions-5.1.14.ebuild | 193 +++++++++ .../virtualbox-guest-additions-5.1.8.ebuild | 190 --------- app-emulation/virtualbox-modules/Manifest | 2 +- .../files/create_vbox_modules_tarball.sh | 29 ++ .../files/virtualbox-modules-4.1.4-pax-const.patch | 48 +++ .../virtualbox-modules-5.1.10-ALIGN-backport.patch | 12 + .../virtualbox-modules-5.1.14.ebuild | 36 ++ .../virtualbox-modules-5.1.8.ebuild | 37 -- app-emulation/virtualbox/Manifest | 2 +- app-emulation/virtualbox/virtualbox-5.1.14.ebuild | 447 +++++++++++++++++++++ app-emulation/virtualbox/virtualbox-5.1.8.ebuild | 447 --------------------- 13 files changed, 798 insertions(+), 677 deletions(-) create mode 100644 app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3-localconfig create mode 100644 app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.14.ebuild delete mode 100644 app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.8.ebuild create mode 100755 app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh create mode 100644 app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch create mode 100644 app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.10-ALIGN-backport.patch create mode 100644 app-emulation/virtualbox-modules/virtualbox-modules-5.1.14.ebuild delete mode 100644 app-emulation/virtualbox-modules/virtualbox-modules-5.1.8.ebuild create mode 100644 app-emulation/virtualbox/virtualbox-5.1.14.ebuild delete mode 100644 app-emulation/virtualbox/virtualbox-5.1.8.ebuild (limited to 'app-emulation') diff --git a/app-emulation/virtualbox-guest-additions/Manifest b/app-emulation/virtualbox-guest-additions/Manifest index c8bd71b8..0e370c01 100644 --- a/app-emulation/virtualbox-guest-additions/Manifest +++ b/app-emulation/virtualbox-guest-additions/Manifest @@ -1 +1 @@ -DIST VirtualBox-5.1.8.tar.bz2 114688166 SHA256 e447031de468aee746529b2cf60768922f9beff22a13c54284aa430f5e925933 SHA512 178299173ee0062e23aee779faa893a42815d17163eab9ba2ed8b46be63a7110fe1690792de21514dc05ccd5a1752ea0f11357220e0e6f91f101dea3416e819c WHIRLPOOL 20ea8d253d177fd11c4349656aaa0f87f0fb76018511b345e85800d4dd8ab1e2e05c300a1f932670e5f5fac6ea547bfaa0a52b8526c4f363358911c770444a81 +DIST VirtualBox-5.1.14.tar.bz2 115042132 SHA256 8267bb026717c6e55237eb798210767d9c703cfcdf01224d9bc26f7dac9f228a SHA512 ab0646c587fa1b573a9332ca0f1959660adc02f2ecf63ac808f4a7e3ceb9b2c58adab8e309aec4630ff7fa447f47d7487e7e8d0a1f718a42d39ce71e96067fae WHIRLPOOL 915b3ac0d50def86e92b662c7fe32e1390c9dab73efb9fc9595465c45818b86b4380be93a7075d17e33f9b70d92dbbbf6063ce0dad6448c9a592648a10f2409b diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3-localconfig b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3-localconfig new file mode 100644 index 00000000..aeea54d6 --- /dev/null +++ b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-3-localconfig @@ -0,0 +1,30 @@ +# -*- Makefile -*- +# +# Overwrite some default kBuild settings +# + +# +# Copyright (C) 2006-2008 Sun Microsystems, Inc. +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License as published by the Free Software Foundation, +# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE +# distribution. VirtualBox OSE is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY of any kind. +# + +# don't build testcases to save time, they are not needed for the package +VBOX_WITH_TESTCASES := +VBOX_WITH_TESTSUITE := + +KBUILD_MSG_STYLE := brief + +## paths, origin, hardening +VBOX_WITH_HARDENING := 2 +VBOX_WITH_ORIGIN := +VBOX_ONLY_ADDITIONS := 1 + +## don't build with -Werror +VBOX_WITH_WARNINGS_AS_ERRORS := diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.14.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.14.ebuild new file mode 100644 index 00000000..be06590d --- /dev/null +++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.14.ebuild @@ -0,0 +1,193 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit eutils systemd user toolchain-funcs + +MY_PV="${PV/beta/BETA}" +MY_PV="${MY_PV/rc/RC}" +MY_P=VirtualBox-${MY_PV} +DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests" +HOMEPAGE="http://www.virtualbox.org/" +SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="X" + +RDEPEND="X? ( x11-apps/xrandr + x11-apps/xrefresh + x11-libs/libXmu + x11-libs/libX11 + x11-libs/libXt + x11-libs/libXext + x11-libs/libXau + x11-libs/libXdmcp + x11-libs/libSM + x11-libs/libICE + x11-proto/glproto ) + sys-apps/dbus + !!x11-drivers/xf86-input-virtualbox" +DEPEND="${RDEPEND} + >=dev-util/kbuild-0.1.9998_pre20131130 + >=dev-lang/yasm-0.6.2 + sys-devel/bin86 + sys-libs/pam + sys-power/iasl + X? ( x11-proto/renderproto ) + !X? ( x11-proto/xproto )" +PDEPEND="X? ( ~x11-drivers/xf86-video-virtualbox-${PV} )" + +BUILD_TARGETS="all" +BUILD_TARGET_ARCH="${ARCH}" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup vboxguest + enewuser vboxguest -1 /bin/sh /dev/null vboxguest + enewgroup vboxsf +} + +src_unpack() { + unpack ${A} + + "${S}"/src/VBox/Additions/linux/export_modules "${WORKDIR}/vbox-kmod.tar.gz" + unpack ./vbox-kmod.tar.gz + + cd "${S}" + rm -rf kBuild/bin tools +} + +src_prepare() { + pushd "${WORKDIR}" &>/dev/null || die + eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch + popd &>/dev/null || die + + cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die + use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk + + 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 + + sed -e "/\s*-o\s*\\\(\s*\$cc_maj\s*-eq\s*[5-9]\s*-a\s*\$cc_min\s*-gt\s*[0-5]\s*\\\)\s*\\\/d" \ + -i configure || die + + eapply_user +} + +src_configure() { + 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 +} + +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 + + 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 + + local udev_rules_dir="/lib/udev/rules.d" + dodir ${udev_rules_dir} + echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ + >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ + || die + echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ + >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ + || die + + insinto /etc/xdg/autostart + doins "${FILESDIR}"/vboxclient.desktop + + insinto /usr/share/doc/${PF} + doins "${FILESDIR}"/xorg.conf.vbox + + systemd_dounit "${FILESDIR}/${PN}.service" +} + +pkg_postinst() { + linux-mod_pkg_postinst + if ! use X ; then + elog "use flag X is off, enable it to install the" + elog "X Window System video driver." + fi + elog "" + elog "Please add users to the \"vboxguest\" group so they can" + elog "benefit from seamless mode, auto-resize and clipboard." + elog "" + elog "The vboxsf group has been added to make automount services work." + elog "These services are part of the shared folders support." + elog "" + elog "Please add:" + elog "/etc/init.d/${PN}" + elog "to the default runlevel in order to start" + elog "needed services." + elog "To use the VirtualBox X driver, use the following" + elog "file as your /etc/X11/xorg.conf:" + elog " /usr/share/doc/${PF}/xorg.conf.vbox" + elog "" + elog "Also make sure you use the Mesa library for OpenGL:" + elog " eselect opengl set xorg-x11" + elog "" + elog "An autostart .desktop file has been installed to start" + elog "VBoxClient in desktop sessions." + elog "" + elog "You can mount shared folders with:" + elog " mount -t vboxsf " + elog "" + elog "Warning:" + elog "this ebuild is only needed if you are running gentoo" + elog "inside a VirtualBox Virtual Machine, you don't need" + elog "it to run VirtualBox itself." + elog "" +} diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.8.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.8.ebuild deleted file mode 100644 index ba46d57d..00000000 --- a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.8.ebuild +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -inherit eutils systemd user toolchain-funcs - -MY_PV="${PV/beta/BETA}" -MY_PV="${MY_PV/rc/RC}" -MY_P=VirtualBox-${MY_PV} -DESCRIPTION="VirtualBox user-space tools for Gentoo guests" -HOMEPAGE="http://www.virtualbox.org/" -SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="X" - -RDEPEND="X? ( ~x11-drivers/xf86-video-virtualbox-${PV} - x11-apps/xrandr - x11-apps/xrefresh - x11-libs/libXmu - x11-libs/libX11 - x11-libs/libXt - x11-libs/libXext - x11-libs/libXau - x11-libs/libXdmcp - x11-libs/libSM - x11-libs/libICE - x11-proto/glproto ) - sys-apps/dbus - =sys-kernel/virtualbox-guest-dkms-${PV} - !!x11-drivers/xf86-input-virtualbox" -DEPEND="${RDEPEND} - >=dev-util/kbuild-0.1.9998_pre20131130 - >=dev-lang/yasm-0.6.2 - sys-devel/bin86 - sys-libs/pam - sys-power/iasl - X? ( x11-proto/renderproto ) - !X? ( x11-proto/xproto )" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - enewgroup vboxguest - enewuser vboxguest -1 /bin/sh /dev/null vboxguest - enewgroup vboxsf -} - -src_unpack() { - unpack ${A} - - "${S}"/src/VBox/Additions/linux/export_modules "${WORKDIR}/vbox-kmod.tar.gz" - unpack ./vbox-kmod.tar.gz - - cd "${S}" - rm -rf kBuild/bin tools -} - -src_prepare() { - pushd "${WORKDIR}" &>/dev/null || die - eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch - popd &>/dev/null || die - - cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die - use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk - - 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 - - sed -e "/\s*-o\s*\\\(\s*\$cc_maj\s*-eq\s*[5-9]\s*-a\s*\$cc_min\s*-gt\s*[0-5]\s*\\\)\s*\\\/d" \ - -i configure || die - - eapply_user -} - -src_configure() { - 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 -} - -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 - - 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 - - local udev_rules_dir="/lib/udev/rules.d" - dodir ${udev_rules_dir} - echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ - >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ - || die - echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ - >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ - || die - - insinto /etc/xdg/autostart - doins "${FILESDIR}"/vboxclient.desktop - - insinto /usr/share/doc/${PF} - doins "${FILESDIR}"/xorg.conf.vbox - - systemd_dounit "${FILESDIR}/${PN}.service" -} - -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 " - 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 76141d3a..4128a06c 100644 --- a/app-emulation/virtualbox-modules/Manifest +++ b/app-emulation/virtualbox-modules/Manifest @@ -1 +1 @@ -DIST vbox-kernel-module-src-5.1.8.tar.xz 612740 SHA256 a9448ae2cb0468b9dbc94cbcdafc7d8c49787bc6246e69d9cc905dfe61d0f3c8 SHA512 56ebaaab238d1a4b9b632cea9a9653849c88af23fff64bf6fb7b96b9a0890108f83fca33562abbad51358dd5757c57b619beb466f703bb2bf1d103631655ec45 WHIRLPOOL 396a44167f337e9a0acd1cee2cd325d493486786976ce9a34f44eee7fb2443730fc57a07a7e89f0f190a8cc6f5bc89692066af44a34a86a61b63a5c20e112cba +DIST vbox-kernel-module-src-5.1.14.tar.xz 613508 SHA256 7409f0cdb4de7358aa5c1265bb6cc71802d37a28ac0156daa3c4c8c9c6d49551 SHA512 fad7c4d12a2afc1c112ee620fe748ecb0bacdcbf6db9d3c1375ac35f610dc017c8b0a62221b8401935ea7b266b2126191bf1c3fe96613b0a0bf779341df5d147 WHIRLPOOL c0ea8f4ab1b73cd04c20a095875beec4cd3b43630c0c3b17e884f59ed0ee7d12e3d6c102419d954b9f0dd27bc6e5fd1f0bcbf14aa605d0ebfc70eb5b703c03d8 diff --git a/app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh b/app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh new file mode 100755 index 00000000..756d2435 --- /dev/null +++ b/app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Create a virtualbox modules tarball from a VirtualBox binary package. +# We cannot download the package by this script because of the unpredictable +# build number being in the filename. +# +# usage: create_vbox_modules_tarball.sh VirtualBox-4.1.18-78361-Linux_amd64.run + +[ -f "$1" ] || exit 1 + +VBOX_PACKAGE="$1" +VERSION_SUFFIX="" + +if [[ ${VBOX_PACKAGE} = *_BETA* ]] || [[ ${VBOX_PACKAGE} = *_RC* ]] ; then + VERSION_SUFFIX="$(echo ${VBOX_PACKAGE} | sed 's@.*VirtualBox-[[:digit:]\.]\+\(_[[:alpha:]]\+[[:digit:]]\).*@\L\1@')" + +fi + +VBOX_VER="$(echo ${VBOX_PACKAGE} | sed 's@.*VirtualBox-\([[:digit:]\.]\+\).*@\1@')${VERSION_SUFFIX}" + + +sh ${VBOX_PACKAGE} --noexec --keep --nox11 || exit 2 +cd install || exit 3 +tar -xaf VirtualBox.tar.bz2 || exit 4 +cd src/vboxhost || exit 5 +tar -cvJf ../../../vbox-kernel-module-src-${VBOX_VER}.tar.xz . || exit 6 +cd ../../.. && rm install -rf + +exit 0 diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch new file mode 100644 index 00000000..4e4cde06 --- /dev/null +++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch @@ -0,0 +1,48 @@ +diff -urp vboxdrv.orig/SUPDrvIDC.h vboxdrv/SUPDrvIDC.h +--- vboxdrv.orig/SUPDrvIDC.h 2011-09-06 15:53:27.852567531 +0200 ++++ vboxdrv/SUPDrvIDC.h 2011-09-06 15:54:05.420565524 +0200 +@@ -160,7 +160,7 @@ typedef struct SUPDRVIDCREQGETSYM + { + /** The symbol address. */ + PFNRT pfnSymbol; +- } Out; ++ } __no_const Out; + } u; + } SUPDRVIDCREQGETSYM; + /** Pointer to a SUPDRV IDC get symbol request. */ +diff -urp vboxnetflt.orig/include/VBox/intnet.h vboxnetflt/include/VBox/intnet.h +--- vboxnetflt.orig/include/VBox/intnet.h 2011-09-06 15:53:27.852567531 +0200 ++++ vboxnetflt/include/VBox/intnet.h 2011-09-06 15:54:05.424565524 +0200 +@@ -783,7 +783,7 @@ typedef struct INTNETTRUNKFACTORY + DECLR0CALLBACKMEMBER(int, pfnCreateAndConnect,(struct INTNETTRUNKFACTORY *pIfFactory, const char *pszName, + PINTNETTRUNKSWPORT pSwitchPort, uint32_t fFlags, + PINTNETTRUNKIFPORT *ppIfPort)); +-} INTNETTRUNKFACTORY; ++} __no_const INTNETTRUNKFACTORY; + /** Pointer to the trunk factory. */ + typedef INTNETTRUNKFACTORY *PINTNETTRUNKFACTORY; + +diff -urp vboxnetflt.orig/linux/VBoxNetFlt-linux.c vboxnetflt/linux/VBoxNetFlt-linux.c +--- vboxnetflt.orig/linux/VBoxNetFlt-linux.c 2011-07-19 12:15:22.000000000 +0200 ++++ vboxnetflt/linux/VBoxNetFlt-linux.c 2011-09-06 15:56:00.516559379 +0200 +@@ -840,7 +840,7 @@ typedef struct ethtool_ops OVR_OPSTYPE; + + # else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) */ + +-typedef struct net_device_ops OVR_OPSTYPE; ++typedef net_device_ops_no_const OVR_OPSTYPE; + # define OVR_OPS netdev_ops + # define OVR_XMIT pOrgOps->ndo_start_xmit + +diff -urp vboxpci.orig/include/VBox/rawpci.h vboxpci/include/VBox/rawpci.h +--- vboxpci.orig/include/VBox/rawpci.h 2011-04-18 17:01:12.000000000 +0200 ++++ vboxpci/include/VBox/rawpci.h 2011-09-06 15:57:17.340555277 +0200 +@@ -545,7 +545,7 @@ typedef struct RAWPCIFACTORY + DECLR0CALLBACKMEMBER(void, pfnDeinitVm,(PRAWPCIFACTORY pFactory, + PVM pVM, + PRAWPCIPERVM pPciData)); +-} RAWPCIFACTORY; ++} __no_const RAWPCIFACTORY; + + #define RAWPCIFACTORY_UUID_STR "ea089839-4171-476f-adfb-9e7ab1cbd0fb" + diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.10-ALIGN-backport.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.10-ALIGN-backport.patch new file mode 100644 index 00000000..1bc3fddd --- /dev/null +++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.10-ALIGN-backport.patch @@ -0,0 +1,12 @@ +Index: trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h +=================================================================== +--- a/vboxdrv/SUPDrvInternal.h ++++ b/vboxdrv/SUPDrvInternal.h +@@ -65,7 +65,4 @@ + # include + # endif +-# endif +-# if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 0) +-# undef ALIGN + # endif + # ifndef KBUILD_STR diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.14.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.14.ebuild new file mode 100644 index 00000000..e8b50e38 --- /dev/null +++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.14.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit eutils user + +MY_P=vbox-kernel-module-src-${PV} +DESCRIPTION="Kernel Modules for Virtualbox" +HOMEPAGE="http://www.virtualbox.org/" +SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="=sys-kernel/${PN}-dkms-${PV}" +RDEPEND="${DEPEND} + !=app-emulation/virtualbox-9999" + +S=${WORKDIR} + +pkg_setup() { + enewgroup vboxusers +} + +src_compile() { + : +} + +src_install() { + insinto /usr/lib/modules-load.d/ + doins "${FILESDIR}"/virtualbox.conf +} diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.8.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.8.ebuild deleted file mode 100644 index f7b579d4..00000000 --- a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.8.ebuild +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit eutils user - -MY_P=vbox-kernel-module-src-${PV} -DESCRIPTION="Kernel Modules for Virtualbox" -HOMEPAGE="http://www.virtualbox.org/" -SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="" - -DEPEND="=sys-kernel/${PN}-dkms-${PV}" -RDEPEND="${DEPEND} - !=app-emulation/virtualbox-9999" - -S=${WORKDIR} - - -pkg_setup() { - enewgroup vboxusers -} - -src_compile() { - : -} - -src_install() { - insinto /usr/lib/modules-load.d/ - doins "${FILESDIR}"/virtualbox.conf -} diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest index 1cb020f0..237da10d 100644 --- a/app-emulation/virtualbox/Manifest +++ b/app-emulation/virtualbox/Manifest @@ -1,2 +1,2 @@ -DIST VirtualBox-5.1.8.tar.bz2 114688166 SHA256 e447031de468aee746529b2cf60768922f9beff22a13c54284aa430f5e925933 SHA512 178299173ee0062e23aee779faa893a42815d17163eab9ba2ed8b46be63a7110fe1690792de21514dc05ccd5a1752ea0f11357220e0e6f91f101dea3416e819c WHIRLPOOL 20ea8d253d177fd11c4349656aaa0f87f0fb76018511b345e85800d4dd8ab1e2e05c300a1f932670e5f5fac6ea547bfaa0a52b8526c4f363358911c770444a81 +DIST VirtualBox-5.1.14.tar.bz2 115042132 SHA256 8267bb026717c6e55237eb798210767d9c703cfcdf01224d9bc26f7dac9f228a SHA512 ab0646c587fa1b573a9332ca0f1959660adc02f2ecf63ac808f4a7e3ceb9b2c58adab8e309aec4630ff7fa447f47d7487e7e8d0a1f718a42d39ce71e96067fae WHIRLPOOL 915b3ac0d50def86e92b662c7fe32e1390c9dab73efb9fc9595465c45818b86b4380be93a7075d17e33f9b70d92dbbbf6063ce0dad6448c9a592648a10f2409b DIST virtualbox-5.1.6-patches-01.tar.xz 4268 SHA256 5bfae08bc53fee06aea501e77b7998348adba43792149248d217ab03dea8c04f SHA512 2401df42ac8c2fd1f4bbc795713b185d5e65c2a36c763fa1d7274686599808aecdc28aaa6443c9efc9842f7b3eeb928818c95d1e7ad3b86239c2ace441a5e116 WHIRLPOOL 25505eaff2eeb820a09a2c8807c2d5cec48cbfe98fcd30b04daf86c4cd7c506f09c67b80d5ecc221ded08af6e48297e0161bae16862e5a1d3204b27945c511b0 diff --git a/app-emulation/virtualbox/virtualbox-5.1.14.ebuild b/app-emulation/virtualbox/virtualbox-5.1.14.ebuild new file mode 100644 index 00000000..496e3a16 --- /dev/null +++ b/app-emulation/virtualbox/virtualbox-5.1.14.ebuild @@ -0,0 +1,447 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +inherit eutils fdo-mime flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 toolchain-funcs udev + +MY_PV="${PV/beta/BETA}" +MY_PV="${MY_PV/rc/RC}" +MY_P=VirtualBox-${MY_PV} +SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2 + https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.1.6-patches-01.tar.xz" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use" +HOMEPAGE="http://www.virtualbox.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="alsa debug doc headless java libressl lvm pam pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc" + +RDEPEND="!app-emulation/virtualbox-bin + ~app-emulation/virtualbox-modules-${PV} + dev-libs/libIDL + >=dev-libs/libxslt-1.1.19 + net-misc/curl + dev-libs/libxml2 + media-libs/libpng:0= + media-libs/libvpx:0= + sys-libs/zlib + !headless? ( + media-libs/libsdl:0[X,video] + x11-libs/libX11 + x11-libs/libXcursor + x11-libs/libXext + x11-libs/libXmu + x11-libs/libXt + opengl? ( virtual/opengl media-libs/freeglut ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwidgets:5 + dev-qt/qtx11extras:5 + opengl? ( dev-qt/qtopengl:5 ) + x11-libs/libXinerama + ) + ) + java? ( >=virtual/jre-1.6:= ) + libressl? ( dev-libs/libressl:= ) + !libressl? ( dev-libs/openssl:0= ) + lvm? ( sys-fs/lvm2 ) + udev? ( >=virtual/udev-171 ) + vnc? ( >=net-libs/libvncserver-0.9.9 )" +DEPEND="${RDEPEND} + >=dev-util/kbuild-0.1.9998_pre20131130-r1 + >=dev-lang/yasm-0.6.2 + sys-devel/bin86 + sys-libs/libcap + sys-power/iasl + virtual/pkgconfig + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + doc? ( + dev-texlive/texlive-basic + dev-texlive/texlive-latex + dev-texlive/texlive-latexrecommended + dev-texlive/texlive-latexextra + dev-texlive/texlive-fontsrecommended + dev-texlive/texlive-fontsextra + ) + !headless? ( x11-libs/libXinerama ) + java? ( >=virtual/jre-1.6:= ) + pam? ( sys-libs/pam ) + pulseaudio? ( media-sound/pulseaudio ) + qt5? ( dev-qt/linguist-tools:5 ) + vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] ) + ${PYTHON_DEPS}" + +QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so + usr/lib/virtualbox/VBoxSDL.so + usr/lib/virtualbox/VBoxSharedFolders.so + usr/lib/virtualbox/VBoxDD2.so + usr/lib/virtualbox/VBoxOGLrenderspu.so + usr/lib/virtualbox/VBoxPython.so + usr/lib/virtualbox/VBoxDD.so + usr/lib/virtualbox/VBoxDDU.so + usr/lib/virtualbox/VBoxREM64.so + usr/lib/virtualbox/VBoxSharedClipboard.so + usr/lib/virtualbox/VBoxHeadless.so + usr/lib/virtualbox/VBoxRT.so + usr/lib/virtualbox/VBoxREM.so + usr/lib/virtualbox/VBoxSettings.so + usr/lib/virtualbox/VBoxKeyboard.so + usr/lib/virtualbox/VBoxSharedCrOpenGL.so + usr/lib/virtualbox/VBoxVMM.so + usr/lib/virtualbox/VirtualBox.so + usr/lib/virtualbox/VBoxOGLhosterrorspu.so + usr/lib/virtualbox/components/VBoxC.so + usr/lib/virtualbox/components/VBoxSVCM.so + usr/lib/virtualbox/components/VBoxDDU.so + usr/lib/virtualbox/components/VBoxRT.so + usr/lib/virtualbox/components/VBoxREM.so + usr/lib/virtualbox/components/VBoxVMM.so + usr/lib/virtualbox/VBoxREM32.so + usr/lib/virtualbox/VBoxPython2_7.so + usr/lib/virtualbox/VBoxXPCOMC.so + usr/lib/virtualbox/VBoxOGLhostcrutil.so + usr/lib/virtualbox/VBoxNetDHCP.so + usr/lib/virtualbox/VBoxNetNAT.so" + +REQUIRED_USE=" + java? ( sdk ) + python? ( sdk ) + vboxwebsrv? ( java ) + ${PYTHON_REQUIRED_USE} +" + +pkg_setup() { + if ! use headless && ! use qt5 ; then + einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend." + elif use headless && use qt5 ; then + einfo "You selected USE=\"headless qt5\", defaulting to" + einfo "USE=\"headless\", this build will not include any X11/Qt frontend." + fi + + if ! use opengl ; then + einfo "No USE=\"opengl\" selected, this build will lack" + einfo "the OpenGL feature." + fi + if ! use python ; then + einfo "You have disabled the \"python\" USE flag. This will only" + einfo "disable the python bindings being installed." + fi + java-pkg-opt-2_pkg_setup + python-single-r1_pkg_setup + + tc-ld-disable-gold #bug 488176 + tc-export CC CXX LD AR RANLIB + export HOST_CC="$(tc-getBUILD_CC)" +} + +src_prepare() { + # Remove shipped binaries (kBuild,yasm), see bug #232775 + rm -r kBuild/bin tools || die + + # Remove pointless GCC version limitations in check_gcc() + sed -e "/\s*-o\s*\\\(\s*\$cc_maj\s*-eq\s*[5-9]\s*-a\s*\$cc_min\s*-gt\s*[0-5]\s*\\\)\s*\\\/d" \ + -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 + rm "${WORKDIR}"/patches/050_${PN}-*-nopie.patch || die + fi + + eapply "${WORKDIR}/patches" + + eapply_user +} + +src_configure() { + local myconf=() + use alsa || myconf+=( --disable-alsa ) + use debug && myconf+=( --build-debug ) + use doc || myconf+=( --disable-docs ) + use java || myconf+=( --disable-java ) + use lvm || myconf+=( --disable-devmapper ) + use opengl || myconf+=( --disable-opengl ) + use pulseaudio || myconf+=( --disable-pulse ) + use python || myconf+=( --disable-python ) + use vboxwebsrv && myconf+=( --enable-webservice ) + use vnc && myconf+=( --enable-vnc ) + if ! use headless ; then + use qt5 || myconf+=( --disable-qt ) + else + myconf+=( --build-headless --disable-opengl ) + fi + if use amd64 && ! has_multilib_profile ; then + myconf+=( --disable-vmmraw ) + fi + # not an autoconf script + ./configure \ + --with-gcc="$(tc-getCC)" \ + --with-g++="$(tc-getCXX)" \ + --disable-dbus \ + --disable-kmods \ + ${myconf[@]} \ + || die "configure failed" +} + +src_compile() { + source ./env.sh || die + + # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529) + MAKEJOBS=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+') + MAKELOAD=$(echo ${MAKEOPTS} | egrep -o '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+') #' + MAKEOPTS="${MAKEJOBS} ${MAKELOAD}" + MAKE="kmk" emake \ + VBOX_BUILD_PUBLISHER=_Gentoo \ + TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \ + TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \ + TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \ + TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \ + VBOX_GCC_OPT="${CXXFLAGS}" \ + TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \ + all +} + +src_install() { + local binpath="release" + use debug && binpath="debug" + cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die + + local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile + + vbox_inst() { + local binary="${1}" + local perms="${2:-0750}" + local path="${3:-${vbox_inst_path}}" + + [[ -n "${binary}" ]] || die "vbox_inst: No binray given!" + [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits." + + insinto ${path} + doins ${binary} + fowners root:vboxusers ${path}/${binary} + fperms ${perms} ${path}/${binary} + } + + # Create configuration files + insinto /etc/vbox + newins "${FILESDIR}/${PN}-4-config" vbox.cfg + + # Set the correct libdir + sed \ + -e "s@MY_LIBDIR@$(get_libdir)@" \ + -i "${D}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed" + + # Install the wrapper script + exeinto ${vbox_inst_path} + newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox" + fowners root:vboxusers ${vbox_inst_path}/VBox + fperms 0750 ${vbox_inst_path}/VBox + + # Install binaries and libraries + insinto ${vbox_inst_path} + doins -r components + + # *.rc files for x86_64 are only available on multilib systems + local rcfiles="*.rc" + if use amd64 && ! has_multilib_profile ; then + rcfiles="" + fi + for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do + vbox_inst ${each} + done + + # These binaries need to be suid root. + for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do + vbox_inst ${each} 4750 + done + + # Install EFI Firmware files (bug #320757) + pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die + for fwfile in VBoxEFI{32,64}.fd ; do + vbox_inst ${fwfile} 0644 + done + popd &>/dev/null || die + + # VBoxSVC and VBoxManage need to be pax-marked (bug #403453) + # VBoxXPCOMIPCD (bug #524202) + for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do + pax-mark -m "${D}"${vbox_inst_path}/${each} + done + + # Symlink binaries to the shipped wrapper + for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl + + # VRDPAuth only works with this (bug #351949) + dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so + + # set an env-variable for 3rd party tools + echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox" + doenvd "${T}/90virtualbox" + + if ! use headless ; then + vbox_inst VBoxSDL 4750 + pax-mark -m "${D}"${vbox_inst_path}/VBoxSDL + + for each in vboxsdl VBoxSDL ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + + if use qt5 ; then + vbox_inst VirtualBox 4750 + pax-mark -m "${D}"${vbox_inst_path}/VirtualBox + + if use opengl ; then + vbox_inst VBoxTestOGL + pax-mark -m "${D}"${vbox_inst_path}/VBoxTestOGL + fi + + for each in virtualbox VirtualBox ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + + insinto /usr/share/${PN} + doins -r nls + + newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop + fi + + pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die + for size in 16 32 48 64 128 ; do + newicon -s ${size} ${PN}-${size}px.png ${PN}.png + done + newicon ${PN}-48px.png ${PN}.png + doicon -s scalable ${PN}.svg + popd &>/dev/null || die + pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die + for size in 16 24 32 48 64 72 96 128 256 512 ; do + for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do + icofile="${PN}-${ico}-${size}px.png" + if [[ -f "${icofile}" ]] ; then + newicon -s ${size} ${icofile} ${PN}-${ico}.png + fi + done + done + popd &>/dev/null || die + fi + + if use lvm ; then + vbox_inst VBoxVolInfo 4750 + dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo + fi + + if use sdk ; then + insinto ${vbox_inst_path} + doins -r sdk + + if use java ; then + java-pkg_regjar "${D}${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar" + java-pkg_regso "${D}${vbox_inst_path}/libvboxjxpcom.so" + fi + fi + + if use udev ; then + # New way of handling USB device nodes for VBox (bug #356215) + local udevdir="$(get_udevdir)" + insinto ${udevdir} + doins VBoxCreateUSBNode.sh + fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh + fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh + insinto ${udevdir}/rules.d + sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \ + > "${T}"/10-virtualbox.rules || die + doins "${T}"/10-virtualbox.rules + fi + + if use vboxwebsrv ; then + vbox_inst vboxwebsrv + dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv + newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv + newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv + fi +} + +pkg_postinst() { + fdo-mime_desktop_database_update + + if use udev ; then + udevadm control --reload-rules \ + && udevadm trigger --subsystem-match=usb + fi + + if ! use headless && use qt5 ; then + elog "To launch VirtualBox just type: \"virtualbox\"." + fi + elog "You must be in the vboxusers group to use VirtualBox." + elog "" + elog "The latest user manual is available for download at:" + elog "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf" + elog "" + elog "For advanced networking setups you should emerge:" + elog "net-misc/bridge-utils and sys-apps/usermode-utilities" + elog "" + elog "IMPORTANT!" + elog "If you upgrade from app-emulation/virtualbox-ose make sure to run" + elog "\"env-update\" as root and logout and relogin as the user you wish" + elog "to run ${PN} as." + elog "" + elog "Starting with version 4.0.0, ${PN} has USB-1 support." + elog "For USB-2 support, PXE-boot ability and VRDP support please emerge" + elog " app-emulation/virtualbox-extpack-oracle" + elog "package." + elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and" + elog "the \"extension\" USE flag. For installation of the guest additions ISO" + elog "image, please emerge" + elog " app-emulation/virtualbox-additions" + elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge" + elog " app-emulation/virtualbox-extpack-oracle" + if ! use udev ; then + elog "" + elog "WARNING!" + elog "Without USE=udev, USB devices will likely not work in ${PN}." + elif [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then + elog "" + elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\"" + elog "or else USB in ${PN} won't work." + fi +} + +pkg_postrm() { + fdo-mime_desktop_database_update +} diff --git a/app-emulation/virtualbox/virtualbox-5.1.8.ebuild b/app-emulation/virtualbox/virtualbox-5.1.8.ebuild deleted file mode 100644 index 396fb664..00000000 --- a/app-emulation/virtualbox/virtualbox-5.1.8.ebuild +++ /dev/null @@ -1,447 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) -inherit eutils fdo-mime flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 toolchain-funcs udev - -MY_PV="${PV/beta/BETA}" -MY_PV="${MY_PV/rc/RC}" -MY_P=VirtualBox-${MY_PV} -SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2 - https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.1.6-patches-01.tar.xz" -S="${WORKDIR}/${MY_P}" - -DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use" -HOMEPAGE="http://www.virtualbox.org/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="alsa debug doc headless java libressl +lvm pam pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc" - -RDEPEND="!app-emulation/virtualbox-bin - ~app-emulation/virtualbox-modules-${PV} - dev-libs/libIDL - >=dev-libs/libxslt-1.1.19 - net-misc/curl - dev-libs/libxml2 - media-libs/libpng:0= - media-libs/libvpx:0= - sys-libs/zlib - !headless? ( - media-libs/libsdl:0[X,video] - x11-libs/libX11 - x11-libs/libXcursor - x11-libs/libXext - x11-libs/libXmu - x11-libs/libXt - opengl? ( virtual/opengl media-libs/freeglut ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtprintsupport:5 - dev-qt/qtwidgets:5 - dev-qt/qtx11extras:5 - opengl? ( dev-qt/qtopengl:5 ) - x11-libs/libXinerama - ) - ) - java? ( >=virtual/jre-1.6:= ) - libressl? ( dev-libs/libressl:= ) - !libressl? ( dev-libs/openssl:0= ) - lvm? ( sys-fs/lvm2 ) - udev? ( >=virtual/udev-171 ) - vnc? ( >=net-libs/libvncserver-0.9.9 )" -DEPEND="${RDEPEND} - >=dev-util/kbuild-0.1.9998_pre20131130-r1 - >=dev-lang/yasm-0.6.2 - sys-devel/bin86 - sys-libs/libcap - sys-power/iasl - virtual/pkgconfig - alsa? ( >=media-libs/alsa-lib-1.0.13 ) - doc? ( - dev-texlive/texlive-basic - dev-texlive/texlive-latex - dev-texlive/texlive-latexrecommended - dev-texlive/texlive-latexextra - dev-texlive/texlive-fontsrecommended - dev-texlive/texlive-fontsextra - ) - !headless? ( x11-libs/libXinerama ) - java? ( >=virtual/jre-1.6:= ) - pam? ( sys-libs/pam ) - pulseaudio? ( media-sound/pulseaudio ) - qt5? ( dev-qt/linguist-tools:5 ) - vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] ) - ${PYTHON_DEPS}" - -QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so - usr/lib/virtualbox/VBoxSDL.so - usr/lib/virtualbox/VBoxSharedFolders.so - usr/lib/virtualbox/VBoxDD2.so - usr/lib/virtualbox/VBoxOGLrenderspu.so - usr/lib/virtualbox/VBoxPython.so - usr/lib/virtualbox/VBoxDD.so - usr/lib/virtualbox/VBoxDDU.so - usr/lib/virtualbox/VBoxREM64.so - usr/lib/virtualbox/VBoxSharedClipboard.so - usr/lib/virtualbox/VBoxHeadless.so - usr/lib/virtualbox/VBoxRT.so - usr/lib/virtualbox/VBoxREM.so - usr/lib/virtualbox/VBoxSettings.so - usr/lib/virtualbox/VBoxKeyboard.so - usr/lib/virtualbox/VBoxSharedCrOpenGL.so - usr/lib/virtualbox/VBoxVMM.so - usr/lib/virtualbox/VirtualBox.so - usr/lib/virtualbox/VBoxOGLhosterrorspu.so - usr/lib/virtualbox/components/VBoxC.so - usr/lib/virtualbox/components/VBoxSVCM.so - usr/lib/virtualbox/components/VBoxDDU.so - usr/lib/virtualbox/components/VBoxRT.so - usr/lib/virtualbox/components/VBoxREM.so - usr/lib/virtualbox/components/VBoxVMM.so - usr/lib/virtualbox/VBoxREM32.so - usr/lib/virtualbox/VBoxPython2_7.so - usr/lib/virtualbox/VBoxXPCOMC.so - usr/lib/virtualbox/VBoxOGLhostcrutil.so - usr/lib/virtualbox/VBoxNetDHCP.so - usr/lib/virtualbox/VBoxNetNAT.so" - -REQUIRED_USE=" - java? ( sdk ) - python? ( sdk ) - vboxwebsrv? ( java ) - ${PYTHON_REQUIRED_USE} -" - -pkg_setup() { - if ! use headless && ! use qt5 ; then - einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend." - elif use headless && use qt5 ; then - einfo "You selected USE=\"headless qt5\", defaulting to" - einfo "USE=\"headless\", this build will not include any X11/Qt frontend." - fi - - if ! use opengl ; then - einfo "No USE=\"opengl\" selected, this build will lack" - einfo "the OpenGL feature." - fi - if ! use python ; then - einfo "You have disabled the \"python\" USE flag. This will only" - einfo "disable the python bindings being installed." - fi - java-pkg-opt-2_pkg_setup - python-single-r1_pkg_setup - - tc-ld-disable-gold #bug 488176 - tc-export CC CXX LD AR RANLIB - export HOST_CC="$(tc-getBUILD_CC)" -} - -src_prepare() { - # Remove shipped binaries (kBuild,yasm), see bug #232775 - rm -r kBuild/bin tools || die - - # Remove pointless GCC version limitations in check_gcc() - sed -e "/\s*-o\s*\\\(\s*\$cc_maj\s*-eq\s*[5-9]\s*-a\s*\$cc_min\s*-gt\s*[0-5]\s*\\\)\s*\\\/d" \ - -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 - rm "${WORKDIR}"/patches/050_${PN}-*-nopie.patch || die - fi - - eapply "${WORKDIR}/patches" - - eapply_user -} - -src_configure() { - local myconf - use alsa || myconf+=( --disable-alsa ) - use debug && myconf+=( --build-debug ) - use doc || myconf+=( --disable-docs ) - use java || myconf+=( --disable-java ) - use lvm || myconf+=( --disable-devmapper ) - use opengl || myconf+=( --disable-opengl ) - use pulseaudio || myconf+=( --disable-pulse ) - use python || myconf+=( --disable-python ) - use vboxwebsrv && myconf+=( --enable-webservice ) - use vnc && myconf+=( --enable-vnc ) - if ! use headless ; then - use qt5 || myconf+=( --disable-qt ) - else - myconf+=( --build-headless --disable-opengl ) - fi - if use amd64 && ! has_multilib_profile ; then - myconf+=( --disable-vmmraw ) - fi - # not an autoconf script - ./configure \ - --with-gcc="$(tc-getCC)" \ - --with-g++="$(tc-getCXX)" \ - --disable-dbus \ - --disable-kmods \ - ${myconf[@]} \ - || die "configure failed" -} - -src_compile() { - source ./env.sh || die - - # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529) - MAKEJOBS=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+') - MAKELOAD=$(echo ${MAKEOPTS} | egrep -o '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+') #' - MAKEOPTS="${MAKEJOBS} ${MAKELOAD}" - MAKE="kmk" emake \ - VBOX_BUILD_PUBLISHER=_Gentoo \ - TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \ - TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \ - TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \ - TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \ - VBOX_GCC_OPT="${CXXFLAGS}" \ - TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \ - all -} - -src_install() { - local binpath="release" - use debug && binpath="debug" - cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die - - local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile - - vbox_inst() { - local binary="${1}" - local perms="${2:-0750}" - local path="${3:-${vbox_inst_path}}" - - [[ -n "${binary}" ]] || die "vbox_inst: No binray given!" - [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits." - - insinto ${path} - doins ${binary} - fowners root:vboxusers ${path}/${binary} - fperms ${perms} ${path}/${binary} - } - - # Create configuration files - insinto /etc/vbox - newins "${FILESDIR}/${PN}-4-config" vbox.cfg - - # Set the correct libdir - sed \ - -e "s@MY_LIBDIR@$(get_libdir)@" \ - -i "${D}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed" - - # Install the wrapper script - exeinto ${vbox_inst_path} - newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox" - fowners root:vboxusers ${vbox_inst_path}/VBox - fperms 0750 ${vbox_inst_path}/VBox - - # Install binaries and libraries - insinto ${vbox_inst_path} - doins -r components - - # *.rc files for x86_64 are only available on multilib systems - local rcfiles="*.rc" - if use amd64 && ! has_multilib_profile ; then - rcfiles="" - fi - for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do - vbox_inst ${each} - done - - # These binaries need to be suid root. - for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do - vbox_inst ${each} 4750 - done - - # Install EFI Firmware files (bug #320757) - pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die - for fwfile in VBoxEFI{32,64}.fd ; do - vbox_inst ${fwfile} 0644 - done - popd &>/dev/null || die - - # VBoxSVC and VBoxManage need to be pax-marked (bug #403453) - # VBoxXPCOMIPCD (bug #524202) - for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do - pax-mark -m "${D}"${vbox_inst_path}/${each} - done - - # Symlink binaries to the shipped wrapper - for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do - dosym ${vbox_inst_path}/VBox /usr/bin/${each} - done - dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl - - # VRDPAuth only works with this (bug #351949) - dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so - - # set an env-variable for 3rd party tools - echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox" - doenvd "${T}/90virtualbox" - - if ! use headless ; then - vbox_inst VBoxSDL 4750 - pax-mark -m "${D}"${vbox_inst_path}/VBoxSDL - - for each in vboxsdl VBoxSDL ; do - dosym ${vbox_inst_path}/VBox /usr/bin/${each} - done - - if use qt5 ; then - vbox_inst VirtualBox 4750 - pax-mark -m "${D}"${vbox_inst_path}/VirtualBox - - if use opengl ; then - vbox_inst VBoxTestOGL - pax-mark -m "${D}"${vbox_inst_path}/VBoxTestOGL - fi - - for each in virtualbox VirtualBox ; do - dosym ${vbox_inst_path}/VBox /usr/bin/${each} - done - - insinto /usr/share/${PN} - doins -r nls - - newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop - fi - - pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die - for size in 16 32 48 64 128 ; do - newicon -s ${size} ${PN}-${size}px.png ${PN}.png - done - newicon ${PN}-48px.png ${PN}.png - doicon -s scalable ${PN}.svg - popd &>/dev/null || die - pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die - for size in 16 24 32 48 64 72 96 128 256 512 ; do - for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do - icofile="${PN}-${ico}-${size}px.png" - if [[ -f "${icofile}" ]] ; then - newicon -s ${size} ${icofile} ${PN}-${ico}.png - fi - done - done - popd &>/dev/null || die - fi - - if use lvm ; then - vbox_inst VBoxVolInfo 4750 - dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo - fi - - if use sdk ; then - insinto ${vbox_inst_path} - doins -r sdk - - if use java ; then - java-pkg_regjar "${D}${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar" - java-pkg_regso "${D}${vbox_inst_path}/libvboxjxpcom.so" - fi - fi - - if use udev ; then - # New way of handling USB device nodes for VBox (bug #356215) - local udevdir="$(get_udevdir)" - insinto ${udevdir} - doins VBoxCreateUSBNode.sh - fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh - fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh - insinto ${udevdir}/rules.d - sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \ - > "${T}"/10-virtualbox.rules || die - doins "${T}"/10-virtualbox.rules - fi - - if use vboxwebsrv ; then - vbox_inst vboxwebsrv - dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv - newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv - newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv - fi -} - -pkg_postinst() { - fdo-mime_desktop_database_update - - if use udev ; then - udevadm control --reload-rules \ - && udevadm trigger --subsystem-match=usb - fi - - if ! use headless && use qt5 ; then - elog "To launch VirtualBox just type: \"virtualbox\"." - fi - elog "You must be in the vboxusers group to use VirtualBox." - elog "" - elog "The latest user manual is available for download at:" - elog "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf" - elog "" - elog "For advanced networking setups you should emerge:" - elog "net-misc/bridge-utils and sys-apps/usermode-utilities" - elog "" - elog "IMPORTANT!" - elog "If you upgrade from app-emulation/virtualbox-ose make sure to run" - elog "\"env-update\" as root and logout and relogin as the user you wish" - elog "to run ${PN} as." - elog "" - elog "Starting with version 4.0.0, ${PN} has USB-1 support." - elog "For USB-2 support, PXE-boot ability and VRDP support please emerge" - elog " app-emulation/virtualbox-extpack-oracle" - elog "package." - elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and" - elog "the \"extension\" USE flag. For installation of the guest additions ISO" - elog "image, please emerge" - elog " app-emulation/virtualbox-additions" - elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge" - elog " app-emulation/virtualbox-extpack-oracle" - if ! use udev ; then - elog "" - elog "WARNING!" - elog "Without USE=udev, USB devices will likely not work in ${PN}." - elif [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then - elog "" - elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\"" - elog "or else USB in ${PN} won't work." - fi -} - -pkg_postrm() { - fdo-mime_desktop_database_update -} -- cgit v1.2.3