summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
Diffstat (limited to 'emulators')
-rw-r--r--emulators/virtualbox-ose-70/Makefile14
-rw-r--r--emulators/virtualbox-ose-70/files/patch-configure43
-rw-r--r--emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk13
-rw-r--r--emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp28
-rw-r--r--emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r3_freebsd_systemmem-freebsd.cpp39
-rw-r--r--emulators/virtualbox-ose-additions-legacy/Makefile4
-rw-r--r--emulators/virtualbox-ose-additions/Makefile4
-rw-r--r--emulators/virtualbox-ose-kmod-70/Makefile2
-rw-r--r--emulators/virtualbox-ose-kmod-legacy/Makefile2
-rw-r--r--emulators/virtualbox-ose-kmod/Makefile2
-rw-r--r--emulators/virtualbox-ose-legacy/Makefile4
-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-nox11-70/Makefile6
-rw-r--r--emulators/virtualbox-ose-nox11/Makefile2
-rw-r--r--emulators/virtualbox-ose/Makefile4
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk13
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp20
18 files changed, 217 insertions, 43 deletions
diff --git a/emulators/virtualbox-ose-70/Makefile b/emulators/virtualbox-ose-70/Makefile
index e785466e8721..26c32ab3d9e4 100644
--- a/emulators/virtualbox-ose-70/Makefile
+++ b/emulators/virtualbox-ose-70/Makefile
@@ -1,6 +1,6 @@
PORTNAME= virtualbox-ose
DISTVERSION= 7.0.26
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= emulators
MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/:src \
LOCAL/vvd:docs
@@ -77,8 +77,9 @@ PLIST_SUB= GUEST_VER=${DISTVERSION} \
SLAVE_PORT?= no
-OPTIONS_DEFINE= AIO ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS PULSEAUDIO \
- PYTHON QT5 R0LOGGING UDPTUNNEL VBOXIMG VDE VNC WEBSERVICE VPX X11
+OPTIONS_DEFINE= AIO ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS OGG PULSEAUDIO \
+ PYTHON QT5 R0LOGGING UDPTUNNEL VBOXIMG VDE VNC VORBIS VPX \
+ WEBSERVICE X11
OPTIONS_DEFAULT= AIO DBUS QT5 UDPTUNNEL VNC WEBSERVICE X11
.if ${SLAVE_PORT} == no
OPTIONS_DEFAULT+= PYTHON
@@ -92,12 +93,14 @@ AIO_DESC= Enable Asyncronous IO support (check pkg-message)
DEBUG_DESC= Debug symbols, additional logs and assertions
GUESTADDITIONS_DESC= Build with Guest Additions
NLS_DESC= Native language support (requires QT5)
+OGG_DESC= Use libogg from audio/libogg instead of bundled one
QT5_DESC= Build with QT5 frontend (requires X11)
R0LOGGING_DESC= Enable R0 logging (requires DEBUG)
UDPTUNNEL_DESC= Build with UDP tunnel support
VBOXIMG_DESC= Build vboximg-mount (requires fuse-libs)
VDE_DESC= Build with VDE support
VNC_DESC= Build with VNC support
+VORBIS_DESC= Use libvorbis from audio/libvorbis instead of bundled one
VPX_DESC= Use libvpx for video recording
WEBSERVICE_DESC= Build Webservice
@@ -107,6 +110,8 @@ DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus
DBUS_CONFIGURE_OFF= --disable-dbus
DEBUG_CONFIGURE_ON= --build-debug
NLS_IMPLIES= QT5
+OGG_LIB_DEPENDS= libogg.so:audio/libogg
+OGG_CONFIGURE_ON= --enable-libogg
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
PULSEAUDIO_CONFIGURE_OFF= --disable-pulse
PYTHON_USES= python
@@ -127,6 +132,9 @@ VDE_RUN_DEPENDS= vde_switch:net/vde2
VDE_CONFIGURE_ON= --enable-vde
VNC_LIB_DEPENDS= libvncserver.so:net/libvncserver
VNC_CONFIGURE_ON= --enable-vnc
+VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis \
+ libvorbisenc.so:audio/libvorbis
+VORBIS_CONFIGURE_ON= --enable-libvorbis
VPX_LIB_DEPENDS= libvpx.so:multimedia/libvpx
VPX_CONFIGURE_OFF= --disable-libvpx
WEBSERVICE_BUILD_DEPENDS= soapcpp2:devel/gsoap
diff --git a/emulators/virtualbox-ose-70/files/patch-configure b/emulators/virtualbox-ose-70/files/patch-configure
index fe0f4247089b..992770166b0f 100644
--- a/emulators/virtualbox-ose-70/files/patch-configure
+++ b/emulators/virtualbox-ose-70/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2024-10-10 20:19:24.000000000 +0200
-+++ configure 2024-12-27 13:12:46.010746000 +0100
-@@ -154,10 +154,14 @@
+--- configure.orig 2025-04-11 11:59:42 UTC
++++ configure
+@@ -154,10 +154,14 @@ if [ "$OS" = "freebsd" ]; then
if [ "$OS" = "freebsd" ]; then
INCCURL="-I/usr/local/include"
LIBCURL="-L/usr/local/lib -lcurl"
@@ -15,7 +15,7 @@
else
INCCURL=""
LIBCURL="-lcurl"
-@@ -1207,6 +1211,9 @@
+@@ -1207,6 +1211,9 @@ extern "C" int main(int argc, char** argv)
printf("found version %d.%d.%d",
SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL);
#if SDL_VERSION_ATLEAST(1,2,7)
@@ -25,7 +25,7 @@
printf(", OK.\n");
return 0;
#else
-@@ -1291,7 +1298,7 @@
+@@ -1291,7 +1298,7 @@ EOF
#endif
}
EOF
@@ -34,7 +34,7 @@
test_execute
fi
}
-@@ -1605,6 +1612,7 @@
+@@ -1605,6 +1612,7 @@ EOF
FLGQT5=`pkg-config Qt5Core --cflags`
# gcc 4.8 is able to compile with C++11 (see also VBOX_GCC_std in Config.kmk)
[ $(($cc_maj * 100 + $cc_min)) -ge 408 ] && FLGQT5="$FLGQT5 -std=c++11"
@@ -42,7 +42,28 @@
INCQT5=`strip_I "$FLGQT5"`
LIBDIR5=`pkg-config Qt5Core --variable=libdir`
LIBQT5=`pkg-config Qt5Core Qt5Gui --libs`
-@@ -2180,8 +2188,8 @@
+@@ -1861,9 +1869,9 @@ check_libvorbis()
+ if which_wrapper pkg-config > /dev/null; then
+ libvorbis_ver=`pkg-config vorbis --modversion 2>> $LOG`
+ if [ $? -eq 0 ]; then
+- FLGVRB=`pkg-config vorbis --cflags`
++ FLGVRB=`pkg-config vorbis vorbisenc --cflags`
+ INCVRB=`strip_I "$FLGVRB"`
+- LIBVRB=`pkg-config vorbis --libs`
++ LIBVRB=`pkg-config vorbis vorbisenc --libs`
+ fi
+ cat > $ODIR.tmp_src.cc << EOF
+ #include <cstdio>
+@@ -1913,7 +1921,7 @@ EOF
+ return 0;
+ }
+ EOF
+- [ -n "$INCOGG" ] && I_INCVRB=`prefix_I "$INCOGG"`
++ [ -n "$INCOGG" ] && I_INCOGG=`prefix_I "$INCOGG"`
+ if test_compile "$LIBOGG $I_INCOGG" ogg ogg nofatal; then
+ if test_execute; then
+ cnf_append "SDK_VBoxLibOgg_INCS" "$INCOGG"
+@@ -2180,8 +2188,8 @@ EOF
echo "compiling the following source file:" >> $LOG
cat $ODIR.tmp_src.cc >> $LOG
echo "using the following command line:" >> $LOG
@@ -53,7 +74,7 @@
if [ $? -eq 0 ]; then
found=1
break
-@@ -2297,7 +2305,7 @@
+@@ -2297,7 +2305,7 @@ check_gsoap()
else
cnf_append "VBOX_GSOAP_CXX_SOURCES" ""
fi
@@ -62,7 +83,7 @@
gsoap_version=`pkg-config gsoapssl++ --modversion`
log_success "found version $gsoap_version"
return
-@@ -2661,7 +2669,7 @@
+@@ -2661,7 +2669,7 @@ for option in "$@"; do
--with-openssl-dir=*)
OPENSSLDIR=`echo $option | cut -d'=' -f2`
INCCRYPTO="-I${OPENSSLDIR}/include"
@@ -71,7 +92,7 @@
# On Darwin (at least for macports) static OpenSSL also needs zlib.
[ "$OS" = "darwin" ] && LIBCRYPTO="$LIBCRYPTO ${OPENSSLDIR}/lib/libz.a"
# On Linux static OpenSSL typically needs a few additional libraries.
-@@ -3028,12 +3036,22 @@
+@@ -3028,12 +3036,22 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then
[ $WITH_JAVA -eq 1 ] && check_java
# PulseAudio
@@ -100,7 +121,7 @@
fi
fi
-@@ -3049,14 +3067,6 @@
+@@ -3049,14 +3067,6 @@ if [ "$OS" = "linux" ]; then
cnf_append "VBOX_WITHOUT_LINUX_TEST_BUILDS" "1"
fi
if [ $ONLY_ADDITIONS -eq 0 ]; then
diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk
index 4d327e1089b1..270472c045e3 100644
--- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk
+++ b/emulators/virtualbox-ose-70/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-70/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp
index 96058e78ff1f..caf9d72e8e19 100644
--- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp
+++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp
@@ -1,6 +1,6 @@
---- src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp.orig 2021-01-07 15:39:17 UTC
+--- src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp.orig 2025-04-11 12:09:20 UTC
+++ src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
-@@ -1189,7 +1189,7 @@ int vmsvga3dTerminate(PVGASTATECC pThisCC)
+@@ -1198,7 +1198,7 @@ static DECLCALLBACK(int) vmsvga3dBackTerminate(PVGASTA
RTSemEventDestroy(pState->WndRequestSem);
#elif defined(RT_OS_DARWIN)
@@ -9,7 +9,7 @@
/* signal to the thread that it is supposed to exit */
pState->bTerminate = true;
/* wait for it to terminate */
-@@ -3194,7 +3194,7 @@ int vmsvga3dGenerateMipmaps(PVGASTATECC pThisCC, uint3
+@@ -3216,7 +3216,7 @@ static DECLCALLBACK(int) vmsvga3dBackGenerateMipmaps(P
}
@@ -18,7 +18,7 @@
/**
* X11 event handling thread.
*
-@@ -3224,7 +3224,7 @@ DECLCALLBACK(int) vmsvga3dXEventThread(RTTHREAD hThrea
+@@ -3246,7 +3246,7 @@ DECLCALLBACK(int) vmsvga3dXEventThread(RTTHREAD hThrea
}
return VINF_SUCCESS;
}
@@ -27,7 +27,25 @@
/**
-@@ -4052,7 +4052,7 @@ static int vmsvga3dContextDestroyOgl(PVGASTATECC pThis
+@@ -3484,7 +3484,7 @@ int vmsvga3dContextDefineOgl(PVGASTATECC pThisCC, uint
+ return VINF_SUCCESS;
+ }
+
+-#if defined(RT_OS_LINUX)
++#if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX)
+ /*
+ * HW accelerated graphics output.
+ */
+@@ -3976,7 +3976,7 @@ static DECLCALLBACK(int) vmsvga3dBackSurfaceBlitToScre
+ return VINF_SUCCESS;
+ }
+
+-#else /* !RT_OS_LINUX */
++#else /* !RT_OS_FREEBSD && !RT_OS_LINUX */
+
+ static DECLCALLBACK(int) vmsvga3dBackDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)
+ {
+@@ -4096,7 +4096,7 @@ static int vmsvga3dContextDestroyOgl(PVGASTATECC pThis
AssertRC(rc);
#elif defined(RT_OS_DARWIN)
vmsvga3dCocoaDestroyViewAndContext(pContext->cocoaView, pContext->cocoaContext);
diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r3_freebsd_systemmem-freebsd.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r3_freebsd_systemmem-freebsd.cpp
new file mode 100644
index 000000000000..87ae993446a3
--- /dev/null
+++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r3_freebsd_systemmem-freebsd.cpp
@@ -0,0 +1,39 @@
+--- src/VBox/Runtime/r3/freebsd/systemmem-freebsd.cpp.orig 2025-04-14 17:59:18 UTC
++++ src/VBox/Runtime/r3/freebsd/systemmem-freebsd.cpp
+@@ -75,7 +75,6 @@ RTDECL(int) RTSystemQueryAvailableRam(uint64_t *pcb)
+ u_int cPagesMemFree = 0;
+ u_int cPagesMemInactive = 0;
+ u_int cPagesMemCached = 0;
+- u_int cPagesMemUsed = 0;
+ int cbPage = 0;
+ size_t cbParameter;
+ int cProcessed = 0;
+@@ -83,25 +82,23 @@ RTDECL(int) RTSystemQueryAvailableRam(uint64_t *pcb)
+ cbParameter = sizeof(cPagesMemFree);
+ if (sysctlbyname("vm.stats.vm.v_free_count", &cPagesMemFree, &cbParameter, NULL, 0))
+ rc = RTErrConvertFromErrno(errno);
+- cbParameter = sizeof(cPagesMemUsed);
+- if ( RT_SUCCESS(rc)
+- && sysctlbyname("vm.stats.vm.v_active_count", &cPagesMemUsed, &cbParameter, NULL, 0))
+- rc = RTErrConvertFromErrno(errno);
+ cbParameter = sizeof(cPagesMemInactive);
+ if ( RT_SUCCESS(rc)
+ && sysctlbyname("vm.stats.vm.v_inactive_count", &cPagesMemInactive, &cbParameter, NULL, 0))
+ rc = RTErrConvertFromErrno(errno);
++#if __FreeBSD_version < 1200016
+ cbParameter = sizeof(cPagesMemCached);
+ if ( RT_SUCCESS(rc)
+ && sysctlbyname("vm.stats.vm.v_cache_count", &cPagesMemCached, &cbParameter, NULL, 0))
+ rc = RTErrConvertFromErrno(errno);
++#endif
+ cbParameter = sizeof(cbPage);
+ if ( RT_SUCCESS(rc)
+ && sysctlbyname("hw.pagesize", &cbPage, &cbParameter, NULL, 0))
+ rc = RTErrConvertFromErrno(errno);
+
+ if (RT_SUCCESS(rc))
+- *pcb = (cPagesMemFree + cPagesMemInactive + cPagesMemCached ) * cbPage;
++ *pcb = ((uint64_t)cPagesMemFree + cPagesMemInactive + cPagesMemCached) * cbPage;
+
+ return rc;
+ }
diff --git a/emulators/virtualbox-ose-additions-legacy/Makefile b/emulators/virtualbox-ose-additions-legacy/Makefile
index eb2767e9c7dc..36da35e3c79c 100644
--- a/emulators/virtualbox-ose-additions-legacy/Makefile
+++ b/emulators/virtualbox-ose-additions-legacy/Makefile
@@ -138,6 +138,10 @@ post-patch:
.if ${PORT_OPTIONS:MPAE}
@${ECHO_CMD} 'VBOX_FREEBSD = -DPAE' >> ${WRKSRC}/LocalConfig.kmk
.endif
+.if ${OSVERSION} >= 1500038
+ @${ECHO_CMD} 'HAVE_MNTOPTS_IN_LIBUTIL = 1' >> \
+ ${WRKSRC}/LocalConfig.kmk
+.endif
post-patch-X11-on:
@${ECHO_CMD} 'VBOX_USE_SYSTEM_XORG_HEADERS = 1' >> \
diff --git a/emulators/virtualbox-ose-additions/Makefile b/emulators/virtualbox-ose-additions/Makefile
index 395ad0a8517d..58ad514e9a9b 100644
--- a/emulators/virtualbox-ose-additions/Makefile
+++ b/emulators/virtualbox-ose-additions/Makefile
@@ -126,6 +126,10 @@ post-patch:
${WRKSRC}/src/VBox/Additions/x11/VBoxClient/Makefile.kmk
@${ECHO_CMD} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk
.endif
+.if ${OSVERSION} >= 1500038
+ @${ECHO_CMD} 'HAVE_MNTOPTS_IN_LIBUTIL = 1' >> \
+ ${WRKSRC}/LocalConfig.kmk
+.endif
post-patch-X11-on:
@${ECHO_CMD} 'VBOX_USE_SYSTEM_XORG_HEADERS = 1' >> \
diff --git a/emulators/virtualbox-ose-kmod-70/Makefile b/emulators/virtualbox-ose-kmod-70/Makefile
index 4ad6ad62ca85..411534590df1 100644
--- a/emulators/virtualbox-ose-kmod-70/Makefile
+++ b/emulators/virtualbox-ose-kmod-70/Makefile
@@ -90,7 +90,7 @@ post-patch:
.if ${PORT_OPTIONS:MVIMAGE}
@${ECHO_CMD} 'VBOX_WITH_NETFLT_VIMAGE = 1' >> ${WRKSRC}/LocalConfig.kmk
.endif
- @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
+ @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g; s|which \$$\*|which \$$1|g' \
${WRKSRC}/Config.kmk ${WRKSRC}/configure
@${REINPLACE_CMD} \
-e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \
diff --git a/emulators/virtualbox-ose-kmod-legacy/Makefile b/emulators/virtualbox-ose-kmod-legacy/Makefile
index c3770f902d8e..424fd42ee14f 100644
--- a/emulators/virtualbox-ose-kmod-legacy/Makefile
+++ b/emulators/virtualbox-ose-kmod-legacy/Makefile
@@ -99,7 +99,7 @@ post-patch:
.if ${PORT_OPTIONS:MPAE}
@${ECHO_CMD} 'VBOX_FREEBSD = -DPAE' >> ${WRKSRC}/LocalConfig.kmk
.endif
- @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
+ @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g; s|which \$$\*|which \$$1|g' \
${WRKSRC}/Config.kmk ${WRKSRC}/configure
@${REINPLACE_CMD} \
-e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \
diff --git a/emulators/virtualbox-ose-kmod/Makefile b/emulators/virtualbox-ose-kmod/Makefile
index 28f57d2c777c..d99d0ef6f084 100644
--- a/emulators/virtualbox-ose-kmod/Makefile
+++ b/emulators/virtualbox-ose-kmod/Makefile
@@ -91,7 +91,7 @@ post-patch:
.if ${PORT_OPTIONS:MVIMAGE}
@${ECHO_CMD} 'VBOX_WITH_NETFLT_VIMAGE = 1' >> ${WRKSRC}/LocalConfig.kmk
.endif
- @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
+ @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g; s|which \$$\*|which \$$1|g' \
${WRKSRC}/Config.kmk ${WRKSRC}/configure
@${REINPLACE_CMD} \
-e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \
diff --git a/emulators/virtualbox-ose-legacy/Makefile b/emulators/virtualbox-ose-legacy/Makefile
index 9635d1977766..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
@@ -75,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-nox11-70/Makefile b/emulators/virtualbox-ose-nox11-70/Makefile
index b1f9189a1bd4..ae6cac9a31c3 100644
--- a/emulators/virtualbox-ose-nox11-70/Makefile
+++ b/emulators/virtualbox-ose-nox11-70/Makefile
@@ -1,10 +1,10 @@
-PORTREVISION= 0
+PORTREVISION= 1
PKGNAMESUFFIX= -nox11-70
MASTERDIR= ${.CURDIR}/../virtualbox-ose-70
-OPTIONS_EXCLUDE= ALSA DBUS DEBUG GUESTADDITIONS DOCS NLS PULSEAUDIO \
- QT5 VPX X11
+OPTIONS_EXCLUDE= ALSA DBUS DEBUG GUESTADDITIONS DOCS NLS OGG PULSEAUDIO \
+ QT5 VORBIS VPX X11
SLAVE_PORT= yes
diff --git a/emulators/virtualbox-ose-nox11/Makefile b/emulators/virtualbox-ose-nox11/Makefile
index 743d0be9d248..c9a9c1f951e3 100644
--- a/emulators/virtualbox-ose-nox11/Makefile
+++ b/emulators/virtualbox-ose-nox11/Makefile
@@ -3,7 +3,7 @@ PKGNAMESUFFIX= -nox11
MASTERDIR= ${.CURDIR}/../virtualbox-ose
-OPTIONS_EXCLUDE= ALSA DBUS DEBUG GUESTADDITIONS DOCS NLS PULSEAUDIO \
+OPTIONS_EXCLUDE= ALSA DBUS DEBUG GUESTADDITIONS DOCS NLS OPUS PULSEAUDIO \
QT5 VPX X11
SLAVE_PORT= yes
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile
index 101b19ebd385..e79e170b28a5 100644
--- a/emulators/virtualbox-ose/Makefile
+++ b/emulators/virtualbox-ose/Makefile
@@ -1,6 +1,6 @@
PORTNAME= virtualbox-ose
DISTVERSION= 6.1.50
-PORTREVISION?= 12
+PORTREVISION?= 13
CATEGORIES= emulators
MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/:src \
LOCAL/bofh/emulators/virtualbox-ose:docs
@@ -75,7 +75,7 @@ PLIST_SUB= GUEST_VER=${DISTVERSION} \
SLAVE_PORT?= no
OPTIONS_DEFINE= AIO ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS OPUS PULSEAUDIO \
- PYTHON QT5 R0LOGGING UDPTUNNEL VBOXIMG VDE VNC WEBSERVICE VPX X11
+ PYTHON QT5 R0LOGGING UDPTUNNEL VBOXIMG VDE VNC VPX WEBSERVICE X11
OPTIONS_DEFAULT= AIO DBUS QT5 UDPTUNNEL VNC WEBSERVICE X11
.if ${SLAVE_PORT} == no
OPTIONS_DEFAULT+= PYTHON
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk
index 4d327e1089b1..270472c045e3 100644
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk
+++ b/emulators/virtualbox-ose/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/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp
index 96058e78ff1f..b055a2606c79 100644
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Graphics_DevVGA-SVGA3d-ogl.cpp
@@ -1,4 +1,4 @@
---- src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp.orig 2021-01-07 15:39:17 UTC
+--- src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp.orig 2024-01-11 12:18:21 UTC
+++ src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
@@ -1189,7 +1189,7 @@ int vmsvga3dTerminate(PVGASTATECC pThisCC)
RTSemEventDestroy(pState->WndRequestSem);
@@ -27,6 +27,24 @@
/**
+@@ -3461,7 +3461,7 @@ int vmsvga3dContextDefineOgl(PVGASTATECC pThisCC, uint
+ return VINF_SUCCESS;
+ }
+
+-#if defined(RT_OS_LINUX)
++#if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX)
+ /*
+ * HW accelerated graphics output.
+ */
+@@ -3932,7 +3932,7 @@ int vmsvga3dBackSurfaceBlitToScreen(PVGASTATECC pThisC
+ return VINF_SUCCESS;
+ }
+
+-#else /* !RT_OS_LINUX */
++#else /* !RT_OS_FREEBSD && !RT_OS_LINUX */
+
+ int vmsvga3dBackDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)
+ {
@@ -4052,7 +4052,7 @@ static int vmsvga3dContextDestroyOgl(PVGASTATECC pThis
AssertRC(rc);
#elif defined(RT_OS_DARWIN)