public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2015-09-29 13:29 Lars Wendler
  0 siblings, 0 replies; 17+ messages in thread
From: Lars Wendler @ 2015-09-29 13:29 UTC (permalink / raw
  To: gentoo-commits

commit:     9f7b9fb31d387ec7783abba052b8e2d35fe75dad
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 29 13:28:29 2015 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Sep 29 13:29:05 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f7b9fb3

app-emulation/virtualbox: Added x86 buildfix patches (bug #561758).

Package-Manager: portage-2.2.22
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../files/virtualbox-5.0.4-x86_buildfix_1.patch         | 17 +++++++++++++++++
 .../files/virtualbox-5.0.4-x86_buildfix_2.patch         | 12 ++++++++++++
 app-emulation/virtualbox/virtualbox-5.0.4.ebuild        |  3 +++
 3 files changed, 32 insertions(+)

diff --git a/app-emulation/virtualbox/files/virtualbox-5.0.4-x86_buildfix_1.patch b/app-emulation/virtualbox/files/virtualbox-5.0.4-x86_buildfix_1.patch
new file mode 100644
index 0000000..3e5b5a5
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-5.0.4-x86_buildfix_1.patch
@@ -0,0 +1,17 @@
+fix VirtualBox-5.0.4/src/VBox/ExtPacks/VNC/VBoxVNC.cpp:339:30: error: invalid conversion from 'rfbNewClientAction (__attribute__((regparm(0), cdecl)) *)(rfbClientPtr) {aka rfbNewClientAction (__attribute__((regparm(0), cdecl)) *)(_rfbClientRec*)}' to 'rfbNewClientHookPtr {aka rfbNewClientAction (*)(_rfbClientRec*)}' [-fpermissive]
+error for 32-bit build
+
+See:
+https://www.virtualbox.org/ticket/14564
+
+--- VirtualBox-5.0.4/src/VBox/ExtPacks/VNC/VBoxVNC.cpp
++++ VirtualBox-5.0.4/src/VBox/ExtPacks/VNC/VBoxVNC.cpp
+@@ -104,6 +104,6 @@
+     unsigned char *mFrameBuffer;
+     uint32_t uClients;
+-    static DECLCALLBACK(enum rfbNewClientAction) rfbNewClientEvent(rfbClientPtr cl);
+-    static DECLCALLBACK(void) vncMouseEvent(int buttonMask, int x, int y, rfbClientPtr cl);
++    static enum rfbNewClientAction rfbNewClientEvent(rfbClientPtr cl);
++    static void vncMouseEvent(int buttonMask, int x, int y, rfbClientPtr cl);
+     static void vncKeyboardEvent(rfbBool down, rfbKeySym keySym, rfbClientPtr cl);
+     static void clientGoneHook(rfbClientPtr cl);

diff --git a/app-emulation/virtualbox/files/virtualbox-5.0.4-x86_buildfix_2.patch b/app-emulation/virtualbox/files/virtualbox-5.0.4-x86_buildfix_2.patch
new file mode 100644
index 0000000..191862e
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-5.0.4-x86_buildfix_2.patch
@@ -0,0 +1,12 @@
+fix VirtualBox-5.0.4/src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp:929:64: error: invalid conversion from 'void (*)(PRTLOGGER, RTLOGPHASE, PFNRTLOGPHASEMSG) {aka void (*)(RTLOGGER*, RTLOGPHASE, void (__attribute__((regparm(0), cdecl)) *)(RTLOGGER*, const char*, ...))}' to 'PFNRTLOGPHASE {aka void (__attribute__((regparm(0), cdecl)) *)(RTLOGGER*, RTLOGPHASE, void (__attribute__((regparm(0), cdecl)) *)(RTLOGGER*, const char*, ...))}' [-fpermissive]
+for 32-bit build
+
+--- VirtualBox-5.0.4/src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp
++++ VirtualBox-5.0.4/src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp
+@@ -843,5 +843,5 @@
+  * @param   pfnLog
+  */
+-static void vboxGreeterLogHeaderFooter(PRTLOGGER pLoggerRelease, RTLOGPHASE enmPhase, PFNRTLOGPHASEMSG pfnLog)
++static DECLCALLBACK(void) vboxGreeterLogHeaderFooter(PRTLOGGER pLoggerRelease, RTLOGPHASE enmPhase, PFNRTLOGPHASEMSG pfnLog)
+ {
+     /* Some introductory information. */

diff --git a/app-emulation/virtualbox/virtualbox-5.0.4.ebuild b/app-emulation/virtualbox/virtualbox-5.0.4.ebuild
index b10c461..3151d9e 100644
--- a/app-emulation/virtualbox/virtualbox-5.0.4.ebuild
+++ b/app-emulation/virtualbox/virtualbox-5.0.4.ebuild
@@ -174,6 +174,9 @@ src_prepare() {
 	EPATCH_FORCE="yes" \
 	epatch "${WORKDIR}/patches"
 
+	# x86 build fixes (#561758)
+	epatch "${FILESDIR}"/${P}-x86_buildfix_{1,2}.patch
+
 	epatch_user
 }
 


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2016-12-09 22:28 Lars Wendler
  0 siblings, 0 replies; 17+ messages in thread
From: Lars Wendler @ 2016-12-09 22:28 UTC (permalink / raw
  To: gentoo-commits

commit:     2b91777aca23544ebd8de16f9e4f3bc68600bc72
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  9 22:28:41 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Dec  9 22:28:41 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b91777a

app-emulation/virtualbox: Upstream patch to fix some SAS timeouts.

Package-Manager: portage-2.3.3

 .../files/virtualbox-5.1.10-sas_timeouts.patch     | 94 ++++++++++++++++++++++
 ...x-5.1.10.ebuild => virtualbox-5.1.10-r1.ebuild} |  1 +
 2 files changed, 95 insertions(+)

diff --git a/app-emulation/virtualbox/files/virtualbox-5.1.10-sas_timeouts.patch b/app-emulation/virtualbox/files/virtualbox-5.1.10-sas_timeouts.patch
new file mode 100644
index 00000000..eeeb474
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-5.1.10-sas_timeouts.patch
@@ -0,0 +1,94 @@
+Index: vbox/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
+===================================================================
+--- vbox/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp	(revision 64807)
++++ vbox/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp	(revision 64808)
+@@ -286,6 +286,12 @@
+     PDMCRITSECT           ReplyPostQueueCritSect;
+     /** Critical section protecting the reply free queue. */
+     PDMCRITSECT           ReplyFreeQueueCritSect;
++    /** Critical section protecting the request queue against
++     * concurrent access from the guest. */
++    PDMCRITSECT           RequestQueueCritSect;
++    /** Critical section protecting the reply free queue against
++     * concurrent write access from the guest. */
++    PDMCRITSECT           ReplyFreeQueueWriteCritSect;
+ 
+     /** Pointer to the start of the reply free queue - R3. */
+     R3PTRTYPE(volatile uint32_t *) pReplyFreeQueueBaseR3;
+@@ -1275,14 +1281,22 @@
+     {
+         case LSILOGIC_REG_REPLY_QUEUE:
+         {
++            int rc = PDMCritSectEnter(&pThis->ReplyFreeQueueWriteCritSect, VINF_IOM_R3_MMIO_WRITE);
++            if (rc != VINF_SUCCESS)
++                return rc;
+             /* Add the entry to the reply free queue. */
+             ASMAtomicWriteU32(&pThis->CTX_SUFF(pReplyFreeQueueBase)[pThis->uReplyFreeQueueNextEntryFreeWrite], u32);
+             pThis->uReplyFreeQueueNextEntryFreeWrite++;
+             pThis->uReplyFreeQueueNextEntryFreeWrite %= pThis->cReplyQueueEntries;
++            PDMCritSectLeave(&pThis->ReplyFreeQueueWriteCritSect);
+             break;
+         }
+         case LSILOGIC_REG_REQUEST_QUEUE:
+         {
++            int rc = PDMCritSectEnter(&pThis->RequestQueueCritSect, VINF_IOM_R3_MMIO_WRITE);
++            if (rc != VINF_SUCCESS)
++                return rc;
++
+             uint32_t uNextWrite = ASMAtomicReadU32(&pThis->uRequestQueueNextEntryFreeWrite);
+ 
+             ASMAtomicWriteU32(&pThis->CTX_SUFF(pRequestQueueBase)[uNextWrite], u32);
+@@ -1296,6 +1310,7 @@
+             uNextWrite++;
+             uNextWrite %= pThis->cRequestQueueEntries;
+             ASMAtomicWriteU32(&pThis->uRequestQueueNextEntryFreeWrite, uNextWrite);
++            PDMCritSectLeave(&pThis->RequestQueueCritSect);
+ 
+             /* Send notification to R3 if there is not one sent already. Do this
+              * only if the worker thread is not sleeping or might go sleeping. */
+@@ -1309,7 +1324,7 @@
+                     PDMQueueInsert(pThis->CTX_SUFF(pNotificationQueue), pNotificationItem);
+ #else
+                     LogFlowFunc(("Signal event semaphore\n"));
+-                    int rc = SUPSemEventSignal(pThis->pSupDrvSession, pThis->hEvtProcess);
++                    rc = SUPSemEventSignal(pThis->pSupDrvSession, pThis->hEvtProcess);
+                     AssertRC(rc);
+ #endif
+                 }
+@@ -5304,6 +5319,8 @@
+ 
+     PDMR3CritSectDelete(&pThis->ReplyFreeQueueCritSect);
+     PDMR3CritSectDelete(&pThis->ReplyPostQueueCritSect);
++    PDMR3CritSectDelete(&pThis->RequestQueueCritSect);
++    PDMR3CritSectDelete(&pThis->ReplyFreeQueueWriteCritSect);
+ 
+     RTMemFree(pThis->paDeviceStates);
+     pThis->paDeviceStates = NULL;
+@@ -5470,6 +5487,14 @@
+     if (RT_FAILURE(rc))
+         return PDMDEV_SET_ERROR(pDevIns, rc, N_("LsiLogic: cannot create critical section for reply post queue"));
+ 
++    rc = PDMDevHlpCritSectInit(pDevIns, &pThis->RequestQueueCritSect, RT_SRC_POS, "%sRQ", szDevTag);
++    if (RT_FAILURE(rc))
++        return PDMDEV_SET_ERROR(pDevIns, rc, N_("LsiLogic: cannot create critical section for request queue"));
++
++    rc = PDMDevHlpCritSectInit(pDevIns, &pThis->ReplyFreeQueueWriteCritSect, RT_SRC_POS, "%sRFQW", szDevTag);
++    if (RT_FAILURE(rc))
++        return PDMDEV_SET_ERROR(pDevIns, rc, N_("LsiLogic: cannot create critical section for reply free queue write access"));
++
+     /*
+      * Register the PCI device, it's I/O regions.
+      */
+Index: vbox/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
+===================================================================
+--- vbox/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp	(revision 64807)
++++ vbox/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp	(revision 64808)
+@@ -1744,6 +1744,8 @@
+     GEN_CHECK_OFF(LSILOGICSCSI, cRequestQueueEntries);
+     GEN_CHECK_OFF(LSILOGICSCSI, ReplyPostQueueCritSect);
+     GEN_CHECK_OFF(LSILOGICSCSI, ReplyFreeQueueCritSect);
++    GEN_CHECK_OFF(LSILOGICSCSI, RequestQueueCritSect);
++    GEN_CHECK_OFF(LSILOGICSCSI, ReplyFreeQueueWriteCritSect);
+     GEN_CHECK_OFF(LSILOGICSCSI, pReplyFreeQueueBaseR3);
+     GEN_CHECK_OFF(LSILOGICSCSI, pReplyPostQueueBaseR3);
+     GEN_CHECK_OFF(LSILOGICSCSI, pRequestQueueBaseR3);

diff --git a/app-emulation/virtualbox/virtualbox-5.1.10.ebuild b/app-emulation/virtualbox/virtualbox-5.1.10-r1.ebuild
similarity index 99%
rename from app-emulation/virtualbox/virtualbox-5.1.10.ebuild
rename to app-emulation/virtualbox/virtualbox-5.1.10-r1.ebuild
index cd60f3e..40c2eb3 100644
--- a/app-emulation/virtualbox/virtualbox-5.1.10.ebuild
+++ b/app-emulation/virtualbox/virtualbox-5.1.10-r1.ebuild
@@ -183,6 +183,7 @@ src_prepare() {
 	fi
 
 	eapply "${WORKDIR}/patches"
+	eapply "${FILESDIR}/${P}-sas_timeouts.patch"
 
 	eapply_user
 }


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2018-04-11  7:54 Lars Wendler
  0 siblings, 0 replies; 17+ messages in thread
From: Lars Wendler @ 2018-04-11  7:54 UTC (permalink / raw
  To: gentoo-commits

commit:     b3da431a04f89ae090d13b3952f9a67d19912647
Author:     Sergey Alirzaev <zl29ah <AT> gmail <DOT> com>
AuthorDate: Tue Apr 10 13:36:22 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Apr 11 07:54:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3da431a

app-emulation/virtualbox: fix patching for hardened

Bug: https://bugs.gentoo.org/643466
Closes: https://github.com/gentoo/gentoo/pull/7928

 .../files/050_virtualbox-5.2.8-nopie.patch         | 147 +++++++++++++++++++++
 .../files/virtualbox-5.2.8-paxmark-bldprogs.patch  |  59 +++++++++
 app-emulation/virtualbox/virtualbox-5.2.8.ebuild   |   4 +-
 3 files changed, 208 insertions(+), 2 deletions(-)

diff --git a/app-emulation/virtualbox/files/050_virtualbox-5.2.8-nopie.patch b/app-emulation/virtualbox/files/050_virtualbox-5.2.8-nopie.patch
new file mode 100644
index 00000000000..35bd8e0a705
--- /dev/null
+++ b/app-emulation/virtualbox/files/050_virtualbox-5.2.8-nopie.patch
@@ -0,0 +1,147 @@
+diff -Naur VirtualBox-5.1.24/Config.kmk VirtualBox-5.1.24/Config.kmk
+--- VirtualBox-5.1.24/Config.kmk	2017-07-26 13:55:27.803972185 -0400
++++ VirtualBox-5.1.24/Config.kmk	2017-07-26 13:53:10.700974328 -0400
+@@ -2601,6 +2601,7 @@
+ 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-overlength-strings?= $(call VBOX_GCC_CHECK_CC,-Wno-overlength-strings,)'
+ 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-overloaded-virtual?= $(call VBOX_GCC_CHECK_CXX,-Wno-overloaded-virtual,)'
+ 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-stack-protector   ?= $(call VBOX_GCC_CHECK_CC,-fno-stack-protector,)'
++	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_nopie                 ?= $(call VBOX_GCC_CHECK_CC,-nopie,)'
+ 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-dwarf2-cfi-asm    ?= $(call VBOX_GCC_CHECK_CC,-fno-dwarf2-cfi-asm,)'
+ 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_m64                   ?= $(call VBOX_GCC_CHECK_CC,-m64,)'
+ 	$(QUIET)$(APPEND) '$@' 'VBOX_GCC_no-pie                ?= $(call VBOX_GCC_CHECK_CC,-no-pie,)'
+@@ -3843,8 +3844,8 @@
+ 
+  ifeq ($(VBOX_LDR_FMT32),elf)
+  TEMPLATE_VBoxRc_TOOL                = $(VBOX_GCC32_TOOL)
+- TEMPLATE_VBoxRc_CXXFLAGS            = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
+- TEMPLATE_VBoxRc_CFLAGS              = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C)   $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_IPRT_FMT_CHECK)
++ TEMPLATE_VBoxRc_CXXFLAGS            = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
++ TEMPLATE_VBoxRc_CFLAGS              = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C)   $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_IPRT_FMT_CHECK)
+   ifeq ($(KBUILD_TARGET),solaris)
+    TEMPLATE_VBoxRc_LDFLAGS           = -r
+   else
+@@ -3864,8 +3865,8 @@
+  ifeq ($(VBOX_LDR_FMT32),macho)
+  TEMPLATE_VBoxRc_TOOL                = $(VBOX_GCC_TOOL)
+  TEMPLATE_VBoxRc_DEFS               += $(VBOX_DARWIN_DEF_SDK_DEFS)
+- TEMPLATE_VBoxRc_CXXFLAGS            = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-rtti
+- TEMPLATE_VBoxRc_CFLAGS              = $(VBOX_DARWIN_DEF_SDK_CFLAGS)   -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C)   $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing
++ TEMPLATE_VBoxRc_CXXFLAGS            = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-rtti
++ TEMPLATE_VBoxRc_CFLAGS              = $(VBOX_DARWIN_DEF_SDK_CFLAGS)   -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C)   $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing
+  TEMPLATE_VBoxRc_LDFLAGS             = $(VBOX_DARWIN_DEF_SDK_LDFLAGS)  -m32 -nostdlib
+  #TEMPLATE_VBoxRc_LDFLAGS.release     = -Wl,-S ???
+  endif
+@@ -3903,9 +3904,9 @@
+  endif
+ 
+  ifeq ($(VBOX_LDR_FMT32),elf)
+-  TEMPLATE_VBoxRcExe_CFLAGS   = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CFLAGS)) -O0
+-  TEMPLATE_VBoxRcExe_CXXFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CXXFLAGS)) -O0
+-  TEMPLATE_VBoxRcExe_LDFLAGS  = -g
++  TEMPLATE_VBoxRcExe_CFLAGS   = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CFLAGS)) -O0 $(VBOX_GCC_nopie)
++  TEMPLATE_VBoxRcExe_CXXFLAGS = $(filter-out -nostdinc,$(TEMPLATE_VBoxRc_CXXFLAGS)) -O0 $(VBOX_GCC_nopie)
++  TEMPLATE_VBoxRcExe_LDFLAGS  = -g $(VBOX_GCC_nopie)
+   TEMPLATE_VBoxRcExe_LDFLAGS.dbgopt = -g
+   TEMPLATE_VBoxRcExe_LDFLAGS.strict = -g
+   TEMPLATE_VBoxRcExe_LDFLAGS.release = -g
+@@ -3984,8 +3985,8 @@
+ 
+ ifeq ($(VBOX_LDR_FMT),elf)
+ TEMPLATE_VBoxR0_TOOL                = $(VBOX_GCC_TOOL)
+-TEMPLATE_VBoxR0_CFLAGS              = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C)   $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK)
+-TEMPLATE_VBoxR0_CXXFLAGS            = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
++TEMPLATE_VBoxR0_CFLAGS              = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C)   $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK)
++TEMPLATE_VBoxR0_CXXFLAGS            = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
+ TEMPLATE_VBoxR0_CFLAGS.amd64        = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables -ffreestanding
+ TEMPLATE_VBoxR0_CXXFLAGS.amd64      = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables
+ ifeq ($(KBUILD_TARGET),solaris)
+@@ -4018,12 +4019,12 @@
+ TEMPLATE_VBoxR0_DEFS               += $(VBOX_DARWIN_DEF_SDK_DEFS)
+ TEMPLATE_VBoxR0_CXXFLAGS            = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) \
+ 	-fno-common -msoft-float -static -fno-rtti -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \
+-	-mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector)
++	-mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
+ TEMPLATE_VBoxR0_CXXFLAGS.amd64      = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2  -mno-sse4a -fno-unwind-tables
+ TEMPLATE_VBoxR0_CXXFLAGS.x86        = -m32
+ TEMPLATE_VBoxR0_CFLAGS              = $(VBOX_DARWIN_DEF_SDK_CFLAGS)   -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C)   $(VBOX_GCC_Wno-variadic-macros) \
+ 	-fno-common -msoft-float -static -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \
+-	-mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector)
++	-mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
+ TEMPLATE_VBoxR0_CFLAGS.amd64        = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2  -mno-sse4a -fno-unwind-tables
+ TEMPLATE_VBoxR0_CFLAGS.x86          = -m32
+ TEMPLATE_VBoxR0_LDFLAGS             = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -nostdlib
+@@ -4259,7 +4260,7 @@
+ 	-Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \
+ 	-Wimplicit-function-declaration -Werror-implicit-function-declaration \
+ 	-O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
+-	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
++	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
+ 	-nostdinc -std=c99
+ TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
+ TEMPLATE_VBOXR0DRV_CFLAGS.amd64        = -m64 --param inline-unit-growth=100 --param large-function-growth=1000 \
+@@ -4268,7 +4269,7 @@
+ TEMPLATE_VBOXR0DRV_CXXFLAGS            = -fno-exceptions -fno-rtti \
+ 	$(VBOX_GCC_WARN) -Wpointer-arith -Winline \
+ 	-O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \
+-	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
++	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
+ 	-nostdinc
+ TEMPLATE_VBOXR0DRV_CXXFLAGS.x86        = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
+ TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64      = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64)
+@@ -4341,7 +4342,7 @@
+ 	-Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \
+ 	-Wimplicit-function-declaration -Werror-implicit-function-declaration \
+ 	-O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
+-	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
++	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
+ 	-nostdinc -std=c99 -msoft-float
+ TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -m32 \
+     -mpreferred-stack-boundary=2 -mno-mmx -mno-sse -mno-avx \
+@@ -4353,7 +4354,7 @@
+ TEMPLATE_VBOXR0DRV_CXXFLAGS            = -fno-exceptions -fno-rtti \
+ 	$(VBOX_GCC_WARN) -Wpointer-arith -Winline \
+ 	-O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \
+-	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
++	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
+ 	-nostdinc -msoft-float
+ TEMPLATE_VBOXR0DRV_CXXFLAGS.x86        = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
+ TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64      = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64)
+@@ -4394,7 +4395,7 @@
+ TEMPLATE_VBOXR0DRV_LDFLAGS             = -shared -no-undefined -dc -dy -lroot -rpath-link /boot/system/develop/lib/x86 --no-add-needed /boot/system/develop/lib/_KERNEL_ --no-add-needed /boot/system/develop/lib/haiku_version_glue.o
+ TEMPLATE_VBOXR0DRV_CFLAGS              = -fno-PIC \
+ 	$(VBOX_GCC_WARN) -Wstrict-prototypes $(VBOX_GCC_Wno-pointer-sign) -Wno-sign-compare \
+-	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
++	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
+ TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
+ TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -m32 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
+ TEMPLATE_VBOXR0DRV_CFLAGS.amd64        = -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \
+@@ -5210,8 +5211,8 @@
+  TEMPLATE_VBoxNoCrtGccLib_TOOL             = $(VBOX_GCC_TOOL)
+  TEMPLATE_VBoxNoCrtGccLib_ASTOOL           = $(VBOX_ASTOOL)
+  TEMPLATE_VBoxNoCrtGccLib_ASFLAGS          = $(VBOX_ASFLAGS)
+- TEMPLATE_VBoxNoCrtGccLib_CFLAGS          += $(VBOX_GCC_fno-stack-protector)
+- TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS        += $(VBOX_GCC_fno-stack-protector)
++ TEMPLATE_VBoxNoCrtGccLib_CFLAGS          += $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
++ TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS        += $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_nopie)
+  ifeq ($(KBUILD_TARGET_ARCH),amd64)
+   # in 64-bit mode we'll build a sys-module (VBoxREM2).
+   if1of ($(KBUILD_TARGET), darwin solaris)
+diff -Naur VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk
+--- VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk	2017-07-26 13:55:27.746972186 -0400
++++ VirtualBox-5.1.24/src/VBox/Devices/PC/ipxe/Makefile.kmk	2017-07-26 13:53:10.641974329 -0400
+@@ -132,6 +132,7 @@
+ 	-W \
+ 	-Wformat-nonliteral \
+ 	$(VBOX_GCC_fno-stack-protector) \
++	$(VBOX_GCC_nopie) \
+ 	$(VBOX_GCC_fno-dwarf2-cfi-asm) \
+ 	$(VBOX_GCC_Wno-address)
+  TEMPLATE_iPxe_ASFLAGS = \
+@@ -155,6 +156,7 @@
+ 	-W \
+ 	-Wformat-nonliteral \
+ 	$(VBOX_GCC_fno-stack-protector) \
++	$(VBOX_GCC_nopie) \
+ 	$(VBOX_GCC_fno-dwarf2-cfi-asm) \
+ 	$(VBOX_GCC_Wno-address) \
+ 	-DASSEMBLY

