commit:     b41146a1ee7046436ffd36b5124a16fe22d380b0
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  6 06:31:37 2025 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Fri Jun  6 07:48:46 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b41146a1

app-emulation/virtualbox: drop 6.1.50-r4

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox/Manifest                  |   2 -
 ...tualbox-6.1.26-configure-include-qt5-path.patch |  15 -
 .../files/virtualbox-6.1.34-r3-python.patch        |  14 -
 .../files/virtualbox-6.1.36-fcf-protection.patch   |  16 -
 .../files/virtualbox-6.1.44-fix-libxml2.patch      |  25 -
 .../files/virtualbox-7.0.14-libxml2-2.12.patch     |  43 --
 app-emulation/virtualbox/metadata.xml              |   2 -
 .../virtualbox/virtualbox-6.1.50-r4.ebuild         | 680 ---------------------
 8 files changed, 797 deletions(-)

diff --git a/app-emulation/virtualbox/Manifest 
b/app-emulation/virtualbox/Manifest
index 478d9adbb87f..17e9becf2bc5 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,4 +1,3 @@
-DIST VirtualBox-6.1.50.tar.bz2 165959648 BLAKE2B 
e244c4fa2ffe86216664104473e27e8ddbad86aae3bc26612d18204a4e67cece91d1fa3aa9e70f1c39f915bf5e4a1e6a14bbb19162c3ae2ff554373df95bce51
 SHA512 
ee2ec352e020f07262bf2120278d0d9807c501cd7c4d621d4e12ce18a821b134d48eb852bc7136008cfa77ed709703d3c2835b7a7177c325d989e8f433aff73f
 DIST VirtualBox-7.0.22.tar.bz2 174643573 BLAKE2B 
93ba1dd44a7147e61d72489a127e497f510c12eef576f8a30af45011e383050a908124c0f9794a92f28400cbb2f230308884893bafacd4f8a391b2354958f02d
 SHA512 
eb231cc487becfbad8c979fb9d6a1ede3a28a1bb11e77b1482181be4bd294fd209c77a7d599562f99f1ac2be587203b9d97230ccce4f85ed96c63e66b0fce392
 DIST VirtualBox-7.0.26.tar.bz2 174650718 BLAKE2B 
ba13a940b9566a5ac5b228bf29d49d4b9bf16a72da3212c305538711d363f1e6fddaa8717d4c46394ce488d2c1670874fece356740f421f44f6f40bd655f5551
 SHA512 
337f62438679f98b342213dbafdd3e07f7d7092a4205bfe388d64d1cc8224499621addea56b70d806c93290bb82e6150c07516e69250460a276e3b7a4484a9b6
 DIST VirtualBox-7.1.10.tar.bz2 233395034 BLAKE2B 
8f451932a4b3cd5e4628f8dd45e9a2cfec6cfbc02fd4eeb7f4dedd473c9c022f57751e4ea78ab1edd6989c111a5c751da1c87662d24c971c3f673bedcf9d6f06
 SHA512 
841c539b30c964eec0e3a5eddc354bcec530aeed882507928c2f0a8675756c27a650cb3094a130d4f609e83a10f1273b40e9a765228586c3c8c90bb74d7872ad
@@ -11,7 +10,6 @@ DIST virtualbox-help-7.1.10.tar.xz 8307956 BLAKE2B 
7da5e31400431b19df136a16dcbb8
 DIST virtualbox-help-7.1.4.tar.xz 1586108 BLAKE2B 
e8219ed67b1db9a5e4d0271e25980fbcbfb8c72316dc4bd3337080c81082bb8ecad9c9317b5b9be77db1eeac42c567512a64fe86ae9bb6371dea8632e7afc9ab
 SHA512 
185249fe2bdf2138a034c53e23eedb88cf487e1fb26a8bd623f0d75ea0d2ff4dff3484564a5b317703fb3f302ec7037cb0a49c7c3845e229fe2ac9e2c8c96af6
 DIST virtualbox-help-7.1.8.tar.xz 8308340 BLAKE2B 
74a553dcf72306ab5168c403862c872d7de917f090a559fc06fc9a6bb344601ab5a78196e5ae13a9daed9150fc3b29e700fe6dbb4e589f8b3636fec6e9bb9ed5
 SHA512 
00613dead921bff77b16369b0267d06d668be7b56a12885cff4d050a1120d51de8576472b2dc069e93bf7cefcf4837ebe13d2d8c147953ad4484669df93d3e1e
 DIST virtualbox-help-7.2.0_beta1.tar.xz 7929852 BLAKE2B 
