summaryrefslogtreecommitdiff
path: root/app-emulation/virtualbox
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-04-19 14:14:48 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-04-19 14:14:48 +0100
commit5cfef3c94cd7e82136c69a0322f5ba21f7e64632 (patch)
tree8f255dfacbacb657e3ac3654d01c1e11e651c066 /app-emulation/virtualbox
parent8aebb228036d5e2863b7eaa6e319ab41c1669269 (diff)
gentoo resync : 19.04.2018
Diffstat (limited to 'app-emulation/virtualbox')
-rw-r--r--app-emulation/virtualbox/Manifest6
-rw-r--r--app-emulation/virtualbox/virtualbox-5.1.36.ebuild (renamed from app-emulation/virtualbox/virtualbox-5.2.6.ebuild)14
-rw-r--r--app-emulation/virtualbox/virtualbox-5.2.10.ebuild468
3 files changed, 477 insertions, 11 deletions
diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index 7b3d441d13bf..c80771dd69b2 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -12,12 +12,14 @@ AUX virtualbox-ose.desktop-2 201 BLAKE2B 05fbf657e8c1d8ec46f1b88e681efd50a4e5ab2
AUX virtualbox-vboxusb_tmpfilesd 35 BLAKE2B 56937e236a0e4d1a2aa085271e8ae0af9553fdf7c3b804af4d3fda3aa8dbc32d63762fee90bc949390cb9cd67f2f0111894c8af084731dab6920ae1675c69a64 SHA512 72e4602f5f214f8833486f5c787c263a10390e8bdf65b5615d67c35ec44048f02add12fe43b19f9c57a9d2f12d768c52e54fcfb9052c0611d06cc988a698c171
DIST VirtualBox-5.1.32.tar.bz2 117268301 BLAKE2B 336df054e3407d7e701d6719258cfcba9beec1439cbe94f137570cfcbdea02df3e34374ac36d3b4387c47ebafd17a0f05c2fb710eb4f140d8200117b505aba98 SHA512 052ac1672515a36c4138e2d52672a466d4c768f219f52eefe98e747a292ebebe04e7de35547eae6803654be5dc937b8e6f4d358a65fd4f49a8333eac8862d138
DIST VirtualBox-5.1.34.tar.bz2 117291269 BLAKE2B 0eb9b3f778f2d677ac3635fa59dfa6861d0fec3c0331582e5961b78ab55b5ab26bbf286de05a3e87e8a64e2b54861613a8d2c93f70736a07c551dca834786abd SHA512 0f828e58d68678a0a94a39c12313425105f9255ca207d40dd04065d0072857cdc4fc886f944b852c3fb63fed04d70a3449aecd2aab9e27af7f13b506143a4b6f
-DIST VirtualBox-5.2.6.tar.bz2 118530572 BLAKE2B 19d32a9252e9594a4c09828bc2bc739c46daf409745c01f764fb54bc17faa667081a27534ac11666cbf1b417057cb99a416faa42e3986ce4d2c08378e7e7240c SHA512 ed6f801c055e9b8e152118a1ebfecdc15c310fac2b007ea3cd4a404d17cbbbc83782a3baa76b979c72b9399616844291576846d820f8aefb7c4b4ec2eaf36482
+DIST VirtualBox-5.1.36.tar.bz2 117244376 BLAKE2B 141048f4fcbb3ce63d236a4127b4bce377e87876c23dc3ff6437b2c0cca5b468bc6a5737899b308bc1ff3252d4e61f7d053ff7574c33c85b56fdd986c31f2af3 SHA512 d1a9322c97c68cc9c21247c3df8ce2084911aded66a63adf5510f9e0f4558b1304dfe924a0c44243adc1ae8f7c45c47782e882baac1bfe995ea6c0a1370fcbd1
+DIST VirtualBox-5.2.10.tar.bz2 118575607 BLAKE2B 46360d63cf6d1b8744016cbb2c1eee1d57ebafc45f8b32782c7216fc547f24af4c7205b4e7c34d24cd7faf7e8ce4ea8373ad4a310040a6ef9b043a8ce2300f94 SHA512 1e6d5e5c6ce45d9a3864860819f6301c192c83be154c674cfb37c98506db88a8f70526ec05d115c53e40c4c91d243513f0a3196261c7dee244a18091b2e5717e
DIST VirtualBox-5.2.8.tar.bz2 118500065 BLAKE2B 64d0cc0f928d224332f59e7966ee1bed8adcf097d27c577b6ecea5cbf203e170e38acca9f2371d6d7aa11f63b73e705b43a0516ccbe5993171f928406b8a3876 SHA512 49a3bd1c60d2c4cbd3799ece5fbfe15d9b6a00c5af9692478a1365a8eb4975228410e17dba24a388c0cf5387cb79fb7492feb4e6b2f531bc17322c3d61de7887
DIST virtualbox-5.1.32-patches-01.tar.xz 2464 BLAKE2B 28f461634ac7f200b74d961e56f56aea486445bdb8d1490000bd34393b4873ee058d1dc9db6c32084921bd7d51a92be1e38b1b098385f443f41b9231c1489829 SHA512 08782c8eecc0cbb370f21fb3951af449ed1c8174a7184210de376a7d4ca5d64b14b2619d121aacef1c85982c8b485e545e260d3c0fc1f95769093efa23cd2cd2
DIST virtualbox-5.2.0-patches-01.tar.xz 2460 BLAKE2B d3f973dc7ee0557c360f801c3bf84065a7e7bc9960984398b8f86d71fab32c59774e970c6cf873be07bcb9666af168570e8a78705a5999b1fc5d863dbbc6e538 SHA512 b91278dd81a50e412f5a281c72949f591a1c53303080549b74b28763cab9e3948948afb0256e0453d17736683cca3372a8e9c6d63f02f3eff3ef92c2a1ea332b
EBUILD virtualbox-5.1.32.ebuild 13944 BLAKE2B 4c0da01774ca4fae3b3ecffdf6739282d268ddcf8b916173c946d1a4977f00dfa012dedeb818f6cfdd28197bd6410bb0cfeb14a5e752643d0c90110b90293b27 SHA512 2e8dc871197657b8783d032188a598e09366850ed6aba92d118f6e5789e443ccecf366c4dd160eaa189cb06919076ec73c1bdbb3045b50a2a7ca0c5e318fc61c
EBUILD virtualbox-5.1.34.ebuild 13744 BLAKE2B 106f8f073d45142839343e6f8332cd4c2989096195e7437f34985a3ace51813a36a4b6cbbfeedaad1cc4c4e449d78baeade80291332a69419be7113e93c65675 SHA512 5530ec6aee0f7a9bc83c978a03ca4b63b18e7ed2e58f95bb481f959d666b7c75543604b00dd6912801a9c6d84ec26dd6427e69edfdb08e19018cf0e0a4162ad8
-EBUILD virtualbox-5.2.6.ebuild 13935 BLAKE2B 497dec1a702f7789ab816dbb1cdec0761f03d01c56e34fe0ef66c1829c19a6235126d11d90c9b18df3407f73477c51c50af9fbe6d7533e1ffa31a8bdac88a4b3 SHA512 eea3c9e165fe2621e262d7506ff790fffe39c77cf485b678838ff38780ae2bcfa082c961eee4768622b5a2ecd2432e8211e38751223a58797f2d63efc62f4b4f
+EBUILD virtualbox-5.1.36.ebuild 13741 BLAKE2B 3ef2174630759483ad199bccaa4bde5a32c633f13f5a601f089291982f4b8199b23182fe9edba927016d44a3188df8f5145d2718059f32417d65108024950732 SHA512 be794585dd46c608accce3c1a95627c2ad0d8681bdb2d1b71be97a67f4621aaeac870d7f72dfc9fb0e29e6910c8173e2079548348ffcc8d08c6bec028faf522e
+EBUILD virtualbox-5.2.10.ebuild 13729 BLAKE2B 3659a5c2cf0b7bcdaa1fd0e9fc797e0efc91a1d197676bec23000c13747e7ac85cb995503c79654cf49160b81a12544058144a63f8219d8e81df55e8cc2ae3e7 SHA512 971467d54021f1333e39cf15dc951454ebf55f0b63f496e381e962280cf4a8b33e416aa078e456f4fe71306a2ddb99842fbebb601d402d4fefa4145ffb6f6cbb
EBUILD virtualbox-5.2.8.ebuild 13732 BLAKE2B 8ae5d949138ee928a0036289afc1936abca2dce7914fa36639b8df7990d1e7056d0f583319c9c8c0918a8f987e86ae2abb167584c921c8e7e3dc69261855f6cc SHA512 a7f242e2491e6e541981259a1434cbc944ff679d0b897aeb56530e048cb368b18b168fdf2252399c4831d224b99e527c5661ef7606f6d02ab983e8448ea21a62
MISC metadata.xml 886 BLAKE2B b8d7691c820ac4d8b0aa2033037a9229ebf68ba005b5c870e6d14dee4fbb9b5c0992904223caeb869fc265d48c57cd7f486d628cc4018cc018e8e32999175df3 SHA512 954d38fbbf08cce200af437ee3a0167bd39b4554c53b93d8f8961ac16e21a173fe4c4271fa8bf0ce2e354437c066e0ab4133131b03dac6ffcc2c92564584d081
diff --git a/app-emulation/virtualbox/virtualbox-5.2.6.ebuild b/app-emulation/virtualbox/virtualbox-5.1.36.ebuild
index e6601c30c85b..73a8fc1d5787 100644
--- a/app-emulation/virtualbox/virtualbox-5.2.6.ebuild
+++ b/app-emulation/virtualbox/virtualbox-5.1.36.ebuild
@@ -4,7 +4,7 @@
EAPI=6
PYTHON_COMPAT=( python2_7 )
-inherit eutils flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils
+inherit flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils
MY_PV="${PV/beta/BETA}"
MY_PV="${MY_PV/rc/RC}"
@@ -13,7 +13,7 @@ MY_P=VirtualBox-${MY_PV}
DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
HOMEPAGE="https://www.virtualbox.org/"
SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
- https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.0-patches-01.tar.xz"
+ https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.1.32-patches-01.tar.xz"
LICENSE="GPL-2"
SLOT="0"
@@ -53,7 +53,7 @@ RDEPEND="!app-emulation/virtualbox-bin
udev? ( >=virtual/udev-171 )
vnc? ( >=net-libs/libvncserver-0.9.9 )"
DEPEND="${RDEPEND}
- >=dev-util/kbuild-0.1.9998.3127
+ >=dev-util/kbuild-0.1.9998_pre20131130-r1
>=dev-lang/yasm-0.6.2
sys-devel/bin86
sys-libs/libcap
@@ -151,7 +151,8 @@ src_prepare() {
# 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
+ sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' \
+ -i configure || die
# Don't use "echo -n"
sed 's@ECHO_N="echo -n"@ECHO_N="printf"@' -i configure || die
@@ -441,11 +442,6 @@ pkg_postinst() {
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"
diff --git a/app-emulation/virtualbox/virtualbox-5.2.10.ebuild b/app-emulation/virtualbox/virtualbox-5.2.10.ebuild
new file mode 100644
index 000000000000..9286de0063a6
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-5.2.10.ebuild
@@ -0,0 +1,468 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils
+
+MY_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=VirtualBox-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.0-patches-01.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug doc headless java libressl lvm pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
+
+RDEPEND="!app-emulation/virtualbox-bin
+ ~app-emulation/virtualbox-modules-${PV}
+ dev-libs/libIDL
+ >=dev-libs/libxslt-1.1.19
+ net-misc/curl
+ dev-libs/libxml2
+ media-libs/libpng:0=
+ media-libs/libvpx:0=
+ sys-libs/zlib
+ !headless? (
+ media-libs/libsdl:0[X,video]
+ x11-libs/libX11
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ opengl? ( virtual/opengl media-libs/freeglut )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ opengl? ( dev-qt/qtopengl:5 )
+ x11-libs/libXinerama
+ )
+ )
+ libressl? ( dev-libs/libressl:= )
+ !libressl? ( dev-libs/openssl:0= )
+ lvm? ( sys-fs/lvm2 )
+ udev? ( >=virtual/udev-171 )
+ vnc? ( >=net-libs/libvncserver-0.9.9 )"
+DEPEND="${RDEPEND}
+ >=dev-util/kbuild-0.1.9998.3127
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-libs/libcap
+ sys-power/iasl
+ virtual/pkgconfig
+ alsa? ( >=media-libs/alsa-lib-1.0.13 )
+ doc? (
+ app-text/docbook-sgml-dtd:4.4
+ dev-texlive/texlive-basic
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexrecommended
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-fontsrecommended
+ dev-texlive/texlive-fontsextra
+ )
+ !headless? ( x11-libs/libXinerama )
+ java? ( >=virtual/jdk-1.6 )
+ pam? ( sys-libs/pam )
+ pax_kernel? ( sys-apps/elfix )
+ pulseaudio? ( media-sound/pulseaudio )
+ qt5? ( dev-qt/linguist-tools:5 )
+ vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
+ ${PYTHON_DEPS}"
+RDEPEND="${RDEPEND}
+ java? ( >=virtual/jre-1.6 )"
+
+QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
+ usr/lib/virtualbox/VBoxSDL.so
+ usr/lib/virtualbox/VBoxSharedFolders.so
+ usr/lib/virtualbox/VBoxDD2.so
+ usr/lib/virtualbox/VBoxOGLrenderspu.so
+ usr/lib/virtualbox/VBoxPython.so
+ usr/lib/virtualbox/VBoxDD.so
+ usr/lib/virtualbox/VBoxDDU.so
+ usr/lib/virtualbox/VBoxREM64.so
+ usr/lib/virtualbox/VBoxSharedClipboard.so
+ usr/lib/virtualbox/VBoxHeadless.so
+ usr/lib/virtualbox/VBoxRT.so
+ usr/lib/virtualbox/VBoxREM.so
+ usr/lib/virtualbox/VBoxSettings.so
+ usr/lib/virtualbox/VBoxKeyboard.so
+ usr/lib/virtualbox/VBoxSharedCrOpenGL.so
+ usr/lib/virtualbox/VBoxVMM.so
+ usr/lib/virtualbox/VirtualBox.so
+ usr/lib/virtualbox/VBoxOGLhosterrorspu.so
+ usr/lib/virtualbox/components/VBoxC.so
+ usr/lib/virtualbox/components/VBoxSVCM.so
+ usr/lib/virtualbox/components/VBoxDDU.so
+ usr/lib/virtualbox/components/VBoxRT.so
+ usr/lib/virtualbox/components/VBoxREM.so
+ usr/lib/virtualbox/components/VBoxVMM.so
+ usr/lib/virtualbox/VBoxREM32.so
+ usr/lib/virtualbox/VBoxPython2_7.so
+ usr/lib/virtualbox/VBoxXPCOMC.so
+ usr/lib/virtualbox/VBoxOGLhostcrutil.so
+ usr/lib/virtualbox/VBoxNetDHCP.so
+ usr/lib/virtualbox/VBoxNetNAT.so"
+
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="
+ java? ( sdk )
+ python? ( sdk )
+ vboxwebsrv? ( java )
+ ${PYTHON_REQUIRED_USE}
+"
+
+pkg_setup() {
+ if ! use headless && ! use qt5 ; then
+ einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend."
+ elif use headless && use qt5 ; then
+ einfo "You selected USE=\"headless qt5\", defaulting to"
+ einfo "USE=\"headless\", this build will not include any X11/Qt frontend."
+ fi
+
+ if ! use opengl ; then
+ einfo "No USE=\"opengl\" selected, this build will lack"
+ einfo "the OpenGL feature."
+ fi
+ if ! use python ; then
+ einfo "You have disabled the \"python\" USE flag. This will only"
+ einfo "disable the python bindings being installed."
+ fi
+ java-pkg-opt-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ tc-ld-disable-gold #bug 488176
+ tc-export CC CXX LD AR RANLIB
+ export HOST_CC="$(tc-getBUILD_CC)"
+}
+
+src_prepare() {
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Replace pointless GCC version check with something less stupid.
+ # This is needed for the qt5 version check.
+ sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' \
+ -i configure || die
+
+ # Don't use "echo -n"
+ sed 's@ECHO_N="echo -n"@ECHO_N="printf"@' -i configure || die
+
+ # Disable things unused or split into separate ebuilds
+ sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+ "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
+
+ # Respect LDFLAGS
+ sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+ -i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+ # Do not use hard-coded ld (related to bug #488176)
+ sed -e '/QUIET)ld /s@ld @$(LD) @' \
+ -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+ # Use PAM only when pam USE flag is enbaled (bug #376531)
+ if ! use pam ; then
+ elog "Disabling PAM removes the possibility to use the VRDP features."
+ sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+ sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+ src/VBox/HostServices/Makefile.kmk || die
+ fi
+
+ # add correct java path
+ if use java ; then
+ sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+ -i "${S}"/Config.kmk || die
+ java-pkg-opt-2_src_prepare
+ fi
+
+ # Only add nopie patch when we're on hardened
+ if gcc-specs-pie ; then
+ eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
+ fi
+
+ # Only add paxmark patch when we're on pax_kernel
+ if use pax_kernel ; then
+ eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
+ fi
+
+ eapply "${WORKDIR}/patches"
+
+ eapply_user
+}
+
+src_configure() {
+ local myconf=(
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+ --disable-dbus
+ --disable-kmods
+ $(usex alsa '' --disable-alsa)
+ $(usex debug --build-debug '')
+ $(usex doc '' --disable-docs)
+ $(usex java '' --disable-java)
+ $(usex lvm '' --disable-devmapper)
+ $(usex pulseaudio '' --disable-pulse)
+ $(usex python '' --disable-python)
+ $(usex vboxwebsrv --enable-webservice '')
+ $(usex vnc --enable-vnc '')
+ )
+ if ! use headless ; then
+ myconf+=(
+ $(usex opengl '' --disable-opengl)
+ $(usex qt5 '' --disable-qt)
+ )
+ else
+ myconf+=(
+ --build-headless
+ --disable-opengl
+ )
+ fi
+ if use amd64 && ! has_multilib_profile ; then
+ myconf+=( --disable-vmmraw )
+ fi
+ # not an autoconf script
+ ./configure ${myconf[@]} || die "configure failed"
+}
+
+src_compile() {
+ source ./env.sh || die
+
+ # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+ MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
+ MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
+ MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+ MAKE="kmk" emake \
+ VBOX_BUILD_PUBLISHER=_Gentoo \
+ TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
+ TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
+ TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
+ TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
+ VBOX_GCC_OPT="${CXXFLAGS}" \
+ TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
+ all
+}
+
+src_install() {
+ local binpath="release"
+ use debug && binpath="debug"
+ cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die
+
+ local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile
+
+ vbox_inst() {
+ local binary="${1}"
+ local perms="${2:-0750}"
+ local path="${3:-${vbox_inst_path}}"
+
+ [[ -n "${binary}" ]] || die "vbox_inst: No binray given!"
+ [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+ insinto ${path}
+ doins ${binary}
+ fowners root:vboxusers ${path}/${binary}
+ fperms ${perms} ${path}/${binary}
+ }
+
+ # Create configuration files
+ insinto /etc/vbox
+ newins "${FILESDIR}/${PN}-4-config" vbox.cfg
+
+ # Set the correct libdir
+ sed \
+ -e "s@MY_LIBDIR@$(get_libdir)@" \
+ -i "${D}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+ # Install the wrapper script
+ exeinto ${vbox_inst_path}
+ newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox"
+ fowners root:vboxusers ${vbox_inst_path}/VBox
+ fperms 0750 ${vbox_inst_path}/VBox
+
+ # Install binaries and libraries
+ insinto ${vbox_inst_path}
+ doins -r components
+
+ # *.rc files for x86_64 are only available on multilib systems
+ local rcfiles="*.rc"
+ if use amd64 && ! has_multilib_profile ; then
+ rcfiles=""
+ fi
+ for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do
+ vbox_inst ${each}
+ done
+
+ # These binaries need to be suid root.
+ for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+ vbox_inst ${each} 4750
+ done
+
+ # Install EFI Firmware files (bug #320757)
+ pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die
+ for fwfile in VBoxEFI{32,64}.fd ; do
+ vbox_inst ${fwfile} 0644
+ done
+ popd &>/dev/null || die
+
+ # VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+ # VBoxXPCOMIPCD (bug #524202)
+ for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
+ pax-mark -m "${D}"${vbox_inst_path}/${each}
+ done
+
+ # Symlink binaries to the shipped wrapper
+ for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do
+ dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+ done
+ dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
+
+ if use pam ; then
+ # VRDPAuth only works with this (bug #351949)
+ dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+ fi
+
+ # set an env-variable for 3rd party tools
+ echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
+ doenvd "${T}/90virtualbox"
+
+ if ! use headless ; then
+ vbox_inst VBoxSDL 4750
+ pax-mark -m "${D}"${vbox_inst_path}/VBoxSDL
+
+ for each in vboxsdl VBoxSDL ; do
+ dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+ done
+
+ if use qt5 ; then
+ vbox_inst VirtualBox 4750
+ pax-mark -m "${D}"${vbox_inst_path}/VirtualBox
+
+ if use opengl ; then
+ vbox_inst VBoxTestOGL
+ pax-mark -m "${D}"${vbox_inst_path}/VBoxTestOGL
+ fi
+
+ for each in virtualbox VirtualBox ; do
+ dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+ done
+
+ insinto /usr/share/${PN}
+ doins -r nls
+
+ newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop
+ fi
+
+ pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+ for size in 16 32 48 64 128 ; do
+ newicon -s ${size} ${PN}-${size}px.png ${PN}.png
+ done
+ newicon ${PN}-48px.png ${PN}.png
+ doicon -s scalable ${PN}.svg
+ popd &>/dev/null || die
+ pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+ for size in 16 24 32 48 64 72 96 128 256 512 ; do
+ for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+ icofile="${PN}-${ico}-${size}px.png"
+ if [[ -f "${icofile}" ]] ; then
+ newicon -s ${size} ${icofile} ${PN}-${ico}.png
+ fi
+ done
+ done
+ popd &>/dev/null || die
+ fi
+
+ if use lvm ; then
+ vbox_inst VBoxVolInfo 4750
+ dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+ fi
+
+ if use sdk ; then
+ insinto ${vbox_inst_path}
+ doins -r sdk
+
+ if use java ; then
+ java-pkg_regjar "${D}${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+ java-pkg_regso "${D}${vbox_inst_path}/libvboxjxpcom.so"
+ fi
+ fi
+
+ if use udev ; then
+ # New way of handling USB device nodes for VBox (bug #356215)
+ local udevdir="$(get_udevdir)"
+ insinto ${udevdir}
+ doins VBoxCreateUSBNode.sh
+ fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
+ fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
+ insinto ${udevdir}/rules.d
+ sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
+ > "${T}"/10-virtualbox.rules || die
+ doins "${T}"/10-virtualbox.rules
+ fi
+
+ if use vboxwebsrv ; then
+ vbox_inst vboxwebsrv
+ dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+ newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+ newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+ fi
+
+ if use doc ; then
+ dodoc UserManual.pdf
+ fi
+
+ newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+
+ if use udev ; then
+ udevadm control --reload-rules \
+ && udevadm trigger --subsystem-match=usb
+ fi
+
+ tmpfiles_process /usr/lib/tmpfiles.d/virtualbox-vboxusb.conf
+
+ if ! use headless && use qt5 ; then
+ elog "To launch VirtualBox just type: \"virtualbox\"."
+ fi
+ elog "You must be in the vboxusers group to use VirtualBox."
+ elog ""
+ elog "The latest user manual is available for download at:"
+ elog "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
+ elog ""
+ elog "For advanced networking setups you should emerge:"
+ elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
+ elog ""
+ elog "Starting with version 4.0.0, ${PN} has USB-1 support."
+ elog "For USB-2 support, PXE-boot ability and VRDP support please emerge"
+ elog " app-emulation/virtualbox-extpack-oracle"
+ elog "package."
+ elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and"
+ elog "the \"extension\" USE flag. For installation of the guest additions ISO"
+ elog "image, please emerge"
+ elog " app-emulation/virtualbox-additions"
+ elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge"
+ elog " app-emulation/virtualbox-extpack-oracle"
+ if ! use udev ; then
+ elog ""
+ elog "WARNING!"
+ elog "Without USE=udev, USB devices will likely not work in ${PN}."
+ elif [ -e "${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
+ elog ""
+ elog "Please remove \"${ROOT%/}/etc/udev/rules.d/10-virtualbox.rules\""
+ elog "or else USB in ${PN} won't work."
+ fi
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+}