diff --git a/emulators/virtualbox-ose-70/Makefile b/emulators/virtualbox-ose-70/Makefile index fdd678179189..b86de1fac4d1 100644 --- a/emulators/virtualbox-ose-70/Makefile +++ b/emulators/virtualbox-ose-70/Makefile @@ -1,431 +1,412 @@ PORTNAME= virtualbox-ose -DISTVERSION= 6.1.50 -PORTREVISION?= 8 +DISTVERSION= 7.0.24 +PORTREVISION?= 0 CATEGORIES= emulators MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/:src \ - LOCAL/bofh/emulators/virtualbox-ose:docs + LOCAL/bofh/emulators/virtualbox-ose:docs \ + LOCAL/vvd:docs +PKGNAMESUFFIX?= -70 DISTFILES= VirtualBox-${DISTVERSION}${EXTRACT_SUFX}:src \ VirtualBox-docs-${DISTVERSION}${EXTRACT_SUFX}:docs EXTRACT_ONLY= VirtualBox-${DISTVERSION}${EXTRACT_SUFX} \ VirtualBox-docs-${DISTVERSION}${EXTRACT_SUFX} MAINTAINER= vbox@FreeBSD.org COMMENT= General-purpose full virtualizer for x86 hardware WWW= https://www.virtualbox.org/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING ONLY_FOR_ARCHS= amd64 BUILD_DEPENDS= gtar:archivers/gtar \ kmk:devel/kBuild \ libIDL-config-2:devel/libIDL \ yasm:devel/yasm \ xsltproc:textproc/libxslt LIB_DEPENDS= libpng.so:graphics/png \ libcurl.so:ftp/curl -RUN_DEPENDS= ${LOCALBASE}/etc/rc.d/vboxnet:emulators/virtualbox-ose-kmod +RUN_DEPENDS= ${LOCALBASE}/etc/rc.d/vboxnet:emulators/virtualbox-ose-kmod-70 -USES= compiler:c++14-lang cpe gnome iconv pkgconfig ssl tar:bzip2 +USES= compiler:c++14-lang cpe gnome iconv qt:5 pkgconfig ssl tar:bzip2 CPE_VENDOR= oracle CPE_PRODUCT= vm_virtualbox USE_GNOME= libxml2 +USE_QT= buildtools:build linguisttools:build USE_RC_SUBR= vboxheadless vboxwatchdog HAS_CONFIGURE= yes CONFIGURE_ARGS= --disable-java --passive-mesa --disable-docs CONFIGURE_ARGS+= --with-gcc="${CC}" --with-g++="${CXX}" CONFLICTS_INSTALL= virtualbox-ose-legacy \ virtualbox-ose-nox11-legacy \ - virtualbox-ose-70 \ - virtualbox-ose-nox11-70 + virtualbox-ose \ + virtualbox-ose-nox11 -PORTSCOUT= limit:^6\. +PORTSCOUT= limit:^7\.0\. SUB_FILES= pkg-message SUB_LIST= VBOXDIR=${VBOX_DIR} \ VBOX_ETC=${VBOX_ETC} \ VBOXGROUP=${VBOXGROUP} \ VBOXUSER=${VBOXUSER} \ VBOXWSUSER=${VBOXWSUSER} WRKSRC= ${WRKDIR}/VirtualBox-${DISTVERSION} VBOXUSER?= vboxusers VBOXWSUSER?= vboxusers VBOXGROUP?= vboxusers USERS= ${VBOXUSER} GROUPS= ${VBOXGROUP} VBOX_DIR= ${PREFIX}/${VBOX_DIR_REL} VBOX_DIR_REL= lib/virtualbox VBOX_ETC= ${PREFIX}/etc/vbox VBOX_LINKS= VBoxVRDP VBOX_PROGS= VBoxAutostart VBoxBalloonCtrl VBoxBugReport VBoxHeadless \ VBoxManage VBOX_UTILS= VBoxExtPackHelperApp VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT \ VBoxSVC VBoxXPCOMIPCD PLIST_SUB= GUEST_VER=${DISTVERSION} \ PYTHON_VERU=${PYTHON_VER:S/./_/}${PYTHON_ABIVER} \ VBOXGROUP=${VBOXGROUP} SLAVE_PORT?= no -OPTIONS_DEFINE= AIO ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS OPUS PULSEAUDIO \ +OPTIONS_DEFINE= AIO ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS PULSEAUDIO \ PYTHON QT5 R0LOGGING UDPTUNNEL VBOXIMG VDE VNC WEBSERVICE VPX X11 OPTIONS_DEFAULT= AIO DBUS QT5 UDPTUNNEL VNC WEBSERVICE X11 .if ${SLAVE_PORT} == no OPTIONS_DEFAULT+= PYTHON .endif # Since version 6.1.24 pulseaudio is broken at runtime, preventing # virtual machines from starting if configured to use it. OPTIONS_EXCLUDE+= PULSEAUDIO OPTIONS_SUB= yes 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) -OPUS_DESC= Use libvpx for audio recording (requires VPX) 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 VPX_DESC= Use libvpx for video recording WEBSERVICE_DESC= Build Webservice ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_CONFIGURE_OFF= --disable-alsa DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus DBUS_CONFIGURE_OFF= --disable-dbus DEBUG_CONFIGURE_ON= --build-debug NLS_IMPLIES= QT5 -OPUS_IMPLIES= VPX -OPUS_LIB_DEPENDS= libopus.so:audio/opus -OPUS_CONFIGURE_OFF= --disable-libopus PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_CONFIGURE_OFF= --disable-pulse PYTHON_USES= python PYTHON_USES_OFF= python:build PYTHON_USE= PYTHON=distutils,noegginfo,noflavors PYTHON_CONFIGURE_OFF= --disable-python PYTHON_VARS= pydistutils_pkgname=vboxapi pydistutils_pkgversion=1.0 QT5_IMPLIES= X11 QT5_USES= gl qmake:no_env qt:5 xorg QT5_USE= QT=buildtools:build,core,dbus,gui,linguisttools:build,opengl \ - QT=printsupport,widgets,x11extras XORG=xcb GL=gl + QT=printsupport,widgets,x11extras,xml XORG=xcb GL=gl QT5_CONFIGURE_ON= --enable-qt5 QT5_CONFIGURE_OFF= --disable-qt R0LOGGING_IMPLIES= DEBUG UDPTUNNEL_CONFIGURE_OFF= --disable-udptunnel VBOXIMG_LIB_DEPENDS= libfuse.so.2:filesystems/fusefs-libs VDE_RUN_DEPENDS= vde_switch:net/vde2 VDE_CONFIGURE_ON= --enable-vde VNC_LIB_DEPENDS= libvncserver.so:net/libvncserver VNC_CONFIGURE_ON= --enable-vnc VPX_LIB_DEPENDS= libvpx.so:multimedia/libvpx VPX_CONFIGURE_OFF= --disable-libvpx WEBSERVICE_BUILD_DEPENDS= soapcpp2:devel/gsoap -X11_USES= sdl xorg -X11_USE= SDL=sdl XORG=x11,xcursor,xext,xinerama,xmu,xorgproto,xt +X11_USES= gl sdl xorg +X11_USE= GL=gl SDL=sdl XORG=x11,xcursor,xext,xinerama,xmu,xorgproto,xt X11_CONFIGURE_OFF= --build-headless ENV= .export ENV .include .if ${SLAVE_PORT} == no -CONFLICTS_INSTALL+= virtualbox-ose-nox11 +CONFLICTS_INSTALL+= virtualbox-ose-nox11-70 .else -CONFLICTS_INSTALL+= virtualbox-ose +CONFLICTS_INSTALL+= virtualbox-ose-70 .endif .if ${PORT_OPTIONS:MDEBUG} KMK_BUILDTYPE= debug KMK_FLAGS+= BUILD_TYPE=debug .else KMK_BUILDTYPE= release .endif .if ${PORT_OPTIONS:MGUESTADDITIONS} GUESTADDITIONS= VBoxGuestAdditions_${DISTVERSION}.iso DISTFILES+= ${GUESTADDITIONS}:src LICENSE+= Additions LICENSE_COMB= multi LICENSE_NAME_Additions= Guest Additions LICENSE_PERMS_Additions= auto-accept LICENSE_DISTFILES_Additions= ${GUESTADDITIONS} .endif .if ${PORT_OPTIONS:MQT5} PLIST_SUB+= QT="" VBOX_PROGS+= VirtualBox VirtualBoxVM VBOX_UTILS+= VBoxTestOGL VBOX_WITH_QT= 1 .else PLIST_SUB+= QT="@comment " .endif .if ${PORT_OPTIONS:MWEBSERVICE} USE_RC_SUBR+= vboxinit vboxwebsrv VBOX_LINKS+= vboxwebsrv VBOX_UTILS+= vboxwebsrv webtest .endif .if ${PORT_OPTIONS:MX11} -VBOX_PROGS+= VBoxSDL +#VBOX_PROGS+= VBoxSDL .endif .if ${PORT_OPTIONS:MPYTHON} || ${PORT_OPTIONS:MWEBSERVICE} PLIST_SUB+= SDK="" .else PLIST_SUB+= SDK="@comment " .endif .if ${PORT_OPTIONS:MVBOXIMG} EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-vboximg-Config.kmk VBOX_UTILS+= vboximg-mount PLIST_SUB+= VBOXIMG="" .else PLIST_SUB+= VBOXIMG="@comment " .endif KMK_ARCH= freebsd.${ARCH} PLIST_SUB+= ARCH="${KMK_ARCH}" KMK_BUILDDIR= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE} KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys KMK_FLAGS+= -j${MAKE_JOBS_NUMBER} .include .if ${CHOSEN_COMPILER_TYPE} == clang -# 1) llvm10 in FreeBSD before r364284 miscompiles virtualbox 6.1 causing errors. -# 2) llvm15 in FreeBSD miscompiles virtualbox 6.1 causing errors: PR#270189. -# Force llvm from ports. -.if ${OPSYS} == FreeBSD -# USES must be before .include , but CHOSEN_COMPILER_TYPE must be after. -# This is a workaround with possibility to define different llvm via VBOX_LLVM_VER in make.conf. -#USES+= llvm:min=11,max=14 -#CC= clang${LLVM_VERSION} -#CXX= clang++${LLVM_VERSION} -BUILD_DEPENDS+= clang${VBOX_LLVM_VER}:devel/llvm${VBOX_LLVM_VER} -CC= clang${VBOX_LLVM_VER} -CXX= clang++${VBOX_LLVM_VER} -.if ${LLVM_DEFAULT} < 11 || ${LLVM_DEFAULT} > 14 -VBOX_LLVM_VER?= 14 -.else -VBOX_LLVM_VER?= ${LLVM_DEFAULT} -.endif -.endif PATCH_DEPENDS+= ${LOCALBASE}/share/kBuild/tools/GXX3.kmk:devel/kBuild .endif .if ${PYTHON_MAJOR_VER} >= 3 PLIST_SUB+= PYTHON_PYCDIR=/__pycache__/ \ PYTHON_PYCEXT=.cpython-${PYTHON_SUFFIX}.pyc .else PLIST_SUB+= PYTHON_PYCDIR=/ \ PYTHON_PYCEXT=.pyc .endif .if ${SSL_DEFAULT} != base CONFIGURE_ARGS+= --with-openssl-dir="${OPENSSLBASE}" .endif post-patch: @${ECHO_CMD} 'VBOX_PATH_APP_PRIVATE_ARCH = ${VBOX_DIR}' > \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_DOCBOOK = ${DBKXSLDIR}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_DOCBOOK_DTD = ${DBKXMLDIR}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_SHARED_LIBS = ${VBOX_DIR}' >> \ ${WRKSRC}/LocalConfig.kmk # Please keep this even if using Clang to avoid repeated regressions. # PR 245048 @${ECHO_CMD} "VBOX_WITH_RUNPATH = ${_GCC_RUNTIME:D${_GCC_RUNTIME}\:}${VBOX_DIR}" >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_APP_PRIVATE = ${DATADIR}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_APP_DOCS = ${DOCSDIR}' >> ${WRKSRC}/LocalConfig.kmk .if ${SSL_DEFAULT} != base @${ECHO_CMD} 'VBOX_WITH_ALT_HASH_CODE = 1' >> ${WRKSRC}/LocalConfig.kmk .endif @${ECHO_CMD} 'VBOX_WITH_EXTPACK_VBOXDTRACE =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_INSTALLER = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_VBOXDRV =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_TESTCASES =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'SDK_VBOX_LIBPNG_INCS = ${PREFIX}/include/libpng' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'SDK_VBOX_LIBPNG_LIBS = png' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_ADDITIONS =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_DRAG_AND_DROP = ${VBOX_WITH_QT}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_DRAG_AND_DROP_GH = ${VBOX_WITH_QT}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_VALIDATIONKIT =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_X11_ADDITIONS =' >> ${WRKSRC}/LocalConfig.kmk .if ${PORT_OPTIONS:MR0LOGGING} @${ECHO_CMD} 'VBOX_WITH_R0_LOGGING = 1' >> ${WRKSRC}/LocalConfig.kmk .endif .if ${PORT_OPTIONS:MWEBSERVICE} @${ECHO_CMD} 'VBOX_WITH_WEBSERVICES = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_GSOAP_INSTALLED = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_GSOAP = ${PREFIX}/lib/gsoap' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_GSOAP_BIN = ${PREFIX}/bin' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_GSOAP_IMPORT = ${PREFIX}/share/gsoap/import' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_GCC_PEDANTIC_CXX = -Wshadow $$(VBOX_GCC_WARN) -Wno-long-long' >> \ ${WRKSRC}/LocalConfig.kmk .endif .if empty(PORT_OPTIONS:MX11) @${ECHO} 'VBOX_WITH_VMSVGA3D =' >> ${WRKSRC}/LocalConfig.kmk .endif .if ${CHOSEN_COMPILER_TYPE} == clang @${REINPLACE_CMD} -e 's| -finline-limit=8000||' \ -e 's| -mpreferred-stack-boundary=2||' ${WRKSRC}/Config.kmk @${REINPLACE_CMD} -e 's| -fpermissive||' ${WRKSRC}/Config.kmk \ ${WRKSRC}/src/VBox/Main/webservice/Makefile.kmk @${ECHO_CMD} 'TOOL_VBoxGccFreeBSD_LD = ${CXX}' >> ${WRKSRC}/LocalConfig.kmk @${SED} -e 's|GXX3|VBoxGccFreeBSD|g' \ ${LOCALBASE}/share/kBuild/tools/GXX3.kmk > \ ${WRKSRC}/tools/kBuildTools/VBoxGccFreeBSD.kmk .endif # Causes a "reinplace" QA warning with default LOCALBASE @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Config.kmk ${WRKSRC}/configure \ ${WRKSRC}/kBuild/header.kmk ${WRKSRC}/kBuild/units/qt4.kmk \ ${WRKSRC}/kBuild/units/qt5.kmk ${WRKSRC}/kBuild/sdks/LIBSDL.kmk \ ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py @${REINPLACE_CMD} \ -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \ -e 's|SUPPYTHONLIBS=.*|SUPPYTHONLIBS="${PYTHON_VERSION}${PYTHON_ABIVER}"|' \ ${WRKSRC}/configure .if empty(ICONV_LIB) @${REINPLACE_CMD} -e 's|iconv||' ${WRKSRC}/Config.kmk \ ${WRKSRC}/src/VBox/Runtime/Makefile.kmk @${ECHO_CMD} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk .endif @${REINPLACE_CMD} -e 's|%%VBOX_DIR%%|${VBOX_DIR}|g' \ -e 's|%%VBOX_ETC%%|${VBOX_ETC}|g' \ -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh @${REINPLACE_CMD} -e 's|%%VBOX_ETC%%|${VBOX_ETC}|g' \ ${WRKSRC}/src/VBox/HostDrivers/adpctl/VBoxNetAdpCtl.cpp @${REINPLACE_CMD} \ -e 's|^versions =.*|versions = ["${PYTHON_VER}${PYTHON_ABIVER}"]|' \ ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py post-patch-AIO-off: @${REINPLACE_CMD} 's|r3/freebsd/fileaio-freebsd.cpp|r3/posix/fileaio-posix.cpp|' \ ${WRKSRC}/src/VBox/Runtime/Makefile.kmk do-build: cd ${WRKSRC} && ${SH} -c '. ${WRKSRC}/env.sh && \ ${SETENV} ${MAKE_ENV} ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}' .if ${PORT_OPTIONS:MPYTHON} ${PYTHON_CMD} -mcompileall \ ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/python/xpcom .endif do-install: .if ${PORT_OPTIONS:MPYTHON} || ${PORT_OPTIONS:MWEBSERVICE} ${MKDIR} ${STAGEDIR}${DATADIR}/sdk .endif cd ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom && \ ${COPYTREE_SHARE} "idl samples" ${STAGEDIR}${DATADIR} ${MKDIR} ${STAGEDIR}${PREFIX}/include/virtualbox cd ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/include && \ ${COPYTREE_SHARE} "*" ${STAGEDIR}${PREFIX}/include/virtualbox ${MKDIR} ${STAGEDIR}${VBOX_DIR} cd ${KMK_BUILDDIR}/bin && ${COPYTREE_SHARE} \ "*.fd *.r0 *.so components" ${STAGEDIR}${VBOX_DIR} .if ${PORT_OPTIONS:MPYTHON} || ${PORT_OPTIONS:MWEBSERVICE} ${RLN} ${STAGEDIR}${DATADIR}/sdk ${STAGEDIR}${VBOX_DIR} .endif ${INSTALL_SCRIPT} ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh \ ${STAGEDIR}${VBOX_DIR} .for f in ${VBOX_PROGS} ${VBOX_UTILS} ${INSTALL_PROGRAM} ${KMK_BUILDDIR}/bin/${f} ${STAGEDIR}${VBOX_DIR} .endfor .for f in ${VBOX_PROGS} ${VBOX_LINKS} ${LN} -fs ../${VBOX_DIR_REL}/VBox.sh ${STAGEDIR}${PREFIX}/bin/${f} .endfor .for f in ${VBOX_PROGS} ${LN} -fs ../${VBOX_DIR_REL}/VBox.sh ${STAGEDIR}${PREFIX}/bin/${f:tl} .endfor .if ${PORT_OPTIONS:MGUESTADDITIONS} ${MKDIR} ${STAGEDIR}${VBOX_DIR}/additions ${INSTALL_DATA} ${DISTDIR}/${GUESTADDITIONS} \ ${STAGEDIR}${VBOX_DIR}/additions/ ${RLN} ${STAGEDIR}${VBOX_DIR}/additions/${GUESTADDITIONS} \ ${STAGEDIR}${VBOX_DIR}/additions/VBoxGuestAdditions.iso .endif .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKDIR}/VirtualBox-docs-${DISTVERSION}/UserManual.pdf \ ${STAGEDIR}${DOCSDIR} .endif .if ${PORT_OPTIONS:MNLS} cd ${KMK_BUILDDIR}/obj/VirtualBox/qtnls && \ ${COPYTREE_SHARE} "*.qm" ${STAGEDIR}${DATADIR}/nls .endif .if ${PORT_OPTIONS:MPYTHON} cd ${KMK_BUILDDIR}/bin/sdk/installer && \ ${SETENV} VBOX_INSTALL_PATH="${VBOX_DIR}" \ ${PYTHON_CMD} vboxapisetup.py install --root=${STAGEDIR} @${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/xpcom cd ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/python/xpcom && \ ${COPYTREE_SHARE} "*" ${STAGEDIR}${PYTHON_SITELIBDIR}/xpcom @${MKDIR} ${STAGEDIR}${DATADIR}/sdk/bindings/xpcom/python ${RLN} ${STAGEDIR}${PYTHON_SITELIBDIR}/xpcom \ ${STAGEDIR}${DATADIR}/sdk/bindings/xpcom/python .endif .if ${PORT_OPTIONS:MQT5} ${INSTALL_DATA} \ ${WRKSRC}/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_48px.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/VBox.png ${INSTALL_DATA} \ - ${WRKSRC}/src/VBox/Installer/freebsd/virtualbox.desktop \ + ${FILESDIR}/virtualbox.desktop \ ${STAGEDIR}${PREFIX}/share/applications/virtualbox.desktop .endif .if ${PORT_OPTIONS:MVNC} ${MKDIR} ${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/${KMK_ARCH} ${INSTALL_DATA} ${KMK_BUILDDIR}/bin/ExtensionPacks/VNC/ExtPack* \ ${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/ ${INSTALL_LIB} ${KMK_BUILDDIR}/bin/ExtensionPacks/VNC/${KMK_ARCH}/* \ ${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/${KMK_ARCH}/ .endif .if ${PORT_OPTIONS:MVBOXIMG} ${LN} -fs ../${VBOX_DIR_REL}/vboximg-mount ${STAGEDIR}${PREFIX}/bin/ .endif .if ${PORT_OPTIONS:MWEBSERVICE} ${MKDIR} ${STAGEDIR}${DATADIR}/sdk/bindings/webservice ${INSTALL_DATA} ${KMK_BUILDDIR}/obj/webservice/vboxweb.wsdl \ ${STAGEDIR}${DATADIR}/sdk/bindings/webservice/ .endif post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/virtualbox/*.so \ ${STAGEDIR}${PREFIX}/lib/virtualbox/components/*.so .include diff --git a/emulators/virtualbox-ose-70/distinfo b/emulators/virtualbox-ose-70/distinfo index 08ac88176444..774d7e8d44a7 100644 --- a/emulators/virtualbox-ose-70/distinfo +++ b/emulators/virtualbox-ose-70/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1716920210 -SHA256 (VirtualBox-6.1.50.tar.bz2) = 73ff603842896cb8d86ac5a817eb5037d7d225d3c46ea238e39d7ba5aaf61a57 -SIZE (VirtualBox-6.1.50.tar.bz2) = 165959648 -SHA256 (VBoxGuestAdditions_6.1.50.iso) = af53e34c5a5ec143f3418ac01d00ed5f33f6b31bfdc92eb4714c99d9bccb6602 -SIZE (VBoxGuestAdditions_6.1.50.iso) = 64051200 -SHA256 (VirtualBox-docs-6.1.50.tar.bz2) = e5dc118e8bb8352c06d5359e4f75ceb339a3917f0727fd74ad02ff07251e67db -SIZE (VirtualBox-docs-6.1.50.tar.bz2) = 4063302 +TIMESTAMP = 1738097405 +SHA256 (VirtualBox-7.0.24.tar.bz2) = 340d66f52251e23d9bc1eb4fdf70e44cb9d1db69bc5064e3f7bdfb8bc0e3a458 +SIZE (VirtualBox-7.0.24.tar.bz2) = 174663788 +SHA256 (VirtualBox-docs-7.0.24.tar.bz2) = a4005ab62ff6352b820f3aba2c5a98b4541317433afff0d58d4b8c2678e75cdd +SIZE (VirtualBox-docs-7.0.24.tar.bz2) = 4766637 +SHA256 (VBoxGuestAdditions_7.0.24.iso) = 17b01cd40bc34a7b79e4922c8f68bea3da3b2348bc4cdeadc962f84f1a63e225 +SIZE (VBoxGuestAdditions_7.0.24.iso) = 54804480 diff --git a/emulators/virtualbox-ose-70/files/extrapatch-Config.kmk b/emulators/virtualbox-ose-70/files/extrapatch-Config.kmk index 775508d23b1b..4a91ac89097b 100644 --- a/emulators/virtualbox-ose-70/files/extrapatch-Config.kmk +++ b/emulators/virtualbox-ose-70/files/extrapatch-Config.kmk @@ -1,11 +1,11 @@ --- Config.kmk.orig 2021-04-28 16:21:25 UTC +++ Config.kmk -@@ -4931,7 +4931,7 @@ define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS +@@ -5958,7 +5942,7 @@ define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS | xargs -J% objcopy % $(out) ## Strip debug info (comment out if debugging or something). - objcopy --strip-debug $(out) +# objcopy --strip-debug $(out) endef else # x86 TOOL_FREEBSDKMODLD_LINK_SYSMOD_OUTPUT = $(outbase).kld diff --git a/emulators/virtualbox-ose-70/files/patch-Config.kmk b/emulators/virtualbox-ose-70/files/patch-Config.kmk index 119926c9e025..9fe5ecdc458d 100644 --- a/emulators/virtualbox-ose-70/files/patch-Config.kmk +++ b/emulators/virtualbox-ose-70/files/patch-Config.kmk @@ -1,234 +1,400 @@ ---- Config.kmk.orig 2021-01-07 15:31:21 UTC -+++ Config.kmk -@@ -469,11 +469,11 @@ ifn1of ($(KBUILD_TARGET), win darwin) +--- Config.kmk.orig 2024-10-10 20:19:24.000000000 +0200 ++++ Config.kmk 2024-12-27 17:28:48.466891000 +0100 +@@ -579,11 +579,11 @@ # Enable OSS audio support. VBOX_WITH_AUDIO_OSS = 1 endif -if1of ($(KBUILD_TARGET), linux) +if1of ($(KBUILD_TARGET), freebsd linux) # Enable ALSA audio support. VBOX_WITH_AUDIO_ALSA = 1 endif -if1of ($(KBUILD_TARGET), linux) +if1of ($(KBUILD_TARGET), freebsd linux) # Enable PulseAudio audio support. VBOX_WITH_AUDIO_PULSE = 1 endif -@@ -489,11 +489,11 @@ VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT = 1 +@@ -596,11 +596,11 @@ # (disabled with 6.1, since it's not complete/useful enough) VBOX_WITH_PCI_PASSTHROUGH = # Enable statically linked dbus support. -if1of ($(KBUILD_TARGET), linux solaris) +if1of ($(KBUILD_TARGET), freebsd linux solaris) VBOX_WITH_DBUS = 1 endif # Enable building PAM modules. -if1of ($(KBUILD_TARGET), linux solaris) +if1of ($(KBUILD_TARGET), freebsd linux solaris) VBOX_WITH_PAM = 1 endif # Enable internal networking. -@@ -501,7 +501,7 @@ VBOX_WITH_INTERNAL_NETWORKING = 1 +@@ -608,7 +608,7 @@ # Enable vmsvga (svga2) graphics device variant, 2D part VBOX_WITH_VMSVGA = 1 # Enable vmsvga (svga2) graphics device variant, 3D part -if1of ($(KBUILD_TARGET), darwin linux win) +if1of ($(KBUILD_TARGET), darwin freebsd linux win) VBOX_WITH_VMSVGA3D = 1 endif - # Enable the generic 3D settings support if at least one 3D capable solution is enabled -@@ -647,7 +647,7 @@ VBOX_WITH_MAIN_USB_ID_DATABASE = 1 + # Enable vmsvga (svga2) graphics device variant, 3D part, VGPU10 DX commands +@@ -787,7 +787,7 @@ #endif # Set this to prefix all C symbols in XPCOM, to avoid dynamic linking problems # caused by our XPCOM library polluting the symbol namespace for system libs. -if1of ($(KBUILD_TARGET), linux solaris) +if1of ($(KBUILD_TARGET), freebsd linux solaris) VBOX_WITH_XPCOM_NAMESPACE_CLEANUP = 1 endif # The webservices api. -@@ -1064,10 +1064,6 @@ ifeq ($(KBUILD_TARGET),darwin) - VBOX_WITH_VBOXSDL= +@@ -1295,10 +1295,6 @@ + endif endif -ifeq ($(KBUILD_TARGET),freebsd) -- VBOX_WITH_DOCS= +- VBOX_WITH_DOCS = -endif - ifeq ($(KBUILD_TARGET),haiku) - # Don't bother with SDL ttf for now. - VBOX_WITH_SECURELABEL= -@@ -1228,7 +1224,7 @@ ifdef VBOX_OSE - VBOX_WITH_KCHMVIEWER= - VBOX_WITH_PLUGIN_CRYPT= - VBOX_WITH_DRAG_AND_DROP_PROMISES= + VBOX_WITH_VRDP_RDESKTOP = + # Permanent (no working SDL). +@@ -1457,7 +1453,7 @@ + # not yet + VBOX_WITH_PLUGIN_CRYPT = + VBOX_WITH_DRAG_AND_DROP_PROMISES = - ifn1of ($(KBUILD_TARGET), linux) + ifn1of ($(KBUILD_TARGET), freebsd linux) - VBOX_WITH_DOCS= - VBOX_WITH_DOCS_PACKING= + VBOX_WITH_DOCS = + VBOX_WITH_DOCS_PACKING = endif -@@ -4928,7 +4924,7 @@ define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS +@@ -3518,19 +3514,7 @@ + # + ## @todo consider maxing this out. + ifndef VBOX_GCC_std +- if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.arm64) # Go straight for c++17 here. + VBOX_GCC_std := -std=c++17 +- # else if "$(VBOX_CLANG_VERSION_CXX)" vge 60000 # Most language features complete by v6. Lib stuff was less complete in v6, but hopefully acceptable for out purposes. +- #VBOX_GCC_std := -std=c++17 +- else if "$(VBOX_CLANG_VERSION_CXX)" vge 50000 # darwin Xcode 5 allegedly knows what C++11 is +- VBOX_GCC_std := -std=c++11 +- # else if "$(VBOX_GCC_VERSION_CXX)" vge 70000 # Language feature P0512R0 was v8, rest v7 or earlier. Most lib stuff present in 7, complete in v12. +- #VBOX_GCC_std := -std=gnu++17 +- else if "$(VBOX_GCC_VERSION_CXX)" vge 40800 +- VBOX_GCC_std := -std=c++11 +- else if "$(VBOX_GCC_VERSION_CXX)" vge 40600 +- VBOX_GCC_std := -std=c++0x +- endif + endif + ifndef VBOX_VCC_std + if $(VBOX_VCC_TOOL_STEM) >= VCC141 # since 2017 15.3 +@@ -5484,11 +5468,11 @@ + # Solaris driver signing. + TEMPLATE_VBoxR0_POST_CMDS = $(VBOX_SIGN_DRIVER_CMDS) + else +- TEMPLATE_VBoxR0_LDFLAGS = -nostdlib -Bsymbolic -g ++ TEMPLATE_VBoxR0_LDFLAGS = -nostdlib -Bsymbolic -g -fuse-ld=bfd + ## @todo WTF doesn't the globals work? Debug info is supposed to be split everywhere. GRR + TEMPLATE_VBoxR0_LD_DEBUG = split + endif +- if "$(KBUILD_TARGET)" == "linux" && !defined(VBOX_WITH_KMOD_WRAPPED_R0_MODS) ++ if ( "$(KBUILD_TARGET)" == "linux" || "$(KBUILD_TARGET)" == "freebsd") && !defined(VBOX_WITH_KMOD_WRAPPED_R0_MODS) + VBOX_WITH_VBOXR0_AS_DLL = 1 + TEMPLATE_VBoxR0_DLLSUFF = .r0 + TEMPLATE_VBoxR0_CFLAGS += -fPIC +@@ -5499,7 +5483,7 @@ + else + TEMPLATE_VBoxR0_CFLAGS.amd64 += -mcmodel=kernel + TEMPLATE_VBoxR0_CXXFLAGS.amd64 += -mcmodel=kernel +- endif ++endif + ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS # For BTF/pahold issue we use -g1 + TEMPLATE_VBoxR0_DEFS += VBOX_WITH_KMOD_WRAPPED_R0_MODS + TEMPLATE_VBoxR0_LDFLAGS.linux += $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/VBoxR0-wrapped.lds +@@ -5880,7 +5864,7 @@ + # x86 FreeBSD (6.2 or something): + # cc -O2 -fno-strict-aliasing -pipe -Werror -D_KERNEL -DKLD_MODULE \ + # -nostdinc -I- -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include \ +- # -finline-limit=8000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 \ ++ # -fno-common -mno-align-long-strings \ + # -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs \ + # -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions \ + # -std=c99 -c ../my.c +@@ -5891,7 +5875,7 @@ + # + # AMD64 FreeBSD (7.1): + # cc -O2 -fno-strict-aliasing -pipe -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc -I. -I@ -I@/contrib/altq \ +- # -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common \ ++ # --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common \ + # -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx \ + # -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding \ + # -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign \ +@@ -5973,7 +5957,7 @@ | xargs -J% objcopy % $(outbase).kld - # Link the final .ko (a shared object). + # Link the final .ko (a shared object). - ld $(flags) -Bshareable -o $(out) $(outbase).kld -+ ld $(flags) -Bshareable -znotext -o $(out) $(outbase).kld - endef ++ ld $(flags) -Bshareable -znotext -o $(out) $(outbase).kld + endef endif # x86 -@@ -5205,6 +5201,7 @@ TEMPLATE_VBOXR3EXE_LDFLAGS.x86 = -m32 - TEMPLATE_VBOXR3EXE_LDFLAGS.amd64 = -m64 - TEMPLATE_VBOXR3EXE_LDFLAGS.sparc32 = -m32 - TEMPLATE_VBOXR3EXE_LDFLAGS.sparc64 = -m64 -+TEMPLATE_VBOXR3EXE_LDFLAGS.freebsd = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) - TEMPLATE_VBOXR3EXE_LDFLAGS.linux = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) - TEMPLATE_VBOXR3EXE_LDFLAGS.solaris = -Wl,-z,ignore # same as VBOX_LD_as_needed - TEMPLATE_VBOXR3EXE_LDFLAGS.debug = $(VBOX_GCC_SANITIZER_FLAGS) $(VBOX_GCC_SANITIZER_LDFLAGS) -@@ -5238,10 +5235,18 @@ TEMPLATE_VBOXR3EXE_LIBPATH += \ - TEMPLATE_VBOXR3EXE_CFLAGS += -fno-pic - TEMPLATE_VBOXR3EXE_CXXFLAGS += -fno-pic - TEMPLATE_VBOXR3EXE_LDFLAGS += -fno-pic +@@ -6008,7 +5992,7 @@ + $(VBOX_GCC_fdiagnostics-show-option) \ + -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \ + -Wimplicit-function-declaration -Werror-implicit-function-declaration \ +- -O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \ ++ -O2 -ffreestanding -fno-strict-aliasing -fno-common \ + $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ + -nostdinc -std=c99 -msoft-float + TEMPLATE_VBoxR0Drv_CFLAGS.x86 = -m32 -mno-mmx -mno-sse -mno-avx \ +@@ -6019,7 +6003,7 @@ + -fno-asynchronous-unwind-tables -mno-fp-ret-in-387 + TEMPLATE_VBoxR0Drv_CXXFLAGS = -fno-exceptions -fno-rtti \ + $(VBOX_GCC_WARN) -Wpointer-arith -Winline \ +- -O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \ ++ -O2 -fno-strict-aliasing -fno-common \ + $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ + -nostdinc -msoft-float + TEMPLATE_VBoxR0Drv_CXXFLAGS.x86 = $(TEMPLATE_VBoxR0Drv_CFLAGS.x86) +@@ -6318,11 +6302,11 @@ + TEMPLATE_VBoxR3Exe_LIBS = pthread m rt dl + else ifeq ($(KBUILD_TARGET),os2) + TEMPLATE_VBoxR3Exe_TOOL = GXX3OMF +- TEMPLATE_VBoxR3Exe_LIBS = socket iconv ++ TEMPLATE_VBoxR3Exe_LIBS = socket + else ifeq ($(KBUILD_TARGET),darwin) + TEMPLATE_VBoxR3Exe_TOOL = $(VBOX_GCC_TOOL) + TEMPLATE_VBoxR3Exe_LIBS = +- TEMPLATE_VBoxR3Exe_DEFS += LIBICONV_PLUG # Avoid 3rd party libiconv (from macports). ++ TEMPLATE_VBoxR3Exe_DEFS += LIBICONV_PLUG # Avoid 3rd party lib (from macports). + TEMPLATE_VBoxR3Exe_SDKS.darwin = $(VBOX_DARWIN_DEF_SDK_SDKS) + TEMPLATE_VBoxR3Exe_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_DEFS) + TEMPLATE_VBoxR3Exe_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -fno-common +@@ -6339,17 +6323,26 @@ + else ifeq ($(KBUILD_TARGET),haiku) + TEMPLATE_VBoxR3Exe_TOOL = GXX3 + TEMPLATE_VBoxR3Exe_POST_CMDS = $(VBOX_HAIKU_XRES_SETVER_CMDS) +- TEMPLATE_VBoxR3Exe_LIBS = network iconv stdc++ supc++ ++ TEMPLATE_VBoxR3Exe_LIBS = network stdc++ supc++ + TEMPLATE_VBoxR3Exe_LIBPATH += \ + /boot/common/lib + # Haiku uses PIC by default... + TEMPLATE_VBoxR3Exe_CFLAGS += -fno-pic + TEMPLATE_VBoxR3Exe_CXXFLAGS += -fno-pic + TEMPLATE_VBoxR3Exe_LDFLAGS += -fno-pic - else if1of ($(KBUILD_TARGET), freebsd openbsd) -+ else ifeq ($(KBUILD_TARGET),freebsd) - TEMPLATE_VBOXR3EXE_TOOL = GXX3 - TEMPLATE_VBOXR3EXE_LIBS = pthread -+TEMPLATE_VBOXR3EXE_LDFLAGS.freebsd.x86 = -Wl,-z,notext - TEMPLATE_VBOXR3EXE_INCS += \ -+ /usr/local/include -+TEMPLATE_VBOXR3EXE_LIBPATH += \ -+ /usr/local/lib -+ else ifeq ($(KBUILD_TARGET),openbsd) -+TEMPLATE_VBOXR3EXE_TOOL = GXX3 -+TEMPLATE_VBOXR3EXE_LIBS = pthread -+TEMPLATE_VBOXR3EXE_INCS += \ - /usr/include \ - /usr/X11R6/include \ - /usr/local/include -@@ -5273,6 +5278,7 @@ TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile = $(TEMPLATE_VB - TEMPLATE_VBOXR3EXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' ++ else ifeq ($(KBUILD_TARGET), freebsd) + TEMPLATE_VBoxR3Exe_TOOL = GXX3 + TEMPLATE_VBoxR3Exe_LIBS = pthread ++ TEMPLATE_VBoxR3Exe_LDFLAGS = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) ++ TEMPLATE_VBoxR3Exe_LDFLAGS.freebsd.x86 = -Wl,-z,notext + TEMPLATE_VBoxR3Exe_INCS += \ ++ /usr/local/include ++ TEMPLATE_VBoxR3Exe_LIBPATH += \ ++ /usr/local/lib ++ else ifeq ($(KBUILD_TARGET), openbsd) ++ TEMPLATE_VBoxR3Exe_TOOL = GXX3 ++ TEMPLATE_VBoxR3Exe_LIBS = pthread ++ TEMPLATE_VBoxR3Exe_INCS += \ + /usr/include \ + /usr/X11R6/include \ + /usr/local/include +@@ -6368,7 +6361,7 @@ + /usr/X11R7/lib + else ifeq ($(KBUILD_TARGET),solaris) + TEMPLATE_VBoxR3Exe_TOOL = GXX3PLAIN +- TEMPLATE_VBoxR3Exe_DEFS += LIBICONV_PLUG _REENTRANT # Avoid the GNU libiconv, for now at least. ++ TEMPLATE_VBoxR3Exe_DEFS += LIBICONV_PLUG _REENTRANT # Avoid the GNU lib, for now at least. + if $(VBOX_GCC_VERSION_CC) < 30500 + TEMPLATE_VBoxR3Exe_CFLAGS += -std=gnu99 + endif +@@ -6384,6 +6377,7 @@ + TEMPLATE_VBoxR3Exe_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' endif ifdef VBOX_WITH_ORIGIN -+ TEMPLATE_VBOXR3EXE_LDFLAGS.freebsd += $(VBOX_GCC_ORIGIN_OPT) - TEMPLATE_VBOXR3EXE_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) ++ TEMPLATE_VBoxR3Exe_LDFLAGS.freebsd += $(VBOX_GCC_ORIGIN_OPT) + TEMPLATE_VBoxR3Exe_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) endif endif -@@ -5412,7 +5418,7 @@ ifeq ($(KBUILD_TARGET),win) - $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.amd64)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \ - $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.amd64)_LIB)/libcpmt$(VBOX_VCC_CRT_TYPE).lib \ - $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.amd64)_LIB)/oldnames.lib --else ifn1of ($(KBUILD_TARGET), darwin linux solaris) -+else ifn1of ($(KBUILD_TARGET), darwin freebsd linux solaris) - # The gcc guys sans darwin, linux and solaris (don't depend on statically compiled system libs there) - TEMPLATE_VBOXR3STATIC_CFLAGS = $(TEMPLATE_VBOXR3EXE_CFLAGS) -static - TEMPLATE_VBOXR3STATIC_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -static -@@ -5557,6 +5563,7 @@ ifeq ($(KBUILD_TARGET),win) # No CRT! - else ifn1of ($(KBUILD_TARGET), os2 solaris) - # We want to keep the RPATH on Solaris to be able to find libgcc_1/libstdc++ within $(VBOX_WITH_RUNPATH) - TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS)) -+ TEMPLATE_VBoxR3HardenedTstDll_LDFLAGS.freebsd = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBoxR3TstDll_LDFLAGS.freebsd)) - TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux)) +@@ -6590,7 +6584,7 @@ + ifdef VBOX_WITH_NOCRT_STATIC + TEMPLATE_VBoxR3StaticBase_DEFS += RT_WITH_NOCRT_WRAPPERS + endif +- ifn1of ($(KBUILD_TARGET), darwin linux solaris) ++ ifn1of ($(KBUILD_TARGET), darwin freebsd linux solaris) + # The gcc guys sans darwin, linux and solaris (don't depend on statically compiled system libs there) + TEMPLATE_VBoxR3StaticBase_CFLAGS = $(TEMPLATE_VBoxR3Exe_CFLAGS) -static + TEMPLATE_VBoxR3StaticBase_CXXFLAGS = $(TEMPLATE_VBoxR3Exe_CXXFLAGS) -static +@@ -6656,7 +6650,7 @@ + $(SDK_VBoxLzf_LIBS) \ + $(SDK_VBoxZlib_LIBS) + if1of ($(KBUILD_TARGET), darwin freebsd) +- TEMPLATE_VBoxR3Static_LIBS += iconv ++ TEMPLATE_VBoxR3Static_LIBS += + else ifeq ($(KBUILD_TARGET),solaris) + TEMPLATE_VBoxR3Static_LIBS += kstat + endif +@@ -6830,6 +6824,7 @@ + else ifn1of ($(KBUILD_TARGET), os2) + ifneq ($(KBUILD_TYPE),asan) # Keep RPATH in asan builds so we can find libasan.so.X and libubsan.so.Y. + TEMPLATE_VBoxR3HardenedExe_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBoxR3Exe_LDFLAGS)) ++ TEMPLATE_VBoxR3HardenedExe_LDFLAGS.freebsd = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBoxR3Exe_LDFLAGS.freebsd)) + TEMPLATE_VBoxR3HardenedExe_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBoxR3Exe_LDFLAGS.linux)) + endif endif - -@@ -5584,6 +5591,7 @@ TEMPLATE_VBoxR3HardenedTstDll_INST = $(INST_TESTCASE) - TEMPLATE_VBoxR3HardenedTstDll_LDFLAGS.win = $(TEMPLATE_VBoxR3TstDll_LDFLAGS.win) -IntegrityCheck +@@ -6861,6 +6856,7 @@ + $(if-expr !defined(VBOX_WITHOUT_WINDOWS_KERNEL_CODE_SIGNING_CERT),-IntegrityCheck,) ifn1of ($(KBUILD_TARGET), win os2) TEMPLATE_VBoxR3HardenedTstDll_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBoxR3TstDll_LDFLAGS)) + TEMPLATE_VBoxR3HardenedTstDll_LDFLAGS.freebsd = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBoxR3TstDll_LDFLAGS.freebsd)) TEMPLATE_VBoxR3HardenedTstDll_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBoxR3TstDll_LDFLAGS.linux)) endif -@@ -5606,6 +5614,7 @@ ifndef VBOX_WITH_HARDENING +@@ -6884,6 +6880,7 @@ TEMPLATE_VBoxR3SetUidToRoot_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' endif ifdef VBOX_WITH_ORIGIN + TEMPLATE_VBoxR3SetUidToRoot_LDFLAGS.freebsd += $(VBOX_GCC_ORIGIN_OPT) TEMPLATE_VBoxR3SetUidToRoot_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) endif endif -@@ -6132,10 +6141,19 @@ TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTI +@@ -7208,7 +7205,7 @@ + endif + TEMPLATE_VBoxMainExe_CXXFLAGS = -g $(VBOX_GCC_pipe) \ + $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_Wno-multistatement-macros) $(VBOX_GCC_Wno-class-memaccess) -Wshadow \ +- -fshort-wchar -fpermissive -fexceptions -frtti $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing \ ++ -fshort-wchar -fexceptions -frtti $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing \ + $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_std) $(VBOX_GCC_IPRT_FMT_CHECK) \ + $(VBOX_GCC_SANITIZER_FLAGS) + if !defined("VBOX_GCC_Wno-delete-non-virtual-dtor") && defined("VBOX_GCC_Wno-non-virtual-dtor") +@@ -7272,10 +7269,19 @@ else ifeq ($(KBUILD_TARGET),haiku) - TEMPLATE_VBOXMAINEXE_TOOL = GXX3 - TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME) network stdc++ supc++ + TEMPLATE_VBoxMainExe_TOOL = GXX3 + TEMPLATE_VBoxMainExe_LIBS = $(LIB_RUNTIME) network stdc++ supc++ - else if1of ($(KBUILD_TARGET), freebsd openbsd) -+ else ifeq ($(KBUILD_TARGET),freebsd) - TEMPLATE_VBOXMAINEXE_TOOL = GXX3 - TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME) -+TEMPLATE_VBOXMAINEXE_LDFLAGS.freebsd = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) -+TEMPLATE_VBOXMAINEXE_LDFLAGS.freebsd.x86 = -Wl,-z,notext - TEMPLATE_VBOXMAINEXE_INCS += \ -+ /usr/local/include -+TEMPLATE_VBOXMAINEXE_LIBPATH += \ -+ /usr/local/lib -+ else ifeq ($(KBUILD_TARGET),openbsd) -+TEMPLATE_VBOXMAINEXE_TOOL = GXX3 -+TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME) -+TEMPLATE_VBOXMAINEXE_INCS += \ - /usr/include \ - /usr/X11R6/include \ - /usr/local/include -@@ -6167,6 +6185,7 @@ TEMPLATE_VBOXMAINEXE_LDFLAGS += '$(VBOX_GCC - TEMPLATE_VBOXMAINEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' ++ else ifeq ($(KBUILD_TARGET), freebsd) + TEMPLATE_VBoxMainExe_TOOL = GXX3 + TEMPLATE_VBoxMainExe_LIBS = $(LIB_RUNTIME) ++ TEMPLATE_VBoxMainExe_LDFLAGS = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) ++ TEMPLATE_VBoxMainExe_LDFLAGS.freebsd.x86 = -Wl,-z,notext + TEMPLATE_VBoxMainExe_INCS += \ ++ /usr/local/include ++ TEMPLATE_VBoxMainExe_LIBPATH += \ ++ /usr/local/lib ++ else ifeq ($(KBUILD_TARGET), openbsd) ++ TEMPLATE_VBoxMainExe_TOOL = GXX3 ++ TEMPLATE_VBoxMainExe_LIBS = $(LIB_RUNTIME) ++ TEMPLATE_VBoxMainExe_INCS += \ + /usr/include \ + /usr/X11R6/include \ + /usr/local/include +@@ -7307,6 +7313,7 @@ + TEMPLATE_VBoxMainExe_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' endif ifdef VBOX_WITH_ORIGIN -+TEMPLATE_VBOXMAINEXE_LDFLAGS.freebsd += $(VBOX_GCC_ORIGIN_OPT) - TEMPLATE_VBOXMAINEXE_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) ++ TEMPLATE_VBoxMainExe_LDFLAGS.freebsd += $(VBOX_GCC_ORIGIN_OPT) + TEMPLATE_VBoxMainExe_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) endif -@@ -6735,13 +6754,11 @@ ifdef VBOX_WITH_QTGUI - TEMPLATE_VBOXQTGUIEXE_LIBPATH += \ - $(VBOX_LIBPATH_X11) +@@ -7943,13 +7950,11 @@ + TEMPLATE_VBoxQtGuiExe_LIBPATH += \ + $(VBOX_LIBPATH_X11) ifeq ($(KBUILD_TARGET),freebsd) -+ TEMPLATE_VBOXQTGUIEXE_LDFLAGS += -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) -+ TEMPLATE_VBOXQTGUIEXE_LDFLAGS.freebsd.x86 = -Wl,-z,notext - TEMPLATE_VBOXQTGUIEXE_INCS += \ -- /usr/include \ -- /usr/X11R6/include \ - /usr/local/include - TEMPLATE_VBOXQTGUIEXE_LIBPATH += \ -- /usr/lib \ -- /usr/X11R6/lib \ - /usr/local/lib ++ TEMPLATE_VBoxQtGuiExe_LDFLAGS += -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) ++ TEMPLATE_VBoxQtGuiExe_LDFLAGS.freebsd.x86 = -Wl,-z,notext + TEMPLATE_VBoxQtGuiExe_INCS += \ +- /usr/include \ +- /usr/X11R6/include \ + /usr/local/include + TEMPLATE_VBoxQtGuiExe_LIBPATH += \ +- /usr/lib \ +- /usr/X11R6/lib \ + /usr/local/lib endif ifeq ($(KBUILD_TARGET),solaris) -@@ -6988,10 +7005,17 @@ TEMPLATE_VBoxBldProg_TOOL = GXX3 - TEMPLATE_VBoxBldProg_LIBS = network iconv - TEMPLATE_VBoxBldProg_LIBPATH += \ - /boot/common/lib +@@ -8231,7 +8236,7 @@ + TEMPLATE_VBoxBldProg_LIBS = pthread m rt dl + else ifeq ($(KBUILD_HOST),os2) + TEMPLATE_VBoxBldProg_TOOL = GXX3OMF +- TEMPLATE_VBoxBldProg_LIBS = socket iconv ++ TEMPLATE_VBoxBldProg_LIBS = socket + else ifeq ($(KBUILD_HOST),darwin) + TEMPLATE_VBoxBldProg_TOOL = $(VBOX_GCC_TOOL) + if "$(VBOX_DEF_MACOSX_VERSION_MIN)" == "10.7" || "$(VBOX_DARWIN_HOST_VERSION_MAJOR)" == "7" +@@ -8271,13 +8276,20 @@ + TEMPLATE_VBoxBldProg_LIBS = + else ifeq ($(KBUILD_HOST),haiku) + TEMPLATE_VBoxBldProg_TOOL = GXX3 +- TEMPLATE_VBoxBldProg_LIBS = network iconv ++ TEMPLATE_VBoxBldProg_LIBS = network + TEMPLATE_VBoxBldProg_LIBPATH += \ + /boot/common/lib - else if1of ($(KBUILD_HOST), freebsd openbsd) -+ else ifeq ($(KBUILD_HOST),freebsd) - TEMPLATE_VBoxBldProg_TOOL = GXX3 - TEMPLATE_VBoxBldProg_LIBS = pthread - TEMPLATE_VBoxBldProg_INCS += \ -+ /usr/local/include -+TEMPLATE_VBoxBldProg_LIBPATH += \ -+ /usr/local/lib -+ else ifeq ($(KBUILD_HOST),openbsd) -+TEMPLATE_VBoxBldProg_TOOL = GXX3 -+TEMPLATE_VBoxBldProg_LIBS = pthread -+TEMPLATE_VBoxBldProg_INCS += \ - /usr/include \ - /usr/X11R6/include \ - /usr/local/include -@@ -7115,6 +7139,7 @@ else # the gcc guys - # Do not inherit sanitizer flags from VBOXR3EXE in guest executables. Deal with them separately. - TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS.debug = $(NO_SUCH_VARIABLE) - TEMPLATE_VBOXGUESTR3EXE_CFLAGS.debug = $(NO_SUCH_VARIABLE) -+ TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.freebsd = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.freebsd)) - TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux)) - TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.debug = $(NO_SUCH_VARIABLE) - TEMPLATE_VBOXGUESTR3EXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS)) -@@ -7138,6 +7163,7 @@ TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS.linux = \ ++ else ifeq ($(KBUILD_HOST), freebsd) + TEMPLATE_VBoxBldProg_TOOL = $(VBOX_GCC_TOOL) + TEMPLATE_VBoxBldProg_LIBS = pthread + TEMPLATE_VBoxBldProg_INCS += \ ++ /usr/local/include ++ TEMPLATE_VBoxBldProg_LIBPATH += \ ++ /usr/local/lib ++ else ifeq ($(KBUILD_HOST), openbsd) ++ TEMPLATE_VBoxBldProg_TOOL = $(VBOX_GCC_TOOL) ++ TEMPLATE_VBoxBldProg_LIBS = pthread ++ TEMPLATE_VBoxBldProg_INCS += \ + /usr/include \ + /usr/X11R6/include \ + /usr/local/include +@@ -8324,11 +8336,11 @@ + $(TEMPLATE_VBoxBldProg_LIBS) + TEMPLATE_VBoxAdvBldProg_LIBS.darwin = \ + $(TEMPLATE_VBoxAdvBldProg_LIBS) \ +- iconv \ ++ \ + $(TEMPLATE_VBoxBldProg_LIBS.darwin) + TEMPLATE_VBoxAdvBldProg_LIBS.freebsd = \ + $(TEMPLATE_VBoxAdvBldProg_LIBS) \ +- iconv \ ++ \ + rt \ + $(TEMPLATE_VBoxBldProg_LIBS.freebsd) + TEMPLATE_VBoxAdvBldProg_LIBS.linux = \ +@@ -8419,6 +8431,7 @@ + # Do not inherit sanitizer flags from VBoxR3Exe in guest executables. Deal with them separately. + TEMPLATE_VBoxGuestR3ExeBase_CXXFLAGS.debug = $(NO_SUCH_VARIABLE) + TEMPLATE_VBoxGuestR3ExeBase_CFLAGS.debug = $(NO_SUCH_VARIABLE) ++ TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.freebsd = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LDFLAGS.freebsd)) + TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LDFLAGS.linux)) + TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.debug = $(NO_SUCH_VARIABLE) + TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LDFLAGS)) +@@ -8442,7 +8455,7 @@ + ifeq ($(KBUILD_TARGET),linux) # As few libs as possible on linux. + TEMPLATE_VBoxGuestR3ExeBase_LIBS = pthread rt m dl + else if1of ($(KBUILD_TARGET), darwin freebsd openbsd) +- TEMPLATE_VBoxGuestR3ExeBase_LIBS = $(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LIBS) iconv ++ TEMPLATE_VBoxGuestR3ExeBase_LIBS = $(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LIBS) + else ifeq ($(KBUILD_TARGET),solaris) + TEMPLATE_VBoxGuestR3ExeBase_LIBS = $(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LIBS) nsl + endif +@@ -8455,6 +8468,7 @@ $(VBOX_GCC_fno-stack-protector) - TEMPLATE_VBOXGUESTR3EXE_CFLAGS.linux = $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS.linux) + TEMPLATE_VBoxGuestR3ExeBase_CFLAGS.linux = $(TEMPLATE_VBoxGuestR3ExeBase_CXXFLAGS.linux) # The GNU_HASH ELF tag is not supported by older systems. -+TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.freebsd += $(VBOX_LD_hash_style_sysv) - TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux += $(VBOX_LD_hash_style_sysv) ++TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.freebsd += $(VBOX_LD_hash_style_sysv) + TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.linux += $(VBOX_LD_hash_style_sysv) - # -@@ -7345,6 +7371,7 @@ TEMPLATE_VBOXGUESTR3XF86MOD_LIBS.$(KBUILD_TYPE) = - TEMPLATE_VBOXGUESTR3XF86MOD_LIBS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE) - TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE) + +@@ -8684,6 +8698,7 @@ + TEMPLATE_VBoxGuestR3XFree86Mod_CXXFLAGS.linux = $(VBOX_GCC_fno-stack-protector) # Remove symvers.h + TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE) # The GNU_HASH ELF tag is not supported by older glibc dynamic linkers. -+TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.freebsd = $(subst -Wl$(COMMA),,$(VBOX_LD_hash_style_sysv)) - TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.linux = $(subst -Wl$(COMMA),,$(VBOX_LD_hash_style_sysv)) - TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE) - TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS = -r ++TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS.freebsd = $(subst -Wl$(COMMA),,$(VBOX_LD_hash_style_sysv)) + TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS.linux = $(subst -Wl$(COMMA),,$(VBOX_LD_hash_style_sysv)) + TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE) + TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS := -r +@@ -8725,7 +8740,7 @@ + TEMPLATE_VBoxGuestR3XOrgMod_LIBS = $(VBOX_LIB_VBGL_R3_XORG) + TEMPLATE_VBoxGuestR3XOrgMod_LIBS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE) + TEMPLATE_VBoxGuestR3XOrgMod_LIBS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE) +-TEMPLATE_VBoxGuestR3XOrgMod_LIBS.freebsd += iconv ++TEMPLATE_VBoxGuestR3XOrgMod_LIBS.freebsd += + + + # diff --git a/emulators/virtualbox-ose-70/files/patch-configure b/emulators/virtualbox-ose-70/files/patch-configure index 25015e642bc1..fe0f4247089b 100644 --- a/emulators/virtualbox-ose-70/files/patch-configure +++ b/emulators/virtualbox-ose-70/files/patch-configure @@ -1,126 +1,117 @@ ---- configure.orig 2021-10-18 17:47:25 UTC -+++ configure -@@ -139,10 +139,14 @@ CXX_FLAGS="" +--- configure.orig 2024-10-10 20:19:24.000000000 +0200 ++++ configure 2024-12-27 13:12:46.010746000 +0100 +@@ -154,10 +154,14 @@ if [ "$OS" = "freebsd" ]; then INCCURL="-I/usr/local/include" LIBCURL="-L/usr/local/lib -lcurl" + INCALSA="-I/usr/local/include" + LIBALSA="-L/usr/local/lib" INCPULSE="-I/usr/local/include" LIBPULSE="-L/usr/local/lib" INCPNG="-I/usr/local/include" LIBPNG="-L/usr/local/lib -lpng" + INCVNCSERVER="-I/usr/local/include" + LIBVNCSERVER="-L/usr/local/lib" else INCCURL="" LIBCURL="-lcurl" -@@ -1173,6 +1177,9 @@ extern "C" int main(int argc, char** arg +@@ -1207,6 +1211,9 @@ printf("found version %d.%d.%d", SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL); #if SDL_VERSION_ATLEAST(1,2,7) +#if !defined(SDL_VIDEO_DRIVER_X11) +#error SDL must be compiled with X11 support +#endif printf(", OK.\n"); return 0; #else -@@ -1257,7 +1264,7 @@ extern "C" int main(void) +@@ -1291,7 +1298,7 @@ #endif } EOF - if test_compile "-lasound" asound asound; then + if test_compile "$INCALSA $LIBALSA -lasound" asound asound; then test_execute fi } -@@ -1564,6 +1571,7 @@ EOF +@@ -1605,6 +1612,7 @@ 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" + FLGQT5="$FLGQT5 -std=c++11" INCQT5=`strip_I "$FLGQT5"` LIBDIR5=`pkg-config Qt5Core --variable=libdir` LIBQT5=`pkg-config Qt5Core Qt5Gui --libs` -@@ -1702,7 +1710,7 @@ check_libopus() - fi - cat > $ODIR.tmp_src.cc << EOF - #include --#include -+#include - extern "C" int main(void) - { - OpusEncoder *test; -@@ -2034,8 +2042,8 @@ EOF +@@ -2180,8 +2188,8 @@ echo "compiling the following source file:" >> $LOG cat $ODIR.tmp_src.cc >> $LOG echo "using the following command line:" >> $LOG - echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so" >> $LOG - $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so >> $LOG 2>&1 + echo "$CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so -pthread" >> $LOG + $CXX -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.cc -I$p/include/$d $p/$b/lib$d.so -pthread >> $LOG 2>&1 if [ $? -eq 0 ]; then found=1 break -@@ -2151,7 +2159,7 @@ check_gsoap() +@@ -2297,7 +2305,7 @@ else cnf_append "VBOX_GSOAP_CXX_SOURCES" "" fi - cnf_append "VBOX_GSOAP_CXX_LIBS" "`strip_l "$GSOAP_CXX_LIBS"`" + cnf_append "VBOX_GSOAP_CXX_LIBS" "`strip_l "$GSOAP_CXX_LIBS"` z" gsoap_version=`pkg-config gsoapssl++ --modversion` log_success "found version $gsoap_version" return -@@ -2519,7 +2527,7 @@ for option in "$@"; do +@@ -2661,7 +2669,7 @@ --with-openssl-dir=*) OPENSSLDIR=`echo $option | cut -d'=' -f2` INCCRYPTO="-I${OPENSSLDIR}/include" - LIBCRYPTO="${OPENSSLDIR}/lib/libssl.a ${OPENSSLDIR}/lib/libcrypto.a" + LIBCRYPTO="-L${OPENSSLDIR}/lib -lssl -lcrypto" + # 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. - [ "$OS" = "linux" ] && LIBCRYPTO="-ldl $LIBPTHREAD -lm" - ;; -@@ -2865,12 +2873,22 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then +@@ -3028,12 +3036,22 @@ [ $WITH_JAVA -eq 1 ] && check_java # PulseAudio - if [ $WITH_PULSE -eq 1 ]; then - check_pulse - elif [ $WITH_PULSE -eq 0 ]; then # Force disabling PulseAudio. - cnf_append "VBOX_WITH_AUDIO_PULSE" "" - elif [ $WITH_PULSE -eq 2 ]; then # --enable-pulse was passed, force PulseAudio. - cnf_append "VBOX_WITH_AUDIO_PULSE" "1" + if [ "$OS" = "linux" -o "$OS" = "freebsd" -o "$OS" = "netbsd" ]; then + if [ $WITH_ALSA -eq 1 ]; then + check_alsa + else + cnf_append "VBOX_WITH_AUDIO_ALSA" "" + fi + if [ $WITH_PULSE -eq 1 ]; then + check_pulse + elif [ $WITH_PULSE -eq 0 ]; then # Force disabling PulseAudio. + cnf_append "VBOX_WITH_AUDIO_PULSE" "" + elif [ $WITH_PULSE -eq 2 ]; then # --enable-pulse was passed, force PulseAudio. + cnf_append "VBOX_WITH_AUDIO_PULSE" "1" + fi + if [ $WITH_DBUS -eq 0 ]; then + cnf_append "VBOX_WITH_DBUS" "" + fi fi fi -@@ -2886,14 +2904,6 @@ if [ "$OS" = "linux" ]; then +@@ -3049,14 +3067,6 @@ cnf_append "VBOX_WITHOUT_LINUX_TEST_BUILDS" "1" fi if [ $ONLY_ADDITIONS -eq 0 ]; then - if [ $WITH_ALSA -eq 1 ]; then - check_alsa - else - cnf_append "VBOX_WITH_AUDIO_ALSA" "" - fi - if [ $WITH_DBUS -eq 0 ]; then - cnf_append "VBOX_WITH_DBUS" "" - fi if [ $WITH_DEVMAPPER -eq 1 ]; then check_libdevmapper else diff --git a/emulators/virtualbox-ose-70/files/patch-include_VBox_sup.h b/emulators/virtualbox-ose-70/files/patch-include_VBox_sup.h new file mode 100644 index 000000000000..9cf3fabe63f1 --- /dev/null +++ b/emulators/virtualbox-ose-70/files/patch-include_VBox_sup.h @@ -0,0 +1,11 @@ +--- include/VBox/sup.h.orig 2024-12-27 04:08:45.986426000 +0100 ++++ include/VBox/sup.h 2024-12-27 04:09:08.925387000 +0100 +@@ -2248,7 +2248,7 @@ + + SUPR0DECL(void) SUPR0BadContext(PSUPDRVSESSION pSession, const char *pszFile, uint32_t uLine, const char *pszExpr); + +-#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) ++#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) + /** + * Translates a physical address to a virtual mapping (valid up to end of page). + * @returns VBox status code. diff --git a/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c b/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c index 8fd24bda91f1..e790f372f95f 100644 --- a/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c +++ b/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c @@ -1,290 +1,284 @@ ---- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2022-03-22 23:37:46 UTC -+++ src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c -@@ -45,6 +45,7 @@ +--- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2022-10-06 19:03:06.000000000 +0200 ++++ src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c 2024-12-26 15:28:38.066230000 +0100 +@@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include -@@ -61,6 +62,7 @@ +@@ -71,6 +72,7 @@ #include #include #include +#include #include #include #include -@@ -102,8 +104,6 @@ struct VBoxGuestDeviceState +@@ -112,8 +114,6 @@ struct resource *pIrqRes; /** Pointer to the IRQ handler. */ void *pfnIrqHandler; - /** VMMDev version */ - uint32_t u32Version; }; -@@ -113,8 +113,7 @@ struct VBoxGuestDeviceState +@@ -123,8 +123,7 @@ /* * Character device file handlers. */ -static d_fdopen_t vgdrvFreeBSDOpen; -static d_close_t vgdrvFreeBSDClose; +static d_open_t vgdrvFreeBSDOpen; static d_ioctl_t vgdrvFreeBSDIOCtl; static int vgdrvFreeBSDIOCtlSlow(PVBOXGUESTSESSION pSession, u_long ulCmd, caddr_t pvData, struct thread *pTd); static d_write_t vgdrvFreeBSDWrite; -@@ -145,8 +144,7 @@ static struct cdevsw g_vgdrvFreeBSDChrDevSW = +@@ -155,8 +154,7 @@ { .d_version = D_VERSION, .d_flags = D_TRACKCLOSE | D_NEEDMINOR, - .d_fdopen = vgdrvFreeBSDOpen, - .d_close = vgdrvFreeBSDClose, + .d_open = vgdrvFreeBSDOpen, .d_ioctl = vgdrvFreeBSDIOCtl, .d_read = vgdrvFreeBSDRead, .d_write = vgdrvFreeBSDWrite, -@@ -154,81 +152,28 @@ static struct cdevsw g_vgdrvFreeBSDChrDevSW = +@@ -164,81 +162,28 @@ .d_name = "vboxguest" }; +/** Device structure. */ +static struct cdev *g_pDev; + /** Device extention & session data association structure. */ static VBOXGUESTDEVEXT g_DevExt; -/** List of cloned device. Managed by the kernel. */ -static struct clonedevs *g_pvgdrvFreeBSDClones; -/** The dev_clone event handler tag. */ -static eventhandler_tag g_vgdrvFreeBSDEHTag; /** Reference counter */ static volatile uint32_t cUsers; /** selinfo structure used for polling. */ static struct selinfo g_SelInfo; -/** - * DEVFS event handler. - */ -static void vgdrvFreeBSDClone(void *pvArg, struct ucred *pCred, char *pszName, int cchName, struct cdev **ppDev) +static void vgdrvFreeBSDDtr(void *pSession) { - int iUnit; - int rc; - - Log(("vgdrvFreeBSDClone: pszName=%s ppDev=%p\n", pszName, ppDev)); - - /* - * One device node per user, si_drv1 points to the session. - * /dev/vboxguest where N = {0...255}. - */ - if (!ppDev) - return; - if (strcmp(pszName, "vboxguest") == 0) - iUnit = -1; - else if (dev_stdclone(pszName, NULL, "vboxguest", &iUnit) != 1) - return; - if (iUnit >= 256) - { - Log(("vgdrvFreeBSDClone: iUnit=%d >= 256 - rejected\n", iUnit)); - return; - } - - Log(("vgdrvFreeBSDClone: pszName=%s iUnit=%d\n", pszName, iUnit)); - - rc = clone_create(&g_pvgdrvFreeBSDClones, &g_vgdrvFreeBSDChrDevSW, &iUnit, ppDev, 0); - Log(("vgdrvFreeBSDClone: clone_create -> %d; iUnit=%d\n", rc, iUnit)); - if (rc) - { - *ppDev = make_dev(&g_vgdrvFreeBSDChrDevSW, - iUnit, - UID_ROOT, - GID_WHEEL, - 0664, - "vboxguest%d", iUnit); - if (*ppDev) - { - dev_ref(*ppDev); - (*ppDev)->si_flags |= SI_CHEAPCLONE; - Log(("vgdrvFreeBSDClone: Created *ppDev=%p iUnit=%d si_drv1=%p si_drv2=%p\n", - *ppDev, iUnit, (*ppDev)->si_drv1, (*ppDev)->si_drv2)); - (*ppDev)->si_drv1 = (*ppDev)->si_drv2 = NULL; - } - else - Log(("vgdrvFreeBSDClone: make_dev iUnit=%d failed\n", iUnit)); - } - else - Log(("vgdrvFreeBSDClone: Existing *ppDev=%p iUnit=%d si_drv1=%p si_drv2=%p\n", - *ppDev, iUnit, (*ppDev)->si_drv1, (*ppDev)->si_drv2)); + VGDrvCommonCloseSession(&g_DevExt, pSession); + ASMAtomicDecU32(&cUsers); } /** * File open handler * */ -#if __FreeBSD_version >= 700000 -static int vgdrvFreeBSDOpen(struct cdev *pDev, int fOpen, struct thread *pTd, struct file *pFd) -#else -static int vgdrvFreeBSDOpen(struct cdev *pDev, int fOpen, struct thread *pTd) -#endif +static int vgdrvFreeBSDOpen(struct cdev *pDev, int fOpen, int DevType, struct thread *pTd) { int rc; PVBOXGUESTSESSION pSession; -@@ -240,12 +185,6 @@ static int vgdrvFreeBSDOpen(struct cdev *pDev, int fOp +@@ -250,12 +195,6 @@ LogFlow(("vgdrvFreeBSDOpen:\n")); /* - * Try grab it (we don't grab the giant, remember). - */ - if (!ASMAtomicCmpXchgPtr(&pDev->si_drv1, (void *)0x42, NULL)) - return EBUSY; - - /* * Create a new session. */ fRequestor = VMMDEV_REQUESTOR_USERMODE | VMMDEV_REQUESTOR_TRUST_NOT_GIVEN; -@@ -262,14 +201,13 @@ static int vgdrvFreeBSDOpen(struct cdev *pDev, int fOp +@@ -272,47 +211,20 @@ rc = VGDrvCommonCreateUserSession(&g_DevExt, fRequestor, &pSession); if (RT_SUCCESS(rc)) { - if (ASMAtomicCmpXchgPtr(&pDev->si_drv1, pSession, (void *)0x42)) - { - Log(("vgdrvFreeBSDOpen: success - g_DevExt=%p pSession=%p rc=%d pid=%d\n", &g_DevExt, pSession, rc, (int)RTProcSelf())); + Log(("vgdrvFreeBSDOpen: success - g_DevExt=%p pSession=%p rc=%d pid=%d\n", &g_DevExt, pSession, rc, (int)RTProcSelf())); + rc = devfs_set_cdevpriv(pSession, vgdrvFreeBSDDtr); + if (rc) + VGDrvCommonCloseSession(&g_DevExt, pSession); + else ASMAtomicIncU32(&cUsers); - return 0; - } - - VGDrvCommonCloseSession(&g_DevExt, pSession); + return rc; } LogRel(("vgdrvFreeBSDOpen: failed. rc=%d\n", rc)); -@@ -277,33 +215,6 @@ static int vgdrvFreeBSDOpen(struct cdev *pDev, int fOp + return RTErrConvertToErrno(rc); } - /** +-/** - * File close handler - * - */ -static int vgdrvFreeBSDClose(struct cdev *pDev, int fFile, int DevType, struct thread *pTd) -{ - PVBOXGUESTSESSION pSession = (PVBOXGUESTSESSION)pDev->si_drv1; - Log(("vgdrvFreeBSDClose: fFile=%#x pSession=%p\n", fFile, pSession)); -- + - /* - * Close the session if it's still hanging on to the device... - */ -- if (VALID_PTR(pSession)) +- if (RT_VALID_PTR(pSession)) - { - VGDrvCommonCloseSession(&g_DevExt, pSession); - if (!ASMAtomicCmpXchgPtr(&pDev->si_drv1, NULL, pSession)) - Log(("vgdrvFreeBSDClose: si_drv1=%p expected %p!\n", pDev->si_drv1, pSession)); - ASMAtomicDecU32(&cUsers); - /* Don't use destroy_dev here because it may sleep resulting in a hanging user process. */ - destroy_dev_sched(pDev); - } - else - Log(("vgdrvFreeBSDClose: si_drv1=%p!\n", pSession)); - return 0; -} - - --/** + /** * I/O control request. * - * @returns depends... -@@ -316,8 +227,12 @@ static int vgdrvFreeBSDIOCtl(struct cdev *pDev, u_long +@@ -326,8 +238,12 @@ static int vgdrvFreeBSDIOCtl(struct cdev *pDev, u_long ulCmd, caddr_t pvData, int fFile, struct thread *pTd) { PVBOXGUESTSESSION pSession; - devfs_get_cdevpriv((void **)&pSession); + int rc; + rc = devfs_get_cdevpriv((void **)&pSession); + if (rc) + return rc; + /* * Deal with the fast ioctl path first. */ -@@ -512,12 +427,14 @@ static int vgdrvFreeBSDPoll(struct cdev *pDev, int fEv - - static int vgdrvFreeBSDPoll(struct cdev *pDev, int fEvents, struct thread *td) - { -- int fEventsProcessed; -+ PVBOXGUESTSESSION pSession; -+ int fEventsProcessed, rc; +@@ -526,8 +442,10 @@ LogFlow(("vgdrvFreeBSDPoll: fEvents=%d\n", fEvents)); - PVBOXGUESTSESSION pSession = (PVBOXGUESTSESSION)pDev->si_drv1; -- if (RT_UNLIKELY(!VALID_PTR(pSession))) { +- if (RT_UNLIKELY(!RT_VALID_PTR(pSession))) { ++ + rc = devfs_get_cdevpriv((void **)&pSession); + if (rc) -+ { ++ { Log(("vgdrvFreeBSDPoll: no state data for %s\n", devtoname(pDev))); return (fEvents & (POLLHUP|POLLIN|POLLRDNORM|POLLOUT|POLLWRNORM)); } -@@ -558,11 +475,8 @@ static int vgdrvFreeBSDDetach(device_t pDevice) +@@ -568,11 +486,8 @@ /* * Reverse what we did in vgdrvFreeBSDAttach. */ - if (g_vgdrvFreeBSDEHTag != NULL) - EVENTHANDLER_DEREGISTER(dev_clone, g_vgdrvFreeBSDEHTag); + destroy_dev(g_pDev); - clone_cleanup(&g_pvgdrvFreeBSDClones); - vgdrvFreeBSDRemoveIRQ(pDevice, pState); if (pState->pVMMDevMemRes) -@@ -727,18 +641,21 @@ static int vgdrvFreeBSDAttach(device_t pDevice) +@@ -737,18 +652,21 @@ VGDrvCommonProcessOptionsFromHost(&g_DevExt); /* - * Configure device cloning. + * Configure device. */ - clone_setup(&g_pvgdrvFreeBSDClones); - g_vgdrvFreeBSDEHTag = EVENTHANDLER_REGISTER(dev_clone, vgdrvFreeBSDClone, 0, 1000); - if (g_vgdrvFreeBSDEHTag) + g_pDev = make_dev(&g_vgdrvFreeBSDChrDevSW, + 0, + UID_ROOT, + GID_WHEEL, + 0664, + "vboxguest"); + if (g_pDev) { printf(DEVICE_NAME ": loaded successfully\n"); return 0; } - printf(DEVICE_NAME ": EVENTHANDLER_REGISTER(dev_clone,,,) failed\n"); - clone_cleanup(&g_pvgdrvFreeBSDClones); + printf(DEVICE_NAME ": make_dev failed\n"); vgdrvFreeBSDRemoveIRQ(pDevice, pState); } else -@@ -782,8 +699,12 @@ static driver_t vgdrvFreeBSDDriver = +@@ -792,8 +710,12 @@ sizeof(struct VBoxGuestDeviceState), }; +#if __FreeBSD_version >= 1400058 +DRIVER_MODULE(vboxguest, pci, vgdrvFreeBSDDriver, 0, 0); +#else static devclass_t vgdrvFreeBSDClass; DRIVER_MODULE(vboxguest, pci, vgdrvFreeBSDDriver, vgdrvFreeBSDClass, 0, 0); +#endif MODULE_VERSION(vboxguest, 1); diff --git a/emulators/virtualbox-ose-70/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-files_vboxnetflt b/emulators/virtualbox-ose-70/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-files_vboxnetflt index eb3b623f7299..dc4e779fb6b0 100644 --- a/emulators/virtualbox-ose-70/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-files_vboxnetflt +++ b/emulators/virtualbox-ose-70/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-files_vboxnetflt @@ -1,10 +1,10 @@ ---- src/VBox/HostDrivers/VBoxNetFlt/freebsd/files_vboxnetflt.orig 2021-01-07 15:41:28 UTC -+++ src/VBox/HostDrivers/VBoxNetFlt/freebsd/files_vboxnetflt -@@ -62,6 +62,7 @@ VBOX_VBOXNETFLT_SOURCES=" \ +--- src/VBox/HostDrivers/VBoxNetFlt/freebsd/files_vboxnetflt.orig 2022-10-06 19:11:15.000000000 +0200 ++++ src/VBox/HostDrivers/VBoxNetFlt/freebsd/files_vboxnetflt 2024-12-26 15:41:50.870345000 +0100 +@@ -72,6 +72,7 @@ ${PATH_ROOT}/include/iprt/uni.h=>include/iprt/uni.h \ ${PATH_ROOT}/include/iprt/utf16.h=>include/iprt/utf16.h \ ${PATH_ROOT}/include/iprt/uuid.h=>include/iprt/uuid.h \ + ${PATH_ROOT}/include/iprt/x86.h=>include/iprt/x86.h \ + ${PATH_ROOT}/include/iprt/x86-helpers.h=>include/iprt/x86-helpers.h \ ${PATH_ROOT}/include/iprt/nocrt/limits.h=>include/iprt/nocrt/limits.h \ ${PATH_ROOT}/include/VBox/cdefs.h=>include/VBox/cdefs.h \ - ${PATH_ROOT}/include/VBox/err.h=>include/VBox/err.h \ diff --git a/emulators/virtualbox-ose-70/files/patch-src-VBox-Installer-freebsd-virtualbox.desktop b/emulators/virtualbox-ose-70/files/patch-src-VBox-Installer-freebsd-virtualbox.desktop deleted file mode 100644 index ae2253daf847..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src-VBox-Installer-freebsd-virtualbox.desktop +++ /dev/null @@ -1,10 +0,0 @@ ---- src/VBox/Installer/freebsd/virtualbox.desktop.orig 2020-05-13 19:44:01 UTC -+++ src/VBox/Installer/freebsd/virtualbox.desktop -@@ -7,7 +7,6 @@ GenericName=Virtual Machine - Type=Application - Exec=VirtualBox - TryExec=VirtualBox --DocPath=file://$VBOX_DOC_PATH/UserManual.pdf - Icon=VBox - Categories=Emulator;System; - Comment=Run several virtual systems on a single host computer diff --git a/emulators/virtualbox-ose-70/files/patch-src-VBox-Main-webservice-Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src-VBox-Main-webservice-Makefile.kmk deleted file mode 100644 index 6725f67e1923..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src-VBox-Main-webservice-Makefile.kmk +++ /dev/null @@ -1,39 +0,0 @@ ---- src/VBox/Main/webservice/Makefile.kmk.orig 2021-01-07 15:41:45 UTC -+++ src/VBox/Main/webservice/Makefile.kmk -@@ -158,7 +158,6 @@ VBOX_PATH_IDL := $(abspath $(PATH_SUB_ - RECOMPILE_ON_MAKEFILE_CURRENT := $(MAKEFILE_CURRENT) - - PATH_TARGET_SOAPDEMOXML := $(VBOXWEB_OUT_DIR)/demo_soapxml --PATH_TARGET_SOAPDEMOHEADERS := $(VBOXWEB_OUT_DIR)/demo_headers - PATH_TARGET_SOAPDEMONSMAPS := $(VBOXWEB_OUT_DIR)/demo_namespacemaps - PATH_TARGET_WEBTEST := $(VBOXWEB_OUT_DIR)/webtest - -@@ -565,8 +564,6 @@ $$(VBOX_JWSSRC_JAR): $$(VBOX_JWS_JAR) | $$(dir $$@) - $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts \ - $(wildcard $(PATH_TARGET_SOAPDEMOXML)/*) \ - $(PATH_TARGET_SOAPDEMOXML)/dummy_file \ -- $(wildcard $(PATH_TARGET_SOAPDEMOHEADERS)/*) \ -- $(PATH_TARGET_SOAPDEMOHEADERS)/dummy_file \ - $(wildcard $(PATH_TARGET_SOAPDEMONSMAPS)/*) \ - $(PATH_TARGET_SOAPDEMONSMAPS)/dummy_file - -@@ -786,17 +783,14 @@ endif - # any more. Ignoring the exit code is the simple solution, accepting the error. - $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts: $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts | $$(dir $$@) - $(RM) -f $@ -- $(MKDIR) -p $(PATH_TARGET_SOAPDEMOXML) $(PATH_TARGET_SOAPDEMOHEADERS) $(PATH_TARGET_SOAPDEMONSMAPS) -+ $(MKDIR) -p $(PATH_TARGET_SOAPDEMOXML) $(PATH_TARGET_SOAPDEMONSMAPS) - ifdef VBOX_GSOAP_VERBOSE - $(MV_EXT) -f -- $(VBOXWEB_OUT_DIR)/*.req.xml $(VBOXWEB_OUT_DIR)/*.res.xml $(PATH_TARGET_SOAPDEMOXML)/ - endif -- -$(MV_EXT) -f -- $(VBOXWEB_OUT_DIR)/soapvbox*.h $(PATH_TARGET_SOAPDEMOHEADERS)/ - $(MV_EXT) -f -- $(VBOXWEB_OUT_DIR)/vboxBinding.nsmap $(PATH_TARGET_SOAPDEMONSMAPS)/ - $(APPEND) $@ done - --$(PATH_TARGET_SOAPDEMONSMAPS) \ --$(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingProxy.h \ --$(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingObject.h: $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts -+$(PATH_TARGET_SOAPDEMONSMAPS): $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts - - # soapcpp2 -2: generate SOAP 1.2 calls - # soapcpp2 -S: server-side code only diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_Makefile.kmk deleted file mode 100644 index 9494bd970456..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_Makefile.kmk +++ /dev/null @@ -1,50 +0,0 @@ ---- src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk.orig 2021-01-07 15:34:22 UTC -+++ src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk -@@ -33,32 +33,37 @@ vboxvfs_INCS = \ - $(vboxvfs_0_OUTDIR) - vboxvfs_SOURCES = \ - vboxvfs_vfsops.c \ -- vboxvfs_vnops.c -+ bcmp.c \ -+ vboxvfs_vnops.c \ -+ vboxvfs_prov.c - vboxvfs_LIBS = \ - $(VBOX_LIB_VBGL_R0) \ - $(VBOX_LIB_IPRT_GUEST_R0) - vboxvfs_DEPS = \ -- $$(vboxvfs_0_OUTDIR)/vnode_if.h \ -- $$(vboxvfs_0_OUTDIR)/vnode_if_newproto.h \ -- $$(vboxvfs_0_OUTDIR)/vnode_if_typedef.h -+ $(vboxvfs_0_OUTDIR)/vnode_if.h \ -+ $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h \ -+ $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h - vboxvfs_CLEAN += $(vboxvfs_DEPS) - - VBOX_AWK := /usr/bin/awk - --$$(vboxvfs_0_OUTDIR)/vnode_if.h: $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -+$$(vboxvfs_0_OUTDIR): -+ $(QUIET)$(MKDIR) -p $(vboxvfs_0_OUTDIR) -+ -+$$(vboxvfs_0_OUTDIR)/vnode_if.h: $$(vboxvfs_0_OUTDIR) $(VBOX_FREEBSD_SRC)/kern/vnode_if.src - $(call MSG_TOOL,awk,VBoxGuest,$<,$@) - $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/vnode_if.awk $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -h -- $(QUIET)$(MV) $(vboxvfs_0_OUTDIR)/vnode_if.h $(vboxvfs_0_OUTDIR)/vnode_if.h -+ $(QUIET)$(MV) vnode_if.h $(vboxvfs_0_OUTDIR)/vnode_if.h - --$$(vboxvfs_0_OUTDIR)/vnode_if_newproto.h: $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -+$$(vboxvfs_0_OUTDIR)/vnode_if_newproto.h: $$(vboxvfs_0_OUTDIR) $(VBOX_FREEBSD_SRC)/kern/vnode_if.src - $(call MSG_TOOL,awk,VBoxGuest,$<,$@) - $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/vnode_if.awk $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -p -- $(QUIET)$(MV) $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h -+ $(QUIET)$(MV) vnode_if_newproto.h $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h - --$$(vboxvfs_0_OUTDIR)/vnode_if_typedef.h: $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -+$$(vboxvfs_0_OUTDIR)/vnode_if_typedef.h: $$(vboxvfs_0_OUTDIR) $(VBOX_FREEBSD_SRC)/kern/vnode_if.src - $(call MSG_TOOL,awk,VBoxGuest,$<,$@) - $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/vnode_if.awk $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -q -- $(QUIET)$(MV) $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h -+ $(QUIET)$(MV) vnode_if_typedef.h $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h - - include $(FILE_KBUILD_SUB_FOOTER) - diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_VBoxClient_logging.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_VBoxClient_logging.cpp deleted file mode 100644 index ad756a686569..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_VBoxClient_logging.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- src/VBox/Additions/x11/VBoxClient/logging.cpp.orig 2021-01-07 15:34:30 UTC -+++ src/VBox/Additions/x11/VBoxClient/logging.cpp -@@ -17,6 +17,7 @@ - - - #include -+#include - #include - #include - #include diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxvideo_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxvideo_Makefile.kmk deleted file mode 100644 index 398c835b4b43..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxvideo_Makefile.kmk +++ /dev/null @@ -1,15 +0,0 @@ ---- src/VBox/Additions/x11/vboxvideo/Makefile.kmk.orig 2019-01-25 18:24:30 UTC -+++ src/VBox/Additions/x11/vboxvideo/Makefile.kmk -@@ -406,9 +406,10 @@ ifdef VBOX_USE_SYSTEM_XORG_HEADERS - vboxvideo_drv_system_INCS += \ - $(PATH_ROOT)/src/VBox/Runtime/include \ - $(VBOX_GRAPHICS_INCS) \ -- /usr/include/xorg \ -- /usr/include/pixman-1 -+ /usr/local/include/xorg \ -+ /usr/local/include/pixman-1 - vboxvideo_drv_system_SOURCES := $(vboxvideo_drv_17_SOURCES) -+ vboxvideo_drv_system_LIBS += $(vboxvideo_drv_70_LIBS) - endif - - diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_x11include_xproto-7.0.18_X11_Xfuncproto.h b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_x11include_xproto-7.0.18_X11_Xfuncproto.h deleted file mode 100644 index ee9a615ab5c8..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_x11include_xproto-7.0.18_X11_Xfuncproto.h +++ /dev/null @@ -1,230 +0,0 @@ ---- src/VBox/Additions/x11/x11include/xproto-7.0.18/X11/Xfuncproto.h.orig 2021-01-07 15:37:10 UTC -+++ src/VBox/Additions/x11/x11include/xproto-7.0.18/X11/Xfuncproto.h -@@ -48,6 +48,227 @@ in this Software without prior written authorization f - #endif /* _Xconst */ - - /* Function prototype configuration (see configure for more info) */ -+#if !defined(NARROWPROTO) && \ -+ (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) -+#define NARROWPROTO -+#endif -+#ifndef FUNCPROTO -+#define FUNCPROTO 15 -+#endif -+ -+#ifndef NeedWidePrototypes -+#ifdef NARROWPROTO -+#define NeedWidePrototypes 0 -+#else -+#define NeedWidePrototypes 1 /* default to make interropt. easier */ -+#endif -+#endif /* NeedWidePrototypes */ -+ -+#endif /* NeedFunctionPrototypes */ -+ -+#ifndef _XFUNCPROTOBEGIN -+#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */ -+#define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */ -+#define _XFUNCPROTOEND } -+#else -+#define _XFUNCPROTOBEGIN -+#define _XFUNCPROTOEND -+#endif -+#endif /* _XFUNCPROTOBEGIN */ -+ -+/* http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute */ -+#ifndef __has_attribute -+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ -+#endif -+#ifndef __has_feature -+# define __has_feature(x) 0 /* Compatibility with non-clang compilers. */ -+#endif -+#ifndef __has_extension -+# define __has_extension(x) 0 /* Compatibility with non-clang compilers. */ -+#endif -+ -+/* Added in X11R6.9, so available in any version of modular xproto */ -+#if __has_attribute(__sentinel__) || (defined(__GNUC__) && (__GNUC__ >= 4)) -+# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x))) -+#else -+# define _X_SENTINEL(x) -+#endif /* GNUC >= 4 */ -+ -+/* Added in X11R6.9, so available in any version of modular xproto */ -+#if (__has_attribute(visibility) || (defined(__GNUC__) && (__GNUC__ >= 4))) \ -+ && !defined(__CYGWIN__) && !defined(__MINGW32__) -+# define _X_EXPORT __attribute__((visibility("default"))) -+# define _X_HIDDEN __attribute__((visibility("hidden"))) -+# define _X_INTERNAL __attribute__((visibility("internal"))) -+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) -+# define _X_EXPORT __global -+# define _X_HIDDEN __hidden -+# define _X_INTERNAL __hidden -+#else /* not gcc >= 4 and not Sun Studio >= 8 */ -+# define _X_EXPORT -+# define _X_HIDDEN -+# define _X_INTERNAL -+#endif /* GNUC >= 4 */ -+ -+/* Branch prediction hints for individual conditionals */ -+/* requires xproto >= 7.0.9 */ -+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303) -+# define _X_LIKELY(x) __builtin_expect(!!(x), 1) -+# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0) -+#else /* not gcc >= 3.3 */ -+# define _X_LIKELY(x) (x) -+# define _X_UNLIKELY(x) (x) -+#endif -+ -+/* Bulk branch prediction hints via marking error path functions as "cold" */ -+/* requires xproto >= 7.0.25 */ -+#if __has_attribute(__cold__) || \ -+ (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403)) /* 4.3+ */ -+# define _X_COLD __attribute__((__cold__)) -+#else -+# define _X_COLD /* nothing */ -+#endif -+ -+/* Added in X11R6.9, so available in any version of modular xproto */ -+#if __has_attribute(deprecated) \ -+ || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)) \ -+ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5130)) -+# define _X_DEPRECATED __attribute__((deprecated)) -+#else /* not gcc >= 3.1 */ -+# define _X_DEPRECATED -+#endif -+ -+/* requires xproto >= 7.0.30 */ -+#if __has_extension(attribute_deprecated_with_message) || \ -+ (defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)))) -+# define _X_DEPRECATED_MSG(_msg) __attribute__((deprecated(_msg))) -+#else -+# define _X_DEPRECATED_MSG(_msg) _X_DEPRECATED -+#endif -+ -+/* requires xproto >= 7.0.17 */ -+#if __has_attribute(noreturn) \ -+ || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \ -+ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) -+# define _X_NORETURN __attribute((noreturn)) -+#else -+# define _X_NORETURN -+#endif /* GNUC */ -+ -+/* Added in X11R6.9, so available in any version of modular xproto */ -+#if __has_attribute(__format__) \ -+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203) -+# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y))) -+#else /* not gcc >= 2.3 */ -+# define _X_ATTRIBUTE_PRINTF(x,y) -+#endif -+ -+/* requires xproto >= 7.0.22 - since this uses either gcc or C99 variable -+ argument macros, must be only used inside #ifdef _X_NONNULL guards, as -+ many legacy X clients are compiled in C89 mode still. */ -+#if __has_attribute(nonnull) \ -+ && defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ -+#define _X_NONNULL(...) __attribute__((nonnull(__VA_ARGS__))) -+#elif __has_attribute(nonnull) \ -+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303) -+#define _X_NONNULL(args...) __attribute__((nonnull(args))) -+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ -+#define _X_NONNULL(...) /* */ -+#endif -+ -+/* requires xproto >= 7.0.22 */ -+#if __has_attribute(__unused__) \ -+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205) -+#define _X_UNUSED __attribute__((__unused__)) -+#else -+#define _X_UNUSED /* */ -+#endif -+ -+/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */ -+/* requires xproto >= 7.0.9 -+ (introduced in 7.0.8 but didn't support all compilers until 7.0.9) */ -+#if defined(inline) /* assume autoconf set it correctly */ || \ -+ (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \ -+ (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)) -+# define _X_INLINE inline -+#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */ -+# define _X_INLINE __inline__ -+#else -+# define _X_INLINE -+#endif -+ -+/* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */ -+/* requires xproto >= 7.0.21 */ -+#ifndef _X_RESTRICT_KYWD -+# if defined(restrict) /* assume autoconf set it correctly */ || \ -+ (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ \ -+ && !defined(__cplusplus)) /* Workaround g++ issue on Solaris */ -+# define _X_RESTRICT_KYWD restrict -+# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */ -+# define _X_RESTRICT_KYWD __restrict__ -+# else -+# define _X_RESTRICT_KYWD -+# endif -+#endif -+ -+/* requires xproto >= 7.0.30 */ -+#if __has_attribute(no_sanitize_thread) -+# define _X_NOTSAN __attribute__((no_sanitize_thread)) -+#else -+# define _X_NOTSAN -+#endif -+ -+#endif /* _XFUNCPROTO_H_ */ -+/* -+ * -+Copyright 1989, 1991, 1998 The Open Group -+ -+Permission to use, copy, modify, distribute, and sell this software and its -+documentation for any purpose is hereby granted without fee, provided that -+the above copyright notice appear in all copies and that both that -+copyright notice and this permission notice appear in supporting -+documentation. -+ -+The above copyright notice and this permission notice shall be included in -+all copies or substantial portions of the Software. -+ -+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ -+Except as contained in this notice, the name of The Open Group shall not be -+used in advertising or otherwise to promote the sale, use or other dealings -+in this Software without prior written authorization from The Open Group. -+ * -+ */ -+ -+/* Definitions to make function prototypes manageable */ -+ -+#ifndef _XFUNCPROTO_H_ -+#define _XFUNCPROTO_H_ -+ -+#ifndef NeedFunctionPrototypes -+#define NeedFunctionPrototypes 1 -+#endif /* NeedFunctionPrototypes */ -+ -+#ifndef NeedVarargsPrototypes -+#define NeedVarargsPrototypes 1 -+#endif /* NeedVarargsPrototypes */ -+ -+#if NeedFunctionPrototypes -+ -+#ifndef NeedNestedPrototypes -+#define NeedNestedPrototypes 1 -+#endif /* NeedNestedPrototypes */ -+ -+#ifndef _Xconst -+#define _Xconst const -+#endif /* _Xconst */ -+ -+/* Function prototype configuration (see configure for more info) */ - #ifndef NARROWPROTO - #undef NARROWPROTO - #endif diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Debugger_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Debugger_Makefile.kmk deleted file mode 100644 index 11d20783bf83..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Debugger_Makefile.kmk +++ /dev/null @@ -1,10 +0,0 @@ ---- src/VBox/Debugger/Makefile.kmk.orig 2021-01-07 15:37:12 UTC -+++ src/VBox/Debugger/Makefile.kmk -@@ -110,6 +110,7 @@ VBoxDbg_SOURCES = \ - VBoxDbgBase.cpp \ - VBoxDbgConsole.cpp \ - VBoxDbgStatsQt.cpp -+VBoxDbg_CXXFLAGS.freebsd += -std=c++11 - VBoxDbg_LIBS = \ - $(VBOX_LIB_VMM_LAZY) - VBoxDbg_LDFLAGS.darwin = \ diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_Makefile.kmk index 257e61da679d..021d004d5a00 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_Makefile.kmk +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_Makefile.kmk @@ -1,44 +1,44 @@ ---- src/VBox/Devices/Makefile.kmk.orig 2021-01-07 15:39:35 UTC -+++ src/VBox/Devices/Makefile.kmk -@@ -112,6 +112,7 @@ if !defined(VBOX_ONLY_EXTPACKS) +--- src/VBox/Devices/Makefile.kmk.orig 2024-10-10 20:29:17.000000000 +0200 ++++ src/VBox/Devices/Makefile.kmk 2024-12-27 13:26:17.132294000 +0100 +@@ -132,6 +132,7 @@ VBoxDDU_LDFLAGS.darwin += -framework IOKit endif + VBoxDDU_LDFLAGS.freebsd = $(VBOX_GCC_NO_UNDEFINED) VBoxDDU_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED) $(call VBOX_SET_VER_INFO_DLL,VBoxDDU,VirtualBox VMM Devices and Drivers Utilities) -@@ -245,6 +246,7 @@ if !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBU +@@ -286,6 +287,7 @@ -framework SystemConfiguration \ -framework AVFoundation \ -framework Foundation + VBoxDD_LDFLAGS.freebsd = $(VBOX_GCC_NO_UNDEFINED) VBoxDD_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED) # --- Tracing bits. --- -@@ -287,7 +289,7 @@ if !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBU - VBoxDD_SOURCES += Graphics/DevVGA-SVGA.cpp +@@ -331,7 +333,7 @@ + Graphics/DevVGA-SVGA-cmd.cpp endif ifdef VBOX_WITH_VMSVGA3D - if1of ($(KBUILD_TARGET), linux win) -+ if1of ($(KBUILD_TARGET), freebsd linux win) - # Dynamically load 3D library (opengl32, libGL). - # This is a temporary solution. In future the 3D backend will be in a separate library. - VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD = 1 -@@ -329,6 +331,7 @@ VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD = 1 - VBoxDD_SOURCES += \ - Graphics/DevVGA-SVGA3d-glLdr.cpp ++ if1of ($(KBUILD_TARGET), linux win freebsd) + # Dynamically load 3D library (opengl32, libGL). + # This is a temporary solution. In future the 3D backend will be in a separate library. + VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD = 1 +@@ -390,6 +392,7 @@ + Graphics/DevVGA-SVGA3d-glLdr.cpp else -+ VBoxDD_LIBS.freebsd += X11 GL - VBoxDD_LIBS.linux += X11 GL - VBoxDD_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib + VBoxDD_LIBS.linux += X11 GL ++ VBoxDD_LIBS.freebsd += X11 GL + VBoxDD_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib endif -@@ -1526,6 +1529,8 @@ if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_E + VBoxDD_LDFLAGS.darwin += -framework OpenGL +@@ -1701,6 +1704,8 @@ VBoxSVGA3D_INCS = $(VBOX_GRAPHICS_INCS) VBoxSVGA3D_INCS.win := \ Graphics/shaderlib/libWineStub/include + VBoxSVGA3D_INCS.freebsd := \ + Graphics/shaderlib/wine/include VBoxSVGA3D_INCS.linux := \ Graphics/shaderlib/wine/include VBoxSVGA3D_INCS.darwin := \ diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_PC_ipxe_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_PC_ipxe_Makefile.kmk index 86fda6974519..df7052d7049a 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_PC_ipxe_Makefile.kmk +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_PC_ipxe_Makefile.kmk @@ -1,29 +1,29 @@ ---- src/VBox/Devices/PC/ipxe/Makefile.kmk.orig 2024-01-11 12:19:38 UTC -+++ src/VBox/Devices/PC/ipxe/Makefile.kmk -@@ -35,7 +35,7 @@ iPxeBiosBin_CLEAN = \ +--- src/VBox/Devices/PC/ipxe/Makefile.kmk.orig 2024-10-10 20:29:25.000000000 +0200 ++++ src/VBox/Devices/PC/ipxe/Makefile.kmk 2024-12-27 13:50:35.036241000 +0100 +@@ -45,7 +45,7 @@ iPxeBiosBin_CLEAN = \ $(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c \ -if1of ($(KBUILD_TARGET), darwin os2 solaris win) -+if1of ($(KBUILD_TARGET), darwin freebsd os2 solaris win) ++if1of ($(KBUILD_TARGET), darwin os2 solaris win linux freebsd) $$(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c: $(PATH_SUB_CURRENT)/iPxeBiosBin.rom $(VBOX_BIN2C) | $$(dir $$@) $(call MSG_TOOL,bin2c,iPxeBiosBin,$<,$@) $(QUIET)$(VBOX_BIN2C) -min 32 -max 56 -mask 0x1ff -export NetBiosBinary $< $@ -@@ -121,7 +121,7 @@ endif +@@ -131,7 +131,7 @@ -falign-loops=1 \ -Os \ -falign-functions=1 \ - -mpreferred-stack-boundary=2 \ + -mstack-alignment=2 \ -mregparm=3 \ -mrtd \ -freg-struct-return \ -@@ -144,7 +144,7 @@ endif +@@ -154,7 +154,7 @@ -falign-jumps=1 \ -falign-loops=1 \ -falign-functions=1 \ - -mpreferred-stack-boundary=2 \ + -mstack-alignment=2 \ -mregparm=3 \ -mrtd \ -freg-struct-return \ diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxHeadless_VBoxHeadless.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxHeadless_VBoxHeadless.cpp new file mode 100644 index 000000000000..ca03e57922b4 --- /dev/null +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxHeadless_VBoxHeadless.cpp @@ -0,0 +1,11 @@ +--- src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp.orig 2024-12-26 22:32:13.106542000 +0100 ++++ src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp 2024-12-26 22:32:32.805126000 +0100 +@@ -61,7 +61,7 @@ + # include + #endif + +-#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) ++#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) + # include + #endif + diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageHelp.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageHelp.cpp deleted file mode 100644 index 925c6ca2157d..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageHelp.cpp +++ /dev/null @@ -1,43 +0,0 @@ ---- src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp.orig 2021-01-07 15:40:48 UTC -+++ src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp -@@ -646,7 +646,7 @@ void printUsage(USAGECATEGORY enmCommand, uint64_t fSu - " file |\n" - " ]\n" - " [--uarttype<1-N> 16450|16550A|16750]\n" --#if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) -+#if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) - " [--lpt<1-N> off| ]\n" - " [--lptmode<1-N> ]\n" - #endif -@@ -661,7 +661,7 @@ void printUsage(USAGECATEGORY enmCommand, uint64_t fSu - RTStrmPrintf(pStrm, "|dsound"); - #endif - } -- if (fLinux || fSolaris) -+ if (fLinux || fFreeBSD || fSolaris) - { - RTStrmPrintf(pStrm, "" - #ifdef VBOX_WITH_AUDIO_OSS -@@ -674,22 +674,6 @@ void printUsage(USAGECATEGORY enmCommand, uint64_t fSu - "|pulse" - #endif - ); -- } -- if (fFreeBSD) -- { --#ifdef VBOX_WITH_AUDIO_OSS -- /* Get the line break sorted when dumping all option variants. */ -- if (fDumpOpts) -- { -- RTStrmPrintf(pStrm, "|\n" -- " oss"); -- } -- else -- RTStrmPrintf(pStrm, "|oss"); --#endif --#ifdef VBOX_WITH_AUDIO_PULSE -- RTStrmPrintf(pStrm, "|pulse"); --#endif - } - if (fDarwin) - { diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageModifyVM.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageModifyVM.cpp index adc5217b88f3..fc1639b58302 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageModifyVM.cpp +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageModifyVM.cpp @@ -1,29 +1,29 @@ ---- src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp.orig 2021-01-07 15:40:49 UTC -+++ src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp -@@ -153,7 +153,7 @@ enum +--- src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp.orig 2022-10-06 19:10:28.000000000 +0200 ++++ src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp 2024-12-26 16:08:30.624183000 +0100 +@@ -170,7 +170,7 @@ MODIFYVM_UARTMODE, MODIFYVM_UARTTYPE, MODIFYVM_UART, -#if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) +#if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) MODIFYVM_LPTMODE, MODIFYVM_LPT, #endif -@@ -348,7 +348,7 @@ static const RTGETOPTDEF g_aModifyVMOptions[] = - { "--uartmode", MODIFYVM_UARTMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX }, - { "--uarttype", MODIFYVM_UARTTYPE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX }, - { "--uart", MODIFYVM_UART, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX }, +@@ -382,7 +382,7 @@ + OPT2("--uart-mode", "--uartmode", MODIFYVM_UARTMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX), + OPT2("--uart-type", "--uarttype", MODIFYVM_UARTTYPE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX), + OPT1("--uart", MODIFYVM_UART, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX), -#if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) -+#if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) - { "--lptmode", MODIFYVM_LPTMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX }, - { "--lpt", MODIFYVM_LPT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX }, ++#if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) || defined(RT_OS_FREEBSD) + OPT2("--lpt-mode", "--lptmode", MODIFYVM_LPTMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX), + OPT1("--lpt", MODIFYVM_LPT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX), #endif -@@ -2278,7 +2278,7 @@ RTEXITCODE handleModifyVM(HandlerArg *a) +@@ -2496,7 +2496,7 @@ break; } -#if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) +#if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) case MODIFYVM_LPTMODE: { ComPtr lpt; diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VirtualBox_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VirtualBox_Makefile.kmk deleted file mode 100644 index c339a8b87443..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VirtualBox_Makefile.kmk +++ /dev/null @@ -1,18 +0,0 @@ ---- src/VBox/Frontends/VirtualBox/Makefile.kmk.orig 2021-01-07 15:40:49 UTC -+++ src/VBox/Frontends/VirtualBox/Makefile.kmk -@@ -1186,6 +1186,7 @@ if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI - src/VBox2DHelpers.cpp \ - src/VBoxFBOverlay.cpp \ - src/VBoxGLSupportInfo.cpp -+ VirtualBox_CXXFLAGS.freebsd += -std=c++11 - endif - - $(call VBOX_SET_VER_INFO_EXE,VirtualBox,VirtualBox Manager,$(VBOX_WINDOWS_ICON_FILE)) -@@ -1862,6 +1863,7 @@ if defined(VBOX_WITH_VIDEOHWACCEL) - VBoxOGL2D_SOURCES = \ - src/VBoxGLSupportInfo.cpp - VBoxOGL2D_INCS = include -+ VBoxOGL2D_CXXFLAGS.freebsd += -std=c++11 - endif - endif - diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_SUPDrv.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_SUPDrv.cpp index e34783734251..4139a88a9929 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_SUPDrv.cpp +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_SUPDrv.cpp @@ -1,11 +1,13 @@ ---- src/VBox/HostDrivers/Support/SUPDrv.cpp.orig 2018-10-15 14:30:56 UTC -+++ src/VBox/HostDrivers/Support/SUPDrv.cpp -@@ -104,7 +104,7 @@ - /** @def SUPDRV_CHECK_SMAP_CHECK - * Checks that the AC flag is set if SMAP is enabled. If AC is not set, it - * will be logged and @a a_BadExpr is executed. */ --#if (defined(RT_OS_DARWIN) || defined(RT_OS_LINUX)) && !defined(VBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV) -+#if (defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX)) && !defined(VBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV) - # define SUPDRV_CHECK_SMAP_SETUP() uint32_t const fKernelFeatures = SUPR0GetKernelFeatures() - # define SUPDRV_CHECK_SMAP_CHECK(a_pDevExt, a_BadExpr) \ - do { \ +--- src/VBox/HostDrivers/Support/SUPDrv.cpp.orig 2024-12-27 08:34:02.157677000 +0100 ++++ src/VBox/HostDrivers/Support/SUPDrv.cpp 2024-12-27 08:34:25.419134000 +0100 +@@ -317,8 +317,8 @@ + SUPEXP_STK_BACK( 2, SUPR0PageFree), + SUPEXP_STK_BACK( 6, SUPR0PageMapKernel), + SUPEXP_STK_BACK( 6, SUPR0PageProtect), +-#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) +- SUPEXP_STK_OKAY( 2, SUPR0HCPhysToVirt), /* only-linux, only-solaris, only-freebsd */ ++#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) ++ SUPEXP_STK_OKAY( 2, SUPR0HCPhysToVirt), /* only-linux, only-solaris */ + #endif + SUPEXP_STK_BACK( 2, SUPR0PrintfV), + SUPEXP_STK_BACK( 1, SUPR0GetSessionGVM), diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_Makefile b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_Makefile index e41829d41114..646c16a3617d 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_Makefile +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_Makefile @@ -1,30 +1,20 @@ ---- src/VBox/HostDrivers/Support/freebsd/Makefile.orig 2021-10-18 17:58:03 UTC -+++ src/VBox/HostDrivers/Support/freebsd/Makefile -@@ -82,6 +82,7 @@ SRCS += \ +--- src/VBox/HostDrivers/Support/freebsd/Makefile.orig 2022-10-06 19:11:13.000000000 +0200 ++++ src/VBox/HostDrivers/Support/freebsd/Makefile 2024-12-26 16:15:26.678480000 +0100 +@@ -93,6 +93,7 @@ assert.c \ handletable.c \ handletablectx.c \ + handletablesimple.c \ once.c \ term.c \ thread.c -@@ -94,16 +95,17 @@ SRCS += \ - RTStrCopy.c \ - RTStrCopyEx.c \ - RTStrCopyP.c \ -+ memchr.c \ - strformat.c \ - RTStrFormat.c \ - strformatnum.c \ - strformatrt.c \ - strformattype.c \ -+ stringalloc.c \ - strprintf.c \ - strprintf-ellipsis.c \ +@@ -117,7 +118,8 @@ + strprintf2-ellipsis.c \ strtonum.c \ -- memchr.c \ + memchr.c \ - stringalloc.c -+ utf-8.c ++ stringalloc.c \ ++ utf-8.c .PATH: ${.CURDIR}/common/rand SRCS += \ diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c index 7dd580efb0a0..7faa07739f14 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c @@ -1,224 +1,234 @@ ---- src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c.orig 2022-07-19 20:58:42 UTC +--- src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c.orig 2025-01-21 14:06:14 UTC +++ src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c -@@ -44,8 +44,11 @@ +@@ -44,9 +44,13 @@ #include #include #include ++#include + #include /* for pmap_map() */ +#include +#include /* mp_maxcpus */ #include "../SUPDrvInternal.h" +#include "freebsd/the-freebsd-kernel.h" #include #include #include -@@ -57,7 +60,14 @@ +@@ -58,7 +62,15 @@ #include #include #include +#include ++ +#ifdef VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV +# include +# include +# include +#endif + #ifdef VBOX_WITH_HARDENING # define VBOXDRV_PERM 0600 #else -@@ -76,7 +86,9 @@ static d_ioctl_t VBoxDrvFreeBSDIOCtl; +@@ -77,7 +89,9 @@ static d_ioctl_t VBoxDrvFreeBSDIOCtl; static d_open_t VBoxDrvFreeBSDOpenSys; static void vboxdrvFreeBSDDtr(void *pvData); static d_ioctl_t VBoxDrvFreeBSDIOCtl; +static d_ioctl_t VBoxDrvFreeBSDIOCtlSMAP; static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSession, u_long ulCmd, caddr_t pvData, struct thread *pTd); +static bool VBoxDrvFreeBSDCpuHasSMAP(void); /********************************************************************************************************************************* -@@ -93,7 +105,8 @@ static moduledata_t g_VBoxDrvFreeBSDModule = +@@ -94,7 +108,8 @@ static moduledata_t g_VBoxDrvFreeBSDModule = }; /** Declare the module as a pseudo device. */ -DECLARE_MODULE(vboxdrv, g_VBoxDrvFreeBSDModule, SI_SUB_PSEUDO, SI_ORDER_ANY); +#define KERNEL_RELBRANCHEND (roundup(__FreeBSD_version, 500) - 1) +DECLARE_MODULE_WITH_MAXVER(vboxdrv, g_VBoxDrvFreeBSDModule, SI_SUB_PSEUDO, SI_ORDER_ANY, KERNEL_RELBRANCHEND); MODULE_VERSION(vboxdrv, 1); /** -@@ -140,6 +153,13 @@ static int VBoxDrvFreeBSDModuleEvent(struct module *pM +@@ -141,6 +156,13 @@ static int VBoxDrvFreeBSDModuleEvent(struct module *pM static int VBoxDrvFreeBSDModuleEvent(struct module *pMod, int enmEventType, void *pvArg) { int rc; + + /* Refuse to load if mp_maxcpus is wrong */ + if (MAXCPU != mp_maxcpus) { + printf("vboxdrv: MAXCPU != mp_maxcpus (%d != %d)\n", MAXCPU, mp_maxcpus); + return EINVAL; + } + switch (enmEventType) { case MOD_LOAD: -@@ -182,6 +202,13 @@ static int VBoxDrvFreeBSDLoad(void) +@@ -183,6 +205,13 @@ static int VBoxDrvFreeBSDLoad(void) rc = supdrvInitDevExt(&g_VBoxDrvFreeBSDDevExt, sizeof(SUPDRVSESSION)); if (RT_SUCCESS(rc)) { + if (VBoxDrvFreeBSDCpuHasSMAP()) + { + LogRel(("disabling SMAP for VBoxDrvFreeBSDIOCtl\n")); + g_VBoxDrvFreeBSDChrDevSwSys.d_ioctl = VBoxDrvFreeBSDIOCtlSMAP; + g_VBoxDrvFreeBSDChrDevSwUsr.d_ioctl = VBoxDrvFreeBSDIOCtlSMAP; + } + /* * Configure character devices. Add symbolic links for compatibility. */ -@@ -324,6 +351,45 @@ static int VBoxDrvFreeBSDIOCtl(struct cdev *pDev, u_lo - +@@ -322,7 +351,45 @@ static int VBoxDrvFreeBSDIOCtl(struct cdev *pDev, u_lo + return VBoxDrvFreeBSDIOCtlSlow(pSession, ulCmd, pvData, pTd); + } - /** ++/** + * Alternative Device I/O Control entry point on hosts with SMAP support. + * + * @returns depends... + * @param pDev The device. + * @param ulCmd The command. + * @param pvData Pointer to the data. + * @param fFile The file descriptor flags. + * @param pTd The calling thread. + */ +static int VBoxDrvFreeBSDIOCtlSMAP(struct cdev *pDev, u_long ulCmd, caddr_t pvData, int fFile, struct thread *pTd) +{ + /* + * Allow VBox R0 code to touch R3 memory. Setting the AC bit disables the + * SMAP check. + */ + RTCCUINTREG fSavedEfl = ASMAddFlags(X86_EFL_AC); -+ + + int rc = VBoxDrvFreeBSDIOCtl(pDev, ulCmd, pvData, fFile, pTd); + +#ifdef VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV + /* + * Before we restore AC and the rest of EFLAGS, check if the IOCtl handler code + * accidentially modified it or some other important flag. + */ + if (RT_UNLIKELY( (ASMGetFlags() & (X86_EFL_AC | X86_EFL_IF | X86_EFL_DF | X86_EFL_IOPL)) + != ((fSavedEfl & (X86_EFL_AC | X86_EFL_IF | X86_EFL_DF | X86_EFL_IOPL)) | X86_EFL_AC) )) + { + char szTmp[48]; + RTStrPrintf(szTmp, sizeof(szTmp), "ulCmd=%#x: %#x->%#x!", ulCmd, (uint32_t)fSavedEfl, (uint32_t)ASMGetFlags()); + supdrvBadContext(&g_VBoxDrvFreeBSDDevExt, "SUPDrv-freebsd.c", __LINE__, szTmp); + } +#endif + + ASMSetFlags(fSavedEfl); + return rc; +} + + -+/** + /** * Deal with the 'slow' I/O control requests. * - * @returns 0 on success, appropriate errno on failure. -@@ -372,11 +438,10 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes +@@ -372,11 +439,10 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes */ SUPREQHDR Hdr; pvUser = *(void **)pvData; - int rc = copyin(pvUser, &Hdr, sizeof(Hdr)); - if (RT_UNLIKELY(rc)) + if (RT_FAILURE(RTR0MemUserCopyFrom(&Hdr, (uintptr_t)pvUser, sizeof(Hdr)))) { - OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: copyin(%p,Hdr,) -> %#x; ulCmd=%#lx\n", pvUser, rc, ulCmd)); - return rc; + OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: copyin(%p,Hdr,); ulCmd=%#lx\n", pvUser, ulCmd)); + return EFAULT; } if (RT_UNLIKELY((Hdr.fFlags & SUPREQHDR_FLAGS_MAGIC_MASK) != SUPREQHDR_FLAGS_MAGIC)) { -@@ -401,13 +466,12 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes +@@ -401,13 +467,12 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: failed to allocate buffer of %d bytes; ulCmd=%#lx\n", cbReq, ulCmd)); return ENOMEM; } - rc = copyin(pvUser, pHdr, Hdr.cbIn); - if (RT_UNLIKELY(rc)) + if (RT_FAILURE(RTR0MemUserCopyFrom(pHdr, (uintptr_t)pvUser, Hdr.cbIn))) { - OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: copyin(%p,%p,%#x) -> %#x; ulCmd=%#lx\n", - pvUser, pHdr, Hdr.cbIn, rc, ulCmd)); + OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: copyin(%p,%p,%#x); ulCmd=%#lx\n", + pvUser, pHdr, Hdr.cbIn, ulCmd)); RTMemTmpFree(pHdr); - return rc; + return EFAULT; } if (Hdr.cbIn < cbReq) RT_BZERO((uint8_t *)pHdr + Hdr.cbIn, cbReq - Hdr.cbIn); -@@ -435,9 +499,8 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes +@@ -435,9 +500,8 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: too much output! %#x > %#x; uCmd=%#lx!\n", cbOut, cbReq, ulCmd)); cbOut = cbReq; } - rc = copyout(pHdr, pvUser, cbOut); - if (RT_UNLIKELY(rc)) - OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: copyout(%p,%p,%#x) -> %d; uCmd=%#lx!\n", pHdr, pvUser, cbOut, rc, ulCmd)); + if (RT_FAILURE(RTR0MemUserCopyTo((uintptr_t)pvUser, pHdr, cbOut))) + OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: copyout(%p,%p,%#x); uCmd=%#lx!\n", pHdr, pvUser, cbOut, ulCmd)); Log(("VBoxDrvFreeBSDIOCtlSlow: returns %d / %d ulCmd=%lx\n", 0, pHdr->rc, ulCmd)); -@@ -540,8 +603,7 @@ bool VBOXCALL supdrvOSAreCpusOfflinedOnSuspend(void) +@@ -540,8 +604,7 @@ bool VBOXCALL supdrvOSAreCpusOfflinedOnSuspend(void) bool VBOXCALL supdrvOSAreCpusOfflinedOnSuspend(void) { - /** @todo verify this. */ - return false; + return true; } -@@ -624,20 +686,44 @@ int VBOXCALL supdrvOSMsrProberModify(RTCPUID idCpu, +@@ -637,31 +700,44 @@ int VBOXCALL supdrvOSMsrProberModify(RTCPUID idCpu, #endif /* SUPDRV_WITH_MSR_PROBER */ +-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_ARM64) +-SUPR0DECL(int) SUPR0HCPhysToVirt(RTHCPHYS HCPhys, void **ppv) +/** + * Check if the CPU has SMAP support. + */ +static bool VBoxDrvFreeBSDCpuHasSMAP(void) -+{ + { +- AssertReturn(!(HCPhys & PAGE_OFFSET_MASK), VERR_INVALID_POINTER); +- AssertReturn(HCPhys != NIL_RTHCPHYS, VERR_INVALID_POINTER); +- *ppv = (void *)(uintptr_t)pmap_map(NULL, HCPhys, (HCPhys | PAGE_OFFSET_MASK) + 1, VM_PROT_WRITE | VM_PROT_READ); +- return VINF_SUCCESS; +-} +#ifdef VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV + if ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0) + return true; -+#endif + #endif + return false; +} -+ -+ + + SUPR0DECL(int) SUPR0PrintfV(const char *pszFormat, va_list va) { char szMsg[256]; + IPRT_FREEBSD_SAVE_EFL_AC(); + RTStrPrintfV(szMsg, sizeof(szMsg), pszFormat, va); szMsg[sizeof(szMsg) - 1] = '\0'; printf("%s", szMsg); + + IPRT_FREEBSD_RESTORE_EFL_AC(); return 0; } SUPR0DECL(uint32_t) SUPR0GetKernelFeatures(void) { - return 0; + uint32_t fFlags = 0; +#ifdef VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV + if (g_VBoxDrvFreeBSDChrDevSwSys.d_ioctl == VBoxDrvFreeBSDIOCtlSMAP) + fFlags |= SUPKERNELFEATURES_SMAP; + else + Assert(!(ASMGetCR4() & X86_CR4_SMAP)); +#endif + return fFlags; } diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPLib-freebsd.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPLib-freebsd.cpp new file mode 100644 index 000000000000..95cbe0e2a32c --- /dev/null +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPLib-freebsd.cpp @@ -0,0 +1,11 @@ +--- src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp.orig 2024-10-10 20:31:28.000000000 +0200 ++++ src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp 2024-11-17 18:27:46.400938000 +0100 +@@ -88,7 +88,7 @@ + /* + * Try open the BSD device. + */ +- const char * const *pszDeviceNm = fFlags & SUPR3INIT_F_UNRESTRICTED ? DEVICE_NAME_SYS : DEVICE_NAME_USR; ++ const char * pszDeviceNm = fFlags & SUPR3INIT_F_UNRESTRICTED ? DEVICE_NAME_SYS : DEVICE_NAME_USR; + int hDevice = open(pszDeviceNm, O_RDWR, 0); + if (hDevice < 0) + { diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_files__vboxdrv b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_files__vboxdrv index 6a6ac9839efc..ef7f483fa00d 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_files__vboxdrv +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_files__vboxdrv @@ -1,30 +1,18 @@ ---- src/VBox/HostDrivers/Support/freebsd/files_vboxdrv.orig 2021-10-18 17:58:03 UTC -+++ src/VBox/HostDrivers/Support/freebsd/files_vboxdrv -@@ -119,6 +119,7 @@ FILES_VBOXDRV_NOBIN=" \ +--- src/VBox/HostDrivers/Support/freebsd/files_vboxdrv.orig 2022-10-06 19:11:13.000000000 +0200 ++++ src/VBox/HostDrivers/Support/freebsd/files_vboxdrv 2024-12-26 16:21:34.761238000 +0100 +@@ -132,6 +132,7 @@ ${PATH_ROOT}/src/VBox/Runtime/common/misc/handletable.cpp=>common/misc/handletable.c \ ${PATH_ROOT}/src/VBox/Runtime/common/misc/handletable.h=>common/misc/handletable.h \ ${PATH_ROOT}/src/VBox/Runtime/common/misc/handletablectx.cpp=>common/misc/handletablectx.c \ + ${PATH_ROOT}/src/VBox/Runtime/common/misc/handletablesimple.cpp=>common/misc/handletablesimple.c \ ${PATH_ROOT}/src/VBox/Runtime/common/misc/once.cpp=>common/misc/once.c \ ${PATH_ROOT}/src/VBox/Runtime/common/misc/term.cpp=>common/misc/term.c \ ${PATH_ROOT}/src/VBox/Runtime/common/misc/thread.cpp=>common/misc/thread.c \ -@@ -128,16 +129,17 @@ FILES_VBOXDRV_NOBIN=" \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrCopyEx.cpp=>common/string/RTStrCopyEx.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrNCmp.cpp=>common/string/RTStrNCmp.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrNLen.cpp=>common/string/RTStrNLen.c \ -+ ${PATH_ROOT}/src/VBox/Runtime/common/string/memchr.cpp=>common/string/memchr.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/strformat.cpp=>common/string/strformat.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrFormat.cpp=>common/string/RTStrFormat.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatnum.cpp=>common/string/strformatnum.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatrt.cpp=>common/string/strformatrt.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/strformattype.cpp=>common/string/strformattype.c \ -+ ${PATH_ROOT}/src/VBox/Runtime/common/string/stringalloc.cpp=>common/string/stringalloc.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/strprintf.cpp=>common/string/strprintf.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/strprintf-ellipsis.cpp=>common/string/strprintf-ellipsis.c \ +@@ -153,6 +154,7 @@ + ${PATH_ROOT}/src/VBox/Runtime/common/string/strprintf2-ellipsis.cpp=>common/string/strprintf2-ellipsis.c \ ${PATH_ROOT}/src/VBox/Runtime/common/string/strtonum.cpp=>common/string/strtonum.c \ -- ${PATH_ROOT}/src/VBox/Runtime/common/string/memchr.cpp=>common/string/memchr.c \ -- ${PATH_ROOT}/src/VBox/Runtime/common/string/stringalloc.cpp=>common/string/stringalloc.c \ + ${PATH_ROOT}/src/VBox/Runtime/common/string/memchr.cpp=>common/string/memchr.c \ + ${PATH_ROOT}/src/VBox/Runtime/common/string/utf-8.cpp=>common/string/utf-8.c \ + ${PATH_ROOT}/src/VBox/Runtime/common/string/stringalloc.cpp=>common/string/stringalloc.c \ ${PATH_ROOT}/src/VBox/Runtime/common/rand/rand.cpp=>common/rand/rand.c \ ${PATH_ROOT}/src/VBox/Runtime/common/rand/randadv.cpp=>common/rand/randadv.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/rand/randparkmiller.cpp=>common/rand/randparkmiller.c \ diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_VBoxNetFlt_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_VBoxNetFlt_Makefile.kmk index 9c7ab624c52a..690d27be2bfd 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_VBoxNetFlt_Makefile.kmk +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_VBoxNetFlt_Makefile.kmk @@ -1,11 +1,11 @@ ---- src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk.orig 2019-05-13 13:33:07 UTC +--- src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk.orig 2025-01-21 14:06:16 UTC +++ src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk -@@ -565,7 +565,7 @@ $(PATH_OUT)/opt_netgraph.h: +@@ -543,7 +543,7 @@ ifeq ($(KBUILD_TARGET),freebsd) $(QUIET)$(RM) -f -- $@ $(QUIET)$(CP) -f $< $@ ifndef VBOX_WITH_HARDENING - $(QUIET)$(SED) -e "s;VBOX_WITH_HARDENING;;g" --output $@.tmp $@ + $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@.tmp $@ ${QUIET}$(MV) -f $@.tmp $@ endif ifndef VBOX_WITH_NETFLT_VIMAGE diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Main_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Main_Makefile.kmk index 173a896547a1..f5693ffb72b4 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Main_Makefile.kmk +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Main_Makefile.kmk @@ -1,10 +1,10 @@ ---- src/VBox/Main/Makefile.kmk.orig 2021-01-07 15:41:36 UTC -+++ src/VBox/Main/Makefile.kmk -@@ -646,6 +646,7 @@ VBoxSVC_SOURCES.os2 = \ +--- src/VBox/Main/Makefile.kmk.orig 2024-10-10 20:31:38.000000000 +0200 ++++ src/VBox/Main/Makefile.kmk 2024-12-27 13:32:31.610875000 +0100 +@@ -761,6 +761,7 @@ - VBoxSVC_SOURCES.freebsd = \ - src-server/freebsd/HostHardwareFreeBSD.cpp \ + VBoxSVC_SOURCES.freebsd = \ + src-server/freebsd/HostHardwareFreeBSD.cpp \ + $(if $(VBOX_WITH_DBUS),src-server/linux/HostPowerLinux.cpp) \ - src-server/HostDnsServiceResolvConf.cpp - + src-server/HostDnsServiceResolvConf.cpp + VBoxSVC_LDFLAGS.freebsd += -lcam diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_NetworkServices_Dhcpd_VBoxNetDhcpd.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_NetworkServices_Dhcpd_VBoxNetDhcpd.cpp deleted file mode 100644 index fb84e7344504..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_NetworkServices_Dhcpd_VBoxNetDhcpd.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/VBox/NetworkServices/Dhcpd/VBoxNetDhcpd.cpp.orig 2021-01-07 15:41:46 UTC -+++ src/VBox/NetworkServices/Dhcpd/VBoxNetDhcpd.cpp -@@ -394,7 +394,7 @@ void VBoxNetDhcpd::ifPump() - WaitReq.Hdr.cbReq = sizeof(WaitReq); - WaitReq.pSession = m_pSession; - WaitReq.hIf = m_hIf; -- WaitReq.cMillies = RT_INDEFINITE_WAIT; -+ WaitReq.cMillies = 2000; - int rc = CALL_VMMR0(VMMR0_DO_INTNET_IF_WAIT, WaitReq); - - /* diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_RDP_client-1.8.4_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_RDP_client-1.8.4_Makefile.kmk deleted file mode 100644 index c23a6e6fbb16..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_RDP_client-1.8.4_Makefile.kmk +++ /dev/null @@ -1,13 +0,0 @@ ---- src/VBox/RDP/client-1.8.4/Makefile.kmk.orig 2021-01-07 15:41:47 UTC -+++ src/VBox/RDP/client-1.8.4/Makefile.kmk -@@ -117,8 +117,8 @@ rdesktop-vrdp_SOURCES.solaris = \ - rdesktop-vrdp_SOURCES.freebsd = \ - rdpsnd_oss.c - rdesktop-vrdp_LIBPATH = \ -- /usr/lib \ -- $(VBOX_LIBPATH_X11) -+ $(VBOX_LIBPATH_X11)/lib \ -+ /usr/lib - rdesktop-vrdp_LIBS = \ - X11 \ - $(LIB_RUNTIME) diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_Makefile.kmk new file mode 100644 index 000000000000..05a94f714549 --- /dev/null +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_Makefile.kmk @@ -0,0 +1,12 @@ +--- src/VBox/Runtime/Makefile.kmk.orig 2024-11-20 20:11:05.667725000 +0100 ++++ src/VBox/Runtime/Makefile.kmk 2024-11-20 20:12:40.904599000 +0100 +@@ -220,6 +220,9 @@ + $(QUIET)$(oiddb2c_1_TARGET) "$@" $(filter %.cfg,$^) + $(QUIET)$(CP) --changed -fv "$@" "$(IPRT_OUT_DIR)/oiddb.h" + ++# Set the defines that utf8-posix.cpp needs. It's used by several targets. ++# ++r3/posix/utf8-posix.cpp_DEFS.freebsd = $(VBOX_ICONV_DEFS) + + # + # Unicode Specification reader used to regenerate unidata-*.cpp. diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_alloc-r0drv-freebsd.c b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_alloc-r0drv-freebsd.c index 9424293d8fb6..0ae2d847c0f6 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_alloc-r0drv-freebsd.c +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_alloc-r0drv-freebsd.c @@ -1,73 +1,58 @@ ---- src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c.orig 2021-01-07 15:42:08 UTC -+++ src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c -@@ -78,6 +78,7 @@ MALLOC_DEFINE(M_IPRTCONT, "iprtcont", "IPRT - contiguo +--- src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c.orig 2024-10-10 20:32:14.000000000 +0200 ++++ src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c 2024-12-27 13:39:49.059878000 +0100 +@@ -88,6 +88,7 @@ DECLHIDDEN(int) rtR0MemAllocEx(size_t cb, uint32_t fFlags, PRTMEMHDR *ppHdr) { + IPRT_FREEBSD_SAVE_EFL_AC(); size_t cbAllocated = cb; - PRTMEMHDR pHdr = NULL; - -@@ -100,8 +101,10 @@ DECLHIDDEN(int) rtR0MemAllocEx(size_t cb, uint32_t fFl - cbAllocated = RT_ALIGN_Z(cb + sizeof(*pHdr), PAGE_SIZE); - - pVmObject = vm_object_allocate(OBJT_DEFAULT, cbAllocated >> PAGE_SHIFT); -- if (!pVmObject) -+ if (!pVmObject) { -+ IPRT_FREEBSD_RESTORE_EFL_AC(); - return VERR_NO_EXEC_MEMORY; -+ } - - /* Addr contains a start address vm_map_find will start searching for suitable space at. */ - #if __FreeBSD_version >= 1000055 -@@ -138,6 +141,8 @@ DECLHIDDEN(int) rtR0MemAllocEx(size_t cb, uint32_t fFl - fFlags & RTMEMHDR_FLAG_ZEROED ? M_NOWAIT | M_ZERO : M_NOWAIT); - } + PRTMEMHDR pHdr = (PRTMEMHDR)malloc(cb + sizeof(RTMEMHDR), M_IPRTHEAP, + fFlags & RTMEMHDR_FLAG_ZEROED ? M_NOWAIT | M_ZERO : M_NOWAIT); +@@ -99,21 +100,28 @@ + pHdr->cbReq = cb; + *ppHdr = pHdr; ++ IPRT_FREEBSD_RESTORE_EFL_AC(); + return VINF_SUCCESS; +- } ++ } ++ + IPRT_FREEBSD_RESTORE_EFL_AC(); -+ - if (RT_UNLIKELY(!pHdr)) - return VERR_NO_MEMORY; + return VERR_NO_MEMORY; + } -@@ -153,6 +158,8 @@ DECLHIDDEN(int) rtR0MemAllocEx(size_t cb, uint32_t fFl DECLHIDDEN(void) rtR0MemFree(PRTMEMHDR pHdr) { + IPRT_FREEBSD_SAVE_EFL_AC(); + pHdr->u32Magic += 1; - - #ifdef RT_ARCH_AMD64 -@@ -165,11 +172,14 @@ DECLHIDDEN(void) rtR0MemFree(PRTMEMHDR pHdr) - else - #endif - free(pHdr, M_IPRTHEAP); -+ + free(pHdr, M_IPRTHEAP); + IPRT_FREEBSD_RESTORE_EFL_AC(); } RTR0DECL(void *) RTMemContAlloc(PRTCCPHYS pPhys, size_t cb) { + IPRT_FREEBSD_SAVE_EFL_AC(); void *pv; /* -@@ -194,6 +204,7 @@ RTR0DECL(void *) RTMemContAlloc(PRTCCPHYS pPhys, size_ +@@ -138,6 +146,7 @@ *pPhys = vtophys(pv); Assert(!(*pPhys & PAGE_OFFSET_MASK)); } + IPRT_FREEBSD_RESTORE_EFL_AC(); return pv; } -@@ -203,7 +214,9 @@ RTR0DECL(void) RTMemContFree(void *pv, size_t cb) +@@ -147,7 +156,9 @@ if (pv) { AssertMsg(!((uintptr_t)pv & PAGE_OFFSET_MASK), ("pv=%p\n", pv)); + IPRT_FREEBSD_SAVE_EFL_AC(); contigfree(pv, cb, M_IPRTCONT); + IPRT_FREEBSD_RESTORE_EFL_AC(); } } diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c index 7e0f92ad6468..d8bfcc464dc0 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c @@ -1,412 +1,366 @@ ---- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2021-10-18 17:58:41 UTC -+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c -@@ -129,6 +129,7 @@ static vm_map_t rtR0MemObjFreeBSDGetMap(PRTR0MEMOBJINT +--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2024-11-22 11:30:43.777055000 +0100 ++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2024-11-22 22:12:10.608369000 +0100 +@@ -139,8 +139,10 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) { + IPRT_FREEBSD_SAVE_EFL_AC(); PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)pMem; int rc; ++ vm_map_t pMap; -@@ -145,16 +146,15 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) + switch (pMemFreeBSD->Core.enmType) + { +@@ -155,8 +157,6 @@ case RTR0MEMOBJTYPE_LOCK: { - vm_map_t pMap = kernel_map; -+ if (pMemFreeBSD->Core.u.Lock.R0Process != NIL_RTR0PROCESS) { -+ vm_map_t pMap = &((struct proc *)pMemFreeBSD->Core.u.Lock.R0Process)->p_vmspace->vm_map; - -- if (pMemFreeBSD->Core.u.Lock.R0Process != NIL_RTR0PROCESS) -- pMap = &((struct proc *)pMemFreeBSD->Core.u.Lock.R0Process)->p_vmspace->vm_map; - -- rc = vm_map_unwire(pMap, -+ rc = vm_map_unwire(pMap, - (vm_offset_t)pMemFreeBSD->Core.pv, - (vm_offset_t)pMemFreeBSD->Core.pv + pMemFreeBSD->Core.cb, - VM_MAP_WIRE_SYSTEM | VM_MAP_WIRE_NOHOLES); -- AssertMsg(rc == KERN_SUCCESS, ("%#x", rc)); -+ AssertMsg(rc == KERN_SUCCESS, ("%#x", rc)); -+ } - break; - } + if (pMemFreeBSD->Core.u.Lock.R0Process != NIL_RTR0PROCESS) + pMap = &((struct proc *)pMemFreeBSD->Core.u.Lock.R0Process)->p_vmspace->vm_map; -@@ -210,6 +210,7 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) +@@ -220,6 +220,7 @@ return VERR_INTERNAL_ERROR; } + IPRT_FREEBSD_RESTORE_EFL_AC(); return VINF_SUCCESS; } -@@ -320,8 +321,10 @@ static int rtR0MemObjFreeBSDAllocHelper(PRTR0MEMOBJFRE +@@ -329,7 +330,8 @@ size_t cPages = atop(pMemFreeBSD->Core.cb); int rc; - pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, cPages); + pMemFreeBSD->pObject = vm_pager_allocate(OBJT_PHYS, NULL, + pMemFreeBSD->Core.cb, VM_PROT_ALL, 0, curthread->td_ucred); -+ /* No additional object reference for auto-deallocation upon unmapping. */ #if __FreeBSD_version >= 1000055 - rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, -@@ -361,19 +364,25 @@ static int rtR0MemObjFreeBSDAllocHelper(PRTR0MEMOBJFRE - } - DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) +@@ -371,6 +373,7 @@ + + DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); - PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), - RTR0MEMOBJTYPE_PAGE, NULL, cb); - if (!pMemFreeBSD) -+ { -+ IPRT_FREEBSD_RESTORE_EFL_AC(); - return VERR_NO_MEMORY; -+ } - - int rc = rtR0MemObjFreeBSDAllocHelper(pMemFreeBSD, fExecutable, ~(vm_paddr_t)0, false, VERR_NO_MEMORY); - if (RT_FAILURE(rc)) - { - rtR0MemObjDelete(&pMemFreeBSD->Core); + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PAGE, + NULL, cb, pszTag); + if (pMemFreeBSD) +@@ -380,8 +383,10 @@ + *ppMem = &pMemFreeBSD->Core; + else + rtR0MemObjDelete(&pMemFreeBSD->Core); + IPRT_FREEBSD_RESTORE_EFL_AC(); return rc; } - - *ppMem = &pMemFreeBSD->Core; + IPRT_FREEBSD_RESTORE_EFL_AC(); - return rc; + return VERR_NO_MEMORY; } -@@ -387,39 +396,51 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocLarge(PPRTR0MEMOB +@@ -395,6 +400,7 @@ - DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) + DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); - PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), - RTR0MEMOBJTYPE_LOW, NULL, cb); - if (!pMemFreeBSD) -+ { -+ IPRT_FREEBSD_RESTORE_EFL_AC(); - return VERR_NO_MEMORY; -+ } - - int rc = rtR0MemObjFreeBSDAllocHelper(pMemFreeBSD, fExecutable, _4G - 1, false, VERR_NO_LOW_MEMORY); - if (RT_FAILURE(rc)) + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_LOW, NULL, cb, pszTag); + if (pMemFreeBSD) { - rtR0MemObjDelete(&pMemFreeBSD->Core); +@@ -403,14 +409,17 @@ + *ppMem = &pMemFreeBSD->Core; + else + rtR0MemObjDelete(&pMemFreeBSD->Core); + IPRT_FREEBSD_RESTORE_EFL_AC(); return rc; } - - *ppMem = &pMemFreeBSD->Core; + IPRT_FREEBSD_RESTORE_EFL_AC(); - return rc; + return VERR_NO_MEMORY; } - DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) + DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); - PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), - RTR0MEMOBJTYPE_CONT, NULL, cb); - if (!pMemFreeBSD) -+ { -+ IPRT_FREEBSD_RESTORE_EFL_AC(); - return VERR_NO_MEMORY; -+ } - - int rc = rtR0MemObjFreeBSDAllocHelper(pMemFreeBSD, fExecutable, _4G - 1, true, VERR_NO_CONT_MEMORY); - if (RT_FAILURE(rc)) - { - rtR0MemObjDelete(&pMemFreeBSD->Core); + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_CONT, + NULL, cb, pszTag); + if (pMemFreeBSD) +@@ -423,8 +432,10 @@ + } + else + rtR0MemObjDelete(&pMemFreeBSD->Core); + IPRT_FREEBSD_RESTORE_EFL_AC(); return rc; } - - pMemFreeBSD->Core.u.Cont.Phys = vtophys(pMemFreeBSD->Core.pv); - *ppMem = &pMemFreeBSD->Core; + IPRT_FREEBSD_RESTORE_EFL_AC(); - return rc; + return VERR_NO_MEMORY; } -@@ -429,6 +450,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB - RTHCPHYS PhysHighest, size_t uAlignment, - bool fContiguous, int rcNoMem) +@@ -432,6 +443,7 @@ + static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJTYPE enmType, size_t cb, RTHCPHYS PhysHighest, + size_t uAlignment, bool fContiguous, int rcNoMem, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); - uint32_t cPages = atop(cb); - vm_paddr_t VmPhysAddrHigh; - -@@ -436,9 +458,13 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB - PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), - enmType, NULL, cb); - if (!pMemFreeBSD) -+ { -+ IPRT_FREEBSD_RESTORE_EFL_AC(); - return VERR_NO_MEMORY; -+ } - -- pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, atop(cb)); -+ pMemFreeBSD->pObject = vm_pager_allocate(OBJT_PHYS, NULL, + /* create the object. */ + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), enmType, NULL, cb, pszTag); + if (pMemFreeBSD) +@@ -439,7 +451,8 @@ + vm_paddr_t const VmPhysAddrHigh = PhysHighest != NIL_RTHCPHYS ? PhysHighest : ~(vm_paddr_t)0; + u_long const cPages = atop(cb); + +- pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, cPages); ++ pMemFreeBSD->pObject = vm_pager_allocate(OBJT_PHYS, NULL, + pMemFreeBSD->Core.cb, VM_PROT_ALL, 0, curthread->td_ucred); - if (PhysHighest != NIL_RTHCPHYS) - VmPhysAddrHigh = PhysHighest; -@@ -466,6 +492,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB - rtR0MemObjDelete(&pMemFreeBSD->Core); + int rc = rtR0MemObjFreeBSDPhysAllocHelper(pMemFreeBSD->pObject, cPages, VmPhysAddrHigh, + uAlignment, fContiguous, true, rcNoMem); +@@ -462,8 +475,10 @@ + vm_object_deallocate(pMemFreeBSD->pObject); + rtR0MemObjDelete(&pMemFreeBSD->Core); + } ++ IPRT_FREEBSD_RESTORE_EFL_AC(); + return rc; } - + IPRT_FREEBSD_RESTORE_EFL_AC(); - return rc; + return VERR_NO_MEMORY; } -@@ -485,17 +512,22 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocPhysNC(PPRTR0MEMO - DECLHIDDEN(int) rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy) +@@ -486,6 +501,7 @@ + const char *pszTag) { AssertReturn(uCachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_SUPPORTED); + IPRT_FREEBSD_SAVE_EFL_AC(); /* create the object. */ - PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PHYS, NULL, cb); - if (!pMemFreeBSD) -+ { + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PHYS, +@@ -497,8 +513,10 @@ + pMemFreeBSD->Core.u.Phys.PhysBase = Phys; + pMemFreeBSD->Core.u.Phys.uCachePolicy = uCachePolicy; + *ppMem = &pMemFreeBSD->Core; + IPRT_FREEBSD_RESTORE_EFL_AC(); - return VERR_NO_MEMORY; -+ } - - /* there is no allocation here, it needs to be mapped somewhere first. */ - pMemFreeBSD->Core.u.Phys.fAllocated = false; - pMemFreeBSD->Core.u.Phys.PhysBase = Phys; - pMemFreeBSD->Core.u.Phys.uCachePolicy = uCachePolicy; - *ppMem = &pMemFreeBSD->Core; + return VINF_SUCCESS; + } + IPRT_FREEBSD_RESTORE_EFL_AC(); - return VINF_SUCCESS; + return VERR_NO_MEMORY; } -@@ -507,6 +539,7 @@ static int rtR0MemObjNativeLockInMap(PPRTR0MEMOBJINTER +@@ -510,6 +528,7 @@ vm_offset_t AddrStart, size_t cb, uint32_t fAccess, - RTR0PROCESS R0Process, int fFlags) + RTR0PROCESS R0Process, int fFlags, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); int rc; NOREF(fAccess); -@@ -515,21 +548,28 @@ static int rtR0MemObjNativeLockInMap(PPRTR0MEMOBJINTER +@@ -519,21 +538,28 @@ if (!pMemFreeBSD) return VERR_NO_MEMORY; - /* - * We could've used vslock here, but we don't wish to be subject to - * resource usage restrictions, so we'll call vm_map_wire directly. - */ - rc = vm_map_wire(pVmMap, /* the map */ - AddrStart, /* start */ - AddrStart + cb, /* end */ - fFlags); /* flags */ + if (pVmMap != kernel_map) { + /* + * We could've used vslock here, but we don't wish to be subject to + * resource usage restrictions, so we'll call vm_map_wire directly. + */ + rc = vm_map_wire(pVmMap, /* the map */ + AddrStart, /* start */ + AddrStart + cb, /* end */ + fFlags); /* flags */ + } + else + rc = KERN_SUCCESS; + if (rc == KERN_SUCCESS) { pMemFreeBSD->Core.u.Lock.R0Process = R0Process; *ppMem = &pMemFreeBSD->Core; + IPRT_FREEBSD_RESTORE_EFL_AC(); return VINF_SUCCESS; } rtR0MemObjDelete(&pMemFreeBSD->Core); + IPRT_FREEBSD_RESTORE_EFL_AC(); return VERR_NO_MEMORY;/** @todo fix mach -> vbox error conversion for freebsd. */ } -@@ -565,6 +605,7 @@ DECLHIDDEN(int) rtR0MemObjNativeLockKernel(PPRTR0MEMOB - */ - static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process, vm_map_t pMap) +@@ -573,6 +599,7 @@ + static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment, + RTR0PROCESS R0Process, vm_map_t pMap, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); int rc; /* -@@ -622,11 +663,13 @@ static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJIN +@@ -631,11 +658,13 @@ pMemFreeBSD->Core.pv = (void *)MapAddress; pMemFreeBSD->Core.u.ResVirt.R0Process = R0Process; *ppMem = &pMemFreeBSD->Core; + IPRT_FREEBSD_RESTORE_EFL_AC(); return VINF_SUCCESS; } rc = VERR_NO_MEMORY; /** @todo fix translation (borrow from darwin) */ rtR0MemObjDelete(&pMemFreeBSD->Core); + IPRT_FREEBSD_RESTORE_EFL_AC(); return rc; } -@@ -648,6 +691,8 @@ DECLHIDDEN(int) rtR0MemObjNativeReserveUser(PPRTR0MEMO +@@ -659,6 +688,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment, - unsigned fProt, size_t offSub, size_t cbSub) + unsigned fProt, size_t offSub, size_t cbSub, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); + // AssertMsgReturn(!offSub && !cbSub, ("%#x %#x\n", offSub, cbSub), VERR_NOT_SUPPORTED); AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED); -@@ -704,6 +749,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ +@@ -713,6 +744,7 @@ Assert((vm_offset_t)pMemFreeBSD->Core.pv == Addr); pMemFreeBSD->Core.u.Mapping.R0Process = NIL_RTR0PROCESS; *ppMem = &pMemFreeBSD->Core; + IPRT_FREEBSD_RESTORE_EFL_AC(); return VINF_SUCCESS; } rc = vm_map_remove(kernel_map, Addr, Addr + cbSub); -@@ -712,6 +758,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ +@@ -721,6 +753,7 @@ else vm_object_deallocate(pMemToMapFreeBSD->pObject); + IPRT_FREEBSD_RESTORE_EFL_AC(); return VERR_NO_MEMORY; } -@@ -719,6 +766,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ +@@ -728,6 +761,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, - unsigned fProt, RTR0PROCESS R0Process, size_t offSub, size_t cbSub) + unsigned fProt, RTR0PROCESS R0Process, size_t offSub, size_t cbSub, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); + /* * Check for unsupported stuff. */ -@@ -775,47 +824,53 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJIN - 0); /* copy-on-write and similar flags */ +@@ -785,44 +820,50 @@ if (rc == KERN_SUCCESS) -+ rc = vm_map_wire(pProcMap, AddrR3, AddrR3 + cbSub, VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES); -+ if (rc == KERN_SUCCESS) { - rc = vm_map_wire(pProcMap, AddrR3, AddrR3 + pMemToMap->cb, VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES); -+ rc = vm_map_inherit(pProcMap, AddrR3, AddrR3 + cbSub, VM_INHERIT_SHARE); ++ rc = vm_map_wire(pProcMap, AddrR3, AddrR3 + cbSub, VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES); AssertMsg(rc == KERN_SUCCESS, ("%#x\n", rc)); - rc = vm_map_inherit(pProcMap, AddrR3, AddrR3 + pMemToMap->cb, VM_INHERIT_SHARE); -- AssertMsg(rc == KERN_SUCCESS, ("%#x\n", rc)); -- ++ rc = vm_map_inherit(pProcMap, AddrR3, AddrR3 + cbSub, VM_INHERIT_SHARE); + AssertMsg(rc == KERN_SUCCESS, ("%#x\n", rc)); + /* * Create a mapping object for it. */ - PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(RTR0MEMOBJFREEBSD), - RTR0MEMOBJTYPE_MAPPING, - (void *)AddrR3, -- pMemToMap->cb); -+ cbSub); + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(RTR0MEMOBJFREEBSD), RTR0MEMOBJTYPE_MAPPING, +- (void *)AddrR3, pMemToMap->cb, pszTag); ++ (void *)AddrR3, cbSub, pszTag); if (pMemFreeBSD) { Assert((vm_offset_t)pMemFreeBSD->Core.pv == AddrR3); pMemFreeBSD->Core.u.Mapping.R0Process = R0Process; *ppMem = &pMemFreeBSD->Core; + IPRT_FREEBSD_RESTORE_EFL_AC(); return VINF_SUCCESS; } - rc = vm_map_remove(pProcMap, AddrR3, AddrR3 + pMemToMap->cb); -+ rc = vm_map_remove(pProcMap, AddrR3, AddrR3 + cbSub /* XXX pMemToMap->cb*/ ); ++ rc = vm_map_remove(pProcMap, AddrR3, AddrR3 + cbSub); AssertMsg(rc == KERN_SUCCESS, ("Deleting mapping failed\n")); } else vm_object_deallocate(pMemToMapFreeBSD->pObject); + IPRT_FREEBSD_RESTORE_EFL_AC(); return VERR_NO_MEMORY; } DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub, size_t cbSub, uint32_t fProt) { + IPRT_FREEBSD_SAVE_EFL_AC(); -+ vm_prot_t ProtectionFlags = 0; vm_offset_t AddrStart = (uintptr_t)pMem->pv + offSub; vm_offset_t AddrEnd = AddrStart + cbSub; vm_map_t pVmMap = rtR0MemObjFreeBSDGetMap(pMem); if (!pVmMap) + { + IPRT_FREEBSD_RESTORE_EFL_AC(); return VERR_NOT_SUPPORTED; + } if ((fProt & RTMEM_PROT_NONE) == RTMEM_PROT_NONE) ProtectionFlags = VM_PROT_NONE; -@@ -826,7 +881,12 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINT +@@ -833,7 +874,12 @@ if ((fProt & RTMEM_PROT_EXEC) == RTMEM_PROT_EXEC) ProtectionFlags |= VM_PROT_EXECUTE; +#if __FreeBSD_version >= 1300135 + int krc = vm_map_protect(pVmMap, AddrStart, AddrEnd, ProtectionFlags, 0, VM_MAP_PROTECT_SET_PROT); +#else int krc = vm_map_protect(pVmMap, AddrStart, AddrEnd, ProtectionFlags, FALSE); +#endif + IPRT_FREEBSD_RESTORE_EFL_AC(); if (krc == KERN_SUCCESS) return VINF_SUCCESS; -@@ -851,11 +911,19 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P +@@ -858,11 +904,19 @@ vm_offset_t pb = (vm_offset_t)pMemFreeBSD->Core.pv + ptoa(iPage); - struct proc *pProc = (struct proc *)pMemFreeBSD->Core.u.Lock.R0Process; - struct vm_map *pProcMap = &pProc->p_vmspace->vm_map; - pmap_t pPhysicalMap = vm_map_pmap(pProcMap); + if (pMemFreeBSD->Core.u.Mapping.R0Process != NIL_RTR0PROCESS) + { + RTHCPHYS addr; + IPRT_FREEBSD_SAVE_EFL_AC(); + struct proc *pProc = (struct proc *)pMemFreeBSD->Core.u.Lock.R0Process; + struct vm_map *pProcMap = &pProc->p_vmspace->vm_map; + pmap_t pPhysicalMap = vm_map_pmap(pProcMap); - return pmap_extract(pPhysicalMap, pb); + addr = pmap_extract(pPhysicalMap, pb); + IPRT_FREEBSD_RESTORE_EFL_AC(); + return addr; + } + return vtophys(pb); } case RTR0MEMOBJTYPE_MAPPING: -@@ -864,11 +932,16 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P +@@ -871,11 +925,15 @@ if (pMemFreeBSD->Core.u.Mapping.R0Process != NIL_RTR0PROCESS) { + RTHCPHYS addr; + IPRT_FREEBSD_SAVE_EFL_AC(); struct proc *pProc = (struct proc *)pMemFreeBSD->Core.u.Mapping.R0Process; struct vm_map *pProcMap = &pProc->p_vmspace->vm_map; pmap_t pPhysicalMap = vm_map_pmap(pProcMap); - return pmap_extract(pPhysicalMap, pb); + addr = pmap_extract(pPhysicalMap, pb); + IPRT_FREEBSD_RESTORE_EFL_AC(); + return addr; -+ } return vtophys(pb); } -@@ -879,9 +952,11 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P +@@ -886,9 +944,11 @@ { RTHCPHYS addr; + IPRT_FREEBSD_SAVE_EFL_AC(); VM_OBJECT_WLOCK(pMemFreeBSD->pObject); addr = VM_PAGE_TO_PHYS(vm_page_lookup(pMemFreeBSD->pObject, iPage)); VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); + IPRT_FREEBSD_RESTORE_EFL_AC(); return addr; } 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 deleted file mode 100644 index 92af93646dd6..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r3_freebsd_systemmem-freebsd.cpp +++ /dev/null @@ -1,39 +0,0 @@ ---- src/VBox/Runtime/r3/freebsd/systemmem-freebsd.cpp.orig 2017-07-27 13:18:46 UTC -+++ src/VBox/Runtime/r3/freebsd/systemmem-freebsd.cpp -@@ -65,7 +65,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; -@@ -73,25 +72,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-70/files/patch-src_VBox_VMM_VMMR3_PGMPhys.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_VMM_VMMR3_PGMPhys.cpp deleted file mode 100644 index 9080ee4b8e87..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_VMM_VMMR3_PGMPhys.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/VBox/VMM/VMMR3/PGMPhys.cpp.orig 2022-01-13 18:58:38 UTC -+++ src/VBox/VMM/VMMR3/PGMPhys.cpp -@@ -3179,7 +3179,7 @@ VMMR3_INT_DECL(int) PGMR3PhysMmio2Register(PVM pVM, PP - else - #endif - { --#ifndef VBOX_WITH_LINEAR_HOST_PHYS_MEM -+#if defined(VBOX_WITH_RAM_IN_KERNEL) && !defined(VBOX_WITH_LINEAR_HOST_PHYS_MEM) - rc = SUPR3PageAllocEx(cPages, 0 /*fFlags*/, &pvPages, &pvPagesR0, paPages); - #else - rc = SUPR3PageAllocEx(cPages, 0 /*fFlags*/, &pvPages, NULL /*pR0Ptr*/, paPages); diff --git a/emulators/virtualbox-ose-70/files/patch-src_VMM_Config.kmk b/emulators/virtualbox-ose-70/files/patch-src_VMM_Config.kmk new file mode 100644 index 000000000000..1c44352c9409 --- /dev/null +++ b/emulators/virtualbox-ose-70/files/patch-src_VMM_Config.kmk @@ -0,0 +1,11 @@ +--- src/VBox/VMM/Config.kmk.orig 2024-12-27 03:55:34.269311000 +0100 ++++ src/VBox/VMM/Config.kmk 2024-12-27 03:42:41.858673000 +0100 +@@ -91,7 +91,7 @@ + VMM_COMMON_DEFS += VBOX_WITH_NATIVE_NEM VBOX_WITH_NEM_R0 + endif + endif +-if1of ($(KBUILD_TARGET), freebsd linux solaris) # Hosts that implements SUPR0HCPhysToVirt. ++if1of ($(KBUILD_TARGET), linux solaris) # Hosts that implements SUPR0HCPhysToVirt. + VMM_COMMON_DEFS += VBOX_WITH_LINEAR_HOST_PHYS_MEM + endif + diff --git a/emulators/virtualbox-ose-70/files/virtualbox.desktop b/emulators/virtualbox-ose-70/files/virtualbox.desktop new file mode 100644 index 000000000000..b0d09e2128b7 --- /dev/null +++ b/emulators/virtualbox-ose-70/files/virtualbox.desktop @@ -0,0 +1,17 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Oracle VM VirtualBox +GenericName=Virtual Machine +Type=Application +Exec=VirtualBox +TryExec=VirtualBox +Icon=VBox +Categories=Emulator;System; +Comment=Run several virtual systems on a single host computer +Comment[de]=Windows und andere Betriebssysteme unter FreeBSD ausführen +Comment[it]=Esegui più macchine virtuali su un singolo computer +Comment[ko]=가상 머신 +Comment[pl]=Uruchamianie wielu systemów wirtualnych na jednym komputerze gospodarza +Comment[ru]=Запуск нескольких виртуальных машин на одном компьютере +Comment[sv]=Kör flera virtuella system på en enda värddator diff --git a/emulators/virtualbox-ose-70/pkg-plist b/emulators/virtualbox-ose-70/pkg-plist index 93a4dcd48c29..e1bfb5206b85 100644 --- a/emulators/virtualbox-ose-70/pkg-plist +++ b/emulators/virtualbox-ose-70/pkg-plist @@ -1,616 +1,612 @@ bin/VBoxAutostart bin/VBoxBalloonCtrl bin/VBoxBugReport bin/VBoxHeadless bin/VBoxManage -%%X11%%bin/VBoxSDL bin/VBoxVRDP %%QT%%bin/VirtualBox %%QT%%bin/VirtualBoxVM bin/vboxautostart bin/vboxballoonctrl bin/vboxbugreport bin/vboxheadless %%VBOXIMG%%bin/vboximg-mount bin/vboxmanage -%%X11%%bin/vboxsdl %%WEBSERVICE%%bin/vboxwebsrv %%QT%%bin/virtualbox %%QT%%bin/virtualboxvm include/virtualbox/VirtualBox_XPCOM.h include/virtualbox/ipcIClientObserver.h include/virtualbox/ipcIDConnectService.h include/virtualbox/ipcILockService.h include/virtualbox/ipcIMessageObserver.h include/virtualbox/ipcIService.h include/virtualbox/ipcITransactionObserver.h include/virtualbox/ipcITransactionService.h include/virtualbox/nsIArray.h include/virtualbox/nsIAsyncInputStream.h include/virtualbox/nsIAsyncOutputStream.h include/virtualbox/nsIAtom.h include/virtualbox/nsIAtomService.h include/virtualbox/nsIBinaryInputStream.h include/virtualbox/nsIBinaryOutputStream.h include/virtualbox/nsIByteArrayInputStream.h include/virtualbox/nsICategoryManager.h include/virtualbox/nsIClassInfo.h include/virtualbox/nsICollection.h include/virtualbox/nsIComponentLoader.h include/virtualbox/nsIComponentLoaderManager.h include/virtualbox/nsIComponentManager.h include/virtualbox/nsIComponentManagerObsolete.h include/virtualbox/nsIComponentRegistrar.h include/virtualbox/nsIConsoleListener.h include/virtualbox/nsIConsoleMessage.h include/virtualbox/nsIConsoleService.h include/virtualbox/nsIDebug.h include/virtualbox/nsIDirectoryEnumerator.h include/virtualbox/nsIDirectoryService.h include/virtualbox/nsIEnumerator.h include/virtualbox/nsIEnvironment.h include/virtualbox/nsIErrorService.h include/virtualbox/nsIEventQueue.h include/virtualbox/nsIEventQueueService.h include/virtualbox/nsIEventTarget.h include/virtualbox/nsIException.h include/virtualbox/nsIExceptionService.h include/virtualbox/nsIFactory.h include/virtualbox/nsIFastLoadFileControl.h include/virtualbox/nsIFastLoadService.h include/virtualbox/nsIFile.h include/virtualbox/nsIHashable.h include/virtualbox/nsIInputStream.h include/virtualbox/nsIInputStreamTee.h include/virtualbox/nsIInterfaceInfo.h include/virtualbox/nsIInterfaceInfoManager.h include/virtualbox/nsIInterfaceRequestor.h include/virtualbox/nsILineInputStream.h include/virtualbox/nsILocalFile.h include/virtualbox/nsILocalFileMac.h include/virtualbox/nsIMemory.h include/virtualbox/nsIModule.h include/virtualbox/nsIMultiplexInputStream.h include/virtualbox/nsINativeComponentLoader.h include/virtualbox/nsIObjectInputStream.h include/virtualbox/nsIObjectOutputStream.h include/virtualbox/nsIObserver.h include/virtualbox/nsIObserverService.h include/virtualbox/nsIOutputStream.h include/virtualbox/nsIPersistentProperties2.h include/virtualbox/nsIPipe.h include/virtualbox/nsIProcess.h include/virtualbox/nsIProgrammingLanguage.h include/virtualbox/nsIProperties.h include/virtualbox/nsIPropertyBag.h include/virtualbox/nsIProxyObjectManager.h include/virtualbox/nsIRecyclingAllocator.h include/virtualbox/nsIRunnable.h include/virtualbox/nsIScriptableInputStream.h include/virtualbox/nsISeekableStream.h include/virtualbox/nsISerializable.h include/virtualbox/nsIServiceManager.h include/virtualbox/nsISimpleEnumerator.h include/virtualbox/nsIStorageStream.h include/virtualbox/nsIStreamBufferAccess.h include/virtualbox/nsIStringEnumerator.h include/virtualbox/nsIStringStream.h include/virtualbox/nsISupports.h include/virtualbox/nsISupportsArray.h include/virtualbox/nsISupportsIterators.h include/virtualbox/nsISupportsPrimitives.h include/virtualbox/nsIThread.h include/virtualbox/nsITimelineService.h include/virtualbox/nsITimer.h include/virtualbox/nsITimerInternal.h include/virtualbox/nsITimerManager.h include/virtualbox/nsITraceRefcnt.h include/virtualbox/nsIVariant.h include/virtualbox/nsIWeakReference.h include/virtualbox/nsIXPTLoader.h include/virtualbox/nsrootidl.h include/virtualbox/ipcd/ipcCID.h include/virtualbox/ipcd/ipcLockCID.h include/virtualbox/ipcd/ipcMessageReader.h include/virtualbox/ipcd/ipcMessageWriter.h include/virtualbox/ipcd/ipcModule.h include/virtualbox/ipcd/ipcModuleUtil.h include/virtualbox/ipcd/ipcdclient.h include/virtualbox/nsprpub/nspr.h include/virtualbox/nsprpub/plarena.h include/virtualbox/nsprpub/plarenas.h include/virtualbox/nsprpub/plbase64.h include/virtualbox/nsprpub/plerror.h include/virtualbox/nsprpub/plgetopt.h include/virtualbox/nsprpub/plhash.h include/virtualbox/nsprpub/plresolv.h include/virtualbox/nsprpub/plstr.h include/virtualbox/nsprpub/pratom.h include/virtualbox/nsprpub/prbit.h include/virtualbox/nsprpub/prclist.h include/virtualbox/nsprpub/prcmon.h include/virtualbox/nsprpub/prcountr.h include/virtualbox/nsprpub/prcpucfg.h include/virtualbox/nsprpub/prcvar.h include/virtualbox/nsprpub/prdtoa.h include/virtualbox/nsprpub/prenv.h include/virtualbox/nsprpub/prerr.h include/virtualbox/nsprpub/prerror.h include/virtualbox/nsprpub/prinet.h include/virtualbox/nsprpub/prinit.h include/virtualbox/nsprpub/prinrval.h include/virtualbox/nsprpub/prio.h include/virtualbox/nsprpub/pripcsem.h include/virtualbox/nsprpub/prlink.h include/virtualbox/nsprpub/prlock.h include/virtualbox/nsprpub/prlog.h include/virtualbox/nsprpub/prlong.h include/virtualbox/nsprpub/prmem.h include/virtualbox/nsprpub/prmon.h include/virtualbox/nsprpub/prmwait.h include/virtualbox/nsprpub/prnetdb.h include/virtualbox/nsprpub/prolock.h include/virtualbox/nsprpub/prpdce.h include/virtualbox/nsprpub/prprf.h include/virtualbox/nsprpub/prproces.h include/virtualbox/nsprpub/prrng.h include/virtualbox/nsprpub/prrwlock.h include/virtualbox/nsprpub/prshm.h include/virtualbox/nsprpub/prshma.h include/virtualbox/nsprpub/prsystem.h include/virtualbox/nsprpub/prthread.h include/virtualbox/nsprpub/prtime.h include/virtualbox/nsprpub/prtpool.h include/virtualbox/nsprpub/prtrace.h include/virtualbox/nsprpub/prtypes.h include/virtualbox/nsprpub/prvrsion.h include/virtualbox/nsprpub/prwin16.h include/virtualbox/nsprpub/md/_darwin.cfg include/virtualbox/nsprpub/md/_darwin.h include/virtualbox/nsprpub/md/_freebsd.cfg include/virtualbox/nsprpub/md/_freebsd.h include/virtualbox/nsprpub/md/_iprt_atomic.h include/virtualbox/nsprpub/md/_linux.cfg include/virtualbox/nsprpub/md/_linux.h include/virtualbox/nsprpub/md/_macos.h include/virtualbox/nsprpub/md/_netbsd.cfg include/virtualbox/nsprpub/md/_netbsd.h include/virtualbox/nsprpub/md/_openbsd.cfg include/virtualbox/nsprpub/md/_openbsd.h include/virtualbox/nsprpub/md/_os2.cfg include/virtualbox/nsprpub/md/_os2.h include/virtualbox/nsprpub/md/_os2_errors.h include/virtualbox/nsprpub/md/_pcos.h include/virtualbox/nsprpub/md/_pth.h include/virtualbox/nsprpub/md/_solaris.h include/virtualbox/nsprpub/md/_solaris32.cfg include/virtualbox/nsprpub/md/_solaris64.cfg include/virtualbox/nsprpub/md/_unix_errors.h include/virtualbox/nsprpub/md/_unixos.h include/virtualbox/nsprpub/md/prosdep.h include/virtualbox/nsprpub/obsolete/pralarm.h include/virtualbox/nsprpub/obsolete/probslet.h include/virtualbox/nsprpub/obsolete/protypes.h include/virtualbox/nsprpub/obsolete/prsem.h include/virtualbox/nsprpub/private/pprio.h include/virtualbox/nsprpub/private/pprthred.h include/virtualbox/nsprpub/private/prpriv.h include/virtualbox/string/nsAString.h include/virtualbox/string/nsAlgorithm.h include/virtualbox/string/nsCharTraits.h include/virtualbox/string/nsDependentString.h include/virtualbox/string/nsDependentSubstring.h include/virtualbox/string/nsEmbedString.h include/virtualbox/string/nsLiteralString.h include/virtualbox/string/nsObsoleteAString.h include/virtualbox/string/nsPrintfCString.h include/virtualbox/string/nsPromiseFlatString.h include/virtualbox/string/nsReadableUtils.h include/virtualbox/string/nsString.h include/virtualbox/string/nsStringAPI.h include/virtualbox/string/nsStringFwd.h include/virtualbox/string/nsStringIterator.h include/virtualbox/string/nsSubstring.h include/virtualbox/string/nsSubstringTuple.h include/virtualbox/string/nsTAString.h include/virtualbox/string/nsTDependentString.h include/virtualbox/string/nsTDependentSubstring.h include/virtualbox/string/nsTObsoleteAString.h include/virtualbox/string/nsTPromiseFlatString.h include/virtualbox/string/nsTString.h include/virtualbox/string/nsTSubstring.h include/virtualbox/string/nsTSubstringTuple.h include/virtualbox/string/nsUTF8Utils.h include/virtualbox/string/nsXPIDLString.h include/virtualbox/string/string-template-def-char.h include/virtualbox/string/string-template-def-unichar.h include/virtualbox/string/string-template-undef.h include/virtualbox/xpcom/nsAgg.h include/virtualbox/xpcom/nsAppDirectoryServiceDefs.h include/virtualbox/xpcom/nsArray.h include/virtualbox/xpcom/nsArrayEnumerator.h include/virtualbox/xpcom/nsAtomService.h include/virtualbox/xpcom/nsAutoBuffer.h include/virtualbox/xpcom/nsAutoLock.h include/virtualbox/xpcom/nsAutoPtr.h include/virtualbox/xpcom/nsBaseHashtable.h include/virtualbox/xpcom/nsCOMArray.h include/virtualbox/xpcom/nsCOMPtr.h include/virtualbox/xpcom/nsCRT.h include/virtualbox/xpcom/nsCategoryManagerUtils.h include/virtualbox/xpcom/nsCheapSets.h include/virtualbox/xpcom/nsClassHashtable.h include/virtualbox/xpcom/nsCom.h include/virtualbox/xpcom/nsComponentManagerObsolete.h include/virtualbox/xpcom/nsComponentManagerUtils.h include/virtualbox/xpcom/nsCppSharedAllocator.h include/virtualbox/xpcom/nsDataHashtable.h include/virtualbox/xpcom/nsDebug.h include/virtualbox/xpcom/nsDebugImpl.h include/virtualbox/xpcom/nsDeque.h include/virtualbox/xpcom/nsDirectoryService.h include/virtualbox/xpcom/nsDirectoryServiceDefs.h include/virtualbox/xpcom/nsDirectoryServiceUtils.h include/virtualbox/xpcom/nsDoubleHashtable.h include/virtualbox/xpcom/nsEnumeratorUtils.h include/virtualbox/xpcom/nsError.h include/virtualbox/xpcom/nsEscape.h include/virtualbox/xpcom/nsEventQueueUtils.h include/virtualbox/xpcom/nsFastLoadPtr.h include/virtualbox/xpcom/nsFastLoadService.h include/virtualbox/xpcom/nsFixedSizeAllocator.h include/virtualbox/xpcom/nsGenericFactory.h include/virtualbox/xpcom/nsHashKeys.h include/virtualbox/xpcom/nsHashSets.h include/virtualbox/xpcom/nsHashtable.h include/virtualbox/xpcom/nsIAllocator.h include/virtualbox/xpcom/nsIByteBuffer.h include/virtualbox/xpcom/nsID.h include/virtualbox/xpcom/nsIGenericFactory.h include/virtualbox/xpcom/nsIID.h include/virtualbox/xpcom/nsIInterfaceRequestorUtils.h include/virtualbox/xpcom/nsIServiceManagerObsolete.h include/virtualbox/xpcom/nsIServiceManagerUtils.h include/virtualbox/xpcom/nsISupportsBase.h include/virtualbox/xpcom/nsISupportsImpl.h include/virtualbox/xpcom/nsISupportsObsolete.h include/virtualbox/xpcom/nsISupportsUtils.h include/virtualbox/xpcom/nsIUnicharBuffer.h include/virtualbox/xpcom/nsIUnicharInputStream.h include/virtualbox/xpcom/nsIWeakReferenceUtils.h include/virtualbox/xpcom/nsInt64.h include/virtualbox/xpcom/nsInterfaceHashtable.h include/virtualbox/xpcom/nsLinebreakConverter.h include/virtualbox/xpcom/nsLocalFile.h include/virtualbox/xpcom/nsLocalFileOS2.h include/virtualbox/xpcom/nsLocalFileOSX.h include/virtualbox/xpcom/nsLocalFileUnix.h include/virtualbox/xpcom/nsMemory.h include/virtualbox/xpcom/nsModule.h include/virtualbox/xpcom/nsMultiplexInputStream.h include/virtualbox/xpcom/nsNativeCharsetUtils.h include/virtualbox/xpcom/nsNativeComponentLoader.h include/virtualbox/xpcom/nsObserverService.h include/virtualbox/xpcom/nsObsoleteModuleLoading.h include/virtualbox/xpcom/nsProcess.h include/virtualbox/xpcom/nsProxiedService.h include/virtualbox/xpcom/nsProxyEvent.h include/virtualbox/xpcom/nsProxyRelease.h include/virtualbox/xpcom/nsQuickSort.h include/virtualbox/xpcom/nsRecyclingAllocator.h include/virtualbox/xpcom/nsRefPtrHashtable.h include/virtualbox/xpcom/nsScriptableInputStream.h include/virtualbox/xpcom/nsStaticAtom.h include/virtualbox/xpcom/nsStaticComponent.h include/virtualbox/xpcom/nsStaticNameTable.h include/virtualbox/xpcom/nsStorageStream.h include/virtualbox/xpcom/nsStreamUtils.h include/virtualbox/xpcom/nsStringEnumerator.h include/virtualbox/xpcom/nsStringIO.h include/virtualbox/xpcom/nsStringStream.h include/virtualbox/xpcom/nsSupportsArray.h include/virtualbox/xpcom/nsSupportsPrimitives.h include/virtualbox/xpcom/nsTHashtable.h include/virtualbox/xpcom/nsTextFormatter.h include/virtualbox/xpcom/nsTime.h include/virtualbox/xpcom/nsTraceRefcnt.h include/virtualbox/xpcom/nsTraceRefcntImpl.h include/virtualbox/xpcom/nsUnitConversion.h include/virtualbox/xpcom/nsValueArray.h include/virtualbox/xpcom/nsVariant.h include/virtualbox/xpcom/nsVoidArray.h include/virtualbox/xpcom/nsWeakPtr.h include/virtualbox/xpcom/nsWeakReference.h include/virtualbox/xpcom/nsXPCOM.h include/virtualbox/xpcom/nsXPCOMCID.h include/virtualbox/xpcom/nsXPCOMGlue.h include/virtualbox/xpcom/nscore.h include/virtualbox/xpcom/pldhash.h include/virtualbox/xpcom/plevent.h include/virtualbox/xpcom/xcDll.h include/virtualbox/xpcom/xpcom-config.h include/virtualbox/xpcom/xpt_arena.h include/virtualbox/xpcom/xpt_struct.h include/virtualbox/xpcom/xpt_xdr.h include/virtualbox/xpcom/xptcall.h include/virtualbox/xpcom/xptcstubsdecl.inc include/virtualbox/xpcom/xptcstubsdef.inc include/virtualbox/xpcom/xptinfo.h %%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi-1.0-py%%PYTHON_VER%%.egg-info/PKG-INFO %%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi-1.0-py%%PYTHON_VER%%.egg-info/SOURCES.txt %%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi-1.0-py%%PYTHON_VER%%.egg-info/dependency_links.txt %%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi-1.0-py%%PYTHON_VER%%.egg-info/top_level.txt %%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi/VirtualBox_constants.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi%%PYTHON_PYCDIR%%VirtualBox_constants%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi/__init__.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/vboxapi%%PYTHON_PYCDIR%%__init__%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/__init__.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom%%PYTHON_PYCDIR%%__init__%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/components.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom%%PYTHON_PYCDIR%%components%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/file.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom%%PYTHON_PYCDIR%%file%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/nsError.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom%%PYTHON_PYCDIR%%nsError%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/primitives.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom%%PYTHON_PYCDIR%%primitives%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/vboxxpcom.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom%%PYTHON_PYCDIR%%vboxxpcom%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/xpcom_consts.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom%%PYTHON_PYCDIR%%xpcom_consts%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/xpt.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom%%PYTHON_PYCDIR%%xpt%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/client/__init__.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/client%%PYTHON_PYCDIR%%__init__%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/server/__init__.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/server%%PYTHON_PYCDIR%%__init__%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/server/enumerator.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/server%%PYTHON_PYCDIR%%enumerator%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/server/factory.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/server%%PYTHON_PYCDIR%%factory%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/server/loader.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/server%%PYTHON_PYCDIR%%loader%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/server/module.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/server%%PYTHON_PYCDIR%%module%%PYTHON_PYCEXT%% %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/server/policy.py %%PYTHON%%%%PYTHON_SITELIBDIR%%/xpcom/server%%PYTHON_PYCDIR%%policy%%PYTHON_PYCEXT%% %%QT%%lib/virtualbox/DbgPlugInDiggers.so lib/virtualbox/VBox.sh lib/virtualbox/VBoxAuth.so lib/virtualbox/VBoxAuthSimple.so lib/virtualbox/VBoxAutostart lib/virtualbox/VBoxBalloonCtrl lib/virtualbox/VBoxBugReport lib/virtualbox/VBoxDD.so lib/virtualbox/VBoxDD2.so lib/virtualbox/VBoxDDR0.r0 lib/virtualbox/VBoxDDU.so %%QT%%lib/virtualbox/UICommon.so %%QT%%lib/virtualbox/VBoxDbg.so %%QT%%lib/virtualbox/VBoxDragAndDropSvc.so lib/virtualbox/VBoxEFI32.fd lib/virtualbox/VBoxEFI64.fd lib/virtualbox/VBoxExtPackHelperApp lib/virtualbox/VBoxGuestControlSvc.so lib/virtualbox/VBoxGuestPropSvc.so @(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxHeadless lib/virtualbox/VBoxHeadless.so lib/virtualbox/VBoxHostChannel.so -%%X11%%lib/virtualbox/VBoxKeyboard.so +%%QT%%lib/virtualbox/VBoxKeyboard.so lib/virtualbox/VBoxManage @(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxNetAdpCtl @(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxNetDHCP lib/virtualbox/VBoxNetDHCP.so @(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxNetNAT lib/virtualbox/VBoxNetNAT.so lib/virtualbox/VBoxRT.so -%%X11%%@(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxSDL -%%X11%%lib/virtualbox/VBoxSDL.so lib/virtualbox/VBoxSVC %%X11%%lib/virtualbox/VBoxSVGA3D.so lib/virtualbox/VBoxSharedClipboard.so lib/virtualbox/VBoxSharedFolders.so %%QT%%lib/virtualbox/VBoxTestOGL lib/virtualbox/VBoxVMM.so lib/virtualbox/VBoxVMMPreload.so lib/virtualbox/VBoxXPCOM.so lib/virtualbox/VBoxXPCOMC.so lib/virtualbox/VBoxXPCOMIPCD lib/virtualbox/VMMR0.r0 %%QT%%lib/virtualbox/VirtualBox %%QT%%@(root,%%VBOXGROUP%%,4510) lib/virtualbox/VirtualBoxVM %%QT%%lib/virtualbox/VirtualBoxVM.so %%SDK%%lib/virtualbox/sdk %%VBOXIMG%%lib/virtualbox/vboximg-mount %%WEBSERVICE%%lib/virtualbox/vboxwebsrv %%WEBSERVICE%%lib/virtualbox/webtest %%VNC%%lib/virtualbox/ExtensionPacks/VNC/ExtPack-license.html %%VNC%%lib/virtualbox/ExtensionPacks/VNC/ExtPack-license.rtf %%VNC%%lib/virtualbox/ExtensionPacks/VNC/ExtPack-license.txt %%VNC%%lib/virtualbox/ExtensionPacks/VNC/ExtPack.xml %%VNC%%lib/virtualbox/ExtensionPacks/VNC/%%ARCH%%/VBoxVNC.so %%VNC%%lib/virtualbox/ExtensionPacks/VNC/%%ARCH%%/VBoxVNCMain.so %%GUESTADDITIONS%%lib/virtualbox/additions/VBoxGuestAdditions.iso %%GUESTADDITIONS%%lib/virtualbox/additions/VBoxGuestAdditions_%%GUEST_VER%%.iso lib/virtualbox/components/VBoxC.so lib/virtualbox/components/VBoxSVCM.so lib/virtualbox/components/VBoxXPCOMBase.xpt lib/virtualbox/components/VBoxXPCOMIPCC.so lib/virtualbox/components/VirtualBox_XPCOM.xpt %%QT%%share/applications/virtualbox.desktop %%DOCS%%%%DOCSDIR%%/UserManual.pdf %%QT%%share/pixmaps/VBox.png %%DATADIR%%/idl/VirtualBox_XPCOM.idl %%DATADIR%%/idl/ipcIClientObserver.idl %%DATADIR%%/idl/ipcIDConnectService.idl %%DATADIR%%/idl/ipcILockService.idl %%DATADIR%%/idl/ipcIMessageObserver.idl %%DATADIR%%/idl/ipcIService.idl %%DATADIR%%/idl/ipcITransactionObserver.idl %%DATADIR%%/idl/ipcITransactionService.idl %%DATADIR%%/idl/nsIArray.idl %%DATADIR%%/idl/nsIAsyncInputStream.idl %%DATADIR%%/idl/nsIAsyncOutputStream.idl %%DATADIR%%/idl/nsIAtom.idl %%DATADIR%%/idl/nsIAtomService.idl %%DATADIR%%/idl/nsIBinaryInputStream.idl %%DATADIR%%/idl/nsIBinaryOutputStream.idl %%DATADIR%%/idl/nsIByteArrayInputStream.idl %%DATADIR%%/idl/nsICategoryManager.idl %%DATADIR%%/idl/nsIClassInfo.idl %%DATADIR%%/idl/nsICollection.idl %%DATADIR%%/idl/nsIComponentLoader.idl %%DATADIR%%/idl/nsIComponentLoaderManager.idl %%DATADIR%%/idl/nsIComponentManager.idl %%DATADIR%%/idl/nsIComponentManagerObsolete.idl %%DATADIR%%/idl/nsIComponentRegistrar.idl %%DATADIR%%/idl/nsIConsoleListener.idl %%DATADIR%%/idl/nsIConsoleMessage.idl %%DATADIR%%/idl/nsIConsoleService.idl %%DATADIR%%/idl/nsIDebug.idl %%DATADIR%%/idl/nsIDirectoryEnumerator.idl %%DATADIR%%/idl/nsIDirectoryService.idl %%DATADIR%%/idl/nsIEnumerator.idl %%DATADIR%%/idl/nsIEnvironment.idl %%DATADIR%%/idl/nsIErrorService.idl %%DATADIR%%/idl/nsIEventQueue.idl %%DATADIR%%/idl/nsIEventQueueService.idl %%DATADIR%%/idl/nsIEventTarget.idl %%DATADIR%%/idl/nsIException.idl %%DATADIR%%/idl/nsIExceptionService.idl %%DATADIR%%/idl/nsIFactory.idl %%DATADIR%%/idl/nsIFastLoadFileControl.idl %%DATADIR%%/idl/nsIFastLoadService.idl %%DATADIR%%/idl/nsIFile.idl %%DATADIR%%/idl/nsIHashable.idl %%DATADIR%%/idl/nsIInputStream.idl %%DATADIR%%/idl/nsIInputStreamTee.idl %%DATADIR%%/idl/nsIInterfaceInfo.idl %%DATADIR%%/idl/nsIInterfaceInfoManager.idl %%DATADIR%%/idl/nsIInterfaceRequestor.idl %%DATADIR%%/idl/nsILineInputStream.idl %%DATADIR%%/idl/nsILocalFile.idl %%DATADIR%%/idl/nsILocalFileMac.idl %%DATADIR%%/idl/nsIMemory.idl %%DATADIR%%/idl/nsIModule.idl %%DATADIR%%/idl/nsIMultiplexInputStream.idl %%DATADIR%%/idl/nsINativeComponentLoader.idl %%DATADIR%%/idl/nsIObjectInputStream.idl %%DATADIR%%/idl/nsIObjectOutputStream.idl %%DATADIR%%/idl/nsIObserver.idl %%DATADIR%%/idl/nsIObserverService.idl %%DATADIR%%/idl/nsIOutputStream.idl %%DATADIR%%/idl/nsIPersistentProperties2.idl %%DATADIR%%/idl/nsIPipe.idl %%DATADIR%%/idl/nsIProcess.idl %%DATADIR%%/idl/nsIProgrammingLanguage.idl %%DATADIR%%/idl/nsIProperties.idl %%DATADIR%%/idl/nsIPropertyBag.idl %%DATADIR%%/idl/nsIProxyObjectManager.idl %%DATADIR%%/idl/nsIRecyclingAllocator.idl %%DATADIR%%/idl/nsIRunnable.idl %%DATADIR%%/idl/nsIScriptableInputStream.idl %%DATADIR%%/idl/nsISeekableStream.idl %%DATADIR%%/idl/nsISerializable.idl %%DATADIR%%/idl/nsIServiceManager.idl %%DATADIR%%/idl/nsISimpleEnumerator.idl %%DATADIR%%/idl/nsIStorageStream.idl %%DATADIR%%/idl/nsIStreamBufferAccess.idl %%DATADIR%%/idl/nsIStringEnumerator.idl %%DATADIR%%/idl/nsIStringStream.idl %%DATADIR%%/idl/nsISupports.idl %%DATADIR%%/idl/nsISupportsArray.idl %%DATADIR%%/idl/nsISupportsIterators.idl %%DATADIR%%/idl/nsISupportsPrimitives.idl %%DATADIR%%/idl/nsIThread.idl %%DATADIR%%/idl/nsITimelineService.idl %%DATADIR%%/idl/nsITimer.idl %%DATADIR%%/idl/nsITimerInternal.idl %%DATADIR%%/idl/nsITimerManager.idl %%DATADIR%%/idl/nsITraceRefcnt.idl %%DATADIR%%/idl/nsIVariant.idl %%DATADIR%%/idl/nsIWeakReference.idl %%DATADIR%%/idl/nsIXPTLoader.idl %%DATADIR%%/idl/nsrootidl.idl %%NLS%%%%DATADIR%%/nls/VirtualBox_bg.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_ca.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_ca_VA.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_cs.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_da.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_de.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_el.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_en.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_es.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_eu.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_fa.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_fi.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_fr.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_gl.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_he.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_hr_HR.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_hu.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_id.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_it.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_ja.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_ka.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_km_KH.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_ko.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_lt.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_nl.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_pl.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_pt.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_pt_BR.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_ro.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_ru.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_sk.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_sl.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_sr.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_sv.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_th.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_tr.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_uk.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_zh_CN.qm %%NLS%%%%DATADIR%%/nls/VirtualBox_zh_TW.qm %%NLS%%%%DATADIR%%/nls/qt_bg.qm %%NLS%%%%DATADIR%%/nls/qt_ca.qm %%NLS%%%%DATADIR%%/nls/qt_ca_VA.qm %%NLS%%%%DATADIR%%/nls/qt_cs.qm %%NLS%%%%DATADIR%%/nls/qt_da.qm %%NLS%%%%DATADIR%%/nls/qt_de.qm %%NLS%%%%DATADIR%%/nls/qt_el.qm %%NLS%%%%DATADIR%%/nls/qt_en.qm %%NLS%%%%DATADIR%%/nls/qt_es.qm %%NLS%%%%DATADIR%%/nls/qt_eu.qm %%NLS%%%%DATADIR%%/nls/qt_fa.qm %%NLS%%%%DATADIR%%/nls/qt_fi.qm %%NLS%%%%DATADIR%%/nls/qt_fr.qm %%NLS%%%%DATADIR%%/nls/qt_gl.qm %%NLS%%%%DATADIR%%/nls/qt_he.qm %%NLS%%%%DATADIR%%/nls/qt_hr_HR.qm %%NLS%%%%DATADIR%%/nls/qt_hu.qm %%NLS%%%%DATADIR%%/nls/qt_id.qm %%NLS%%%%DATADIR%%/nls/qt_it.qm %%NLS%%%%DATADIR%%/nls/qt_ja.qm %%NLS%%%%DATADIR%%/nls/qt_ka.qm %%NLS%%%%DATADIR%%/nls/qt_km_KH.qm %%NLS%%%%DATADIR%%/nls/qt_ko.qm %%NLS%%%%DATADIR%%/nls/qt_lt.qm %%NLS%%%%DATADIR%%/nls/qt_nl.qm %%NLS%%%%DATADIR%%/nls/qt_pl.qm %%NLS%%%%DATADIR%%/nls/qt_pt.qm %%NLS%%%%DATADIR%%/nls/qt_pt_BR.qm %%NLS%%%%DATADIR%%/nls/qt_ro.qm %%NLS%%%%DATADIR%%/nls/qt_ru.qm %%NLS%%%%DATADIR%%/nls/qt_sk.qm %%NLS%%%%DATADIR%%/nls/qt_sl.qm %%NLS%%%%DATADIR%%/nls/qt_sr.qm %%NLS%%%%DATADIR%%/nls/qt_sv.qm %%NLS%%%%DATADIR%%/nls/qt_th.qm %%NLS%%%%DATADIR%%/nls/qt_tr.qm %%NLS%%%%DATADIR%%/nls/qt_uk.qm %%NLS%%%%DATADIR%%/nls/qt_zh_CN.qm %%NLS%%%%DATADIR%%/nls/qt_zh_TW.qm %%DATADIR%%/samples/Makefile %%DATADIR%%/samples/tstVBoxAPIXPCOM.cpp %%WEBSERVICE%%%%DATADIR%%/sdk/bindings/webservice/vboxweb.wsdl %%PYTHON%%%%DATADIR%%/sdk/bindings/xpcom/python/xpcom diff --git a/emulators/virtualbox-ose-kmod-70/Makefile b/emulators/virtualbox-ose-kmod-70/Makefile index 9bbd0e6d5fa6..2e992ea771bc 100644 --- a/emulators/virtualbox-ose-kmod-70/Makefile +++ b/emulators/virtualbox-ose-kmod-70/Makefile @@ -1,112 +1,111 @@ PORTNAME= virtualbox-ose -DISTVERSION= 6.1.50 -PORTREVISION= 1 +DISTVERSION= 7.0.24 CATEGORIES= emulators MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/ -PKGNAMESUFFIX= -kmod +PKGNAMESUFFIX= -kmod-70 DISTNAME= VirtualBox-${DISTVERSION} MAINTAINER= vbox@FreeBSD.org COMMENT= VirtualBox kernel module for FreeBSD WWW= https://www.virtualbox.org/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING ONLY_FOR_ARCHS= amd64 BUILD_DEPENDS= kmk:devel/kBuild USES= cpe compiler:c++14-lang kmod tar:bzip2 CPE_VENDOR= oracle CPE_PRODUCT= vm_virtualbox USE_RC_SUBR= vboxnet HAS_CONFIGURE= yes CONFIGURE_ARGS+= --build-headless CONFIGURE_ARGS+= --disable-alsa \ --disable-dbus \ --disable-docs \ --disable-libvpx \ --disable-pulse \ --disable-python \ --disable-sdl-ttf \ --disable-xpcom CONFIGURE_ARGS+= --nofatal --with-gcc="${CC}" --with-g++="${CXX}" -CONFLICTS_INSTALL= virtualbox-ose-kmod-legacy \ - virtualbox-ose-kmod-70 +CONFLICTS_INSTALL= virtualbox-ose-kmod \ + virtualbox-ose-kmod-legacy -PATCHDIR= ${.CURDIR}/../${PORTNAME}/files -PORTSCOUT= limit:^6\. +PATCHDIR= ${.CURDIR}/../${PORTNAME}-70/files +PORTSCOUT= limit:^7\.0\. SUB_FILES= pkg-message SUB_LIST= OPSYS=${OPSYS} OSREL=${OSREL} WRKSRC= ${WRKDIR}/VirtualBox-${DISTVERSION} OPTIONS_DEFINE= DEBUG VIMAGE OPTIONS_DEFAULT= VIMAGE OPTIONS_SUB= yes DEBUG_DESC= Debug symbols, additional logs and assertions VIMAGE_DESC= VIMAGE virtual networking support .include VBOX_BIN= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/src VBOX_KMODS= vboxdrv \ vboxnetadp \ vboxnetflt BUILD_WRKSRC= ${VBOX_BIN} KMK_BUILDTYPE= release KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys KMK_FLAGS= HostDrivers-scripts vboxdrv-src VBoxNetFlt-src VBoxNetAdp-src .if ${PORT_OPTIONS:MDEBUG} KMK_FLAGS+= BUILD_TYPE=debug KMK_BUILDTYPE= debug EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-Config.kmk \ ${PATCHDIR}/extrapatch-src-VBox-HostDrivers-Support-freebsd-Makefile MAKE_ARGS+= DEBUG_FLAGS="-O1 -g" .endif .if ${ARCH} == i386 KMK_ARCH= freebsd.x86 .else KMK_ARCH= freebsd.${ARCH} .endif .include SYMBOLSUFFIX= debug PLIST_SUB+= SYMBOLSUFFIX=${SYMBOLSUFFIX} post-patch: @${ECHO_CMD} 'VBOX_WITH_VBOXDRV = 1' > ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_NETFLT = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_NETADP = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_ADDITIONS =' >> ${WRKSRC}/LocalConfig.kmk .if ${PORT_OPTIONS:MVIMAGE} @${ECHO_CMD} 'VBOX_WITH_NETFLT_VIMAGE = 1' >> ${WRKSRC}/LocalConfig.kmk .endif @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Config.kmk ${WRKSRC}/configure @${REINPLACE_CMD} \ -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \ ${WRKSRC}/configure pre-build: cd ${WRKSRC}/src/VBox/HostDrivers && ${SH} -c \ '. ${WRKSRC}/env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}' do-install: ${MKDIR} ${STAGEDIR}${KMODDIR} .for i in ${VBOX_KMODS} ${INSTALL_KLD} ${VBOX_BIN}/${i}/${i}.ko ${STAGEDIR}${KMODDIR} .if ${PORT_OPTIONS:MDEBUG} ${INSTALL_KLD} ${VBOX_BIN}/${i}/${i}.ko.${SYMBOLSUFFIX} ${STAGEDIR}${KMODDIR} .endif .endfor .include diff --git a/emulators/virtualbox-ose-kmod-70/distinfo b/emulators/virtualbox-ose-kmod-70/distinfo index f00e6ab0a7da..abcb5fb32c6c 100644 --- a/emulators/virtualbox-ose-kmod-70/distinfo +++ b/emulators/virtualbox-ose-kmod-70/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1705518738 -SHA256 (VirtualBox-6.1.50.tar.bz2) = 73ff603842896cb8d86ac5a817eb5037d7d225d3c46ea238e39d7ba5aaf61a57 -SIZE (VirtualBox-6.1.50.tar.bz2) = 165959648 +TIMESTAMP = 1738067736 +SHA256 (VirtualBox-7.0.24.tar.bz2) = 340d66f52251e23d9bc1eb4fdf70e44cb9d1db69bc5064e3f7bdfb8bc0e3a458 +SIZE (VirtualBox-7.0.24.tar.bz2) = 174663788 diff --git a/emulators/virtualbox-ose-nox11-70/Makefile b/emulators/virtualbox-ose-nox11-70/Makefile index c396083ebf7c..b1f9189a1bd4 100644 --- a/emulators/virtualbox-ose-nox11-70/Makefile +++ b/emulators/virtualbox-ose-nox11-70/Makefile @@ -1,11 +1,11 @@ -PORTREVISION= 8 -PKGNAMESUFFIX= -nox11 +PORTREVISION= 0 +PKGNAMESUFFIX= -nox11-70 -MASTERDIR= ${.CURDIR}/../virtualbox-ose +MASTERDIR= ${.CURDIR}/../virtualbox-ose-70 OPTIONS_EXCLUDE= ALSA DBUS DEBUG GUESTADDITIONS DOCS NLS PULSEAUDIO \ QT5 VPX X11 SLAVE_PORT= yes .include "${MASTERDIR}/Makefile"