summaryrefslogtreecommitdiff
path: root/app-emulation/virtualbox/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-11-02 09:09:19 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-11-02 09:09:19 +0000
commit1ab8c7f6ed10f981d767a0acc2f420cf86775f12 (patch)
tree44eb556f62eeb50b980ae79712fa5087c2c7e3b0 /app-emulation/virtualbox/files
parent29badda007a3bcd85bb351f602790eb3b8922448 (diff)
gentoo auto-resync : 02:11:2022 - 09:09:18
Diffstat (limited to 'app-emulation/virtualbox/files')
-rw-r--r--app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation-clang.patch44
-rw-r--r--app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation.patch56
-rw-r--r--app-emulation/virtualbox/files/virtualbox-7.0.0-python3_11.patch90
3 files changed, 190 insertions, 0 deletions
diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation-clang.patch b/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation-clang.patch
new file mode 100644
index 000000000000..c3e34f875acd
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation-clang.patch
@@ -0,0 +1,44 @@
+clang does not have syslimits.h, it is gcc specific
+and it is useless anyway since <limits.h> is already included
+so just remove it
+
+Cannot use PFNRT here on clang because of the exception specification
+
+--- a/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceLibCWrappers.h
++++ b/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceLibCWrappers.h
+@@ -34,8 +34,6 @@
+ # include <limits.h> /* Workaround for syslimit.h bug in gcc 4.8.3 on gentoo. */
+ # ifdef RT_OS_DARWIN
+ # include <sys/syslimits.h> /* PATH_MAX */
+-# elif !defined(RT_OS_SOLARIS) && !defined(RT_OS_FREEBSD)
+-# include <syslimits.h> /* PATH_MAX */
+ # endif
+ # include <libgen.h> /* basename */
+ # include <unistd.h>
+--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.h
++++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.h
+@@ -97,7 +97,11 @@
+ /** Load OpenGL library and initialize function pointers. */
+ int glLdrInit(PPDMDEVINS pDevIns);
+ /** Resolve an OpenGL function name. */
++#ifdef __clang__
++void* glLdrGetProcAddress(const char *pszSymbol);
++#else // !__clang__
+ PFNRT glLdrGetProcAddress(const char *pszSymbol);
++#endif // !__clang__
+ /** Get pointers to extension function. They are available on Windows only when OpenGL context is set. */
+ int glLdrGetExtFunctions(PPDMDEVINS pDevIns);
+
+--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.cpp
++++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.cpp
+@@ -35,6 +35,10 @@
+ #include <iprt/ldr.h>
+ #include <iprt/log.h>
+
++#ifdef __clang__
++# define PFNRT void*
++#endif
++
+ #ifdef RT_OS_WINDOWS
+ # define OGLGETPROCADDRESS MyWinGetProcAddress
+ DECLINLINE(PFNRT) MyWinGetProcAddress(const char *pszSymbol)
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
new file mode 100644
index 000000000000..362e792c9cb9
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation.patch
@@ -0,0 +1,56 @@
+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/files/virtualbox-7.0.0-python3_11.patch b/app-emulation/virtualbox/files/virtualbox-7.0.0-python3_11.patch
new file mode 100644
index 000000000000..cbdc1e1e2ad1
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-7.0.0-python3_11.patch
@@ -0,0 +1,90 @@
+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
+