3d44f25a6f192d0ad41e698447432d36abc1ffb8267263f3fb93fc59100309cec2a5c8332ec73e72fb14958a10e62d511187954fa83dbc63da3c2d6ed7453555
 SHA512 
d99e77e988ed0726f9b6613fd8b8b73910c316343f4c839d47c87655a377c92fb72edab8a4fddcb75fc8b5106a7f529033b529158059e9b49c6d2af0d2b43f04
-DIST virtualbox-patches-6.1.36.tar.bz2 2733 BLAKE2B 
dcfebfeca4873d382441515d48b4dfee9343bc7c83ea3cbb5002dbf7975143a79fae9a701b67dc35505e9ca03ff1b6293cb7c3279c4fdfda8ad21ba5fb9b7e87
 SHA512 
1bed5cdefbf8e7c4b0d9092ba4961ecf2262f27f35c71a91ef6f2e8fe8a1d92ed74f06bafbf58d70ba7165d933997f58073f4d4f4051e3ba5c0339b729066f57
 DIST virtualbox-patches-7.0.22-r1.tar.bz2 6972 BLAKE2B 
e9116cb2ed874f9a0133e756b725a48ee665a412114d04195849f5930782c65678a2aaf581b9b02bc29001be4191116e322643232ee37de5cba0f2b5049b615f
 SHA512 
be72b596f63229bd28b22c026108cf5a5c951f58343a709f158446593e6f872a81734dd83a838dd91c02c80854312e2cad81f3a525035db5ffabeb96729a8276
 DIST virtualbox-patches-7.1.10.tar.bz2 5966 BLAKE2B 
cde325931ed2b41c74c9fa070980c5a6988a658608b2899473991e58ebf995f3cfd8efd295c98181d879104249ffc021643315ffe7801d30ded663a61e442488
 SHA512 
82de81a6e63bbaae8a1467fe0f4b84a6a71ee3f3d2190d53215f0b0913f6d2e53623709e5063ba629798a844c0c29fa0f48aca72efc96e775d7b18f75c1de79f
 DIST virtualbox-patches-7.1.4-r1.tar.bz2 6140 BLAKE2B 
dc84a0522629d06b72ff98e330e2c104e55185914238fed53d696399e43400a1c32979724c156479c3a67d2c64f7f8389d58a83242de559cf8dd89fbda0804e6
 SHA512 
3541ace61bd64f6ecb2f7b3aaa2383c33ae51682676eead78b267ff82d46e769117f074a534301e734408efa0e622d63e778085f06741223b35ed8caaacc003d

diff --git 
a/app-emulation/virtualbox/files/virtualbox-6.1.26-configure-include-qt5-path.patch
 
b/app-emulation/virtualbox/files/virtualbox-6.1.26-configure-include-qt5-path.patch
deleted file mode 100644
index 57752c4bbd85..000000000000
--- 
a/app-emulation/virtualbox/files/virtualbox-6.1.26-configure-include-qt5-path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-https://www.virtualbox.org/changeset/90377/vbox
-https://bugs.gentoo.org/805350
-https://bugs.gentoo.org/805365
-
---- VirtualBox-6.1.26/configure
-+++ VirtualBox-6.1.26/configure
-@@ -1624,6 +1624,8 @@ EOF
-         else
-           # Strip .../QtCore as we add components ourself:
-           INCQT5=`echo "$INCQT5"|$KBUILD_SED 's|\([^ ]*\)/QtCore|\1|g; s| 
$||g'`
-+          # Strip .../QtGui as we add components ourself:
-+          INCQT5=`echo "$INCQT5"|$KBUILD_SED 's|\([^ ]*\)/QtGui|\1|g; s| 
$||g'`
-           # store only the first path, remove all other paths
-           # most likely pkg-config gave us -I/usr/include/qt5 
-I/usr/include/qt5/QtCore
-           INCQT5=`echo "$INCQT5"|$KBUILD_SED 's|\([^ ]*\) .*|\1|'`

diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python.patch 
b/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python.patch
deleted file mode 100644
index 3a6da1f681c1..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/configure b/configure
-index fd2e296..695f6a7 100755
---- a/configure
-+++ b/configure
-@@ -1987,6 +1987,9 @@ check_python()
- {
-   test_header "Python support"
- 
-+  # We force the right implementation in the ebuild instead
-+  return
-+
-   # On darwin this is a on/off decision only
-   if [ "$OS" = "darwin" ]; then
-     echo "enabled"

diff --git 
a/app-emulation/virtualbox/files/virtualbox-6.1.36-fcf-protection.patch 
b/app-emulation/virtualbox/files/virtualbox-6.1.36-fcf-protection.patch
deleted file mode 100644
index 14b11f734c71..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-6.1.36-fcf-protection.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Bug https://bugs.gentoo.org/865361
-
-gcc does not support -fcf-protection for i386 (needs i686+),
-so disable it when building iPxeBaseBin.
-
---- a/src/VBox/Devices/PC/ipxe/Makefile.kmk
-+++ b/src/VBox/Devices/PC/ipxe/Makefile.kmk
-@@ -176,6 +177,8 @@
- 
-  iPxeBaseBin_TEMPLATE = iPxe
- 
-+ iPxeBaseBin_CFLAGS = -fcf-protection=none
-+
-  iPxeBaseBin_INCS = \
-       src \
-       src/include \

diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.44-fix-libxml2.patch 
b/app-emulation/virtualbox/files/virtualbox-6.1.44-fix-libxml2.patch
deleted file mode 100644
index c3e76e58c3f2..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-6.1.44-fix-libxml2.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-With dev-libs/libxml2-2.11, xi:include errors out if it can't find a file, so 
add an empty fallback.
-Used to work with dev-libs/libxml2-2.10.
-
-See also: https://bugs.gentoo.org/906309
-
---- a/doc/manual/en_US/user_Frontends.xml
-+++ b/doc/manual/en_US/user_Frontends.xml
-@@ -1205,6 +1205,6 @@
- 
-   </sect1>
- 
--  <xi:include href="user_man_VBoxHeadless.xml" xpointer="element(/1)" 
xmlns:xi="http://www.w3.org/2001/XInclude"; />
-+  <xi:include href="user_man_VBoxHeadless.xml" xpointer="element(/1)" 
xmlns:xi="http://www.w3.org/2001/XInclude"; ><xi:fallback/></xi:include>
- 
- </chapter>
---- b/doc/manual/en_US/user_VBoxManage.xml
-+++ a/doc/manual/en_US/user_VBoxManage.xml
-@@ -8975,6 +8975,6 @@
- <!-- TODO: Figure out how we can handle other manpages. The xml is bolted to
-              sect1, so it's not possible to have them "in place" -->
- 
--  <xi:include href="user_man_vboximg-mount.xml" xpointer="element(/1)" 
xmlns:xi="http://www.w3.org/2001/XInclude"; />
-+  <xi:include href="user_man_vboximg-mount.xml" xpointer="element(/1)" 
xmlns:xi="http://www.w3.org/2001/XInclude"; ><xi:fallback/></xi:include>
- 
- </chapter>

diff --git 
a/app-emulation/virtualbox/files/virtualbox-7.0.14-libxml2-2.12.patch 
b/app-emulation/virtualbox/files/virtualbox-7.0.14-libxml2-2.12.patch
deleted file mode 100644
index a523bad41a30..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-7.0.14-libxml2-2.12.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Bug: https://bugs.gentoo.org/922445
-
-The change in libxml2 is not backwards compatibe.
-A patch like the one in arch does not work with 2.11, so just cast the 
argument to maintain compatibility with both.
-
-The upstream change is in include/libxml/xmlerror.h:
-
- typedef xmlError *xmlErrorPtr;
-
--typedef void (*xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
-+typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError 
*error);
-
-See also: 
https://gitlab.archlinux.org/archlinux/packaging/packages/virtualbox/-/blob/main/019-libxml-2-12.patch?ref_type=heads
-
---- a/src/VBox/Runtime/r3/xml.cpp
-+++ b/src/VBox/Runtime/r3/xml.cpp
-@@ -1870,7 +1870,7 @@
-         throw std::bad_alloc();
-     /* per-thread so it must be here */
-     xmlSetGenericErrorFunc(NULL, xmlParserBaseGenericError);
--    xmlSetStructuredErrorFunc(NULL, xmlParserBaseStructuredError);
-+    xmlSetStructuredErrorFunc(NULL, 
(xmlStructuredErrorFunc)xmlParserBaseStructuredError);
- }
- 
- XmlParserBase::~XmlParserBase()
-@@ -1931,7 +1931,7 @@
-                                                   pcszFilename,
-                                                   NULL,       // encoding = 
auto
-                                                   options)))
--        throw XmlError(xmlCtxtGetLastError(m_ctxt));
-+        throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt));
- 
-     doc.refreshInternals();
- }
-@@ -2191,7 +2191,7 @@
-                                               pcszFilename,
-                                               NULL,       // encoding = auto
-                                               options)))
--        throw XmlError(xmlCtxtGetLastError(m_ctxt));
-+        throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt));
- 
-     doc.refreshInternals();
- }