diff --git a/app-emulation/virtualbox/files/virtualbox-5.2.8-paxmark-bldprogs.patch b/app-emulation/virtualbox/files/virtualbox-5.2.8-paxmark-bldprogs.patch
new file mode 100644
index 00000000000..7eb1e1793a7
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-5.2.8-paxmark-bldprogs.patch
@@ -0,0 +1,59 @@
+2017-02-20  Quentin Minster <quentin@minster.io>
+
+	#https://bugs.gentoo.org/show_bug.cgi?id=591582
+	* Config.kmk: add paxmark befor VBOX_VBOXTPG get run.
+	* src/VBox/VMM/Makefile.kmk: add paxmark befor VBOX_VBOXCPP get run.
+	* src/VBox/Main/Makefile.kmk: add paxmark befor USBIdDatabaseGenerator_1_TARGET get run.
+
+--- a/Config.kmk
++++ b/Config.kmk	2016-09-21 02:22:28 
+@@ -3719,11 +3719,13 @@
+ 		$(if-expr $(intersects $(KBUILD_TARGET_ARCH),$(KBUILD_ARCHES_64)),-64,-32) \
+ 		-h --host-$(VBOX_HC_ARCH_BITS)-bit #-vvv
+ define TOOL_VBoxTpG_DTRACE_HDR_CMDS
++	$(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)"
+ 	$(QUIET)$(VBOX_VBOXTPG) $(flags) -o "$(out)" -s "$(source)"
+ endef
+ TOOL_VBoxTpG_DTRACE_OBJ_NOT_NEEDED :=
+ TOOL_VBoxTpG_DTRACE_OBJ_FLAGS      := -G --host-$(VBOX_HC_ARCH_BITS)-bit #-vvv
+ define TOOL_VBoxTpG_DTRACE_OBJ_CMDS
++	$(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)"
+ 	$(QUIET)$(VBOX_VBOXTPG) \
+ 		$(if-expr $(intersects $(bld_trg_arch),$(KBUILD_ARCHES_64)),-64,-32) \
+ 		$(flags) \
+@@ -3738,6 +3740,7 @@
+ TOOL_VBoxTpG-Disabled_DTRACE_DEPORD     = $(VBOX_VBOXTPG)
+ TOOL_VBoxTpG-Disabled_DTRACE_HDR_FLAGS := -h
+ define TOOL_VBoxTpG-Disabled_DTRACE_HDR_CMDS
++	$(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)"
+ 	$(QUIET)$(VBOX_VBOXTPG) $(flags) -o "$(out)" -s "$(source)"
+ endef
+ TOOL_VBoxTpG-Disabled_DTRACE_OBJ_NOT_NEEDED := $(KBUILD_OSES)
+@@ -3752,6 +3755,7 @@
+ TOOL_DTraceAndVBoxTpG_DTRACE_HDR_CMDS =
+ define TOOL_DTraceAndVBoxTpG_DTRACE_HDR_CMDS
+ 	$(TOOL_StandardDTrace_DTRACE_HDR_CMDS)
++	$(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)"
+ 	$(QUIET)$(VBOX_VBOXTPG) --generate-wrapper-header --host-$(VBOX_HC_ARCH_BITS)-bit --ring-3-context \
+ 		$(filter-out -C, $(filter-out -h,$(flags))) \
+ 		-o "$(out).tmp" -s "$(source)"
+--- a/src/VBox/VMM/Makefile.kmk	2018-04-10 15:26:24.622867735 +0300
++++ b/src/VBox/VMM/Makefile.kmk	2018-04-10 15:24:35.901998796 +0300
+@@ -896,6 +896,7 @@
+   $$(VMMLibDTrace_0_OUTDIR)/$1: $2 $$(VBOX_VBOXCPP) | $$$$(dir $$$$@)
+ 	$$(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
+ 	$$(QUIET)$$(call MSG_GENERATE,VMMLibDTrace,$$@,$2)
++	$$(QUIET)paxmark.sh -m "$(VBOX_VBOXCPP)"
+ 	$$(QUIET)$(VBOX_VBOXCPP) -d \
+ 		-D VBOX_FOR_DTRACE_LIB \
+ 		-D VBOX_FOR_DTRACE_LIB_$(toupper $(KBUILD_TARGET_ARCH)) \
+--- a/src/VBox/Main/Makefile.kmk	2018-04-10 15:26:15.292793067 +0300
++++ b/src/VBox/Main/Makefile.kmk	2018-04-10 15:25:14.042303341 +0300
+@@ -607,6 +607,7 @@
+  		$(PATH_SUB_CURRENT)/src-server/usb.ids $(PATH_SUB_CURRENT)/src-server/custom.ids | $$(dir $$@)
+ 	$(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
+ 	$(call MSG_GENERATE,USBIdDatabase,$@,$(USBIdDatabaseGenerator_1_TARGET))
++	$(QUIET)paxmark.sh -m "$(USBIdDatabaseGenerator_1_TARGET)"
+ 	$(QUIET)$(USBIdDatabaseGenerator_1_TARGET) -o "$@" $(filter %.ids,$^)
+ 
+  BLDPROGS += USBIdDatabaseGenerator

diff --git a/app-emulation/virtualbox/virtualbox-5.2.8.ebuild b/app-emulation/virtualbox/virtualbox-5.2.8.ebuild
index 40b4975b1e8..54d2ee97669 100644
--- a/app-emulation/virtualbox/virtualbox-5.2.8.ebuild
+++ b/app-emulation/virtualbox/virtualbox-5.2.8.ebuild
@@ -185,12 +185,12 @@ src_prepare() {
 
 	# Only add nopie patch when we're on hardened
 	if  gcc-specs-pie ; then
-		eapply "${FILESDIR}/050_virtualbox-5.1.24-nopie.patch"
+		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.1.4-paxmark-bldprogs.patch
+		eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
 	fi
 
 	eapply "${WORKDIR}/patches"


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2018-12-07 20:17 Lars Wendler
  0 siblings, 0 replies; 17+ messages in thread
From: Lars Wendler @ 2018-12-07 20:17 UTC (permalink / raw
  To: gentoo-commits

commit:     2cb1734e09768ba2ac4f814fcfe14ed803f3b8ff
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  7 20:16:44 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Dec  7 20:17:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2cb1734e

app-emulation/virtualbox: Install some more tools for vbox-6

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../virtualbox/files/virtualbox-ose-6-wrapper      | 116 +++++++++++++++++++++
 .../virtualbox/virtualbox-6.0.0_beta3.ebuild       |  14 +--
 2 files changed, 124 insertions(+), 6 deletions(-)

diff --git a/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper b/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper
new file mode 100644
index 00000000000..43e9c9ed448
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper
@@ -0,0 +1,116 @@
+#!/bin/sh
+## @file
+# Oracle VM VirtualBox startup script, Linux hosts.
+#
+
+#
+# Copyright (C) 2006-2017 Oracle Corporation
+#
+# 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 (GPL) 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.
+#
+
+PATH="/usr/bin:/bin:/usr/sbin:/sbin"
+CONFIG="/etc/vbox/vbox.cfg"
+
+test -r "${CONFIG}" &&
+    . "${CONFIG}"
+test -z "${INSTALL_DIR}" &&
+    if test -f /usr/lib/virtualbox/VirtualBox &&
+        test -x /usr/lib/virtualbox/VirtualBox; then
+        INSTALL_DIR=/usr/lib/virtualbox
+    else
+        echo "Could not find VirtualBox installation. Please reinstall."
+        exit 1
+    fi
+
+# Note: This script must not fail if the module was not successfully installed
+#       because the user might not want to run a VM but only change VM params!
+
+if [ "$1" = "shutdown" ]; then
+    SHUTDOWN="true"
+elif ! lsmod|grep -q vboxdrv; then
+    cat << EOF
+WARNING: The vboxdrv kernel module is not loaded. Either there is no module
+         available for the current kernel (`uname -r`) or it failed to
+         load. Please recompile the kernel module and install it by
+
+           for m in vbox{drv,netadp,netflt}; do modprobe \$m; done
+
+         You will not be able to start VMs until this problem is fixed.
+EOF
+elif [ ! -c /dev/vboxdrv ]; then
+    cat << EOF
+WARNING: The character device /dev/vboxdrv does not exist.
+         Please try to reload all the needed kernel modules by:
+
+           for m in vbox{netflt,netadp,drv}; do rmmod \$m; done
+           for m in vbox{drv,netadp,netflt}; do modprobe \$m; done
+
+         and if that is not successful, try to re-install the package by:
+
+           emerge -1av app-emulation/virtualbox-modules
+
+         You will not be able to start VMs until this problem is fixed.
+EOF
+fi
+
+SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'`
+if [ -z "$SERVER_PID" ]; then
+    # Server not running yet/anymore, cleanup socket path.
+    # See IPC_GetDefaultSocketPath()!
+    if [ -n "$LOGNAME" ]; then
+        rm -rf /tmp/.vbox-$LOGNAME-ipc > /dev/null 2>&1
+    else
+        rm -rf /tmp/.vbox-$USER-ipc > /dev/null 2>&1
+    fi
+fi
+
+if [ "$SHUTDOWN" = "true" ]; then
+    if [ -n "$SERVER_PID" ]; then
+        kill -TERM $SERVER_PID
+        sleep 2
+    fi
+    exit 0
+fi
+
+APP=`basename $0`
+case "$APP" in
+    VirtualBox|virtualbox)
+        exec "$INSTALL_DIR/VirtualBox" "$@"
+        ;;
+    VBoxManage|vboxmanage)
+        exec "$INSTALL_DIR/VBoxManage" "$@"
+        ;;
+    VBoxSDL|vboxsdl)
+        exec "$INSTALL_DIR/VBoxSDL" "$@"
+        ;;
+    VBoxVRDP|VBoxHeadless|vboxheadless)
+        exec "$INSTALL_DIR/VBoxHeadless" "$@"
+        ;;
+    VBoxAutostart|vboxautostart)
+        exec "$INSTALL_DIR/VBoxAutostart" "$@"
+        ;;
+    VBoxBalloonCtrl|vboxballoonctrl)
+        exec "$INSTALL_DIR/VBoxBalloonCtrl" "$@"
+        ;;
+    VBoxBugReport|vboxbugreport)
+	exec "$INSTALL_DIR/VBoxBugReport" "$@"
+	;;
+    VBoxDTrace|vboxdtrace)
+        exec "$INSTALL_DIR/VBoxDTrace" "$@"
+        ;;
+    vboxwebsrv)
+        exec "$INSTALL_DIR/vboxwebsrv" "$@"
+        ;;
+    *)
+        echo "Unknown application - $APP"
+        exit 1
+        ;;
+esac
+exit 0

