summaryrefslogtreecommitdiff
path: root/emulators/virtualbox-ose/files
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/virtualbox-ose/files')
-rw-r--r--emulators/virtualbox-ose/files/patch-Config.kmk88
-rw-r--r--emulators/virtualbox-ose/files/patch-configure32
-rw-r--r--emulators/virtualbox-ose/files/patch-include-VBox-com-array.h29
-rw-r--r--emulators/virtualbox-ose/files/patch-include_iprt_string.h11
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile16
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-files_vboxguest24
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh9
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_crOpenGL_load.c34
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Additions_x11_VBoxClient_display.cpp13
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp46
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Devices_Makefile.kmk29
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Devices_build_VBoxDD.cpp25
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageHelp.cpp12
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h10
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyBackendFreeBSD.cpp (renamed from emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyServiceFreeBSD.cpp)6
15 files changed, 182 insertions, 202 deletions
diff --git a/emulators/virtualbox-ose/files/patch-Config.kmk b/emulators/virtualbox-ose/files/patch-Config.kmk
index c1c5a68fc5d6..cf2280c3b434 100644
--- a/emulators/virtualbox-ose/files/patch-Config.kmk
+++ b/emulators/virtualbox-ose/files/patch-Config.kmk
@@ -1,6 +1,6 @@
---- Config.kmk.orig 2016-07-18 11:50:32 UTC
+--- Config.kmk.orig 2016-08-16 19:55:20 UTC
+++ Config.kmk
-@@ -341,7 +341,7 @@ VBOX_WITH_DOCS = 1
+@@ -348,7 +348,7 @@ VBOX_WITH_DOCS = 1
# Include documentation in the package
VBOX_WITH_DOCS_PACKING = 1
# Include CHM when building docs (unset in LocalConfig.kmk to suppress CHM)
@@ -9,20 +9,21 @@
VBOX_WITH_DOCS_CHM = 1
endif
# By default only include translations in documentation-only builds
-@@ -422,22 +422,22 @@ ifn1of ($(KBUILD_TARGET), win darwin)
+@@ -431,11 +431,11 @@ ifn1of ($(KBUILD_TARGET), win darwin)
# Enable OSS audio support.
- VBOX_WITH_OSS = 1
+ VBOX_WITH_AUDIO_OSS = 1
endif
-if1of ($(KBUILD_TARGET), linux)
+if1of ($(KBUILD_TARGET), freebsd linux)
# Enable ALSA audio support.
- VBOX_WITH_ALSA = 1
+ VBOX_WITH_AUDIO_ALSA = 1
endif
-if1of ($(KBUILD_TARGET), linux)
+if1of ($(KBUILD_TARGET), freebsd linux)
# Enable PulseAudio audio support.
- VBOX_WITH_PULSE = 1
+ VBOX_WITH_AUDIO_PULSE = 1
endif
+@@ -446,11 +446,11 @@ endif
# Enable PCI passthrough support.
VBOX_WITH_PCI_PASSTHROUGH = 1
# Enable statically linked dbus support.
@@ -35,8 +36,17 @@
+if1of ($(KBUILD_TARGET), freebsd linux solaris)
VBOX_WITH_PAM = 1
endif
- # Disable WINMM support for Windows (not implemented).
-@@ -627,7 +627,7 @@ VBOX_WITH_VDITOOL =
+ # Enable internal networking.
+@@ -591,7 +591,7 @@ VBOX_WITH_WEBSERVICES = 1
+ VBOX_WITH_WEBSERVICES_SSL = 1
+ # The Qt GUI.
+ VBOX_WITH_QTGUI = 1
+-if1of ($(KBUILD_TARGET), linux win solaris)
++if1of ($(KBUILD_TARGET), freebsd linux win solaris)
+ VBOX_WITH_QTGUI_V5 = 1 # r=bird: s/VBOX_WITH_QTGUI_V5/VBOX_WITH_QT5/g - our we released version 5.0 of the VirtualBox GUI last year, remember?
+ else if "$(KBUILD_TARGET)" == "darwin" && $(KBUILD_HOST_VERSION_MAJOR) >= 13 # (OS X 10.9 Mavericks)
+ VBOX_WITH_QTGUI_V5 = 1
+@@ -651,7 +651,7 @@ VBOX_WITH_VDITOOL =
# Enable this to build vbox-img even if VBOX_WITH_TESTCASES is disabled
VBOX_WITH_VBOX_IMG =
# Enables the VPX module for VM video capturing
@@ -45,7 +55,7 @@
VBOX_WITH_VPX = 1
endif
# Enable shared folders
-@@ -935,10 +935,6 @@ ifeq ($(KBUILD_TARGET),darwin)
+@@ -961,10 +961,6 @@ ifeq ($(KBUILD_TARGET),darwin)
VBOX_WITH_VBOXSDL=
endif
@@ -56,7 +66,7 @@
ifeq ($(KBUILD_TARGET),haiku)
# Don't bother with SDL ttf for now.
VBOX_WITH_SECURELABEL=
-@@ -1096,7 +1092,7 @@ ifdef VBOX_OSE
+@@ -1123,7 +1119,7 @@ ifdef VBOX_OSE
VBOX_WITH_KCHMVIEWER=
VBOX_WITH_PLUGIN_CRYPT=
VBOX_WITH_DRAG_AND_DROP_PROMISES=
@@ -65,7 +75,16 @@
VBOX_WITH_DOCS=
VBOX_WITH_DOCS_PACKING=
endif
-@@ -3912,7 +3908,7 @@ TEMPLATE_VBOXR0DRV_CFLAGS =
+@@ -2562,7 +2558,7 @@ $(PATH_OUT)/DynamicConfig.kmk: \
+ $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-delete-non-virtual-dtor ?= $(call VBOX_GCC_CHECK_CXX,-Wno-delete-non-virtual-dtor,)'
+ $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-int-to-pointer-cast ?= $(call VBOX_GCC_CHECK_CC,-Wno-int-to-pointer-cast,)'
+ $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-invalid-offsetof ?= $(call VBOX_GCC_CHECK_CXX,-Wno-invalid-offsetof,)'
+-if $(KBUILD_TARGET) != "darwin" || !defined(VBOX_WITH_NEW_XCODE) ## @todo somthing goes entirely sideways with the detection. clang doesn't know the option, but only complains when we use it in webservices/Makefile.kmk!
++if ($(KBUILD_TARGET) != "darwin" || !defined(VBOX_WITH_NEW_XCODE)) && $(KBUILD_TARGET) != "freebsd" ## @todo somthing goes entirely sideways with the detection. clang doesn't know the option, but only complains when we use it in webservices/Makefile.kmk!
+ $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-literal-suffix ?= $(call VBOX_GCC_CHECK_CXX,-Wno-literal-suffix,)'
+ else
+ $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-literal-suffix ?='
+@@ -4247,7 +4243,7 @@ TEMPLATE_VBOXR0DRV_CFLAGS =
-O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
-nostdinc -std=c99
@@ -74,7 +93,7 @@
TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 --param inline-unit-growth=100 --param large-function-growth=1000 \
-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 -Wundef
-@@ -4158,12 +4154,8 @@ TEMPLATE_VBOXR3EXE_LDFLAGS +=
+@@ -4574,12 +4570,8 @@ TEMPLATE_VBOXR3EXE_LDFLAGS +=
TEMPLATE_VBOXR3EXE_TOOL = GXX3
TEMPLATE_VBOXR3EXE_LIBS = pthread
TEMPLATE_VBOXR3EXE_INCS += \
@@ -85,18 +104,18 @@
- /usr/lib \
- /usr/X11R6/lib \
/usr/local/lib
- else ifeq ($(KBUILD_TARGET),solaris)
- TEMPLATE_VBOXR3EXE_TOOL = GXX3PLAIN
-@@ -4420,7 +4412,7 @@ ifeq ($(KBUILD_TARGET),win) # No CRT!
+ else ifeq ($(KBUILD_TARGET),netbsd)
+ TEMPLATE_VBOXR3EXE_TOOL = GXX3
+@@ -4869,7 +4861,7 @@ ifeq ($(KBUILD_TARGET),win) # No CRT!
TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.win.amd64 = $(TEMPLATE_VBOXR3EXE_LDFLAGS.win.amd64) /entry:suplibHardenedWindowsMain
TEMPLATE_VBOXR3HARDENEDEXE_LIBS.x86 = $(NOT_SUCH_VARIABLE)
TEMPLATE_VBOXR3HARDENEDEXE_LIBS.amd64 = $(NOT_SUCH_VARIABLE)
--else ifn1of ($(KBUILD_TARGET), os2)
-+else ifn1of ($(KBUILD_TARGET), os2 freebsd)
+-else ifn1of ($(KBUILD_TARGET), os2 solaris)
++else ifn1of ($(KBUILD_TARGET), freebsd 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_VBOXR3HARDENEDEXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux))
- endif
-@@ -4898,12 +4890,8 @@ TEMPLATE_VBOXMAINEXE_LIBS
+@@ -5362,12 +5354,8 @@ TEMPLATE_VBOXMAINEXE_LIBS
TEMPLATE_VBOXMAINEXE_TOOL = GXX3
TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME)
TEMPLATE_VBOXMAINEXE_INCS += \
@@ -107,22 +126,31 @@
- /usr/lib \
- /usr/X11R6/lib \
/usr/local/lib
- else ifeq ($(KBUILD_TARGET),solaris)
- TEMPLATE_VBOXMAINEXE_TOOL = GXX3PLAIN
-@@ -5371,12 +5359,8 @@ ifdef VBOX_WITH_QTGUI
+ else ifeq ($(KBUILD_TARGET),netbsd)
+ TEMPLATE_VBOXMAINEXE_TOOL = GXX3
+@@ -5716,7 +5704,7 @@ ifdef VBOX_WITH_QTGUI
+ else
+ VBOX_PATH_QT ?= $(lastword $(filter %-$(tolower $(VBOX_VCC_TOOL_STEM)),$(sort $(wildcard $(KBUILD_DEVTOOLS_TRG)/qt/v5*))))
+ endif
+- else if1of ($(KBUILD_TARGET), linux solaris)
++ else if1of ($(KBUILD_TARGET), freebsd linux solaris)
+ ifndef VBOX_WITH_QTGUI_V5
+ VBOX_PATH_QT ?= $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_TRG)/qt/v4*)))
+ else
+@@ -5914,12 +5902,8 @@ ifdef VBOX_WITH_QTGUI
$(VBOX_LIBPATH_X11)
ifeq ($(KBUILD_TARGET),freebsd)
- TEMPLATE_VBOXQT4GUIEXE_INCS += \
+ TEMPLATE_VBOXQTGUIEXE_INCS += \
- /usr/include \
- /usr/X11R6/include \
/usr/local/include
- TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \
+ TEMPLATE_VBOXQTGUIEXE_LIBPATH += \
- /usr/lib \
- /usr/X11R6/lib \
/usr/local/lib
endif
ifeq ($(KBUILD_TARGET),solaris)
-@@ -5587,12 +5571,8 @@ TEMPLATE_VBoxBldProg_LIBPATH
+@@ -6144,12 +6128,8 @@ TEMPLATE_VBoxBldProg_LIBPATH
TEMPLATE_VBoxBldProg_TOOL = GXX3
TEMPLATE_VBoxBldProg_LIBS = pthread
TEMPLATE_VBoxBldProg_INCS += \
@@ -133,13 +161,13 @@
- /usr/lib \
- /usr/X11R6/lib \
/usr/local/lib
- else ifeq ($(KBUILD_HOST),solaris)
- TEMPLATE_VBoxBldProg_TOOL = GXX3PLAIN
-@@ -5954,6 +5934,7 @@ TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.darw
+ else ifeq ($(KBUILD_HOST),netbsd)
+ TEMPLATE_VBoxBldProg_TOOL = GXX3
+@@ -6543,6 +6523,7 @@ TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.darw
-current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
-compatibility_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.linux = -Wl,--no-as-needed
+TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.freebsd = -Wl,--no-as-needed
TEMPLATE_VBOXCROGLR3HOSTDLL_BLDDIRS = $(VBOX_PATH_CROGL_GENFILES)/
-
- #
+ ifeq ($(KBUILD_TARGET),darwin)
+ TEMPLATE_VBOXCROGLR3HOSTDLL_CFLAGS = $(TEMPLATE_VBOXR3NP_CFLAGS) -Wno-deprecated-declarations
diff --git a/emulators/virtualbox-ose/files/patch-configure b/emulators/virtualbox-ose/files/patch-configure
index c9bbeb0b39f7..bfdf2a2ae812 100644
--- a/emulators/virtualbox-ose/files/patch-configure
+++ b/emulators/virtualbox-ose/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig 2016-07-18 11:50:32 UTC
+--- configure.orig 2016-08-16 19:55:20 UTC
+++ configure
-@@ -137,10 +137,14 @@ CXX_FLAGS=""
+@@ -140,10 +140,14 @@ CXX_FLAGS=""
if [ "$OS" = "freebsd" ]; then
INCCURL="-I/usr/local/include"
LIBCURL="-L/usr/local/lib -lcurl"
@@ -15,7 +15,17 @@
else
INCCURL=""
LIBCURL="-lcurl"
-@@ -1213,7 +1217,7 @@ extern "C" int main(void)
+@@ -441,6 +445,9 @@ check_gcc()
+ elif [ $cc_maj -eq 4 -a $cc_min -eq 0 -a "$OS" = "darwin" ]; then
+ log_success "found version $cc_ver"
+ # gcc-4.0 is allowed for Darwin only
++ elif [ $cc_maj -eq 4 -a $cc_min -eq 2 -a "$OS" = "freebsd" ]; then
++ log_success "found version $cc_ver"
++ # gcc-4.2 is allowed for FreeBSD only
+ elif [ $cc_maj -lt 4 \
+ -o \( $cc_maj -eq 4 -a $cc_min -lt 4 -a "$OS" != "darwin" \) \
+ -o \( $cc_maj -eq 4 -a $cc_min -lt 2 -a "$OS" = "darwin" \) \
+@@ -1224,7 +1231,7 @@ extern "C" int main(void)
#endif
}
EOF
@@ -24,7 +34,7 @@
test_execute
fi
}
-@@ -1945,8 +1949,8 @@ EOF
+@@ -2126,8 +2133,8 @@ EOF
echo "compiling the following source file:" >> $LOG
cat $ODIR.tmp_src.cc >> $LOG
echo "using the following command line:" >> $LOG
@@ -35,7 +45,7 @@
if [ $? -eq 0 ]; then
found=1
break
-@@ -2415,7 +2419,7 @@ for option in "$@"; do
+@@ -2603,7 +2610,7 @@ for option in "$@"; do
--with-openssl-dir=*)
OPENSSLDIR=`echo $option | cut -d'=' -f2`
INCCRYPTO="-I${OPENSSLDIR}/include"
@@ -44,24 +54,24 @@
;;
--with-ow-dir=*)
WATCOM=`echo $option | cut -d'=' -f2`
-@@ -2744,8 +2748,15 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then
+@@ -2942,8 +2949,15 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then
[ $WITH_PYTHON -eq 1 ] && check_python
[ $WITH_JAVA -eq 1 ] && check_java
- # PulseAudio
- if [ "$OS" = "linux" -o "$OS" = "freebsd" ]; then
-+ if [ $WITH_DBUS -eq 0 ]; then
-+ cnf_append "VBOX_WITH_DBUS" ""
-+ fi
+ if [ "$OS" = "linux" -o "$OS" = "freebsd" -o "$OS" = "netbsd" ]; then
+ if [ $WITH_ALSA -eq 1 ]; then
+ check_alsa
+ else
+ cnf_append "VBOX_WITH_ALSA" ""
+ fi
++ if [ $WITH_DBUS -eq 0 ]; then
++ cnf_append "VBOX_WITH_DBUS" ""
++ fi
if [ $WITH_PULSE -eq 1 ]; then
check_pulse
elif [ $WITH_PULSE -eq 0 ]; then
-@@ -2767,14 +2778,6 @@ if [ "$OS" = "linux" ]; then
+@@ -2965,14 +2979,6 @@ if [ "$OS" = "linux" ]; then
cnf_append "VBOX_WITH_ADDITION_DRIVERS" ""
fi
if [ $ONLY_ADDITIONS -eq 0 ]; then
diff --git a/emulators/virtualbox-ose/files/patch-include-VBox-com-array.h b/emulators/virtualbox-ose/files/patch-include-VBox-com-array.h
deleted file mode 100644
index f4ee788e799d..000000000000
--- a/emulators/virtualbox-ose/files/patch-include-VBox-com-array.h
+++ /dev/null
@@ -1,29 +0,0 @@
---- include/VBox/com/array.h.orig 2015-03-02 10:06:38.000000000 -0500
-+++ include/VBox/com/array.h 2015-03-12 17:52:37.107759000 -0400
-@@ -908,12 +908,12 @@
- */
- const T operator[] (size_t aIdx) const
- {
-- AssertReturn(m.arr != NULL, *((T *)NULL));
-- AssertReturn(aIdx < size(), *((T *)NULL));
-+ Assert(m.arr != NULL);
-+ Assert(aIdx < size());
- #ifdef VBOX_WITH_XPCOM
- return m.arr[aIdx];
- #else
-- AssertReturn(m.raw != NULL, *((T *)NULL));
-+ Assert(m.raw != NULL);
- return m.raw[aIdx];
- #endif
- }
-@@ -1409,8 +1409,8 @@
- */
- const nsID &operator[] (size_t aIdx) const
- {
-- AssertReturn(m.arr != NULL, **((const nsID * *)NULL));
-- AssertReturn(aIdx < size(), **((const nsID * *)NULL));
-+ Assert(m.arr != NULL);
-+ Assert(aIdx < size());
- return *m.arr[aIdx];
- }
-
diff --git a/emulators/virtualbox-ose/files/patch-include_iprt_string.h b/emulators/virtualbox-ose/files/patch-include_iprt_string.h
deleted file mode 100644
index ed8c33ef6341..000000000000
--- a/emulators/virtualbox-ose/files/patch-include_iprt_string.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/iprt/string.h.orig 2015-10-15 11:50:51 UTC
-+++ include/iprt/string.h
-@@ -107,7 +107,7 @@ char *strpbrk(const char *pszStr, const
- RT_C_DECLS_END
- #endif
-
--#if !defined(RT_OS_LINUX) || !defined(_GNU_SOURCE)
-+#if !defined(RT_OS_FREEBSD) && (!defined(RT_OS_LINUX) || !defined(_GNU_SOURCE))
- RT_C_DECLS_BEGIN
- void *memrchr(const char *pv, int ch, size_t cb);
- RT_C_DECLS_END
diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile b/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile
index 157f291eba94..639a44b0be59 100644
--- a/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile
+++ b/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile
@@ -1,6 +1,6 @@
---- src/VBox/Additions/common/VBoxGuest/freebsd/Makefile.orig 2015-04-14 15:38:06.000000000 -0400
-+++ src/VBox/Additions/common/VBoxGuest/freebsd/Makefile 2015-04-14 18:25:23.090523000 -0400
-@@ -71,6 +71,7 @@
+--- src/VBox/Additions/common/VBoxGuest/freebsd/Makefile.orig 2016-08-16 19:55:31 UTC
++++ src/VBox/Additions/common/VBoxGuest/freebsd/Makefile
+@@ -71,6 +71,7 @@ SRCS += \
handletable.c \
handletablectx.c \
once.c \
@@ -8,7 +8,15 @@
thread.c
.PATH: ${.CURDIR}/common/string
-@@ -149,8 +150,7 @@
+@@ -129,6 +130,7 @@ SRCS += \
+ .PATH: ${.CURDIR}/r0drv
+ SRCS += \
+ alloc-r0drv.c \
++ alloc-ef-r0drv.c \
+ initterm-r0drv.c \
+ memobj-r0drv.c \
+ powernotification-r0drv.c
+@@ -149,8 +151,7 @@ SRCS += \
spinlock-r0drv-freebsd.c \
thread-r0drv-freebsd.c \
thread2-r0drv-freebsd.c \
diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-files_vboxguest b/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-files_vboxguest
index cc1837fb6261..2e1f0be3ed6b 100644
--- a/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-files_vboxguest
+++ b/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-files_vboxguest
@@ -1,6 +1,6 @@
---- src/VBox/Additions/common/VBoxGuest/freebsd/files_vboxguest.orig 2014-09-09 23:46:56.000000000 +0400
-+++ src/VBox/Additions/common/VBoxGuest/freebsd/files_vboxguest 2014-09-18 22:06:32.817093478 +0400
-@@ -102,6 +102,7 @@
+--- src/VBox/Additions/common/VBoxGuest/freebsd/files_vboxguest.orig 2016-08-16 19:55:31 UTC
++++ src/VBox/Additions/common/VBoxGuest/freebsd/files_vboxguest
+@@ -102,6 +102,7 @@ FILES_VBOXGUEST_NOBIN=" \
${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/once.cpp=>common/misc/once.c \
@@ -8,7 +8,23 @@
${PATH_ROOT}/src/VBox/Runtime/common/misc/thread.cpp=>common/misc/thread.c \
${PATH_ROOT}/src/VBox/Runtime/common/misc/RTAssertMsg1Weak.cpp=>common/misc/RTAssertMsg1Weak.c \
${PATH_ROOT}/src/VBox/Runtime/common/misc/RTAssertMsg2.cpp=>common/misc/RTAssertMsg2.c \
-@@ -185,6 +186,7 @@
+@@ -139,6 +140,7 @@ FILES_VBOXGUEST_NOBIN=" \
+ ${PATH_ROOT}/src/VBox/Runtime/include/internal/iprt.h=>include/internal/iprt.h \
+ ${PATH_ROOT}/src/VBox/Runtime/include/internal/lockvalidator.h=>include/internal/lockvalidator.h \
+ ${PATH_ROOT}/src/VBox/Runtime/include/internal/magics.h=>include/internal/magics.h \
++ ${PATH_ROOT}/src/VBox/Runtime/include/internal/mem.h=>include/internal/mem.h \
+ ${PATH_ROOT}/src/VBox/Runtime/include/internal/memobj.h=>include/internal/memobj.h \
+ ${PATH_ROOT}/src/VBox/Runtime/include/internal/string.h=>include/internal/string.h \
+ ${PATH_ROOT}/src/VBox/Runtime/include/internal/thread.h=>include/internal/thread.h \
+@@ -161,6 +163,7 @@ FILES_VBOXGUEST_NOBIN=" \
+ ${PATH_ROOT}/src/VBox/Runtime/generic/errvars-generic.cpp=>generic/errvars-generic.c \
+ ${PATH_ROOT}/src/VBox/Runtime/generic/timer-generic.cpp=>generic/timer-generic.c \
+ ${PATH_ROOT}/src/VBox/Runtime/generic/mppresent-generic.cpp=>generic/mppresent-generic.c \
++ ${PATH_ROOT}/src/VBox/Runtime/r0drv/alloc-ef-r0drv.cpp=>r0drv/alloc-ef-r0drv.c \
+ ${PATH_ROOT}/src/VBox/Runtime/r0drv/alloc-r0drv.cpp=>r0drv/alloc-r0drv.c \
+ ${PATH_ROOT}/src/VBox/Runtime/r0drv/alloc-r0drv.h=>r0drv/alloc-r0drv.h \
+ ${PATH_ROOT}/src/VBox/Runtime/r0drv/initterm-r0drv.cpp=>r0drv/initterm-r0drv.c \
+@@ -186,6 +189,7 @@ FILES_VBOXGUEST_NOBIN=" \
${PATH_ROOT}/src/VBox/Runtime/r0drv/freebsd/sleepqueue-r0drv-freebsd.h=>r0drv/freebsd/sleepqueue-r0drv-freebsd.h \
${PATH_ROOT}/src/VBox/Runtime/r0drv/generic/semspinmutex-r0drv-generic.c=>r0drv/generic/semspinmutex-r0drv-generic.c \
${PATH_ROOT}/src/VBox/Runtime/r0drv/generic/mpnotification-r0drv-generic.cpp=>r0drv/generic/mpnotification-r0drv-generic.c \
diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh b/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh
index 9517f2d22342..cebabd64d010 100644
--- a/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh
+++ b/emulators/virtualbox-ose/files/patch-src-VBox-Installer-freebsd-VBox.sh
@@ -1,6 +1,6 @@
---- src/VBox/Installer/freebsd/VBox.sh.orig 2015-04-10 22:01:18.704382000 -0700
-+++ src/VBox/Installer/freebsd/VBox.sh 2015-04-10 22:13:19.896371000 -0700
-@@ -0,0 +1,61 @@
+--- src/VBox/Installer/freebsd/VBox.sh.orig 2016-08-27 05:10:34 UTC
++++ src/VBox/Installer/freebsd/VBox.sh
+@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# Oracle VM VirtualBox startup script, FreeBSD hosts.
@@ -53,6 +53,9 @@
+ VBoxBalloonCtrl|vboxballoonctrl)
+ exec "$INSTALL_DIR/VBoxBalloonCtrl" "$@"
+ ;;
++ VBoxBugReport|vboxbugreport)
++ exec "$INSTALL_DIR/VBoxBugReport" "$@"
++ ;;
+ vboxwebsrv)
+ exec "$INSTALL_DIR/vboxwebsrv" "$@"
+ ;;
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_crOpenGL_load.c b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_crOpenGL_load.c
deleted file mode 100644
index 2ddb6bb58547..000000000000
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_crOpenGL_load.c
+++ /dev/null
@@ -1,34 +0,0 @@
---- src/VBox/Additions/common/crOpenGL/load.c.orig 2016-07-18 11:50:44 UTC
-+++ src/VBox/Additions/common/crOpenGL/load.c
-@@ -1123,7 +1123,7 @@ stubInit(void)
- return bRc;
- }
-
--#if defined(Linux) && !defined(VBOXOGL_FAKEDRI)
-+#if (defined(Linux) || defined(FreeBSD)) && !defined(VBOXOGL_FAKEDRI)
- # include <dlfcn.h>
- /* We only support being used by GLX clients. If the X server GLX extension
- * tries to use our OpenGL library it will fail, as it is written specifically
-@@ -1136,7 +1136,7 @@ stubInit(void)
- * can do, better for GLX to fail than the whole X server). To keep things as
- * simple and fail-safe as possible, we use a fixed path to the system GL
- * library. */
--#ifndef RTLD_DEEPBIND
-+#if defined(Linux) && !defined(RTLD_DEEPBIND)
- # define RTLD_DEEPBIND 0x8
- #endif
-
-@@ -1146,8 +1146,13 @@ void __attribute__ ((constructor)) check
-
- if (!pszDisplay || !*pszDisplay)
- {
-+#ifdef Linux
- dlopen("/var/lib/VBoxGuestAdditions/lib/system/libGL.so.1", RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND);
- dlopen("/var/lib/VBoxGuestAdditions/lib/system/libEGL.so.1", RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND);
-+#else
-+ dlopen("/usr/local/lib/.mesa/libGL.so.1", RTLD_LAZY | RTLD_GLOBAL);
-+ dlopen("/usr/local/lib/.mesa/libEGL.so.1", RTLD_LAZY | RTLD_GLOBAL);
-+#endif
- }
- }
- #endif
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_x11_VBoxClient_display.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_x11_VBoxClient_display.cpp
deleted file mode 100644
index 5327d6939e9a..000000000000
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_x11_VBoxClient_display.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/VBox/Additions/x11/VBoxClient/display.cpp.orig 2016-07-18 11:50:46 UTC
-+++ src/VBox/Additions/x11/VBoxClient/display.cpp
-@@ -75,8 +75,8 @@ static unsigned char *getRootProperty(st
- {
- Atom actualType = None;
- int iFormat = 0;
-- ulong cReturned = 0;
-- ulong cAfter = 0;
-+ unsigned long cReturned = 0;
-+ unsigned long cAfter = 0;
- unsigned char *pData = 0;
-
- if (XGetWindowProperty(pState->pDisplay, DefaultRootWindow(pState->pDisplay),
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp
new file mode 100644
index 000000000000..ccaaea1fb88c
--- /dev/null
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp
@@ -0,0 +1,46 @@
+--- src/VBox/Devices/Audio/DrvHostOSSAudio.cpp.orig 2016-08-16 19:57:22 UTC
++++ src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
+@@ -254,14 +254,14 @@ static int ossStreamClose(int *phFile)
+ }
+
+
+-static int ossStreamOpen(const char *pszDev, int fOpen, POSSAUDIOSTREAMCFG pReq, POSSAUDIOSTREAMCFG pObt, int *phFile)
++static int ossStreamOpen(const char *pszDev, bool fIn, POSSAUDIOSTREAMCFG pReq, POSSAUDIOSTREAMCFG pObt, int *phFile)
+ {
+ int rc;
+
+ int hFile = -1;
+ do
+ {
+- hFile = open(pszDev, fOpen);
++ hFile = open(pszDev, (fIn ? O_RDONLY : O_WRONLY) | O_NONBLOCK);
+ if (hFile == -1)
+ {
+ LogRel(("OSS: Failed to open %s: %s (%d)\n", pszDev, strerror(errno), errno));
+@@ -312,7 +312,7 @@ static int ossStreamOpen(const char *psz
+ }
+
+ audio_buf_info abinfo;
+- if (ioctl(hFile, (fOpen & O_RDONLY) ? SNDCTL_DSP_GETISPACE : SNDCTL_DSP_GETOSPACE, &abinfo))
++ if (ioctl(hFile, fIn ? SNDCTL_DSP_GETISPACE : SNDCTL_DSP_GETOSPACE, &abinfo))
+ {
+ LogRel(("OSS: Failed to retrieve buffer length: %s (%d)\n", strerror(errno), errno));
+ rc = RTErrConvertFromErrno(errno);
+@@ -670,7 +670,7 @@ static int ossCreateStreamIn(PPDMAUDIOST
+ reqStream.cFragments = s_OSSConf.nfrags;
+ reqStream.cbFragmentSize = s_OSSConf.fragsize;
+
+- rc = ossStreamOpen(s_OSSConf.devpath_in, O_RDONLY | O_NONBLOCK, &reqStream, &obtStream, &hFile);
++ rc = ossStreamOpen(s_OSSConf.devpath_in, true /* fIn */, &reqStream, &obtStream, &hFile);
+ if (RT_SUCCESS(rc))
+ {
+ pCfgAcq->enmFormat = obtStream.enmFormat;
+@@ -742,7 +742,7 @@ static int ossCreateStreamOut(PPDMAUDIOS
+ reqStream.cFragments = s_OSSConf.nfrags;
+ reqStream.cbFragmentSize = s_OSSConf.fragsize;
+
+- rc = ossStreamOpen(s_OSSConf.devpath_out, O_WRONLY | O_NONBLOCK, &reqStream, &obtStream, &hFile);
++ rc = ossStreamOpen(s_OSSConf.devpath_out, false /* fIn */, &reqStream, &obtStream, &hFile);
+ if (RT_SUCCESS(rc))
+ {
+ pCfgAcq->enmFormat = obtStream.enmFormat;
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Makefile.kmk b/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Makefile.kmk
deleted file mode 100644
index ea8a9aa10498..000000000000
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Makefile.kmk
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/VBox/Devices/Makefile.kmk.orig 2016-07-18 11:54:57 UTC
-+++ src/VBox/Devices/Makefile.kmk
-@@ -547,7 +547,7 @@ if !defined(VBOX_ONLY_EXTPACKS)
- Audio/DrvHostDSound.cpp
- endif
-
-- ifeq ($(KBUILD_TARGET),linux)
-+ if1of ($(KBUILD_TARGET), freebsd linux)
- ifdef VBOX_WITH_OSS
- VBoxDD_DEFS += VBOX_WITH_OSS
- VBoxDD_SOURCES += \
-@@ -569,17 +569,6 @@ if !defined(VBOX_ONLY_EXTPACKS)
- endif
- endif
-
-- ifeq ($(KBUILD_TARGET),freebsd)
-- VBoxDD_SOURCES += \
-- Audio/DrvHostOSSAudio.cpp
-- ifdef VBOX_WITH_PULSE
-- VBoxDD_DEFS += VBOX_WITH_PULSE
-- VBoxDD_SOURCES += \
-- Audio/DrvHostPulseAudio.cpp \
-- Audio/pulse_stubs.c
-- endif
-- endif
--
- ifeq ($(KBUILD_TARGET),solaris)
- ifdef VBOX_WITH_OSS
- VBoxDD_SOURCES += Audio/DrvHostOSSAudio.cpp
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Devices_build_VBoxDD.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_Devices_build_VBoxDD.cpp
deleted file mode 100644
index 1c7e876a6a12..000000000000
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Devices_build_VBoxDD.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
---- src/VBox/Devices/build/VBoxDD.cpp.orig 2016-07-18 11:55:27 UTC
-+++ src/VBox/Devices/build/VBoxDD.cpp
-@@ -286,7 +286,7 @@ extern "C" DECLEXPORT(int) VBoxDriversRe
- if (RT_FAILURE(rc))
- return rc;
- #endif
--#if defined(RT_OS_LINUX)
-+#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
- # ifdef VBOX_WITH_PULSE
- rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostPulseAudio);
- if (RT_FAILURE(rc))
-@@ -302,12 +302,7 @@ extern "C" DECLEXPORT(int) VBoxDriversRe
- if (RT_FAILURE(rc))
- return rc;
- # endif
--#endif /* RT_OS_LINUX */
--#if defined(RT_OS_FREEBSD)
-- rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostOSSAudio);
-- if (RT_FAILURE(rc))
-- return rc;
--#endif
-+#endif /* RT_OS_LINUX || RT_OS_FREEBSD */
- #if defined(RT_OS_DARWIN)
- rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostCoreAudio);
- if (RT_FAILURE(rc))
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageHelp.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageHelp.cpp
index 1784b6e9b4ba..e4500a6d852e 100644
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageHelp.cpp
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageHelp.cpp
@@ -1,6 +1,6 @@
---- src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp.orig 2016-07-18 11:55:55 UTC
+--- src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp.orig 2016-08-16 19:59:52 UTC
+++ src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
-@@ -791,7 +791,7 @@ void printUsage(USAGECATEGORY fCategory,
+@@ -797,7 +797,7 @@ void printUsage(USAGECATEGORY fCategory,
RTStrmPrintf(pStrm, "|dsound");
#endif
}
@@ -8,14 +8,14 @@
+ if (fLinux || fFreeBSD || fSolaris)
{
RTStrmPrintf(pStrm, ""
- #ifdef VBOX_WITH_OSS
-@@ -805,22 +805,6 @@ void printUsage(USAGECATEGORY fCategory,
+ #ifdef VBOX_WITH_AUDIO_OSS
+@@ -811,22 +811,6 @@ void printUsage(USAGECATEGORY fCategory,
#endif
);
}
- if (fFreeBSD)
- {
--#ifdef VBOX_WITH_OSS
+-#ifdef VBOX_WITH_AUDIO_OSS
- /* Get the line break sorted when dumping all option variants. */
- if (fDumpOpts)
- {
@@ -25,7 +25,7 @@
- else
- RTStrmPrintf(pStrm, "|oss");
-#endif
--#ifdef VBOX_WITH_PULSE
+-#ifdef VBOX_WITH_AUDIO_PULSE
- RTStrmPrintf(pStrm, "|pulse");
-#endif
- }
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h b/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h
new file mode 100644
index 000000000000..e8020892adfa
--- /dev/null
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h
@@ -0,0 +1,10 @@
+--- src/VBox/Main/include/USBProxyBackend.h.orig 2016-08-16 20:00:18 UTC
++++ src/VBox/Main/include/USBProxyBackend.h
+@@ -365,7 +365,6 @@ protected:
+ virtual int interruptWait(void);
+ virtual PUSBDEVICE getDevices(void);
+ int addDeviceToChain(PUSBDEVICE pDev, PUSBDEVICE *ppFirst, PUSBDEVICE **pppNext, int rc);
+- virtual void deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, SessionMachinesList &llOpenedMachines, PUSBDEVICE aUSBDevice);
+
+ private:
+ RTSEMEVENT mNotifyEventSem;
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyServiceFreeBSD.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyBackendFreeBSD.cpp
index 88cdc6698fa0..b763c1a75860 100644
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyServiceFreeBSD.cpp
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyBackendFreeBSD.cpp
@@ -1,6 +1,6 @@
---- src/VBox/Main/src-server/freebsd/USBProxyServiceFreeBSD.cpp.orig 2016-07-18 11:56:36 UTC
-+++ src/VBox/Main/src-server/freebsd/USBProxyServiceFreeBSD.cpp
-@@ -322,21 +322,21 @@ PUSBDEVICE USBProxyServiceFreeBSD::getDe
+--- src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp.orig 2016-08-16 20:00:20 UTC
++++ src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp
+@@ -299,21 +299,21 @@ PUSBDEVICE USBProxyBackendFreeBSD::getDe
if (UsbDevInfo.udi_vendor[0] != '\0')
{