diff --git a/app-emulation/virtualbox/metadata.xml 
b/app-emulation/virtualbox/metadata.xml
index 04d0c63679f3..9ad04d6ed09a 100644
--- a/app-emulation/virtualbox/metadata.xml
+++ b/app-emulation/virtualbox/metadata.xml
@@ -7,9 +7,7 @@
   </maintainer>
   <use>
     <flag name="dtrace">Install dtrace Extension Pack.</flag>
-    <flag name="headless">Build without any graphic frontend.</flag>
     <flag name="lvm">Build VBoxVolInfo that needs devicemapper from 
<pkg>sys-fs/lvm2</pkg>.</flag>
-    <flag name="pax-kernel">Apply patch needed for pax enabled kernels.</flag>
     <flag name="sdk">Enable building of SDK.</flag>
     <flag name="udev">Controls installation of special USB udev rules.</flag>
     <flag name="vboxwebsrv">Build and install the VirtualBox webservice.</flag>

diff --git a/app-emulation/virtualbox/virtualbox-6.1.50-r4.ebuild 
b/app-emulation/virtualbox/virtualbox-6.1.50-r4.ebuild
deleted file mode 100644
index 8f8cce916e67..000000000000
--- a/app-emulation/virtualbox/virtualbox-6.1.50-r4.ebuild
+++ /dev/null
@@ -1,680 +0,0 @@
-# Copyright 2022-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# To add a new Python here:
-# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's 
logic)
-#    Do NOT skip this part. It'll end up silently not-building the Python 
extension
-#    or otherwise misbehaving if you do.
-#
-# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ 
USE=python.
-#
-#  May need to look at other distros (e.g. Arch Linux) to find patches for 
newer
-#  Python versions as upstream tends to lag. Upstream may have patches on their
-#  trunk branch but not release branch.
-#
-#  See bug #785835, bug #856121.
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature 
pax-utils \
-       python-single-r1 tmpfiles toolchain-funcs udev xdg
-
-MY_PN="VirtualBox"
-MY_P=${MY_PN}-${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/${PV}/${MY_P}.tar.bz2
-       
https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-6.1.36.tar.bz2";
-S="${WORKDIR}/${MY_PN}-${PV}"
-
-LICENSE="GPL-2 dtrace? ( CDDL )"
-SLOT="0/$(ver_cut 1-2)"
-KEYWORDS="amd64"
-IUSE="alsa debug doc dtrace headless java lvm +opus pam pax-kernel pch 
pulseaudio +opengl python +qt5 +sdk +sdl +udev vboxwebsrv vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
-       acct-group/vboxusers
-       ~app-emulation/virtualbox-modules-${PV}
-       >=dev-libs/libxslt-1.1.19
-       net-misc/curl
-       dev-libs/libxml2:=
-       media-libs/libpng:0=
-       media-libs/libvpx:0=
-       sys-libs/zlib:=
-       !headless? (
-               sdl? ( media-libs/libsdl:0[X,video] )
-               x11-base/xorg-proto
-               x11-libs/libX11
-               x11-libs/libxcb:=
-               x11-libs/libXcursor
-               x11-libs/libXext
-               x11-libs/libXmu
-               x11-libs/libXt
-               opengl? (
-                       media-libs/libglvnd[X]
-                       virtual/glu
-               )
-               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
-               )
-       )
-       dev-libs/openssl:0=
-       virtual/libcrypt:=
-       lvm? ( sys-fs/lvm2 )
-       opus? ( media-libs/opus )
-       python? ( ${PYTHON_DEPS} )
-       udev? ( >=virtual/udev-171 )
-       vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
-       vnc? ( >=net-libs/libvncserver-0.9.9 )
-"
-# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
-# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
-# not (only, anyway) BDEPEND, as the eclass magic to set the environment 
variables
-# based on *DEPEND doesn't work for BDEPEND at least right now.
-#
-# There's a comment in Config.kmk about it
-# ("With Java 11 wsimport was removed, usually part of a separate install 
now.")
-# but it needs more investigation.
-#
-# See bug #878299 to track this issue.
-DEPEND="
-       ${COMMON_DEPEND}
-       alsa? ( >=media-libs/alsa-lib-1.0.13 )
-       !headless? (
-               x11-libs/libXinerama
-               x11-libs/libXrandr
-               opengl? ( virtual/opengl )
-       )
-       java? ( virtual/jdk:1.8 )
-       pam? ( sys-libs/pam )
-       pax-kernel? ( sys-apps/elfix )
-       pulseaudio? ( media-libs/libpulse )
-"
-BDEPEND="
-       >=app-arch/tar-1.34-r2
-       >=dev-build/kbuild-0.1.9998.3127
-       <=dev-build/kbuild-0.1.9998.3500
-       >=dev-lang/yasm-0.6.2
-       dev-libs/libIDL
-       sys-apps/which
-       sys-devel/bin86
-       sys-libs/libcap
-       sys-power/iasl
-       virtual/pkgconfig
-       doc? (
-               app-text/docbook-sgml-dtd:4.4
-               dev-texlive/texlive-basic
-               dev-texlive/texlive-latex
-               dev-texlive/texlive-latexrecommended
-               dev-texlive/texlive-latexextra
-               dev-texlive/texlive-fontsrecommended
-               dev-texlive/texlive-fontsextra
-       )
-       java? ( virtual/jdk:1.8 )
-       python? ( ${PYTHON_DEPS} )
-       qt5? ( dev-qt/linguist-tools:5 )
-"
-RDEPEND="
-       ${COMMON_DEPEND}
-       java? ( virtual/jre:1.8 )
-"
-
-QA_FLAGS_IGNORED="
-       usr/lib64/virtualbox/VBoxDDR0.r0
-       usr/lib64/virtualbox/VMMR0.r0
-       
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-       
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_TEXTRELS="
-       usr/lib64/virtualbox/VMMR0.r0
-       
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-QA_EXECSTACK="
-       usr/lib64/virtualbox/iPxeBaseBin
-       usr/lib64/virtualbox/VMMR0.r0
-       usr/lib64/virtualbox/VBoxDDR0.r0
-       
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-       
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_WX_LOAD="
-       usr/lib64/virtualbox/iPxeBaseBin
-"
-
-QA_PRESTRIPPED="
-       usr/lib64/virtualbox/VMMR0.r0
-       usr/lib64/virtualbox/VBoxDDR0.r0
-       
usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-REQUIRED_USE="
-       java? ( sdk )
-       python? ( sdk ${PYTHON_REQUIRED_USE} )
-       vboxwebsrv? ( java )
-"
-
-PATCHES=(
-       "${FILESDIR}"/${PN}-6.1.26-configure-include-qt5-path.patch # bug 
#805365
-
-       # This patch is needed to avoid automagic detection based on a hardcoded
-       # list of Pythons in configure. It's necessary but not sufficient
-       # (see the rest of the ebuild's logic for the remainder) to handle
-       # proper Python selection.
-       "${FILESDIR}"/${PN}-6.1.34-r3-python.patch
-
-       # 865361
-       "${FILESDIR}"/${PN}-6.1.36-fcf-protection.patch
-
-       # 906309
-       "${FILESDIR}"/${PN}-6.1.44-fix-libxml2.patch
-       # 922445
-       "${FILESDIR}"/${PN}-7.0.14-libxml2-2.12.patch
-
-       # Downloaded patchset
-       "${WORKDIR}"/virtualbox-patches-6.1.36/patches
-)
-
-pkg_pretend() {
-       if ! use headless && ! use qt5 ; then
-               einfo "No USE=\"qt5\" selected, this build will not include any 
Qt frontend."
-       elif use headless && use qt5 ; then
-               einfo "You selected USE=\"headless qt5\", defaulting to"
-               einfo "USE=\"headless\", this build will not include any X11/Qt 
frontend."
-       fi
-
-       if ! use opengl ; then
-               einfo "No USE=\"opengl\" selected, this build will lack"
-               einfo "the OpenGL feature."
-       fi
-
-       # 749273
-       local d=${ROOT}
-       for i in usr "$(get_libdir)"; do
-               d="${d}/$i"
-               if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
-                       die "${d} should be owned by root, VirtualBox will not 
start otherwise"
-               fi
-       done
-}
-
-pkg_setup() {
-       java-pkg-opt-2_pkg_setup
-       use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-       default
-
-       # Only add nopie patch when we're on hardened
-       if gcc-specs-pie ; then
-               eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
-       fi
-
-       # Remove shipped binaries (kBuild, yasm), see bug #232775
-       rm -r kBuild/bin tools || die
-
-       # Replace pointless GCC version check with something more sensible.
-       # This is needed for the qt5 version check.
-       sed -e 's@^check_gcc$@cc_maj="$(${CC} -dumpversion | cut -d. -f1)" ; 
cc_min="$(${CC} -dumpversion | cut -d. -f2)"@' \
-               -i configure || die
-
-       # Disable things unused or split into separate ebuilds
-       sed -e "s@MY_LIBDIR@$(get_libdir)@" \
-               "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
-
-       if ! use pch ; then
-               # bug #753323
-               printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
-                       >> LocalConfig.kmk || die
-       fi
-
-       # bug #916002, #488176
-       tc-ld-force-bfd
-
-       # 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
-               einfo "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
-
-       # 890561
-       echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-}
-
-src_configure() {
-       #856811 #864274
-       # cannot filter out only one flag, some combinations of these flags 
produce buggy executables
-       for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
-               append-cflags $(test-flags-CC -mno-$i)
-               append-cxxflags $(test-flags-CXX -mno-$i)
-       done
-
-       # replace xhtml names with numeric equivalents
-       find doc/manual -name \*.xml -exec sed -i \
-               -e 's/&nbsp;/\&#160;/g' \
-               -e 's/&ndash;/\&#8211;/g' \
-               -e 's/&larr;/\&#8592;/g' \
-               -e 's/&rarr;/\&#8594;/g' \
-               -e 's/&harr;/\&#8596;/g' {} \+ || die
-
-       tc-export AR CC CXX LD RANLIB
-       export HOST_CC="$(tc-getBUILD_CC)"
-
-       local myconf=(
-               --with-gcc="$(tc-getCC)"
-               --with-g++="$(tc-getCXX)"
-
-               --disable-dbus
-               --disable-kmods
-
-               $(usev !alsa --disable-alsa)
-               $(usev debug --build-debug)
-               $(usev !doc --disable-docs)
-               $(usev !java --disable-java)
-               $(usev !lvm --disable-devmapper)
-               $(usev !opus --disable-libopus)
-               $(usev !pulseaudio --disable-pulse)
-               $(usev !python --disable-python)
-               $(usev vboxwebsrv --enable-webservice)
-               $(usev vnc --enable-vnc)
-       )
-
-       if ! use headless ; then
-               myconf+=(
-                       $(usev !opengl --disable-opengl)
-                       $(usev !qt5 --disable-qt)
-                       $(usev !sdl --disable-sdl)
-               )
-       else
-               myconf+=(
-                       --build-headless
-                       --disable-opengl
-               )
-       fi
-
-       if use amd64 && ! has_multilib_profile ; then
-               myconf+=( --disable-vmmraw )
-       fi
-
-       # bug #908814
-       filter-lto
-
-       # bug #843437
-       cat >> LocalConfig.kmk <<-EOF || die
-               CXXFLAGS=${CXXFLAGS}
-               CFLAGS=${CFLAGS}
-       EOF
-
-       # not an autoconf script
-       edo ./configure "${myconf[@]}"
-
-       # Force usage of chosen Python implementation
-       # bug #856121, bug #785835
-       sed -i \
-               -e '/VBOX_WITH_PYTHON.*=/d' \
-               -e '/VBOX_PATH_PYTHON_INC.*=/d' \
-               -e '/VBOX_LIB_PYTHON.*=/d' \
-               AutoConfig.kmk || die
-
-       if use python ; then
-               cat >> AutoConfig.kmk <<-EOF || die
-                       VBOX_WITH_PYTHON=1
-                       VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-                       VBOX_LIB_PYTHON=$(python_get_library_path)
-               EOF
-
-               local mangled_python="${EPYTHON#python}"
-               mangled_python="${mangled_python/.}"
-
-               # Stub out the script which defines what the Makefile ends up
-               # building for. gen_python_deps.py gets called by the Makefile
-               # with some args and it spits out a bunch of paths for a 
hardcoded
-               # list of Pythons. We just override it with what we're actually 
using.
-               # This minimises the amount of patching we have to do for new 
Pythons.
-               cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
-                       
print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
-                       
print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
-                       print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
-                       print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
-               EOF
-
-               chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
-       else
-               cat >> AutoConfig.kmk <<-EOF || die
-                       VBOX_WITH_PYTHON:=
-               EOF
-       fi
-}
-
-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}"
-
-       local myemakeargs=(
-               VBOX_BUILD_PUBLISHER=_Gentoo
-               VBOX_WITH_VBOXIMGMOUNT=1
-
-               KBUILD_VERBOSE=2
-
-               AS="$(tc-getCC)"
-               CC="$(tc-getCC)"
-               CXX="$(tc-getCXX)"
-
-               TOOL_GCC3_CC="$(tc-getCC)"
-               TOOL_GCC3_LD="$(tc-getCC)"
-               TOOL_GCC3_AS="$(tc-getCC)"
-               TOOL_GCC3_AR="$(tc-getAR)"
-               TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
-
-               TOOL_GXX3_CC="$(tc-getCC)"
-               TOOL_GXX3_CXX="$(tc-getCXX)"
-               TOOL_GXX3_LD="$(tc-getCXX)"
-               TOOL_GXX3_AS="$(tc-getCXX)"
-               TOOL_GXX3_AR="$(tc-getAR)"
-               TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
-
-               TOOL_GCC3_CFLAGS="${CFLAGS}"
-               TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
-               VBOX_GCC_OPT="${CXXFLAGS}"
-               VBOX_NM="$(tc-getNM)"
-
-               TOOL_YASM_AS=yasm
-       )
-
-       if use amd64 && has_multilib_profile ; then
-               myemakeargs+=(
-                       CC32="$(tc-getCC) -m32"
-                       CXX32="$(tc-getCXX) -m32"
-
-                       TOOL_GCC32_CC="$(tc-getCC) -m32"
-                       TOOL_GCC32_CXX="$(tc-getCXX) -m32"
-                       TOOL_GCC32_LD="$(tc-getCC) -m32"
-                       TOOL_GCC32_AS="$(tc-getCC) -m32"
-                       TOOL_GCC32_AR="$(tc-getAR)"
-                       TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
-
-                       TOOL_GXX32_CC="$(tc-getCC) -m32"
-                       TOOL_GXX32_CXX="$(tc-getCXX) -m32"
-                       TOOL_GXX32_LD="$(tc-getCXX) -m32"
-                       TOOL_GXX32_AS="$(tc-getCXX) -m32"
-                       TOOL_GXX32_AR="$(tc-getAR)"
-                       TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
-               )
-       fi
-
-       MAKE="kmk" emake "${myemakeargs[@]}" all
-}
-
-src_install() {
-       cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
-
-       local vbox_inst_path="/usr/$(get_libdir)/${PN}" each size ico icofile
-
-       vbox_inst() {
-               local binary="${1}"
-               local perms="${2:-0750}"
-               local path="${3:-${vbox_inst_path}}"
-
-               [[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
-               [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms 
must consist of four digits."
-
-               insinto ${path}
-               doins ${binary}
-               fowners root:vboxusers ${path}/${binary}
-               fperms ${perms} ${path}/${binary}
-       }
-
-       # Create configuration files
-       insinto /etc/vbox
-       newins "${FILESDIR}/${PN}-4-config" vbox.cfg
-
-       # Set the correct libdir
-       sed \
-               -e "s@MY_LIBDIR@$(get_libdir)@" \
-               -i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
-
-       # Install the wrapper script
-       exeinto ${vbox_inst_path}
-       newexe "${FILESDIR}/${PN}-ose-6-wrapper" "VBox"
-       fowners root:vboxusers ${vbox_inst_path}/VBox
-       fperms 0750 ${vbox_inst_path}/VBox
-
-       # Install binaries and libraries
-       insinto ${vbox_inst_path}
-       doins -r components
-
-       for each in 
VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,Tunctl,VMMPreload,XPCOMIPCD}
 \
-               vboximg-mount *so *r0 iPxeBaseBin ; do
-               vbox_inst ${each}
-       done
-
-       # These binaries need to be suid root.
-       for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
-               vbox_inst ${each} 4750
-       done
-
-       # Install EFI Firmware files (bug #320757)
-       for each in VBoxEFI{32,64}.fd ; do
-               vbox_inst ${each} 0644
-       done
-
-       # VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
-       # VBoxXPCOMIPCD (bug #524202)
-       for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
-               pax-mark -m "${ED}"${vbox_inst_path}/${each}
-       done
-
-       # Symlink binaries to the shipped wrapper
-       for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
-               VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
-                       dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-       done
-       dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
-       dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
-
-       if use pam ; then
-               # VRDPAuth only works with this (bug #351949)
-               dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
-       fi
-
-       # set an env-variable for 3rd party tools
-       echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
-       doenvd "${T}/90virtualbox"
-
-       if ! use headless ; then
-               vbox_inst rdesktop-vrdp
-               if use sdl ; then
-                       vbox_inst VBoxSDL 4750
-                       pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
-
-                       for each in vboxsdl VBoxSDL ; do
-                               dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-                       done
-               fi
-
-               if use qt5 ; then
-                       vbox_inst VirtualBox
-                       vbox_inst VirtualBoxVM 4750
-                       for each in VirtualBox{,VM} ; do
-                               pax-mark -m "${ED}"${vbox_inst_path}/${each}
-                       done
-
-                       if use opengl ; then
-                               vbox_inst VBoxTestOGL
-                               pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
-                       fi
-
-                       for each in virtualbox{,vm} VirtualBox{,VM} ; do
-                               dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-                       done
-
-                       insinto /usr/share/${PN}
-                       doins -r nls
-                       doins -r UnattendedTemplates
-
-                       domenu ${PN}.desktop
-               fi
-
-               pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
-               for size in 16 32 48 64 128 ; do
-                       newicon -s ${size} ${PN}-${size}px.png ${PN}.png
-               done
-               newicon ${PN}-48px.png ${PN}.png
-               doicon -s scalable ${PN}.svg
-               popd &>/dev/null || die
-               pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
-               for size in 16 24 32 48 64 72 96 128 256 512 ; do
-                       for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
-                               icofile="${PN}-${ico}-${size}px.png"
-                               if [[ -f "${icofile}" ]] ; then
-                                       newicon -s ${size} ${icofile} 
${PN}-${ico}.png
-                               fi
-                       done
-               done
-               popd &>/dev/null || die
-       fi
-
-       if use lvm ; then
-               vbox_inst VBoxVolInfo 4750
-               dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
-       fi
-
-       if use sdk ; then
-               insinto ${vbox_inst_path}
-               doins -r sdk
-
-               if use java ; then
-                       java-pkg_regjar 
"${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
-                       java-pkg_regso 
"${ED}/${vbox_inst_path}/libvboxjxpcom.so"
-               fi
-       fi
-
-       if use udev ; then
-               local udevdir="$(get_udevdir)"
-               local udev_file="VBoxCreateUSBNode.sh"
-               local rules_file="10-virtualbox.rules"
-
-               insinto ${udevdir}
-               doins ${udev_file}
-               fowners root:vboxusers ${udevdir}/${udev_file}
-               fperms 0750 ${udevdir}/${udev_file}
-
-               insinto ${udevdir}/rules.d
-               sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
-                       > "${T}"/${rules_file} || die
-               doins "${T}"/${rules_file}
-       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
-
-       # Remove dead symlinks (bug #715338)
-       find "${ED}"/usr/$(get_libdir)/${PN} -xtype l -delete || die
-
-       # Fix version string in extensions or else they don't get accepted
-       # by the virtualbox host process (see bug #438930)
-       find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i 
'/Version/s@_Gentoo@@' {} \+ || die
-
-       local extensions_dir="${vbox_inst_path}/ExtensionPacks"
-
-       if use vnc ; then
-               insinto ${extensions_dir}
-               doins -r ExtensionPacks/VNC
-       fi
-
-       if use dtrace ; then
-               insinto ${extensions_dir}
-               doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
-       fi
-
-       if use doc ; then
-               dodoc UserManual.pdf
-       fi
-
-       if use python ; then
-               local mangled_python="${EPYTHON#python}"
-               mangled_python="${mangled_python/./_}"
-
-               local 
python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython${mangled_python}.so"
-               if [[ ! -x "${python_path_ext}" ]] ; then
-                       eerror "Couldn't find ${python_path_ext}! Bindings were 
requested with USE=python"
-                       eerror "but none were installed. This may happen if 
support for a Python target"
-                       eerror "(listed in PYTHON_COMPAT in the ebuild) is 
incomplete within the Makefiles."
-                       die "Incomplete installation of Python bindings! File a 
bug with Gentoo!"
-               fi
-       fi
-
-       newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
-}
-
-pkg_postinst() {
-       xdg_pkg_postinst
-
-       if use udev ; then
-               udev_reload
-               udevadm trigger --subsystem-match=usb
-       fi
-
-       tmpfiles_process 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 "https://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf";
-       elog ""
-
-       optfeature "Advanced networking setups" net-misc/bridge-utils 
sys-apps/usermode-utilities
-       optfeature "USB2, USB3, PXE boot, and VRDP support" 
app-emulation/virtualbox-extpack-oracle
-       optfeature "Guest additions ISO" app-emulation/virtualbox-additions
-
-       if ! use udev ; then
-               ewarn "Without USE=udev, USB devices will likely not work in 
${PN}."
-       fi
-}
-
-pkg_postrm() {
-       xdg_pkg_postrm
-
-       use udev && udev_reload
-}

Reply via email to