diff --git a/app-emulation/virtualbox/virtualbox-6.0.0_beta3.ebuild b/app-emulation/virtualbox/virtualbox-6.0.0_beta3.ebuild
index 8aa9d0a6b2f..edda2a369a4 100644
--- a/app-emulation/virtualbox/virtualbox-6.0.0_beta3.ebuild
+++ b/app-emulation/virtualbox/virtualbox-6.0.0_beta3.ebuild
@@ -289,7 +289,7 @@ src_install() {
 
 	# Install the wrapper script
 	exeinto ${vbox_inst_path}
-	newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox"
+	newexe "${FILESDIR}/${PN}-ose-6-wrapper" "VBox"
 	fowners root:vboxusers ${vbox_inst_path}/VBox
 	fperms 0750 ${vbox_inst_path}/VBox
 
@@ -302,7 +302,7 @@ src_install() {
 	if use amd64 && ! has_multilib_profile ; then
 		rcfiles=""
 	fi
-	for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do
+	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,Tunctl,VMMPreload,XPCOMIPCD} *so *r0 ${rcfiles} iPxeBaseBin rdesktop-vrdp ; do
 		vbox_inst ${each}
 	done
 
@@ -325,7 +325,7 @@ src_install() {
 	done
 
 	# Symlink binaries to the shipped wrapper
-	for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do
+	for each in vbox{headless,manage} VBox{BugReport,Headless,Manage,VRDP} ; do
 		dosym ${vbox_inst_path}/VBox /usr/bin/${each}
 	done
 	dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
@@ -348,8 +348,10 @@ src_install() {
 		done
 
 		if use qt5 ; then
-			vbox_inst VirtualBox
-			pax-mark -m "${ED%/}"${vbox_inst_path}/VirtualBox
+			for each in VirtualBox{,VM} ; do
+				vbox_inst ${each}
+				pax-mark -m "${ED%/}"${vbox_inst_path}/${each}
+			done
 
 			if use opengl ; then
 				vbox_inst VBoxTestOGL
@@ -364,7 +366,7 @@ src_install() {
 			doins -r nls
 			doins -r UnattendedTemplates
 
-			newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop
+			domenu ${PN}.desktop
 		fi
 
 		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2019-02-02 10:41 Lars Wendler
  0 siblings, 0 replies; 17+ messages in thread
From: Lars Wendler @ 2019-02-02 10:41 UTC (permalink / raw
  To: gentoo-commits

commit:     99d0d10c95f0718c98cd19ef5ebb4599cc5fa2c9
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  2 10:39:35 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Feb  2 10:41:14 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99d0d10c

app-emulation/virtualbox: Added forgotten symlinks.

Closes: https://bugs.gentoo.org/677090
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 app-emulation/virtualbox/files/virtualbox-ose-6-wrapper             | 6 +++---
 .../{virtualbox-6.0.4.ebuild => virtualbox-6.0.4-r1.ebuild}         | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper b/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper
index 6108afe14b2..af8090dd09a 100644
--- a/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper
+++ b/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper
@@ -84,9 +84,9 @@ case "$APP" in
     VirtualBox|virtualbox)
         exec "$INSTALL_DIR/VirtualBox" "$@"
         ;;
-    #VirtualBoxVM|virtualboxvm)
-    #    exec "$INSTALL_DIR/VirtualBoxVM" "$@"
-    #    ;;
+    VirtualBoxVM|virtualboxvm)
+        exec "$INSTALL_DIR/VirtualBoxVM" "$@"
+        ;;
     VBoxManage|vboxmanage)
         exec "$INSTALL_DIR/VBoxManage" "$@"
         ;;

diff --git a/app-emulation/virtualbox/virtualbox-6.0.4.ebuild b/app-emulation/virtualbox/virtualbox-6.0.4-r1.ebuild
similarity index 99%
rename from app-emulation/virtualbox/virtualbox-6.0.4.ebuild
rename to app-emulation/virtualbox/virtualbox-6.0.4-r1.ebuild
index 32183eb05b9..e8d806027ab 100644
--- a/app-emulation/virtualbox/virtualbox-6.0.4.ebuild
+++ b/app-emulation/virtualbox/virtualbox-6.0.4-r1.ebuild
@@ -363,8 +363,7 @@ src_install() {
 				pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxTestOGL
 			fi
 
-			#for each in virtualbox{,vm} VirtualBox{,VM} ; do
-			for each in virtualbox VirtualBox ; do
+			for each in virtualbox{,vm} VirtualBox{,VM} ; do
 				dosym ${vbox_inst_path}/VBox /usr/bin/${each}
 			done
 


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2021-08-03 11:18 Lars Wendler
  0 siblings, 0 replies; 17+ messages in thread
From: Lars Wendler @ 2021-08-03 11:18 UTC (permalink / raw
  To: gentoo-commits

commit:     23627cbbe20fc546b9f9971b955071a9db13c236
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  3 11:12:48 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Aug  3 11:17:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23627cbb

app-emulation/virtualbox: Fixed qt5 include path

Closes: https://bugs.gentoo.org/805350
Closes: https://bugs.gentoo.org/805365
Thanks-to: Jiří Moravec <qjim <AT> volny.cz>
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../virtualbox-6.1.26-configure-include-qt5-path.patch    | 15 +++++++++++++++
 app-emulation/virtualbox/virtualbox-6.1.26.ebuild         |  2 ++
 2 files changed, 17 insertions(+)

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
new file mode 100644
index 00000000000..57752c4bbd8
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-6.1.26-configure-include-qt5-path.patch
@@ -0,0 +1,15 @@
+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/virtualbox-6.1.26.ebuild b/app-emulation/virtualbox/virtualbox-6.1.26.ebuild
index d7cbd13be91..ee270bbcc26 100644
--- a/app-emulation/virtualbox/virtualbox-6.1.26.ebuild
+++ b/app-emulation/virtualbox/virtualbox-6.1.26.ebuild
@@ -211,6 +211,8 @@ src_prepare() {
 		eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
 	fi
 
+	eapply "${FILESDIR}/${P}-configure-include-qt5-path.patch" #805365
+
 	eapply "${WORKDIR}/patches"
 
 	default


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2022-06-15 12:37 Lars Wendler
  0 siblings, 0 replies; 17+ messages in thread
From: Lars Wendler @ 2022-06-15 12:37 UTC (permalink / raw
  To: gentoo-commits

commit:     ffb00de3f195d6273ef1f259795ffa86849e91b4
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 15 12:35:26 2022 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Jun 15 12:37:52 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ffb00de3

app-emulation/virtualbox: Add patch to build with python3_10

Closes: https://bugs.gentoo.org/852152
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../virtualbox/files/virtualbox-6.1.34-python3.10.patch     | 13 +++++++++++++
 app-emulation/virtualbox/virtualbox-6.1.34.ebuild           |  1 +
 2 files changed, 14 insertions(+)

diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.34-python3.10.patch b/app-emulation/virtualbox/files/virtualbox-6.1.34-python3.10.patch
new file mode 100644
index 000000000000..eacc77a7f5bc
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-6.1.34-python3.10.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/852152
+
+--- VirtualBox-6.1.34/configure
++++ VirtualBox-6.1.34/configure
+@@ -2027,7 +2027,7 @@
+ }
+ EOF
+   found=
+-  SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.8m python3.9 python3.9m"
++  SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.8m python3.9 python3.9m python3.10 python3.10m"
+   for p in $PYTHONDIR; do
+     for d in $SUPPYTHONLIBS; do
+       for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do

diff --git a/app-emulation/virtualbox/virtualbox-6.1.34.ebuild b/app-emulation/virtualbox/virtualbox-6.1.34.ebuild
index ffef67a75eb1..3857ced6663f 100644
--- a/app-emulation/virtualbox/virtualbox-6.1.34.ebuild
+++ b/app-emulation/virtualbox/virtualbox-6.1.34.ebuild
@@ -131,6 +131,7 @@ REQUIRED_USE="
 
 PATCHES=(
 	"${FILESDIR}/${P}-vboxr0.patch"
+	"${FILESDIR}/${PN}-6.1.34-python3.10.patch" #852152
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2022-06-15 12:37 Lars Wendler
  0 siblings, 0 replies; 17+ messages in thread
From: Lars Wendler @ 2022-06-15 12:37 UTC (permalink / raw
  To: gentoo-commits

commit:     32e104524f206f4c02aa95f739995ad084c57201
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 15 12:36:35 2022 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Jun 15 12:37:52 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32e10452

app-emulation/virtualbox: Revbumps to remove uage of whoami

Thanks-to: Johan Hedlin <Busan15 <AT> protonmail.com>
Closes: https://bugs.gentoo.org/843776
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 app-emulation/virtualbox/files/virtualbox-ose-6-wrapper                 | 2 +-
 .../{virtualbox-6.1.32-r1.ebuild => virtualbox-6.1.32-r2.ebuild}        | 0
 .../{virtualbox-6.1.34.ebuild => virtualbox-6.1.34-r1.ebuild}           | 0
 3 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper b/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper
index af8090dd09af..57b15cc93eba 100644
--- a/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper
+++ b/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper
@@ -60,7 +60,7 @@ WARNING: The character device /dev/vboxdrv does not exist.
 EOF
 fi
 
-SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'`
+SERVER_PID=$(ps -U ${LOGNAME:-$USER} | grep VBoxSVC | awk '{ print $1 }')
 if [ -z "$SERVER_PID" ]; then
     # Server not running yet/anymore, cleanup socket path.
     # See IPC_GetDefaultSocketPath()!

diff --git a/app-emulation/virtualbox/virtualbox-6.1.32-r1.ebuild b/app-emulation/virtualbox/virtualbox-6.1.32-r2.ebuild
similarity index 100%
rename from app-emulation/virtualbox/virtualbox-6.1.32-r1.ebuild
rename to app-emulation/virtualbox/virtualbox-6.1.32-r2.ebuild

diff --git a/app-emulation/virtualbox/virtualbox-6.1.34.ebuild b/app-emulation/virtualbox/virtualbox-6.1.34-r1.ebuild
similarity index 100%
rename from app-emulation/virtualbox/virtualbox-6.1.34.ebuild
rename to app-emulation/virtualbox/virtualbox-6.1.34-r1.ebuild


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2022-07-06  3:01 Sam James
  0 siblings, 0 replies; 17+ messages in thread
From: Sam James @ 2022-07-06  3:01 UTC (permalink / raw
  To: gentoo-commits

commit:     19111a37141aee3704830806a4419c1cced2d131
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  6 02:14:51 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jul  6 02:14:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19111a37

app-emulation/virtualbox: fix build w/o PAM; respect CFLAGS

Closes: https://bugs.gentoo.org/583148
Closes: https://bugs.gentoo.org/843437
Thanks-to: François-Xavier Carton <fx.carton91 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/virtualbox-6.1.34-no-pam.patch           | 22 +++++++++++++++
 ....1.34-r2.ebuild => virtualbox-6.1.34-r3.ebuild} | 32 ++++++++++++----------
 2 files changed, 39 insertions(+), 15 deletions(-)

diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.34-no-pam.patch b/app-emulation/virtualbox/files/virtualbox-6.1.34-no-pam.patch
new file mode 100644
index 000000000000..9266cece55bd
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-6.1.34-no-pam.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/843437
+https://www.virtualbox.org/changeset/94406/vbox
+
+--- a/src/VBox/Runtime/Makefile.kmk
++++ b/src/VBox/Runtime/Makefile.kmk
+@@ -324,4 +324,7 @@
+ ifdef IPRT_WITH_FUTEX_BASED_SEMS
+  RuntimeR3_DEFS.linux  += IPRT_WITH_FUTEX_BASED_SEMS
++endif
++ifdef IPRT_WITHOUT_PAM
++ RuntimeR3_DEFS        += IPRT_WITHOUT_PAM
+ endif
+ RuntimeR3_INCS         = \
+--- a/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
++++ b/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
+@@ -86,4 +86,5 @@
+ 
+ #if !defined(IPRT_USE_PAM) \
++ && !defined(IPRT_WITHOUT_PAM) \
+  && ( defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(RT_OS_NETBSD) || defined(RT_OS_OPENBSD) )
+ # define IPRT_USE_PAM
+

diff --git a/app-emulation/virtualbox/virtualbox-6.1.34-r2.ebuild b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild
similarity index 96%
rename from app-emulation/virtualbox/virtualbox-6.1.34-r2.ebuild
rename to app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild
index 73fc49ceb444..3920e11b0d57 100644
--- a/app-emulation/virtualbox/virtualbox-6.1.34-r2.ebuild
+++ b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild
@@ -4,23 +4,25 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{8..10} )
-inherit desktop flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
+inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
 
 MY_PN="VirtualBox"
 MY_PV="${PV/beta/BETA}"
 MY_PV="${MY_PV/rc/RC}"
 MY_P=${MY_PN}-${MY_PV}
-[[ "${PV}" == *a ]] && DIR_PV="$(ver_cut 1-3)"
+[[ ${PV} == *a ]] && DIR_PV="$(ver_cut 1-3)"
 
 DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
 HOMEPAGE="https://www.virtualbox.org/"
 SRC_URI="https://download.virtualbox.org/virtualbox/${DIR_PV:-${MY_PV}}/${MY_P}.tar.bz2
 	https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-6.1.12-patches-01.tar.xz"
+S="${WORKDIR}/${MY_PN}-${DIR_PV:-${MY_PV}}"
 
 LICENSE="GPL-2 dtrace? ( CDDL )"
 SLOT="0/$(ver_cut 1-2)"
-[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
-KEYWORDS="~amd64"
+if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
+	KEYWORDS="~amd64"
+fi
 IUSE="alsa debug doc dtrace headless java lvm +opus pam pax-kernel pch pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
 
 COMMON_DEPEND="
@@ -121,12 +123,10 @@ QA_WX_LOAD="
 "
 
 QA_PRESTRIPPED="
-	/usr/lib64/virtualbox/VMMR0.r0
-	/usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
 "
 
-S="${WORKDIR}/${MY_PN}-${DIR_PV:-${MY_PV}}"
-
 REQUIRED_USE="
 	java? ( sdk )
 	python? ( sdk )
@@ -136,7 +136,8 @@ REQUIRED_USE="
 
 PATCHES=(
 	"${FILESDIR}/${P}-vboxr0.patch"
-	"${FILESDIR}/${PN}-6.1.34-python3.10.patch" #852152
+	"${FILESDIR}/${PN}-6.1.34-python3.10.patch" # bug #852152
+	"${FILESDIR}/${PN}-6.1.34-no-pam.patch" # bug #843437
 )
 
 pkg_pretend() {
@@ -225,11 +226,6 @@ src_prepare() {
 	default
 }
 
-doecho() {
-	echo "$@"
-	"$@" || die
-}
-
 src_configure() {
 	local myconf=(
 		--with-gcc="$(tc-getCC)"
@@ -261,8 +257,14 @@ src_configure() {
 	if use amd64 && ! has_multilib_profile ; then
 		myconf+=( --disable-vmmraw )
 	fi
+
+	cat >> LocalConfig.kmk <<-EOF || die
+		CFLAGS=${CFLAGS}
+		CXXFLAGS=${CXXFLAGS}
+	EOF
+
 	# not an autoconf script
-	doecho ./configure "${myconf[@]}"
+	edo ./configure "${myconf[@]}"
 }
 
 src_compile() {


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2022-07-06  3:01 Sam James
  0 siblings, 0 replies; 17+ messages in thread
From: Sam James @ 2022-07-06  3:01 UTC (permalink / raw
  To: gentoo-commits

commit:     0e7860b78e08743e7ba8a9d641a085e349811f83
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  6 02:59:20 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jul  6 03:01:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e7860b7

app-emulation/virtualbox: drop Python 3.10 for now

Didn't really want to do this but it's going to take substantially
more work to get it running.

Two issues (as described in the ebuild comment I've added):
1. The build system (not just configure) does a huge amount of
autodetection;

2. Its infra isn't set up to build Python 3.10+ yet (as in,
no targets defined, and they're all manually written). And
it doesn't seem to even use the result of configure?

It'll take more work to get this done and dropping 3.10 for now,
while it's unfortunate, means it's at least not in a broken state
until then.

I've left in the partial work commented out given it gets
us part of the way there. As far as I can tell, the configure
stuff isn't even used for the subsequent actual building
of the modules.

Bug: https://bugs.gentoo.org/856121
Bug: https://bugs.gentoo.org/785835
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/virtualbox-6.1.34-r3-python.patch        | 14 +++++
 .../virtualbox/virtualbox-6.1.34-r3.ebuild         | 64 +++++++++++++++-------
 2 files changed, 58 insertions(+), 20 deletions(-)

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
new file mode 100644
index 000000000000..3a6da1f681c1
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python.patch
@@ -0,0 +1,14 @@
+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/virtualbox-6.1.34-r3.ebuild b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild
index db2898848eba..a352a9dd329b 100644
--- a/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild
+++ b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild
@@ -3,7 +3,16 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{8..10} )
+# This absolutely doesn't work with Python 3.10 yet as of 6.1.34.
+# Two problems:
+# 1. The build system (not just in configure, but in src/libs/xpcom18a4/python/Makefile.kmk)
+# insists on trying to detect various Python paths without giving choice of which is used;
+#
+# 2. None of that machinery mentioned in #1. is rigged up for Python 3.10+, and
+# the homebrew Makefile/kbuild stuff is a pain to understand.
+#
+# bug #785835, bug #856121
+PYTHON_COMPAT=( python3_{8,9} )
 inherit desktop edo java-pkg-opt-2 linux-info multilib optfeature pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
 
 MY_PN="VirtualBox"
@@ -135,9 +144,12 @@ REQUIRED_USE="
 "
 
 PATCHES=(
-	"${FILESDIR}/${P}-vboxr0.patch"
-	"${FILESDIR}/${PN}-6.1.34-python3.10.patch" # bug #852152
-	"${FILESDIR}/${PN}-6.1.34-no-pam.patch" # bug #843437
+	"${FILESDIR}"/${P}-vboxr0.patch
+	"${FILESDIR}"/${PN}-6.1.34-python3.10.patch # bug #852152
+	"${FILESDIR}"/${PN}-6.1.34-no-pam.patch # bug #843437
+	"${FILESDIR}"/${PN}-6.1.26-configure-include-qt5-path.patch # bug #805365
+	"${FILESDIR}"/${PN}-6.1.34-r3-python.patch
+	"${WORKDIR}"/patches
 )
 
 pkg_pretend() {
@@ -164,6 +176,18 @@ 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
+
+	# 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
+
 	# Remove shipped binaries (kBuild,yasm), see bug #232775
 	rm -r kBuild/bin tools || die
 
@@ -204,22 +228,6 @@ src_prepare() {
 			-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 "${FILESDIR}/${PN}-6.1.26-configure-include-qt5-path.patch" #805365
-
-	eapply "${WORKDIR}/patches"
-
-	default
 }
 
 src_configure() {
@@ -270,6 +278,22 @@ src_configure() {
 
 	# not an autoconf script
 	edo ./configure "${myconf[@]}"
+
+	# Try to force usage of chosen Python implementation
+	# Commented out for now as it's insufficient (see comment above
+	# PYTHON_COMPAT).
+	# 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
+	#
+	#cat >> AutoConfig.kmk <<-EOF || die
+	#	VBOX_WITH_PYTHON=$(usex python 1 0)
+	#	VBOX_PATH_PYTHON_INC=$(python_get_includedir)
+	#	VBOX_LIB_PYTHON=$(python_get_library_path)
+	#EOF
 }
 
 src_compile() {


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2022-07-27 21:05 Sam James
  0 siblings, 0 replies; 17+ messages in thread
From: Sam James @ 2022-07-27 21:05 UTC (permalink / raw
  To: gentoo-commits

commit:     a1e87e52e23ba70995fc257bdeb155ef3ec728f8
Author:     Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
AuthorDate: Tue Jul 26 19:26:38 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jul 27 21:05:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1e87e52

app-emulation/virtualbox: add 6.1.36

Closes: https://bugs.gentoo.org/856769
Closes: https://bugs.gentoo.org/860897
Bug: https://bugs.gentoo.org/859391
Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/virtualbox/Manifest                  |   2 +
 .../files/virtualbox-6.1.36-python3.10.patch       |  16 +
 app-emulation/virtualbox/virtualbox-6.1.36.ebuild  | 644 +++++++++++++++++++++
 3 files changed, 662 insertions(+)

diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index 7c756f072fe3..140f1e61f347 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,3 +1,5 @@
 DIST VirtualBox-6.1.32.tar.bz2 165758238 BLAKE2B 24873d7cc8bd306ea3552fe75379fbe7be767c85406042344eb047ed31184c3357aea07dda5e15c275f5036ae63106ef1d2e6524b143bc645a6b5ba0016f1391 SHA512 8bf7af6b8b4d3ba90f0e91589cf26400648436eb9da6d31c1a760460bfe5eb7311ac3220b4c9a98ac50e559641d3d5f559134be65288821038255de1c2c7ce1e
 DIST VirtualBox-6.1.34.tar.bz2 165761216 BLAKE2B d3c8f7d3d6f408e4c4275c2b2815e92819c871359501ec4fa7212bf7cdc852613e2e4703d8650371097a5bc805efa04ea75bb03ab83d24a869a677555f6e22d5 SHA512 46d63a9fd9df76af654af59fab5cf555858bc2c4b5dc34e2378d85ae784e6380b6def4aab06909a9b5e114a7297269f90cfb2c3d8d6529b423d703afbad18c64
+DIST VirtualBox-6.1.36.tar.bz2 165685382 BLAKE2B 98dbb06450b9df650cb72493bcdea4b88fa9dd21f76d723fdc0bb2c1ab8266f67e972a7222dc9b5bd0d43754911710664bddace753995be025cf6bcc05a24ae5 SHA512 cc3b984a7da40c9bf14831808a2bc2bf7bf6821e53c25fa11cb4b4275feb1d4b0cb4a47d8a360b90c89e5a4038481efe8fe28ee22996dbefb6446761e88a8dec
 DIST virtualbox-6.1.12-patches-01.tar.xz 2528 BLAKE2B a5d7cde0daea41bee2e40e46569c725769927a31865d99d13b8b13c4903e59b4097f85da15dc592b9c7e8baf8ff805397af827620f107ba09a468b4d1198ecab SHA512 f71d10a9fbce99c3f631ef30bcfa9d0e017e702ac509541b039e08ccbcd024beb93fde09c43d90af5d9d28f6842a7947f20e7950d3897da3e6d57859657e1123
+DIST virtualbox-patches-6.1.36.tar.bz2 2733 BLAKE2B dcfebfeca4873d382441515d48b4dfee9343bc7c83ea3cbb5002dbf7975143a79fae9a701b67dc35505e9ca03ff1b6293cb7c3279c4fdfda8ad21ba5fb9b7e87 SHA512 1bed5cdefbf8e7c4b0d9092ba4961ecf2262f27f35c71a91ef6f2e8fe8a1d92ed74f06bafbf58d70ba7165d933997f58073f4d4f4051e3ba5c0339b729066f57

diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.36-python3.10.patch b/app-emulation/virtualbox/files/virtualbox-6.1.36-python3.10.patch
new file mode 100644
index 000000000000..90157ada7d96
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-6.1.36-python3.10.patch
@@ -0,0 +1,16 @@
+https://github.com/archlinux/svntogit-community/blob/b103146beee8b7c70d04685033a8536aed2e5aea/trunk/002-python310.patch
+https://github.com/archlinux/svntogit-community/blob/b103146beee8b7c70d04685033a8536aed2e5aea/trunk/003-pyunicode.patch
+
+https://www.virtualbox.org/changeset/90537/vbox
+https://www.virtualbox.org/changeset/86623/vbox
+--- a/src/libs/xpcom18a4/python/src/PyXPCOM.h
++++ b/src/libs/xpcom18a4/python/src/PyXPCOM.h
+@@ -137,7 +137,7 @@
+ #  define PyInt_Check(o) PyLong_Check(o)
+ #  define PyInt_AsLong(o) PyLong_AsLong(o)
+ #  define PyNumber_Int(o) PyNumber_Long(o)
+-#  if PY_VERSION_HEX <= 0x03030000 /* 3.3 added PyUnicode_AsUTF8AndSize */
++#  if !defined(Py_LIMITED_API) && PY_VERSION_HEX <= 0x03030000 /* 3.3 added PyUnicode_AsUTF8AndSize */
+ #   ifndef PyUnicode_AsUTF8
+ #    define PyUnicode_AsUTF8(o) _PyUnicode_AsString(o)
+ #   endif

diff --git a/app-emulation/virtualbox/virtualbox-6.1.36.ebuild b/app-emulation/virtualbox/virtualbox-6.1.36.ebuild
new file mode 100644
index 000000000000..19b363fc34f3
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-6.1.36.ebuild
@@ -0,0 +1,644 @@
+# Copyright 2022 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_{8..10} )
+
+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_PV="${PV/beta/BETA}"
+MY_PV="${MY_PV/rc/RC}"
+MY_P=${MY_PN}-${MY_PV}
+[[ ${PV} == *a ]] && DIR_PV="$(ver_cut 1-3)"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${DIR_PV:-${MY_PV}}/${MY_P}.tar.bz2
+	https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${MY_PV}.tar.bz2"
+S="${WORKDIR}/${MY_PN}-${DIR_PV:-${MY_PV}}"
+
+LICENSE="GPL-2 dtrace? ( CDDL )"
+SLOT="0/$(ver_cut 1-2)"
+if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
+	KEYWORDS="~amd64"
+fi
+IUSE="alsa debug doc dtrace headless java lvm +opus pam pax-kernel pch pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
+
+unset WATCOM #856769
+
+COMMON_DEPEND="
+	${PYTHON_DEPS}
+	acct-group/vboxusers
+	~app-emulation/virtualbox-modules-${DIR_PV:-${PV}}
+	dev-libs/libIDL
+	>=dev-libs/libxslt-1.1.19
+	net-misc/curl
+	dev-libs/libxml2
+	media-libs/libpng:0=
+	media-libs/libvpx:0=
+	sys-libs/zlib:=
+	!headless? (
+		media-libs/libsdl:0[X,video]
+		x11-libs/libX11
+		x11-libs/libxcb:=
+		x11-libs/libXcursor
+		x11-libs/libXext
+		x11-libs/libXmu
+		x11-libs/libXt
+		opengl? (
+			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 )
+	udev? ( >=virtual/udev-171 )
+	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 #832166.
+DEPEND="
+	${COMMON_DEPEND}
+	alsa? ( >=media-libs/alsa-lib-1.0.13 )
+	!headless? (
+		x11-libs/libXinerama
+		opengl? ( virtual/opengl )
+	)
+	java? ( virtual/jdk:1.8 )
+	pam? ( sys-libs/pam )
+	pax-kernel? ( sys-apps/elfix )
+	pulseaudio? ( media-sound/pulseaudio )
+	vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	>=dev-util/kbuild-0.1.9998.3127
+	>=dev-lang/yasm-0.6.2
+	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 )
+	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
+"
+
+QA_TEXTRELS="
+	usr/lib64/virtualbox/VMMR0.r0
+"
+
+QA_EXECSTACK="
+	usr/lib64/virtualbox/iPxeBaseBin
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+"
+
+QA_WX_LOAD="
+	usr/lib64/virtualbox/iPxeBaseBin
+"
+
+QA_PRESTRIPPED="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+"
+
+REQUIRED_USE="
+	java? ( sdk )
+	python? ( sdk )
+	vboxwebsrv? ( java )
+	${PYTHON_REQUIRED_USE}
+"
+
+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
+
+	# Patch grabbed from Arch Linux / upstream for Python 3.10 support
+	"${FILESDIR}"/${PN}-6.1.36-python3.10.patch
+
+	# Downloaded patchset
+	"${WORKDIR}"/virtualbox-patches-${MY_PV}/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
+	if ! use python ; then
+		einfo "You have disabled the \"python\" USE flag. This will only"
+		einfo "disable the python bindings being installed."
+	fi
+}
+
+pkg_setup() {
+	java-pkg-opt-2_pkg_setup
+	python-single-r1_pkg_setup
+}
+
+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
+
+	# 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
+
+	# 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
+
+	# 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
+}
+
+src_configure() {
+	tc-ld-disable-gold # bug #488176
+
+	#856811 turns out having march defined produces buggy executables
+	filter-flags -march=* -mtune=* -mcpu=*
+
+	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
+
+		$(usex alsa '' --disable-alsa)
+		$(usex debug --build-debug '')
+		$(usex doc '' --disable-docs)
+		$(usex java '' --disable-java)
+		$(usex lvm '' --disable-devmapper)
+		$(usex opus '' --disable-libopus)
+		$(usex pulseaudio '' --disable-pulse)
+		$(usex python '' --disable-python)
+		$(usex vboxwebsrv --enable-webservice '')
+		$(usex vnc --enable-vnc '')
+	)
+
+	if ! use headless ; then
+		myconf+=(
+			$(usex opengl '' --disable-opengl)
+			$(usex qt5 '' --disable-qt)
+		)
+	else
+		myconf+=(
+			--build-headless
+			--disable-opengl
+		)
+	fi
+
+	if use amd64 && ! has_multilib_profile ; then
+		myconf+=( --disable-vmmraw )
+	fi
+
+	# 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
+
+	cat >> AutoConfig.kmk <<-EOF || die
+		VBOX_WITH_PYTHON=$(usev python 1)
+		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
+		VBOX_LIB_PYTHON=$(python_get_library_path)
+	EOF
+
+	if use python ; then
+		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
+	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
+		vbox_inst VBoxSDL 4750
+		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
+
+		for each in vboxsdl VBoxSDL ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+
+		if use qt5 ; then
+			vbox_inst VirtualBox
+			vbox_inst VirtualBoxVM 4750
+			for each in VirtualBox{,VM} ; do
+				pax-mark -m "${ED}"${vbox_inst_path}/${each}
+			done
+
+			if use opengl ; then
+				vbox_inst VBoxTestOGL
+				pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
+			fi
+
+			for each in virtualbox{,vm} VirtualBox{,VM} ; do
+				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" -print0 \
+		| xargs --no-run-if-empty --null 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/${DIR_PV:-${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
+}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2023-01-11 15:38 Viorel Munteanu
  0 siblings, 0 replies; 17+ messages in thread
From: Viorel Munteanu @ 2023-01-11 15:38 UTC (permalink / raw
  To: gentoo-commits

commit:     8d815801bb081fbc0ec416c8b4c1b89c7c19e786
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 11 15:36:26 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed Jan 11 15:36:26 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d815801

app-emulation/virtualbox: drop 7.0.2-r1

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

 app-emulation/virtualbox/Manifest                  |   1 -
 .../files/virtualbox-7.0.0-fix-compilation.patch   |  56 --
 .../virtualbox/virtualbox-7.0.2-r1.ebuild          | 692 ---------------------
 3 files changed, 749 deletions(-)

diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index 08d4525a0370..118f93baaa13 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,4 +1,3 @@
 DIST VirtualBox-6.1.40.tar.bz2 165769795 BLAKE2B 5c216f23422be3fc4f7760881c666c57a516d12726ed8ef040bbdf918f1af53c69d204b22949e25f751cbe788b00c810c49c27b7c51c1837fd1c503a3eff202c SHA512 0dace071fe58500d0912fe4da4751de6840752375039554a56c8c753a0880a419c4a1ed7f1b0ebc51230f7099ca3f5d987dc7b91ad4d98dbd75bf63e3c27e096
-DIST VirtualBox-7.0.2.tar.bz2 199461536 BLAKE2B 94f7c2961c13530b6086bf4576f243b5b260f43ec445c8a2e411205989a9db229715502f2b76b8f3cb45a49ff565410701be90f1e850f069aae5579c0796b503 SHA512 c79d6365f83e1fde356a7f4a6ccd23bc7306d1b5b4be669634c575f08ba53338caca684758c9409ecef2b05ab6f9ad37dfa6075ad6afbc5d7909d46ee6794927
 DIST VirtualBox-7.0.4.tar.bz2 199658172 BLAKE2B 51bde109805e8f3e25f179a05fac532de7a428010955c7cc2a7c9e8c072246d69c5f51f8a51e39b6a1b9f246bd945edc38e0f0cc0630c357a5e9641c38dcac21 SHA512 70f2031c4897249177131795281bf6bd5a75166067d1921db70fd1e21f5638285b5a0c3298a7070e272ac2f093a60c35eb3cab4e5f7d16a68d17b211f637b0bc
 DIST virtualbox-patches-6.1.36.tar.bz2 2733 BLAKE2B dcfebfeca4873d382441515d48b4dfee9343bc7c83ea3cbb5002dbf7975143a79fae9a701b67dc35505e9ca03ff1b6293cb7c3279c4fdfda8ad21ba5fb9b7e87 SHA512 1bed5cdefbf8e7c4b0d9092ba4961ecf2262f27f35c71a91ef6f2e8fe8a1d92ed74f06bafbf58d70ba7165d933997f58073f4d4f4051e3ba5c0339b729066f57

diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation.patch b/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation.patch
deleted file mode 100644
index 362e792c9cb9..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Fix compilation if VBOX_WITH_AUDIO_OSS is defined while VBOX_WITH_AUDIO_PULSE and VBOX_WITH_AUDIO_ALSA are not
-
-Fix compilation if VBOX_WITH_AUDIO_RECORDING is not defined
-
---- a/src/VBox/Main/xml/Settings.cpp
-+++ b/src/VBox/Main/xml/Settings.cpp
-@@ -8931,6 +8931,9 @@
-     RTCLock lock(s_mtx);
-     if (s_enmLinuxDriver == AudioDriverType_Null)
-     {
-+# ifdef VBOX_WITH_AUDIO_OSS
-+	s_enmLinuxDriver = AudioDriverType_OSS;
-+# endif /* VBOX_WITH_AUDIO_OSS */
- # ifdef VBOX_WITH_AUDIO_PULSE
-         /* Check for the pulse library & that the pulse audio daemon is running. */
-         if (RTProcIsRunningByName("pulseaudio") &&
-@@ -8943,10 +8946,7 @@
-              if (RTLdrIsLoadable("libasound.so.2"))
-                 s_enmLinuxDriver = AudioDriverType_ALSA;
- # endif /* VBOX_WITH_AUDIO_ALSA */
--# ifdef VBOX_WITH_AUDIO_OSS
--             else
--                s_enmLinuxDriver = AudioDriverType_OSS;
--# endif /* VBOX_WITH_AUDIO_OSS */
-+	;
-     }
-     return s_enmLinuxDriver;
- 
---- a/src/VBox/Main/src-client/RecordingInternals.cpp
-+++ b/src/VBox/Main/src-client/RecordingInternals.cpp
-@@ -139,7 +139,9 @@
-     switch (pFrame->enmType)
-     {
-         case RECORDINGFRAME_TYPE_AUDIO:
-+#ifdef VBOX_WITH_AUDIO_RECORDING
-             recordingAudioFrameDestroy(&pFrame->Audio);
-+#endif // VBOX_WITH_AUDIO_RECORDING
-             break;
- 
-         case RECORDINGFRAME_TYPE_VIDEO:
---- a/src/VBox/Main/src-client/Recording.cpp
-+++ b/src/VBox/Main/src-client/Recording.cpp
-@@ -836,11 +836,13 @@
- 
-     if (m_enmState == RECORDINGSTS_STARTED)
-     {
-+#ifdef VBOX_WITH_AUDIO_RECORDING
-         if (   recordingCodecIsInitialized(&m_CodecAudio)
-             && recordingCodecGetWritable(&m_CodecAudio, msTimestamp) > 0)
-         {
-             fNeedsUpdate = true;
-         }
-+#endif	// VBOX_WITH_AUDIO_RECORDING
- 
-         if (!fNeedsUpdate)
-         {

diff --git a/app-emulation/virtualbox/virtualbox-7.0.2-r1.ebuild b/app-emulation/virtualbox/virtualbox-7.0.2-r1.ebuild
deleted file mode 100644
index dc0c47d4cbb0..000000000000
--- a/app-emulation/virtualbox/virtualbox-7.0.2-r1.ebuild
+++ /dev/null
@@ -1,692 +0,0 @@
-# Copyright 2022 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_{8..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+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
-SLOT="0/$(ver_cut 1-2)"
-KEYWORDS="~amd64"
-IUSE="alsa dbus 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="
-	${PYTHON_DEPS}
-	acct-group/vboxusers
-	~app-emulation/virtualbox-modules-${PV}
-	dev-libs/libxml2
-	dev-libs/openssl:0=
-	media-libs/libpng:0=
-	media-libs/libvpx:0=
-	net-misc/curl
-	sys-libs/zlib
-	dbus? ( sys-apps/dbus )
-	!headless? (
-		x11-libs/libX11
-		x11-libs/libXt
-		opengl? (
-			media-libs/libglvnd[X]
-			media-libs/vulkan-loader
-		)
-		qt5? (
-			dev-qt/qtcore:5
-			dev-qt/qtdbus:5
-			dev-qt/qtgui:5
-			dev-qt/qthelp:5
-			dev-qt/qtprintsupport:5
-			dev-qt/qtwidgets:5
-			dev-qt/qtx11extras:5
-			dev-qt/qtxml:5
-			opengl? ( dev-qt/qtopengl:5 )
-		)
-		sdl? (
-			media-libs/libsdl:0[X,video]
-			x11-libs/libXcursor
-		)
-	)
-	lvm? ( sys-fs/lvm2 )
-	pam? ( sys-libs/pam )
-	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}
-	>=dev-libs/libxslt-1.1.19
-	virtual/libcrypt:=
-	alsa? ( >=media-libs/alsa-lib-1.0.13 )
-	opengl? ( virtual/glu )
-	!headless? (
-		x11-libs/libXcursor
-		x11-libs/libXext
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libxcb:=
-		x11-libs/libXrandr
-		opengl? ( virtual/opengl )
-	)
-	java? ( virtual/jdk:1.8 )
-	opus? ( media-libs/opus )
-	pax-kernel? ( sys-apps/elfix )
-	pulseaudio? ( media-sound/pulseaudio )
-	qt5? ( x11-libs/libXinerama )
-	udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
-	${COMMON_DEPEND}
-	java? ( virtual/jre:1.8 )
-	qt5? ( x11-libs/libxcb:= )
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	>=dev-lang/yasm-0.6.2
-	dev-libs/libIDL
-	dev-qt/linguist-tools:5
-	dev-util/glslang
-	>=dev-util/kbuild-0.1.9998.3127
-	sys-apps/which
-	sys-devel/bin86
-	sys-libs/libcap
-	sys-power/iasl
-	virtual/pkgconfig
-	doc? (
-		app-text/docbook-sgml-dtd:4.4
-		app-text/docbook-xsl-ns-stylesheets
-		dev-texlive/texlive-basic
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexrecommended
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-fontsrecommended
-		dev-texlive/texlive-fontsextra
-		dev-qt/qthelp:5
-	)
-	java? ( virtual/jdk: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 )
-	vboxwebsrv? ( java )
-	${PYTHON_REQUIRED_USE}
-"
-
-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
-
-	"${FILESDIR}"/${PN}-7.0.0-fix-compilation.patch
-	"${FILESDIR}"/${PN}-7.0.0-fix-compilation-clang.patch
-	"${FILESDIR}"/${PN}-7.0.0-python3_11.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 headless && use sdl; then
-		einfo "You selected USE=\"headless sdl\", defaulting to"
-		einfo "USE=\"headless\", this build will not include SDL."
-	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
-
-	# 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
-	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
-
-	# 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
-
-	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
-	rm -r kBuild/bin || die
-	# Remove everything in tools except kBuildUnits
-	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || 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
-
-	# 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
-
-	#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
-
-	# bug #843437
-	cat >> LocalConfig.kmk <<-EOF || die
-		CXXFLAGS=${CXXFLAGS}
-		CFLAGS=${CFLAGS}
-	EOF
-
-	if ! use headless && use sdl; then
-		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
-	fi
-
-	# clang assembler chokes on comments starting with /
-	if tc-is-clang; then
-		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-	fi
-
-	# fix doc generation
-	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
-	# 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
-}
-
-src_configure() {
-	tc-ld-disable-gold # bug #488176
-
-	tc-export AR CC CXX LD RANLIB
-	export HOST_CC="$(tc-getBUILD_CC)"
-
-	local myconf=(
-		--with-gcc="$(tc-getCC)"
-		--with-g++="$(tc-getCXX)"
-
-		--disable-kmods
-
-		$(usex alsa '' --disable-alsa)
-		$(usex dbus '' --disable-dbus)
-		$(usex debug --build-debug '')
-		$(usex doc '' --disable-docs)
-		$(usex java '' --disable-java)
-		$(usex lvm '' --disable-devmapper)
-		$(usex opus '' --disable-libopus)
-		$(usex pulseaudio '' --disable-pulse)
-		$(usex python '' --disable-python)
-		$(usex vboxwebsrv --enable-webservice '')
-		$(usex vnc --enable-vnc '')
-	)
-
-	if ! use headless; then
-		myconf+=(
-			$(usex opengl '' --disable-opengl)
-			$(usex qt5 '' --disable-qt)
-			$(usex sdl '' --disable-sdl)
-		)
-	else
-		myconf+=(
-			--build-headless
-			--disable-opengl
-		)
-	fi
-
-	if use amd64 && ! has_multilib_profile; then
-		myconf+=( --disable-vmmraw )
-	fi
-
-	# 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
-
-	cat >> AutoConfig.kmk <<-EOF || die
-		VBOX_WITH_PYTHON=$(usev python 1)
-		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-		VBOX_LIB_PYTHON=$(python_get_library_path)
-	EOF
-
-	if use python; then
-		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
-	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,VMMPreload,XPCOMIPCD} vboximg-mount *so *r0; 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}/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
-		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 python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.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
-}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2023-01-22  9:59 Viorel Munteanu
  0 siblings, 0 replies; 17+ messages in thread
From: Viorel Munteanu @ 2023-01-22  9:59 UTC (permalink / raw
  To: gentoo-commits

commit:     ea8c412159e627831fb463ff7f969293abb6cefe
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 20 10:04:17 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sun Jan 22 09:55:03 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea8c4121

app-emulation/virtualbox: enable py3.11

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

 .../files/virtualbox-6.1.42-python3_11.patch       | 81 ++++++++++++++++++++++
 app-emulation/virtualbox/virtualbox-6.1.42.ebuild  |  3 +-
 2 files changed, 83 insertions(+), 1 deletion(-)

diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.42-python3_11.patch b/app-emulation/virtualbox/files/virtualbox-6.1.42-python3_11.patch
new file mode 100644
index 000000000000..1c3af9d8afef
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-6.1.42-python3_11.patch
@@ -0,0 +1,81 @@
+Add Python 3.11 support to virtualbox 6.1
+
+--- a/src/libs/xpcom18a4/python/Makefile.kmk
++++ b/src/libs/xpcom18a4/python/Makefile.kmk
+@@ -26,7 +26,7 @@
+ 
+ #
+ # List of supported Python versions, defining a number of
+-# VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|38|38M|39|39M|310|310M|DEF]_[INC|LIB] variables
++# VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|38|38M|39|39M|310|310M|311|311M|DEF]_[INC|LIB] variables
+ # which get picked up below.
+ #
+ ifeq ($(KBUILD_TARGET),darwin) # Relatively predictable, don't script.
+@@ -624,6 +624,52 @@
+   endif
+  endif
+ endif
++
++ifdef VBOX_PYTHON311_INC
++#
++# Python 3.11 version
++#
++DLLS += VBoxPython3_11
++VBoxPython3_11_EXTENDS    = VBoxPythonBase
++VBoxPython3_11_EXTENDS_BY = appending
++VBoxPython3_11_TEMPLATE   = XPCOM
++VBoxPython3_11_INCS       = $(VBOX_PYTHON311_INC)
++VBoxPython3_11_LIBS       = $(VBOX_PYTHON311_LIB)
++
++ ifdef VBOX_WITH_32_ON_64_MAIN_API
++  ifdef VBOX_PYTHON311_LIB_X86
++DLLS += VBoxPython3_11_x86
++VBoxPython3_11_x86_EXTENDS    = VBoxPythonBase_x86
++VBoxPython3_11_x86_EXTENDS_BY = appending
++VBoxPython3_11_x86_TEMPLATE   = XPCOM
++VBoxPython3_11_x86_INCS       = $(VBOX_PYTHON311_INC)
++VBoxPython3_11_x86_LIBS       = $(VBOX_PYTHON311_LIB_X86)
++  endif
++ endif
++endif
++
++ifdef VBOX_PYTHON311M_INC
++#
++# Python 3.11 version with pymalloc
++#
++DLLS += VBoxPython3_11m
++VBoxPython3_11m_EXTENDS    = VBoxPythonBase_m
++VBoxPython3_11m_EXTENDS_BY = appending
++VBoxPython3_11m_TEMPLATE   = XPCOM
++VBoxPython3_11m_INCS       = $(VBOX_PYTHON311M_INC)
++VBoxPython3_11m_LIBS       = $(VBOX_PYTHON311M_LIB)
++
++ ifdef VBOX_WITH_32_ON_64_MAIN_API
++  ifdef VBOX_PYTHON311M_LIB_X86
++DLLS += VBoxPython3_11m_x86
++VBoxPython3_11m_x86_EXTENDS    = VBoxPythonBase_x86_m
++VBoxPython3_11m_x86_EXTENDS_BY = appending
++VBoxPython3_11m_x86_TEMPLATE_  = XPCOM
++VBoxPython3_11m_x86_INCS       = $(VBOX_PYTHON311M_INC)
++VBoxPython3_11m_x86_LIBS       = $(VBOX_PYTHON311M_LIB_X86)
++  endif
++ endif
++endif
+ 
+ ifdef VBOX_PYTHONDEF_INC
+ #
+--- a/src/libs/xpcom18a4/python/src/module/_xpcom.cpp
++++ b/src/libs/xpcom18a4/python/src/module/_xpcom.cpp
+@@ -84,7 +84,11 @@
+ #  define MANGLE_MODULE_INIT(a_Name)    RT_CONCAT(a_Name, MODULE_NAME_SUFFIX)
+ # endif
+ # ifdef VBOX_PYXPCOM_VERSIONED
+-#  if   PY_VERSION_HEX >= 0x030a0000 && PY_VERSION_HEX < 0x030b0000
++#  if   PY_VERSION_HEX >= 0x030b0000 && PY_VERSION_HEX < 0x030c0000
++#   define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython3_11")
++#   define initVBoxPython MANGLE_MODULE_INIT(PyInit_VBoxPython3_11)
++
++#  elif   PY_VERSION_HEX >= 0x030a0000 && PY_VERSION_HEX < 0x030b0000
+ #   define MODULE_NAME    MANGLE_MODULE_NAME("VBoxPython3_10")
+ #   define initVBoxPython MANGLE_MODULE_INIT(PyInit_VBoxPython3_10)
+ 

diff --git a/app-emulation/virtualbox/virtualbox-6.1.42.ebuild b/app-emulation/virtualbox/virtualbox-6.1.42.ebuild
index 84c0abf767f9..0b6b25b3dcc0 100644
--- a/app-emulation/virtualbox/virtualbox-6.1.42.ebuild
+++ b/app-emulation/virtualbox/virtualbox-6.1.42.ebuild
@@ -15,7 +15,7 @@ EAPI=8
 #  trunk branch but not release branch.
 #
 #  See bug #785835, bug #856121.
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{9..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
@@ -173,6 +173,7 @@ PATCHES=(
 	# (see the rest of the ebuild's logic for the remainder) to handle
 	# proper Python selection.
 	"${FILESDIR}"/${PN}-6.1.34-r3-python.patch
+	"${FILESDIR}"/${PN}-6.1.42-python3_11.patch
 
 	# 865361
 	"${FILESDIR}"/${PN}-6.1.36-fcf-protection.patch


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2023-05-30  5:22 Viorel Munteanu
  0 siblings, 0 replies; 17+ messages in thread
From: Viorel Munteanu @ 2023-05-30  5:22 UTC (permalink / raw
  To: gentoo-commits

commit:     23e33827ff92725fee6b5beaa75a90f71aae3782
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Tue May 30 05:20:35 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Tue May 30 05:20:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23e33827

app-emulation/virtualbox: drop 6.1.42-r1, 7.0.6-r2

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

 app-emulation/virtualbox/Manifest                  |   3 -
 .../files/virtualbox-7.0.0-python3_11.patch        |  90 ---
 .../files/virtualbox-7.0.4-fix-compilation.patch   |  26 -
 .../virtualbox/virtualbox-6.1.42-r1.ebuild         | 665 -------------------
 .../virtualbox/virtualbox-7.0.6-r2.ebuild          | 730 ---------------------
 5 files changed, 1514 deletions(-)

diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index 13bf16444fc0..c5d61e17cfa4 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,8 +1,5 @@
-DIST VirtualBox-6.1.42.tar.bz2 165554573 BLAKE2B 8419793d9e4c4d0804baba926443a27259b012ab90d1bb27c8f9d90b018ddbef83d1cc47e9f5b88e6e247f22c186603584a5ddee4b0c04fe842eba56f3fd103a SHA512 a4861b44ee85d6d1d72ba1d19b5598873503feeb6d562cf7d8c770cc9b466741bdfa5abe74dc4e7952ff189d14c6caf60f584731492c38f688a360baba019ab2
 DIST VirtualBox-6.1.44.tar.bz2 165775421 BLAKE2B e87d7175bc616784c79d02b595d81119cedc7f4df1822b71ca10b85d44d5cd1dacd999e7867a0bef8579ea715ef732b990cef63f3325fff0c139abe394d88ad7 SHA512 49c3baa1a40dcafcc6b31d0abcfecfcb24305de44e5efd3f68ba4443574e21b8cc34d7288e0fbc56730bc3be2bee07089b7dfed14848a88dc38a1433b6dda8af
-DIST VirtualBox-7.0.6.tar.bz2 199512172 BLAKE2B cfe4d7abd57dfdb0294177759e80aa9fda797b9b5433f214771a57764cb23404450169e8c7c30cda13de85b8e02a37024584c7b1f0b5a44b10b100aa66b8d5c5 SHA512 f9db7a154e392f550f50abe774fc6263eb0b6f86dccc069f2c5012fedbe2debbf5b8ba62cca44ea0d5d5475652188176bfb888266f69197677b22854f02b64a0
 DIST VirtualBox-7.0.8a.tar.bz2 199387757 BLAKE2B 0ba397825277ecbb851bd4ea94c85448e2966fd96ef8edcaf3102f8515553736d6ceee84c0647fa37443c1875256353fdd029d6c505aa99834079acb957b24a0 SHA512 fcbf907f6f7f2396ebff5a31af6ec00b38f09799380bac4847cc9044455832de058659edaa9f621b0054fa402bfacef1b5444498c9faeb3671d02da1505c952d
-DIST virtualbox-help-7.0.6.tar.xz 3939412 BLAKE2B ea1326bccb3c2edc33ab37e122a7bedf79475d335e632ee62f99e0dce4b80de7634cbfe121c8c7ccd6588ff3b81effe7b20efe123cc44bc7b1ff4f6a851302a6 SHA512 ffb59f0c99c91b165a0b83d29317e04eee9097b0d0ac92a0d3e71558e70ec8b2807491a4633562a5e820e5f5a8e1339883031fd03de93d09a188f19b8b4d3a93
 DIST virtualbox-help-7.0.8.tar.xz 3941816 BLAKE2B f1c82ccc8a0d4e99f2302a7024a551e7e4a70348b193cf0c3a3b2917a717451c74d652555cadb278f6e27c47dac88a8121acfe9425bc0f5b82b5101475f384b3 SHA512 7483c4321492effb5b4329d48b363d8d2b3aaa248c0259cd06569497090aa438c39e94d6a5da4f511202f424e596f66e7580e37ffa5da66661fd0fadcd99c5ef
 DIST virtualbox-patches-6.1.36.tar.bz2 2733 BLAKE2B dcfebfeca4873d382441515d48b4dfee9343bc7c83ea3cbb5002dbf7975143a79fae9a701b67dc35505e9ca03ff1b6293cb7c3279c4fdfda8ad21ba5fb9b7e87 SHA512 1bed5cdefbf8e7c4b0d9092ba4961ecf2262f27f35c71a91ef6f2e8fe8a1d92ed74f06bafbf58d70ba7165d933997f58073f4d4f4051e3ba5c0339b729066f57
 DIST virtualbox-patches-7.0.8.tar.bz2 2733 BLAKE2B 044dfe02a5bd5e757091318b394b0e5918677b5bbce9caef4a18d4d8df54821559f0df6ffbdd6f52d4934bc4018e9c9d908571c5d3d8804fd3b0f22a7a1aed84 SHA512 93a06aa3f9508d3a8743ca8494a958159b5bc3fd7a0a08ff23414d05c4f31084cf0f1c82a3866e222c83e6996ba004546f0bd33c6eb9a90eec8e548b8b3f2fbf

diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.0-python3_11.patch b/app-emulation/virtualbox/files/virtualbox-7.0.0-python3_11.patch
deleted file mode 100644
index cbdc1e1e2ad1..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-7.0.0-python3_11.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-Add support for python 3.11
-
-Virtualbox 7.0.0 will only build a lib named VBoxPython3.so, regardless of the
-actual python version used when compiling.  Remove VBoxPython3m.so, we don't
-use it.
-
---- a/src/libs/xpcom18a4/python/Makefile.kmk
-+++ b/src/libs/xpcom18a4/python/Makefile.kmk
-@@ -30,7 +30,7 @@
- 
- #
- # List of supported Python versions, defining a number of
--# VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|38|38M|39|39M|310|310M|DEF]_[INC|LIB] variables
-+# VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|38|38M|39|39M|310|310M|311|311M|DEF]_[INC|LIB] variables
- # which get picked up below.
- #
- ifeq ($(KBUILD_TARGET),darwin) # Relatively predictable, don't script.
-@@ -702,6 +702,52 @@
-  endif
- endif
- 
-+ifdef VBOX_PYTHON311_INC
-+#
-+# Python 3.11 version
-+#
-+DLLS += VBoxPython3_11
-+VBoxPython3_11_EXTENDS    = VBoxPythonBase
-+VBoxPython3_11_EXTENDS_BY = appending
-+VBoxPython3_11_TEMPLATE   = XPCOM
-+VBoxPython3_11_INCS       = $(VBOX_PYTHON311_INC)
-+VBoxPython3_11_LIBS       = $(VBOX_PYTHON311_LIB)
-+
-+ ifdef VBOX_WITH_32_ON_64_MAIN_API
-+  ifdef VBOX_PYTHON311_LIB_X86
-+DLLS += VBoxPython3_11_x86
-+VBoxPython3_11_x86_EXTENDS    = VBoxPythonBase_x86
-+VBoxPython3_11_x86_EXTENDS_BY = appending
-+VBoxPython3_11_x86_TEMPLATE   = XPCOM
-+VBoxPython3_11_x86_INCS       = $(VBOX_PYTHON311_INC)
-+VBoxPython3_11_x86_LIBS       = $(VBOX_PYTHON311_LIB_X86)
-+  endif
-+ endif
-+endif
-+
-+ifdef VBOX_PYTHON311M_INC
-+#
-+# Python 3.11 version with pymalloc
-+#
-+DLLS += VBoxPython3_11m
-+VBoxPython3_11m_EXTENDS    = VBoxPythonBase_m
-+VBoxPython3_11m_EXTENDS_BY = appending
-+VBoxPython3_11m_TEMPLATE   = XPCOM
-+VBoxPython3_11m_INCS       = $(VBOX_PYTHON311M_INC)
-+VBoxPython3_11m_LIBS       = $(VBOX_PYTHON311M_LIB)
-+
-+ ifdef VBOX_WITH_32_ON_64_MAIN_API
-+  ifdef VBOX_PYTHON311M_LIB_X86
-+DLLS += VBoxPython3_11m_x86
-+VBoxPython3_11m_x86_EXTENDS    = VBoxPythonBase_x86_m
-+VBoxPython3_11m_x86_EXTENDS_BY = appending
-+VBoxPython3_11m_x86_TEMPLATE_  = XPCOM
-+VBoxPython3_11m_x86_INCS       = $(VBOX_PYTHON311M_INC)
-+VBoxPython3_11m_x86_LIBS       = $(VBOX_PYTHON311M_LIB_X86)
-+  endif
-+ endif
-+endif
-+
- ifdef VBOX_PYTHONDEF_INC
- #
- # Python without versioning
-@@ -744,18 +790,13 @@
- # TODO: ASSUMING that we don't need a different headers for pymalloc
- #       ('m' builds < 3.8) and CRT malloc.
- #
--VBOX_PYTHON_LIMITED_API_VER := $(firstword $(foreach ver, 35 36 38 39 310   34 33 \
-+VBOX_PYTHON_LIMITED_API_VER := $(firstword $(foreach ver, 35 36 38 39 310 311   34 33 \
- ,$(if-expr defined(VBOX_PYTHON$(ver)_INC),$(ver),)$(if-expr defined(VBOX_PYTHON$(ver)M_INC),$(ver)M,)))
-   ifneq ($(VBOX_PYTHON_LIMITED_API_VER),)
- DLLS += VBoxPython3
- VBoxPython3_EXTENDS      = VBoxPythonBase
- VBoxPython3_DEFS         = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_DEFS)) Py_LIMITED_API=0x03030000
- VBoxPython3_INCS         = $(VBoxPythonBase_INCS) $(VBOX_PYTHON$(VBOX_PYTHON_LIMITED_API_VER)_INC)
--
--DLLS += VBoxPython3m
--VBoxPython3m_EXTENDS     = VBoxPythonBase_m
--VBoxPython3m_DEFS        = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_m_DEFS)) Py_LIMITED_API=0x03030000
--VBoxPython3m_INCS        = $(VBoxPythonBase_m_INCS) $(VBOX_PYTHON$(VBOX_PYTHON_LIMITED_API_VER)_INC)
-   endif
-  endif # VBOX_WITH_PYTHON_LIMITED_API
- 

diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.4-fix-compilation.patch b/app-emulation/virtualbox/files/virtualbox-7.0.4-fix-compilation.patch
deleted file mode 100644
index 4452d22fdfd2..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-7.0.4-fix-compilation.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Fix compilation if VBOX_WITH_AUDIO_OSS is defined while VBOX_WITH_AUDIO_PULSE and VBOX_WITH_AUDIO_ALSA are not
-
---- a/src/VBox/Main/xml/Settings.cpp
-+++ b/src/VBox/Main/xml/Settings.cpp
-@@ -8931,6 +8931,9 @@
-     RTCLock lock(s_mtx);
-     if (s_enmLinuxDriver == AudioDriverType_Null)
-     {
-+# ifdef VBOX_WITH_AUDIO_OSS
-+	s_enmLinuxDriver = AudioDriverType_OSS;
-+# endif /* VBOX_WITH_AUDIO_OSS */
- # ifdef VBOX_WITH_AUDIO_PULSE
-         /* Check for the pulse library & that the pulse audio daemon is running. */
-         if (RTProcIsRunningByName("pulseaudio") &&
-@@ -8943,10 +8946,7 @@
-              if (RTLdrIsLoadable("libasound.so.2"))
-                 s_enmLinuxDriver = AudioDriverType_ALSA;
- # endif /* VBOX_WITH_AUDIO_ALSA */
--# ifdef VBOX_WITH_AUDIO_OSS
--             else
--                s_enmLinuxDriver = AudioDriverType_OSS;
--# endif /* VBOX_WITH_AUDIO_OSS */
-+	;
-     }
-     return s_enmLinuxDriver;
- 

diff --git a/app-emulation/virtualbox/virtualbox-6.1.42-r1.ebuild b/app-emulation/virtualbox/virtualbox-6.1.42-r1.ebuild
deleted file mode 100644
index 24ae3360623a..000000000000
--- a/app-emulation/virtualbox/virtualbox-6.1.42-r1.ebuild
+++ /dev/null
@@ -1,665 +0,0 @@
-# Copyright 2022-2023 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_{9..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="
-	${PYTHON_DEPS}
-	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 )
-	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-sound/pulseaudio )
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	>=app-arch/tar-1.34-r2
-	>=dev-util/kbuild-0.1.9998.3127
-	<=dev-util/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 )
-	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 )
-	vboxwebsrv? ( java )
-	${PYTHON_REQUIRED_USE}
-"
-
-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
-	"${FILESDIR}"/${PN}-6.1.42-python3_11.patch
-
-	# 865361
-	"${FILESDIR}"/${PN}-6.1.36-fcf-protection.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
-	if ! use python ; then
-		einfo "You have disabled the \"python\" USE flag. This will only"
-		einfo "disable the python bindings being installed."
-	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
-	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
-
-	# 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() {
-	tc-ld-disable-gold # bug #488176
-
-	#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
-
-	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 #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
-
-	cat >> AutoConfig.kmk <<-EOF || die
-		VBOX_WITH_PYTHON=$(usev python 1)
-		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-		VBOX_LIB_PYTHON=$(python_get_library_path)
-	EOF
-
-	if use python ; then
-		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
-	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
-}

diff --git a/app-emulation/virtualbox/virtualbox-7.0.6-r2.ebuild b/app-emulation/virtualbox/virtualbox-7.0.6-r2.ebuild
deleted file mode 100644
index ebbe07aa2de2..000000000000
--- a/app-emulation/virtualbox/virtualbox-7.0.6-r2.ebuild
+++ /dev/null
@@ -1,730 +0,0 @@
-# Copyright 2022-2023 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_{9..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
-	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-help-${PV}.tar.xz ) )
-"
-S="${WORKDIR}/${MY_PN}-${PV}"
-
-LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
-SLOT="0/$(ver_cut 1-2)"
-KEYWORDS="amd64"
-IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
-	${PYTHON_DEPS}
-	acct-group/vboxusers
-	~app-emulation/virtualbox-modules-${PV}
-	dev-libs/libtpms
-	dev-libs/libxml2
-	dev-libs/openssl:0=
-	media-libs/libpng:0=
-	media-libs/libvpx:0=
-	net-misc/curl
-	sys-libs/zlib
-	dbus? ( sys-apps/dbus )
-	gui? (
-		dev-qt/qtcore:5
-		dev-qt/qtdbus:5
-		dev-qt/qtgui:5
-		dev-qt/qthelp:5
-		dev-qt/qtprintsupport:5
-		dev-qt/qtwidgets:5
-		dev-qt/qtx11extras:5
-		dev-qt/qtxml:5
-		x11-libs/libX11
-		x11-libs/libXt
-		opengl? ( dev-qt/qtopengl:5 )
-	)
-	lvm? ( sys-fs/lvm2 )
-	opengl? (
-		media-libs/libglvnd[X]
-		media-libs/vulkan-loader
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-	pam? ( sys-libs/pam )
-	sdl? (
-		media-libs/libsdl:0[X,video]
-		x11-libs/libX11
-		x11-libs/libXcursor
-		x11-libs/libXt
-	)
-	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
-	vde? ( net-misc/vde )
-	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}
-	>=dev-libs/libxslt-1.1.19
-	virtual/libcrypt:=
-	alsa? ( >=media-libs/alsa-lib-1.0.13 )
-	gui? (
-		x11-base/xorg-proto
-		x11-libs/libxcb:=
-		x11-libs/libXcursor
-		x11-libs/libXext
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-	)
-	java? ( virtual/jdk:1.8 )
-	opengl? (
-		x11-base/xorg-proto
-		x11-libs/libXcursor
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-		virtual/glu
-	)
-	sdl? ( x11-libs/libXinerama )
-	pulseaudio? ( media-sound/pulseaudio )
-	udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
-	${COMMON_DEPEND}
-	gui? ( x11-libs/libxcb:= )
-	java? ( virtual/jre:1.8 )
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	>=app-arch/tar-1.34-r2
-	>=dev-lang/yasm-0.6.2
-	dev-libs/libIDL
-	dev-util/glslang
-	>=dev-util/kbuild-0.1.9998.3127
-	sys-apps/which
-	sys-devel/bin86
-	sys-libs/libcap
-	sys-power/iasl
-	virtual/pkgconfig
-	doc? (
-		app-text/docbook-sgml-dtd:4.4
-		app-text/docbook-xsl-ns-stylesheets
-		dev-texlive/texlive-basic
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexrecommended
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-fontsrecommended
-		dev-texlive/texlive-fontsextra
-		dev-qt/qthelp:5
-	)
-	gui? ( dev-qt/linguist-tools:5 )
-	nls? ( dev-qt/linguist-tools:5 )
-	java? ( virtual/jdk: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 )
-	vboxwebsrv? ( java )
-	${PYTHON_REQUIRED_USE}
-"
-
-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
-
-	"${FILESDIR}"/${PN}-7.0.4-fix-compilation.patch
-	"${FILESDIR}"/${PN}-7.0.0-fix-compilation-clang.patch
-	"${FILESDIR}"/${PN}-7.0.0-python3_11.patch
-	"${FILESDIR}"/${PN}-7.0.6-gcc-13.patch
-	"${FILESDIR}"/${PN}-7.0.6-fix-libxml2.patch
-
-	# Downloaded patchset
-	"${WORKDIR}"/virtualbox-patches-6.1.36/patches
-)
-
-pkg_pretend() {
-	if ! use gui; then
-		einfo "No USE=\"gui\" selected, this build will not include any 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
-	if ! use nls && use gui; then
-		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
-		einfo "will have NLS support."
-	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
-	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) and tools, see bug #232775
-	rm -r kBuild/bin || die
-	# Remove everything in tools except kBuildUnits
-	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || 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
-
-	# 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
-
-	#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
-
-	# bug #843437
-	cat >> LocalConfig.kmk <<-EOF || die
-		CXXFLAGS=${CXXFLAGS}
-		CFLAGS=${CFLAGS}
-	EOF
-
-	if use sdl; then
-		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
-	fi
-
-	#443830
-	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
-	# clang assembler chokes on comments starting with /
-	if tc-is-clang; then
-		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-	fi
-
-	# fix doc generation
-	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
-	# 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
-
-	# fix help path #891879
-	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
-
-	# 489208
-	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
-	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
-		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
-	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
-		src/VBox/Frontends/VirtualBox/src/main.cpp \
-		src/VBox/VMM/VMMR3/VM.cpp || die
-
-	# 890561
-	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-
-	if ! use nls && ! use gui; then
-		cat >> LocalConfig.kmk <<-EOF || die
-			VBOX_WITH_NLS :=
-			VBOX_WITH_MAIN_NLS :=
-			VBOX_WITH_PUEL_NLS :=
-			VBOX_WITH_VBOXMANAGE_NLS :=
-		EOF
-	fi
-}
-
-src_configure() {
-	tc-ld-disable-gold # bug #488176
-
-	tc-export AR CC CXX LD RANLIB
-	export HOST_CC="$(tc-getBUILD_CC)"
-
-	local myconf=(
-		--with-gcc="$(tc-getCC)"
-		--with-g++="$(tc-getCXX)"
-
-		--disable-kmods
-
-		$(usev !alsa --disable-alsa)
-		$(usev !dbus --disable-dbus)
-		$(usev debug --build-debug)
-		$(usev !doc --disable-docs)
-		$(usev !java --disable-java)
-		$(usev !lvm --disable-devmapper)
-		$(usev !pulseaudio --disable-pulse)
-		$(usev !python --disable-python)
-		$(usev vboxwebsrv --enable-webservice)
-		$(usev vde --enable-vde)
-		$(usev vnc --enable-vnc)
-	)
-
-	if use gui || use sdl || use opengl; then
-		myconf+=(
-			$(usev !opengl --disable-opengl)
-			$(usev !gui --disable-qt)
-			$(usev !sdl --disable-sdl)
-		)
-	else
-		myconf+=(
-			--build-headless
-		)
-	fi
-
-	if use amd64 && ! has_multilib_profile; then
-		myconf+=( --disable-vmmraw )
-	fi
-
-	# 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
-
-	cat >> AutoConfig.kmk <<-EOF || die
-		VBOX_WITH_PYTHON=$(usev python 1)
-		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-		VBOX_LIB_PYTHON=$(python_get_library_path)
-	EOF
-
-	if use python; then
-		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
-	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,VMMPreload,XPCOMIPCD} \
-		vboximg-mount vbox-img *so *r0; 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}/vboximg-mount /usr/bin/vboximg-mount
-	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
-
-	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 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 gui; 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
-
-		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 UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}
-	elif use gui; then
-		dodoc "${WORKDIR}"/${PN}-help-${PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}
-	fi
-
-	if use python; then
-		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.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 gui; 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
-}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2023-06-15 10:44 Viorel Munteanu
  0 siblings, 0 replies; 17+ messages in thread
From: Viorel Munteanu @ 2023-06-15 10:44 UTC (permalink / raw
  To: gentoo-commits

commit:     c82c90c331c2321067459a0a71229b7aa6046c4b
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 15 10:36:29 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Thu Jun 15 10:44:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c82c90c3

app-emulation/virtualbox: add 9999

Add live version.  It compiles the latest upstream public svn.
This ebuild also compiles the kernel modules, does not need on vbox-modules.
Upstream added support for python 3.12; I haven't checked it yet.
USE=doc does not work for now.
This version is not meant to be used, might be very unstable.

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

 app-emulation/virtualbox/Manifest                  |   1 +
 .../virtualbox/files/virtualbox-7.0.9-python.patch |  22 +
 app-emulation/virtualbox/virtualbox-9999.ebuild    | 761 +++++++++++++++++++++
 3 files changed, 784 insertions(+)

diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index c5d61e17cfa4..c28e49de1d75 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -2,4 +2,5 @@ DIST VirtualBox-6.1.44.tar.bz2 165775421 BLAKE2B e87d7175bc616784c79d02b595d8111
 DIST VirtualBox-7.0.8a.tar.bz2 199387757 BLAKE2B 0ba397825277ecbb851bd4ea94c85448e2966fd96ef8edcaf3102f8515553736d6ceee84c0647fa37443c1875256353fdd029d6c505aa99834079acb957b24a0 SHA512 fcbf907f6f7f2396ebff5a31af6ec00b38f09799380bac4847cc9044455832de058659edaa9f621b0054fa402bfacef1b5444498c9faeb3671d02da1505c952d
 DIST virtualbox-help-7.0.8.tar.xz 3941816 BLAKE2B f1c82ccc8a0d4e99f2302a7024a551e7e4a70348b193cf0c3a3b2917a717451c74d652555cadb278f6e27c47dac88a8121acfe9425bc0f5b82b5101475f384b3 SHA512 7483c4321492effb5b4329d48b363d8d2b3aaa248c0259cd06569497090aa438c39e94d6a5da4f511202f424e596f66e7580e37ffa5da66661fd0fadcd99c5ef
 DIST virtualbox-patches-6.1.36.tar.bz2 2733 BLAKE2B dcfebfeca4873d382441515d48b4dfee9343bc7c83ea3cbb5002dbf7975143a79fae9a701b67dc35505e9ca03ff1b6293cb7c3279c4fdfda8ad21ba5fb9b7e87 SHA512 1bed5cdefbf8e7c4b0d9092ba4961ecf2262f27f35c71a91ef6f2e8fe8a1d92ed74f06bafbf58d70ba7165d933997f58073f4d4f4051e3ba5c0339b729066f57
+DIST virtualbox-patches-7.0.10_pre20230615.tar.bz2 2253 BLAKE2B 27b422acc2ae85c4324d6f4471db80c9f680b1c4a00223c38b9e3fb31709b05163a1bd53408cffeabdef295e856aa8b01b86e0fecf5d80ace376ea1bd4fc9504 SHA512 c2177f46048f09b6be9ac2c35b43d74f67350b052411cc64adf6c0b3d284055eef79f960f1384a3aaeee7d25f8c19ea8f936ee2623a2251d1d28f85ed3469c22
 DIST virtualbox-patches-7.0.8.tar.bz2 2733 BLAKE2B 044dfe02a5bd5e757091318b394b0e5918677b5bbce9caef4a18d4d8df54821559f0df6ffbdd6f52d4934bc4018e9c9d908571c5d3d8804fd3b0f22a7a1aed84 SHA512 93a06aa3f9508d3a8743ca8494a958159b5bc3fd7a0a08ff23414d05c4f31084cf0f1c82a3866e222c83e6996ba004546f0bd33c6eb9a90eec8e548b8b3f2fbf

diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.9-python.patch b/app-emulation/virtualbox/files/virtualbox-7.0.9-python.patch
new file mode 100644
index 000000000000..73d529628cbb
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-7.0.9-python.patch
@@ -0,0 +1,22 @@
+Virtualbox 7.x will only build a lib named VBoxPython3.so, regardless of the
+actual python version used when compiling.  Remove VBoxPython3m.so, we don't
+use it.
+
+Upstream added support for pyton up to 3.12.
+
+--- a/src/libs/xpcom18a4/python/Makefile.kmk
++++ b/src/libs/xpcom18a4/python/Makefile.kmk
+@@ -704,13 +704,6 @@
+    VBoxPython3_DEFS      = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_DEFS)) Py_LIMITED_API=0x03030000
+    VBoxPython3_INCS      = $(VBoxPythonBase_INCS) $(VBOX_PYTHON$(VBOX_PYTHON_LIMITED_API_VER)_INC)
+    VBoxPython3_LDFLAGS.darwin = -undefined dynamic_lookup
+-
+-   ifneq ($(KBUILD_TARGET),darwin)
+-    DLLS += VBoxPython3m
+-    VBoxPython3m_EXTENDS  = VBoxPythonBase_m
+-    VBoxPython3m_DEFS     = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_m_DEFS)) Py_LIMITED_API=0x03030000
+-    VBoxPython3m_INCS     = $(VBoxPythonBase_m_INCS) $(VBOX_PYTHON$(VBOX_PYTHON_LIMITED_API_VER)_INC)
+-   endif
+   endif
+  endif # VBOX_WITH_PYTHON_LIMITED_API
+ 

diff --git a/app-emulation/virtualbox/virtualbox-9999.ebuild b/app-emulation/virtualbox/virtualbox-9999.ebuild
new file mode 100644
index 000000000000..2d60892ef6c4
--- /dev/null
+++ b/app-emulation/virtualbox/virtualbox-9999.ebuild
@@ -0,0 +1,761 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Important!
+# This compiles the latest svn version.
+# It also compiles the kernel modules.  Does not depend on virtualbox-modules.
+# It is not meant to be used, might be very unstable.
+# Upstream seem to have added support for python 3.12; I haven't checked it yet.
+#
+# USE=doc does not work for now.
+#
+#
+# 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_{9..12} )
+
+inherit desktop edo flag-o-matic java-pkg-opt-2 linux-mod-r1 multilib optfeature pax-utils \
+	python-single-r1 subversion tmpfiles toolchain-funcs udev xdg
+
+MY_PN="VirtualBox"
+BASE_PV=7.0.8
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/"
+ESVN_REPO_URI="https://www.virtualbox.org/svn/vbox/trunk"
+SRC_URI="
+	https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.10_pre20230615.tar.bz2
+	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-help-${BASE_PV}.tar.xz ) )
+"
+S="${WORKDIR}/trunk"
+
+LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
+
+unset WATCOM #856769
+
+COMMON_DEPEND="
+	${PYTHON_DEPS}
+	acct-group/vboxusers
+	dev-libs/libtpms
+	dev-libs/libxml2
+	dev-libs/openssl:0=
+	media-libs/libpng:0=
+	media-libs/libvpx:0=
+	net-misc/curl
+	sys-libs/zlib
+	dbus? ( sys-apps/dbus )
+	gui? (
+		dev-qt/qtcore:5
+		dev-qt/qtdbus:5
+		dev-qt/qtgui:5
+		dev-qt/qthelp:5
+		dev-qt/qtprintsupport:5
+		dev-qt/qtwidgets:5
+		dev-qt/qtx11extras:5
+		dev-qt/qtxml:5
+		x11-libs/libX11
+		x11-libs/libXt
+		opengl? ( dev-qt/qtopengl:5 )
+	)
+	lvm? ( sys-fs/lvm2 )
+	opengl? (
+		media-libs/libglvnd[X]
+		media-libs/vulkan-loader
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+	pam? ( sys-libs/pam )
+	sdl? (
+		media-libs/libsdl2[X,video]
+		x11-libs/libX11
+		x11-libs/libXcursor
+		x11-libs/libXt
+	)
+	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
+	vde? ( net-misc/vde )
+	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}
+	>=dev-libs/libxslt-1.1.19
+	virtual/libcrypt:=
+	alsa? ( >=media-libs/alsa-lib-1.0.13 )
+	gui? (
+		x11-base/xorg-proto
+		x11-libs/libxcb:=
+		x11-libs/libXcursor
+		x11-libs/libXext
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+	)
+	java? ( virtual/jdk:1.8 )
+	opengl? (
+		x11-base/xorg-proto
+		x11-libs/libXcursor
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+		virtual/glu
+	)
+	sdl? ( x11-libs/libXinerama )
+	pulseaudio? ( media-libs/libpulse )
+	udev? ( >=virtual/udev-171 )
+"
+RDEPEND="
+	${COMMON_DEPEND}
+	gui? ( x11-libs/libxcb:= )
+	java? ( virtual/jre:1.8 )
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	app-arch/makeself
+	>=app-arch/tar-1.34-r2
+	>=dev-lang/yasm-0.6.2
+	dev-libs/libIDL
+	dev-util/glslang
+	>=dev-util/kbuild-0.1.9998.3592
+	sys-apps/which
+	sys-devel/bin86
+	sys-libs/libcap
+	sys-power/iasl
+	virtual/pkgconfig
+	doc? (
+		app-text/docbook-sgml-dtd:4.4
+		app-text/docbook-xsl-ns-stylesheets
+		dev-texlive/texlive-basic
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexrecommended
+		dev-texlive/texlive-latexextra
+		dev-texlive/texlive-fontsrecommended
+		dev-texlive/texlive-fontsextra
+		dev-qt/qthelp:5
+	)
+	gui? ( dev-qt/linguist-tools:5 )
+	nls? ( dev-qt/linguist-tools:5 )
+	java? ( virtual/jdk: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 )
+	vboxwebsrv? ( java )
+	${PYTHON_REQUIRED_USE}
+"
+
+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
+
+	"${FILESDIR}"/${PN}-7.0.0-fix-compilation-clang.patch
+	"${FILESDIR}"/${PN}-7.0.9-python.patch
+	"${FILESDIR}"/${PN}-7.0.6-gcc-13.patch
+	"${FILESDIR}"/${PN}-7.0.8-mtune-keep-size.patch
+
+	# Downloaded patchset
+	"${WORKDIR}"/virtualbox-patches-7.0.10_pre20230615/patches
+)
+
+DOCS=()	# Don't install the default README file during einstalldocs
+
+CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
+
+pkg_pretend() {
+	if ! use gui; then
+		einfo "No USE=\"gui\" selected, this build will not include any 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
+	if ! use nls && use gui; then
+		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
+		einfo "will have NLS support."
+	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
+	python-single-r1_pkg_setup
+	linux-mod-r1_pkg_setup
+}
+
+src_unpack() {
+	subversion_src_unpack
+	default
+}
+
+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) and tools, see bug #232775
+	rm -r kBuild/bin || die
+	# Remove everything in tools except kBuildUnits
+	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || 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
+
+	# 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
+
+	#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
+
+	# bug #843437
+	cat >> LocalConfig.kmk <<-EOF || die
+		CXXFLAGS=${CXXFLAGS}
+		CFLAGS=${CFLAGS}
+	EOF
+
+	if use sdl; then
+		sed -i 's/sdl-config/sdl2-config/' configure || die
+		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
+	fi
+
+	#443830
+	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
+
+	if tc-is-clang; then
+		# clang assembler chokes on comments starting with /
+		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
+
+		# clang does not support this extension
+		eapply "${FILESDIR}"/${PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
+	fi
+
+	# fix doc generation
+	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
+	# 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
+
+	# fix help path #891879
+	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
+
+	# 489208
+	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
+	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
+		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
+	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
+		src/VBox/Frontends/VirtualBox/src/main.cpp \
+		src/VBox/VMM/VMMR3/VM.cpp || die
+
+	# 890561
+	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
+
+	if ! use nls && ! use gui; then
+		cat >> LocalConfig.kmk <<-EOF || die
+			VBOX_WITH_NLS :=
+			VBOX_WITH_MAIN_NLS :=
+			VBOX_WITH_PUEL_NLS :=
+			VBOX_WITH_VBOXMANAGE_NLS :=
+		EOF
+	fi
+}
+
+src_configure() {
+	tc-ld-disable-gold # bug #488176
+
+	tc-export AR CC CXX LD RANLIB
+	export HOST_CC="$(tc-getBUILD_CC)"
+
+	local myconf=(
+		--with-gcc="$(tc-getCC)"
+		--with-g++="$(tc-getCXX)"
+
+		--disable-kmods
+
+		$(usev !alsa --disable-alsa)
+		$(usev !dbus --disable-dbus)
+		$(usev debug --build-debug)
+		$(usev !doc --disable-docs)
+		$(usev !java --disable-java)
+		$(usev !lvm --disable-devmapper)
+		$(usev !pulseaudio --disable-pulse)
+		$(usev !python --disable-python)
+		$(usev vboxwebsrv --enable-webservice)
+		$(usev vde --enable-vde)
+		$(usev vnc --enable-vnc)
+	)
+
+	if use gui || use sdl || use opengl; then
+		myconf+=(
+			$(usev !opengl --disable-opengl)
+			$(usev !gui --disable-qt)
+			$(usev !sdl --disable-sdl)
+		)
+	else
+		myconf+=(
+			--build-headless
+		)
+	fi
+
+	if use amd64 && ! has_multilib_profile; then
+		myconf+=( --disable-vmmraw )
+	fi
+
+	# 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
+
+	cat >> AutoConfig.kmk <<-EOF || die
+		VBOX_WITH_PYTHON=$(usev python 1)
+		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
+		VBOX_LIB_PYTHON=$(python_get_library_path)
+	EOF
+
+	if use python; then
+		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
+	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
+
+	local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc:"out/linux.${ARCH}/release/bin/src" )
+	local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+	linux-mod-r1_src_compile
+}
+
+src_install() {
+	linux-mod-r1_src_install
+	insinto /usr/lib/modules-load.d/
+	newins - virtualbox.conf <<-EOF
+		vboxdrv
+		vboxnetflt
+		vboxnetadp
+	EOF
+
+	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,VMMPreload,XPCOMIPCD} \
+		vboximg-mount vbox-img *so *r0; 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}/vboximg-mount /usr/bin/vboximg-mount
+	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
+
+	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 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 gui; then
+		vbox_inst VirtualBox
+		vbox_inst VirtualBoxVM 4750
+		for each in VirtualBox{,VM} ; do
+			pax-mark -m "${ED}"${vbox_inst_path}/${each}
+		done
+
+		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
+
+		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 UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}
+	elif use gui; then
+		dodoc "${WORKDIR}"/${PN}-help-${BASE_PV}/UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}
+	fi
+
+	if use python; then
+		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.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() {
+	linux-mod-r1_pkg_postinst
+
+	xdg_pkg_postinst
+
+	if use udev; then
+		udev_reload
+		udevadm trigger --subsystem-match=usb
+	fi
+
+	tmpfiles_process virtualbox-vboxusb.conf
+
+	if use gui; 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/${BASE_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
+}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2023-09-30  4:36 Viorel Munteanu
  0 siblings, 0 replies; 17+ messages in thread
From: Viorel Munteanu @ 2023-09-30  4:36 UTC (permalink / raw
  To: gentoo-commits

commit:     ddd6654de39243645f1fe99351dfca93d902e70d
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 23 11:39:02 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sat Sep 30 04:36:12 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddd6654d

app-emulation/virtualbox: update live ebuild

Upstream migrated to QT6.
Cannot build with USE=doc yet becuase of a missing new dependency.

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

 app-emulation/virtualbox/Manifest                  |  1 -
 ...tualbox-7.0.11-configure-include-qt6-path.patch | 13 ++++++++
 app-emulation/virtualbox/virtualbox-9999.ebuild    | 37 ++++++++++++----------
 3 files changed, 33 insertions(+), 18 deletions(-)

diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index 892ba7a1c7d0..aad4f0b02e95 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,7 +1,6 @@
 DIST VirtualBox-6.1.46.tar.bz2 166045588 BLAKE2B 041fad30d7cbe524cfd5c865b225c00df7715a6648ed0d8f7ee3ca4be0d0dabcb324c676ba2ea78288cde89ed8e5412fae75e31bb49f623de2acddb8f10d6ee1 SHA512 695ca4d41ff10d0581e4cffe4a0ec80e0fe380f4c7d5d51ee4d21aeb61646c26edd60301e541894e71c3323e2d7207e23299938c18ee45631afd1e0851946e77
 DIST VirtualBox-7.0.10.tar.bz2 175450841 BLAKE2B 49eaa14f716f021f1ecec1ad48a2aa8a3a758cbd9b03cf30d65ddcf5aba11842b0ea8bc2c4d477084a4cea318dc302a4ed426ec9f675a1fe675c5f18c48796c7 SHA512 2870d39385f66557281edf1368db68cd69d6a9bebc30d52511929462d0ac210cec49dd8531a280c6facff22ba6e4808477fbf3d09abf998d863a007fc7f2c3bd
 DIST virtualbox-help-7.0.10.tar.xz 3941196 BLAKE2B fa6667e0cf12e2e05b896a7d9d7e1f78d43bb4618f35b3c81f5ccf5f227d1181b0c8fb1f6dc02a8619550b193a73d4094c5d3f0d43514392f9ed563085068789 SHA512 fab2dff812a438f3e78dbace24741d91b317bbbc7362f082a18f3871e3c6fd8af7744cf1b3fd3b82cf5135e03d521de05a7a5bc98ec19aacfa1b4e5392e60f30
-DIST virtualbox-help-7.0.8.tar.xz 3941816 BLAKE2B f1c82ccc8a0d4e99f2302a7024a551e7e4a70348b193cf0c3a3b2917a717451c74d652555cadb278f6e27c47dac88a8121acfe9425bc0f5b82b5101475f384b3 SHA512 7483c4321492effb5b4329d48b363d8d2b3aaa248c0259cd06569497090aa438c39e94d6a5da4f511202f424e596f66e7580e37ffa5da66661fd0fadcd99c5ef
 DIST virtualbox-patches-6.1.36.tar.bz2 2733 BLAKE2B dcfebfeca4873d382441515d48b4dfee9343bc7c83ea3cbb5002dbf7975143a79fae9a701b67dc35505e9ca03ff1b6293cb7c3279c4fdfda8ad21ba5fb9b7e87 SHA512 1bed5cdefbf8e7c4b0d9092ba4961ecf2262f27f35c71a91ef6f2e8fe8a1d92ed74f06bafbf58d70ba7165d933997f58073f4d4f4051e3ba5c0339b729066f57
 DIST virtualbox-patches-7.0.10_pre20230615.tar.bz2 2253 BLAKE2B 27b422acc2ae85c4324d6f4471db80c9f680b1c4a00223c38b9e3fb31709b05163a1bd53408cffeabdef295e856aa8b01b86e0fecf5d80ace376ea1bd4fc9504 SHA512 c2177f46048f09b6be9ac2c35b43d74f67350b052411cc64adf6c0b3d284055eef79f960f1384a3aaeee7d25f8c19ea8f936ee2623a2251d1d28f85ed3469c22
 DIST virtualbox-patches-7.0.8.tar.bz2 2733 BLAKE2B 044dfe02a5bd5e757091318b394b0e5918677b5bbce9caef4a18d4d8df54821559f0df6ffbdd6f52d4934bc4018e9c9d908571c5d3d8804fd3b0f22a7a1aed84 SHA512 93a06aa3f9508d3a8743ca8494a958159b5bc3fd7a0a08ff23414d05c4f31084cf0f1c82a3866e222c83e6996ba004546f0bd33c6eb9a90eec8e548b8b3f2fbf

diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.11-configure-include-qt6-path.patch b/app-emulation/virtualbox/files/virtualbox-7.0.11-configure-include-qt6-path.patch
new file mode 100644
index 000000000000..a9345ae78141
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-7.0.11-configure-include-qt6-path.patch
@@ -0,0 +1,13 @@
+diff --git a/configure b/configure
+index 5d653d97..f6953d88 100755
+--- a/configure
++++ b/configure
+@@ -1695,6 +1695,8 @@ EOF
+         else
+           # Strip .../QtCore as we add components ourself:
+           INCQT6=`echo "$INCQT6"|$KBUILD_SED 's|\([^ ]*\)/QtCore|\1|g; s| $||g'`
++          # Strip .../QtGui as we add components ourself:
++          INCQT6=`echo "$INCQT6"|$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/qt6 -I/usr/include/qt6/QtCore
+           INCQT6=`echo "$INCQT6"|$KBUILD_SED 's|\([^ ]*\) .*|\1|'`

diff --git a/app-emulation/virtualbox/virtualbox-9999.ebuild b/app-emulation/virtualbox/virtualbox-9999.ebuild
index 9048fa58d8a6..3700fe5adca3 100644
--- a/app-emulation/virtualbox/virtualbox-9999.ebuild
+++ b/app-emulation/virtualbox/virtualbox-9999.ebuild
@@ -7,7 +7,7 @@ EAPI=8
 # This compiles the latest svn version.
 # It also compiles the kernel modules.  Does not depend on virtualbox-modules.
 # It is not meant to be used, might be very unstable.
-# Upstream seem to have added support for python 3.12; I haven't checked it yet.
+# Upstream seem to have added support for python 3.12, but it crashes.
 #
 # USE=doc does not work for now.
 #
@@ -30,7 +30,7 @@ inherit desktop edo flag-o-matic java-pkg-opt-2 linux-mod-r1 multilib optfeature
 	python-single-r1 subversion tmpfiles toolchain-funcs udev xdg
 
 MY_PN="VirtualBox"
-BASE_PV=7.0.8
+BASE_PV=7.0.10
 MY_P=${MY_PN}-${PV}
 
 DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
@@ -51,6 +51,7 @@ unset WATCOM #856769
 COMMON_DEPEND="
 	${PYTHON_DEPS}
 	acct-group/vboxusers
+	app-arch/xz-utils
 	dev-libs/libtpms
 	dev-libs/libxml2
 	dev-libs/openssl:0=
@@ -60,17 +61,12 @@ COMMON_DEPEND="
 	sys-libs/zlib
 	dbus? ( sys-apps/dbus )
 	gui? (
-		dev-qt/qtcore:5
-		dev-qt/qtdbus:5
-		dev-qt/qtgui:5
-		dev-qt/qthelp:5
-		dev-qt/qtprintsupport:5
-		dev-qt/qtwidgets:5
-		dev-qt/qtx11extras:5
-		dev-qt/qtxml:5
+		dev-qt/qtbase:6[widgets]
+		dev-qt/qt5compat:6
+		dev-qt/qtscxml:6
+		dev-qt/qttools:6[assistant]
 		x11-libs/libX11
 		x11-libs/libXt
-		opengl? ( dev-qt/qtopengl:5 )
 	)
 	lvm? ( sys-fs/lvm2 )
 	opengl? (
@@ -83,7 +79,6 @@ COMMON_DEPEND="
 	sdl? (
 		media-libs/libsdl2[X,video]
 		x11-libs/libX11
-		x11-libs/libXcursor
 		x11-libs/libXt
 	)
 	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
@@ -104,6 +99,7 @@ DEPEND="
 	${COMMON_DEPEND}
 	>=dev-libs/libxslt-1.1.19
 	virtual/libcrypt:=
+	x11-libs/libXt
 	alsa? ( >=media-libs/alsa-lib-1.0.13 )
 	gui? (
 		x11-base/xorg-proto
@@ -123,7 +119,10 @@ DEPEND="
 		x11-libs/libXrandr
 		virtual/glu
 	)
-	sdl? ( x11-libs/libXinerama )
+	sdl? (
+		x11-libs/libXcursor
+		x11-libs/libXinerama
+	)
 	pulseaudio? ( media-libs/libpulse )
 	udev? ( >=virtual/udev-171 )
 "
@@ -134,7 +133,6 @@ RDEPEND="
 "
 BDEPEND="
 	${PYTHON_DEPS}
-	app-arch/makeself
 	>=app-arch/tar-1.34-r2
 	>=dev-lang/yasm-0.6.2
 	dev-libs/libIDL
@@ -156,8 +154,8 @@ BDEPEND="
 		dev-texlive/texlive-fontsextra
 		dev-qt/qthelp:5
 	)
-	gui? ( dev-qt/linguist-tools:5 )
-	nls? ( dev-qt/linguist-tools:5 )
+	gui? ( dev-qt/qttools:6[linguist] )
+	nls? ( dev-qt/qttools:6[linguist] )
 	java? ( virtual/jdk:1.8 )
 "
 
@@ -199,7 +197,7 @@ REQUIRED_USE="
 "
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-6.1.26-configure-include-qt5-path.patch # bug #805365
+	"${FILESDIR}"/${PN}-7.0.11-configure-include-qt6-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
@@ -214,6 +212,8 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-7.0.9-python.patch
 	"${FILESDIR}"/${PN}-7.0.6-gcc-13.patch
 	"${FILESDIR}"/${PN}-7.0.8-mtune-keep-size.patch
+	# 913109
+	"${FILESDIR}"/${PN}-7.0.10-fix-binutils-hardened.patch
 
 	# Downloaded patchset
 	"${WORKDIR}"/virtualbox-patches-7.0.10_pre20230615/patches
@@ -316,6 +316,9 @@ src_prepare() {
 		append-cxxflags $(test-flags-CXX -mno-$i)
 	done
 
+	# bug #908814
+	filter-lto
+
 	# bug #843437
 	cat >> LocalConfig.kmk <<-EOF || die
 		CXXFLAGS=${CXXFLAGS}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
@ 2024-08-18 13:32 Viorel Munteanu
  0 siblings, 0 replies; 17+ messages in thread
From: Viorel Munteanu @ 2024-08-18 13:32 UTC (permalink / raw
  To: gentoo-commits

commit:     3d29494e273481027c03ce37785895241e21c6fd
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 18 13:30:56 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sun Aug 18 13:32:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d29494e

app-emulation/virtualbox: fix linking with mold

Bug: https://bugs.gentoo.org/925347
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 .../files/virtualbox-7.1.0_beta1-link-with-mold.patch       | 13 +++++++++++++
 app-emulation/virtualbox/virtualbox-7.1.0_beta1.ebuild      |  5 +++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/app-emulation/virtualbox/files/virtualbox-7.1.0_beta1-link-with-mold.patch b/app-emulation/virtualbox/files/virtualbox-7.1.0_beta1-link-with-mold.patch
new file mode 100644
index 000000000000..71e3edb26b3c
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-7.1.0_beta1-link-with-mold.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/925347
+
+--- a/src/VBox/Frontends/VirtualBox/Makefile.kmk
++++ b/src/VBox/Frontends/VirtualBox/Makefile.kmk
+@@ -1669,7 +1669,7 @@
+ # The Qt modules we're using.
+ # (The include directory and lib/framework for each module will be added by the Qt unit.)
+ #
+-UICommon_QT_MODULES = Core Gui Widgets Help StateMachine
++UICommon_QT_MODULES = Core Gui Widgets Help PrintSupport StateMachine
+ ifdef VBOX_WITH_SCREENSAVER_CONTROL
+  UICommon_QT_MODULES.linux    += DBus
+  UICommon_QT_MODULES.linux    += Xml

diff --git a/app-emulation/virtualbox/virtualbox-7.1.0_beta1.ebuild b/app-emulation/virtualbox/virtualbox-7.1.0_beta1.ebuild
index cc9921a521ed..40cc4cfebb03 100644
--- a/app-emulation/virtualbox/virtualbox-7.1.0_beta1.ebuild
+++ b/app-emulation/virtualbox/virtualbox-7.1.0_beta1.ebuild
@@ -195,6 +195,7 @@ REQUIRED_USE="
 PATCHES=(
 	# Downloaded patchset
 	"${WORKDIR}"/virtualbox-patches-7.1.0_beta1/patches
+	"${FILESDIR}"/${P}-link-with-mold.patch
 )
 
 DOCS=()	# Don't install the default README file during einstalldocs
@@ -251,8 +252,8 @@ src_prepare() {
 			>> LocalConfig.kmk || die
 	fi
 
-	# bug #916002, #488176
-	tc-ld-force-bfd
+	# bug #916002, #488176, #925347
+	tc-ld-is-mold || tc-ld-force-bfd
 
 	# Respect LDFLAGS
 	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-08-18 13:32 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-11 15:38 [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/ Viorel Munteanu
  -- strict thread matches above, loose matches on Subject: below --
2024-08-18 13:32 Viorel Munteanu
2023-09-30  4:36 Viorel Munteanu
2023-06-15 10:44 Viorel Munteanu
2023-05-30  5:22 Viorel Munteanu
2023-01-22  9:59 Viorel Munteanu
2022-07-27 21:05 Sam James
2022-07-06  3:01 Sam James
2022-07-06  3:01 Sam James
2022-06-15 12:37 Lars Wendler
2022-06-15 12:37 Lars Wendler
2021-08-03 11:18 Lars Wendler
2019-02-02 10:41 Lars Wendler
2018-12-07 20:17 Lars Wendler
2018-04-11  7:54 Lars Wendler
2016-12-09 22:28 Lars Wendler
2015-09-29 13:29 Lars Wendler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox