summaryrefslogtreecommitdiff
path: root/emulators/virtualbox-ose-legacy
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/virtualbox-ose-legacy')
-rw-r--r--emulators/virtualbox-ose-legacy/Makefile8
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk13
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp47
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c13
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r3_xml.cpp53
5 files changed, 125 insertions, 9 deletions
diff --git a/emulators/virtualbox-ose-legacy/Makefile b/emulators/virtualbox-ose-legacy/Makefile
index d589ac286c37..e46c5f8b905b 100644
--- a/emulators/virtualbox-ose-legacy/Makefile
+++ b/emulators/virtualbox-ose-legacy/Makefile
@@ -1,6 +1,6 @@
PORTNAME= virtualbox-ose
DISTVERSION= 5.2.44
-PORTREVISION?= 30
+PORTREVISION?= 31
CATEGORIES= emulators
MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/:src \
LOCAL/bofh/emulators/virtualbox-ose-legacy:docs
@@ -42,7 +42,9 @@ CONFIGURE_ARGS+= --with-gcc="${CC}" --with-g++="${CXX}"
CONFLICTS_INSTALL= virtualbox-ose \
virtualbox-ose-nox11 \
virtualbox-ose-70 \
- virtualbox-ose-nox11-70
+ virtualbox-ose-nox11-70 \
+ virtualbox-ose-71 \
+ virtualbox-ose-nox11-71
PORTSCOUT= limit:^5\.
SUB_LIST= VBOXDIR=${VBOX_DIR} \
@@ -73,7 +75,7 @@ PLIST_SUB= GUEST_VER=${DISTVERSION} \
SLAVE_PORT?= no
OPTIONS_DEFINE= ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS PULSEAUDIO \
- PYTHON QT5 R0LOGGING UDPTUNNEL VDE VNC WEBSERVICE VPX X11
+ PYTHON QT5 R0LOGGING UDPTUNNEL VDE VNC VPX WEBSERVICE X11
OPTIONS_DEFAULT= DBUS QT5 UDPTUNNEL VNC WEBSERVICE X11
.if ${SLAVE_PORT} == no
OPTIONS_DEFAULT+= PYTHON
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk
index 4d327e1089b1..270472c045e3 100644
--- a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk
+++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk
@@ -1,6 +1,6 @@
---- src/VBox/Additions/freebsd/mount_vboxvfs/Makefile.kmk.orig 2018-11-29 19:03:21 UTC
+--- src/VBox/Additions/freebsd/mount_vboxvfs/Makefile.kmk.orig 2025-05-11 03:54:13 UTC
+++ src/VBox/Additions/freebsd/mount_vboxvfs/Makefile.kmk
-@@ -0,0 +1,23 @@
+@@ -0,0 +1,28 @@
+# $Id: Makefile.kmk $
+## @file
+# Sub-Makefile for the FreeBSD Shared folder mount utility.
@@ -19,8 +19,13 @@
+
+PROGRAMS += mount_vboxvfs
+mount_vboxvfs_TEMPLATE = NewVBoxGuestR3Exe
-+mount_vboxvfs_SOURCES = $(MOUNT)/getmntopts.c \
-+ mount_vboxvfs.c
++mount_vboxvfs_SOURCES = mount_vboxvfs.c
++
++ifdef HAVE_MNTOPTS_IN_LIBUTIL
++mount_vboxvfs_LIBS = util
++else
++mount_vboxvfs_SOURCES += $(MOUNT)/getmntopts.c
++endif
+
+include $(FILE_KBUILD_SUB_FOOTER)
+
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp
new file mode 100644
index 000000000000..055a29c732a9
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp
@@ -0,0 +1,47 @@
+--- src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp.orig 2020-07-09 16:55:07 UTC
++++ src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
+@@ -1094,7 +1094,7 @@ int vmsvga3dTerminate(PVGASTATE pThis)
+ RTSemEventDestroy(pState->WndRequestSem);
+ #elif defined(RT_OS_DARWIN)
+
+-#elif defined(RT_OS_LINUX)
++#elif defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX)
+ /* signal to the thread that it is supposed to exit */
+ pState->bTerminate = true;
+ /* wait for it to terminate */
+@@ -3200,7 +3200,7 @@ int vmsvga3dCommandPresent(PVGASTATE pThis, uint32_t s
+ return VINF_SUCCESS;
+ }
+
+-#ifdef RT_OS_LINUX
++#if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX)
+ /**
+ * X11 event handling thread.
+ *
+@@ -3230,7 +3230,7 @@ DECLCALLBACK(int) vmsvga3dXEventThread(RTTHREAD hThrea
+ }
+ return VINF_SUCCESS;
+ }
+-#endif // RT_OS_LINUX
++#endif // RT_OS_FREEBSD || RT_OS_LINUX
+
+
+ /**
+@@ -3590,7 +3590,7 @@ static int vmsvga3dContextDestroyOgl(PVGASTATE pThis,
+ AssertRC(rc);
+ #elif defined(RT_OS_DARWIN)
+ vmsvga3dCocoaDestroyViewAndContext(pContext->cocoaView, pContext->cocoaContext);
+-#elif defined(RT_OS_LINUX)
++#elif defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX)
+ glXMakeCurrent(pState->display, None, NULL);
+ glXDestroyContext(pState->display, pContext->glxContext);
+ XDestroyWindow(pState->display, pContext->window);
+@@ -3648,7 +3648,7 @@ static void vmsvga3dChangeModeOneContext(PVGASTATE pTh
+ RT_NOREF(pState);
+ vmsvga3dCocoaViewSetSize(pContext->cocoaView, pThis->svga.uWidth, pThis->svga.uHeight);
+
+-#elif defined(RT_OS_LINUX)
++#elif defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX)
+ XWindowChanges wc;
+ wc.width = pThis->svga.uWidth;
+ wc.height = pThis->svga.uHeight;
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c
index cbc332611e9c..96e957fe7440 100644
--- a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c
+++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c
@@ -46,9 +46,9 @@
+ struct pctrie_iter pages;
+ vm_page_t page;
+
-+ pctrie_iter_init(&pages, pMemFreeBSD->pObject);
++ vm_page_iter_init(&pages, pMemFreeBSD->pObject);
+ VM_RADIX_FORALL(page, &pages)
-+ vm_page_unwire(page, PQ_INACTIVE);
++ (void)vm_page_unwire_noq(page);
+#endif
#if __FreeBSD_version >= 1000030
VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject);
@@ -248,6 +248,15 @@
if (PhysHighest != NIL_RTHCPHYS)
VmPhysAddrHigh = PhysHighest;
+@@ -453,7 +487,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB
+ #else
+ VM_OBJECT_LOCK(pMemFreeBSD->pObject);
+ #endif
+- pMemFreeBSD->Core.u.Phys.PhysBase = VM_PAGE_TO_PHYS(vm_page_find_least(pMemFreeBSD->pObject, 0));
++ pMemFreeBSD->Core.u.Phys.PhysBase = VM_PAGE_TO_PHYS(vm_radix_lookup_ge(&pMemFreeBSD->pObject->rtree, 0));
+ #if __FreeBSD_version >= 1000030
+ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject);
+ #else
@@ -470,6 +504,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB
rtR0MemObjDelete(&pMemFreeBSD->Core);
}
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r3_xml.cpp b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r3_xml.cpp
new file mode 100644
index 000000000000..ae097a96d33c
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Runtime_r3_xml.cpp
@@ -0,0 +1,53 @@
+--- src/VBox/Runtime/r3/xml.cpp.orig 2020-07-09 16:57:46 UTC
++++ src/VBox/Runtime/r3/xml.cpp
+@@ -1837,12 +1837,20 @@ static void xmlParserBaseGenericError(void *pCtx, cons
+ va_end(args);
+ }
+
++#if LIBXML_VERSION >= 21206
++static void xmlStructuredErrorFunc(void *userData, const xmlError *error) RT_NOTHROW_DEF
++{
++ NOREF(userData);
++ NOREF(error);
++}
++#else
+ static void xmlParserBaseStructuredError(void *pCtx, xmlErrorPtr error)
+ {
+ NOREF(pCtx);
+ /* we expect that there is always a trailing NL */
+ LogRel(("XML error at '%s' line %d: %s", error->file, error->line, error->message));
+ }
++#endif
+
+ XmlParserBase::XmlParserBase()
+ {
+@@ -1851,7 +1859,11 @@ XmlParserBase::XmlParserBase()
+ throw std::bad_alloc();
+ /* per-thread so it must be here */
+ xmlSetGenericErrorFunc(NULL, xmlParserBaseGenericError);
++#if LIBXML_VERSION >= 21206
++ xmlSetStructuredErrorFunc(NULL, xmlStructuredErrorFunc);
++#else
+ xmlSetStructuredErrorFunc(NULL, xmlParserBaseStructuredError);
++#endif
+ }
+
+ XmlParserBase::~XmlParserBase()
+@@ -1912,7 +1924,7 @@ void XmlMemParser::read(const void *pvBuf, size_t cbSi
+ pcszFilename,
+ NULL, // encoding = auto
+ options)))
+- throw XmlError(xmlCtxtGetLastError(m_ctxt));
++ throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt));
+
+ doc.refreshInternals();
+ }
+@@ -2172,7 +2184,7 @@ void XmlFileParser::read(const RTCString &strFilename,
+ pcszFilename,
+ NULL, // encoding = auto
+ options)))
+- throw XmlError(xmlCtxtGetLastError(m_ctxt));
++ throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt));
+
+ doc.refreshInternals();
+ }