aboutsummaryrefslogtreecommitdiff
path: root/emulators/virtualbox-ose-legacy
diff options
context:
space:
mode:
authorBernhard Froehlich <decke@FreeBSD.org>2013-12-13 11:17:19 +0000
committerBernhard Froehlich <decke@FreeBSD.org>2013-12-13 11:17:19 +0000
commita60eaff53fd7ab4174e758d36a6af42dd4300f9c (patch)
tree0ce1cf3abd9d6f7f619c3cda4ecadd684b6c900a /emulators/virtualbox-ose-legacy
parent91e3a74739c2303663d214a9fce06a90e150514f (diff)
downloadports-a60eaff53fd7ab4174e758d36a6af42dd4300f9c.tar.gz
ports-a60eaff53fd7ab4174e758d36a6af42dd4300f9c.zip
- Update to virtualbox-ose 4.2.20_1
- This update pulls in many changes from the port and brings better support for FreeBSD 10 and GCC from ports. I am doing that in preparation of the upcoming VirtualBox 4.3 update that should land soon.
Notes
Notes: svn path=/head/; revision=336332
Diffstat (limited to 'emulators/virtualbox-ose-legacy')
-rw-r--r--emulators/virtualbox-ose-legacy/Makefile115
-rw-r--r--emulators/virtualbox-ose-legacy/distinfo8
-rw-r--r--emulators/virtualbox-ose-legacy/files/extrapatch-include-iprt-string.h10
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-Config.kmk58
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-configure19
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-include-iprt-types.h11
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Devices-Audio-ossaudio.c19
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Devices-Bus-DevPciIch9.cpp22
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp25
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Frontends-VirtualBox-Makefile.kmk13
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-HostDrivers-Makefile.kmk27
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-HostServices-auth-pam-VBoxAuthPAM.c15
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-scr-server-freebsd-PerformanceFreeBSD.cpp13
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-MachineImpl.cpp13
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-freebsd-HostHardwareFreeBSD.cpp10
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-freebsd-NetIf-freebsd.cpp32
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-webservice-websrv-wsdl.xsl254
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-Makefile.kmk11
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c16
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c67
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c48
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp83
-rw-r--r--emulators/virtualbox-ose-legacy/files/vboxwatchdog.in53
-rw-r--r--emulators/virtualbox-ose-legacy/pkg-descr2
-rw-r--r--emulators/virtualbox-ose-legacy/pkg-plist43
25 files changed, 486 insertions, 501 deletions
diff --git a/emulators/virtualbox-ose-legacy/Makefile b/emulators/virtualbox-ose-legacy/Makefile
index 1698ddf77b5a..4e9c6d58443a 100644
--- a/emulators/virtualbox-ose-legacy/Makefile
+++ b/emulators/virtualbox-ose-legacy/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= virtualbox-ose
-DISTVERSION= 4.1.24
-PORTREVISION= 1
+DISTVERSION= 4.2.20
CATEGORIES= emulators
MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
http://tmp.chruetertee.ch/ \
@@ -13,7 +12,6 @@ PKGNAMESUFFIX= -legacy
DISTFILES= VirtualBox-${DISTVERSION}${EXTRACT_SUFX} ${GADISTFILES}
EXTRACT_ONLY= VirtualBox-${DISTVERSION}${EXTRACT_SUFX}
-#for discussion please use emulation@FreeBSD.org
MAINTAINER= vbox@FreeBSD.org
COMMENT= A general-purpose full virtualizer for x86 hardware
@@ -26,10 +24,10 @@ BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm \
kmk:${PORTSDIR}/devel/kBuild \
gtar:${PORTSDIR}/archivers/gtar \
cdrecord:${PORTSDIR}/sysutils/cdrtools
-LIB_DEPENDS= png15:${PORTSDIR}/graphics/png \
- xslt.2:${PORTSDIR}/textproc/libxslt \
- curl:${PORTSDIR}/ftp/curl
-RUN_DEPENDS= /boot/modules/vboxdrv.ko:${PORTSDIR}/emulators/virtualbox-ose-kmod-legacy \
+LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png \
+ libxslt.so:${PORTSDIR}/textproc/libxslt \
+ libcurl.so:${PORTSDIR}/ftp/curl
+RUN_DEPENDS= ${KMODDIR}/vboxdrv.ko:${PORTSDIR}/emulators/virtualbox-ose-kmod-legacy \
cdrecord:${PORTSDIR}/sysutils/cdrtools
WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION}
@@ -50,18 +48,20 @@ CONFIGURE_ARGS+=--with-gcc="${CC}" --with-g++="${CXX}" --passive-mesa
USE_LDCONFIG= ${PREFIX}/lib/virtualbox
CONFLICTS= bcc-[0-9]*
-CONFLICTS_INSTALL= virtualbox-ose-[3,4]* virtualbox-ose-devel-[3,4]* virtualbox-ose-additions-[3,4]* virtualbox-ose-additions-devel-[3,4]*
+CONFLICTS_INSTALL= virtualbox-ose-4* virtualbox-ose-devel-4* virtualbox-ose-additions-4* virtualbox-ose-additions-devel-4*
VBOXUSER?= vboxusers
VBOXWSUSER?= vboxusers
VBOXGROUP?= vboxusers
USERS= ${VBOXUSER}
GROUPS= ${VBOXGROUP}
-VBOX_FRONTENDS= VBoxHeadless
+VBOX_FRONTENDS= VBoxAutostart VBoxHeadless
VBOX_GUEST_VER= ${PORTVERSION}
OPTIONS_DEFINE= QT4 DEBUG GUESTADDITIONS DBUS PULSEAUDIO UDPTUNNEL VDE VNC WEBSERVICE NLS X11
-OPTIONS_DEFAULT= QT4 DBUS X11 UDPTUNNEL
+OPTIONS_DEFAULT= QT4 DBUS X11 UDPTUNNEL VNC
+OPTIONS_SUB= X11 QT4 GUESTADDITIONS VNC NLS WEBSERVICE
+DEBUG_DESC= Debug symbols, additional logs and assertions
QT4_DESC= Build with QT4 Frontend
GUESTADDITIONS_DESC= Build with Guest Additions
UDPTUNNEL_DESC= Build with UDP tunnel support
@@ -69,19 +69,42 @@ VDE_DESC= Build with VDE support
VNC_DESC= Build with VNC support
WEBSERVICE_DESC= Build Webservice
+PULSEAUDIO_LIB_DEPENDS= libpulse.so:${PORTSDIR}/audio/pulseaudio
+PULSEAUDIO_CONFIGURE_OFF= --disable-pulse
+
+DBUS_LIB_DEPENDS= libdbus-1.so:${PORTSDIR}/devel/dbus
+DBUS_CONFIGURE_OFF= --disable-dbus
+
+VNC_LIB_DEPENDS= libvncserver.so:${PORTSDIR}/net/libvncserver
+VNC_CONFIGURE_ON= --enable-vnc
+
+VDE_RUN_DEPENDS= vde_switch:${PORTSDIR}/net/vde2
+VDE_CONFIGURE_ON= --enable-vde
+
+# bmake doesn't know about unsetenv=true
+.if defined(.PARSEDIR)
+ENV=
+.export ENV
+.else
+.SHELL: path="/bin/sh" unsetenv=true
+.endif
+
NO_STAGE= yes
.include <bsd.port.options.mk>
+KMODDIR= /boot/modules
+
PLIST_SUB+= PYTHON_VER=${PYTHON_VER} \
PYTHON_VERU=${PYTHON_VER:S/./_/} \
GUEST_VER=${VBOX_GUEST_VER}
-SUB_LIST+= VBOXUSER=${VBOXUSER}
-USE_RC_SUBR+= vboxheadless
+SUB_LIST+= VBOXUSER=${VBOXUSER} \
+ VBOXWSUSER=${VBOXWSUSER}
+USE_RC_SUBR+= vboxheadless vboxwatchdog
KMK_BUILDTYPE= release
KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys
-KMK_FLAGS=
+KMK_FLAGS= -j 1
.if empty(PORT_OPTIONS:MQT4) && !empty(PORT_OPTIONS:MNLS)
BROKEN= NLS support requires QT4 frontend. Run 'make config' again!
@@ -95,10 +118,8 @@ BROKEN= QT4 frontend requires X11 support. Run 'make config' again!
USE_SDL= sdl
USE_XORG= xcursor xmu inputproto xinerama
VBOX_FRONTENDS+=VBoxBFE VBoxSDL
-PLIST_SUB+= X11=""
.else
CONFIGURE_ARGS+=--build-headless
-PLIST_SUB+= X11="@comment "
.endif
.if ${PORT_OPTIONS:MQT4}
@@ -106,10 +127,8 @@ QT_NONSTANDARD= yes
USE_QT4= gui network moc_build uic_build rcc_build linguist
INSTALLS_ICONS= yes
VBOX_FRONTENDS+=VirtualBox VBoxTestOGL
-PLIST_SUB+= QT4=""
.else
CONFIGURE_ARGS+=--disable-qt4
-PLIST_SUB+= QT4="@comment "
.endif
.if ${PORT_OPTIONS:MGUESTADDITIONS}
@@ -117,51 +136,17 @@ GUESTADDITIONS= VBoxGuestAdditions_${VBOX_GUEST_VER}.iso
GADISTFILES= ${GUESTADDITIONS}:guestadditions
RESTRICTED= for personal use only
RESTRICTED_FILES= ${GUESTADDITIONS}
-PLIST_SUB+= GUESTADDITIONS=""
-.else
-PLIST_SUB+= GUESTADDITIONS="@comment "
.endif
.if ${PORT_OPTIONS:MDEBUG}
-KMK_FLAGS+= BUILD_TYPE=debug
KMK_BUILDTYPE= debug
-.endif
-
-.if ${PORT_OPTIONS:MDBUS}
-LIB_DEPENDS+= dbus-1.3:${PORTSDIR}/devel/dbus
-.else
-CONFIGURE_ARGS+=--disable-dbus
-.endif
-
-.if ${PORT_OPTIONS:MPULSEAUDIO}
-LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio
-.else
-CONFIGURE_ARGS+=--disable-pulse
-.endif
-
-.if ${PORT_OPTIONS:MVNC}
-LIB_DEPENDS+= vncserver.0:${PORTSDIR}/net/libvncserver
-.endif
-
-.if ${PORT_OPTIONS:MNLS}
-PLIST_SUB+= NLS=""
-.else
-PLIST_SUB+= NLS="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MVDE}
-RUN_DEPENDS+= vde_switch:${PORTSDIR}/net/vde2
-CONFIGURE_ARGS+=--enable-vde
+KMK_FLAGS+= BUILD_TYPE=debug
.endif
.if ${PORT_OPTIONS:MWEBSERVICE}
BUILD_DEPENDS+= soapcpp2:${PORTSDIR}/devel/gsoap
VBOX_WEB= vboxwebsrv webtest
USE_RC_SUBR+= vboxwebsrv
-SUB_LIST+= VBOXWSUSER=${VBOXWSUSER}
-PLIST_SUB+= WEB=""
-.else
-PLIST_SUB+= WEB="@comment "
.endif
.if ${ARCH} == i386
@@ -172,15 +157,9 @@ KMK_ARCH= freebsd.${ARCH}
PLIST_SUB+= I386="@comment "
.endif
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 802000
-BROKEN= Does not compile on FreeBSD < 8.2
-.endif
+PLIST_SUB+= ARCH="${KMK_ARCH}"
-.if ${OSVERSION} > 900012
-EXTRA_PATCHES+= ${FILESDIR}/extrapatch-include-iprt-string.h
-.endif
+.include <bsd.port.pre.mk>
.if ${OSVERSION} < 900000 && ${OSVERSION} > 801500
EXTRA_PATCHES+= ${FILESDIR}/extrapatch-src-VBox-Devices-PC-vbox.dsl
@@ -198,7 +177,7 @@ pre-everything::
post-patch:
@${ECHO} 'VBOX_PATH_APP_PRIVATE_ARCH = ${PREFIX}/lib/virtualbox' > ${WRKSRC}/LocalConfig.kmk
@${ECHO} 'VBOX_PATH_SHARED_LIBS = ${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk
- @${ECHO} 'VBOX_WITH_RUNPATH = ${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk
+ @var=${_GCC_RUNTIME}; ${ECHO} "VBOX_WITH_RUNPATH = $${var:+$${var}:}${PREFIX}/lib/virtualbox" >> ${WRKSRC}/LocalConfig.kmk
@${ECHO} 'VBOX_PATH_APP_PRIVATE = ${DATADIR}' >> ${WRKSRC}/LocalConfig.kmk
@${ECHO} 'VBOX_PATH_APP_DOCS = ${DOCSDIR}' >> ${WRKSRC}/LocalConfig.kmk
@${ECHO} 'VBOX_WITH_INSTALLER = 1' >> ${WRKSRC}/LocalConfig.kmk
@@ -212,10 +191,7 @@ post-patch:
@${ECHO} 'VBOX_WITH_ADDITIONS=' >> ${WRKSRC}/LocalConfig.kmk
@${ECHO} 'VBOX_WITH_X11_ADDITIONS=' >> ${WRKSRC}/LocalConfig.kmk
.if ${PORT_OPTIONS:MVNC}
- @${ECHO} 'VBOX_WITH_VNC = 1' >> ${WRKSRC}/LocalConfig.kmk
-.endif
-.if ${OSVERSION} < 800069
- @${ECHO} 'VBOX_WITH_USB=' >> ${WRKSRC}/LocalConfig.kmk
+ @${ECHO} 'VBOX_WITH_EXTPACK_VNC = 1' >> ${WRKSRC}/LocalConfig.kmk
.endif
.if ${PORT_OPTIONS:MUDPTUNNEL}
@${ECHO} 'VBOX_WITH_UDPTUNNEL = 1' >> ${WRKSRC}/LocalConfig.kmk
@@ -274,8 +250,13 @@ do-install:
${CHMOD} 0711 ${PREFIX}/lib/virtualbox/${f}
.endfor
+.if ${PORT_OPTIONS:MVNC}
+ ${MKDIR} ${PREFIX}/lib/virtualbox/ExtensionPacks
+ ${CP} -a ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/ExtensionPacks/VNC ${PREFIX}/lib/virtualbox/ExtensionPacks
+.endif
+
.if ${PORT_OPTIONS:MWEBSERVICE}
- ${MKDIR} -p ${DATADIR}/sdk/bindings/webservice
+ ${MKDIR} ${DATADIR}/sdk/bindings/webservice
.for f in vboxweb.wsdl vboxwebService.wsdl
${INSTALL_DATA} ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/sdk/bindings/webservice/${f} ${DATADIR}/sdk/bindings/webservice/
.endfor
@@ -304,7 +285,9 @@ post-install:
@${FIND} ${PREFIX}/lib/virtualbox -type d -print0 | ${XARGS} -0 ${CHMOD} 755
.if ${PORT_OPTIONS:MQT4}
+ ${MKDIR} ${PREFIX}/share/pixmaps/
${INSTALL_DATA} ${WRKSRC}/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_48px.png ${PREFIX}/share/pixmaps/VBox.png
+ ${MKDIR} ${PREFIX}/share/applications/
${INSTALL_DATA} ${WRKSRC}/src/VBox/Installer/freebsd/virtualbox.desktop ${PREFIX}/share/applications/virtualbox.desktop
.endif
@${CAT} ${PKGMESSAGE}
diff --git a/emulators/virtualbox-ose-legacy/distinfo b/emulators/virtualbox-ose-legacy/distinfo
index 9b658d14b28f..28aa1dc9d1d9 100644
--- a/emulators/virtualbox-ose-legacy/distinfo
+++ b/emulators/virtualbox-ose-legacy/distinfo
@@ -1,4 +1,4 @@
-SHA256 (VirtualBox-4.1.24.tar.bz2) = 74008b8e8942045668c1b7d06b0a4bb5fe8464066e343e3a2e1ba30b94ce8a7f
-SIZE (VirtualBox-4.1.24.tar.bz2) = 74612732
-SHA256 (VBoxGuestAdditions_4.1.24.iso) = 6db32584eb4e2ace0fd5fbbd9d63bdb8f50f0c28821d03dafd0ed1018d133cc7
-SIZE (VBoxGuestAdditions_4.1.24.iso) = 53532672
+SHA256 (VirtualBox-4.2.20.tar.bz2) = 193aa3ce7c0e700fe6a12b64bf462ce633a856f1e831ee4a337cc3439b21df61
+SIZE (VirtualBox-4.2.20.tar.bz2) = 77050211
+SHA256 (VBoxGuestAdditions_4.2.20.iso) = 2fb3aa0f370d503b0e77725dbec76b989a251f613abee378f53c1fed9d6edf01
+SIZE (VBoxGuestAdditions_4.2.20.iso) = 59664384
diff --git a/emulators/virtualbox-ose-legacy/files/extrapatch-include-iprt-string.h b/emulators/virtualbox-ose-legacy/files/extrapatch-include-iprt-string.h
deleted file mode 100644
index c22eebe25952..000000000000
--- a/emulators/virtualbox-ose-legacy/files/extrapatch-include-iprt-string.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- include/iprt/string.h.orig 2010-04-28 01:02:16.000000000 +0200
-+++ include/iprt/string.h 2010-06-17 16:20:14.000000000 +0200
-@@ -60,7 +60,6 @@
- #if (defined(RT_OS_DARWIN) && defined(KERNEL)) \
- || (defined(RT_OS_FREEBSD) && defined(_KERNEL))
- RT_C_DECLS_BEGIN
--void *memchr(const void *pv, int ch, size_t cb);
- char *strpbrk(const char *pszStr, const char *pszChars);
- RT_C_DECLS_END
- #endif
diff --git a/emulators/virtualbox-ose-legacy/files/patch-Config.kmk b/emulators/virtualbox-ose-legacy/files/patch-Config.kmk
new file mode 100644
index 000000000000..4c5387eeaee2
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-Config.kmk
@@ -0,0 +1,58 @@
+--- Config.kmk.orig 2013-10-15 13:01:31.000000000 +0200
++++ Config.kmk 2013-10-20 14:43:19.015746151 +0200
+@@ -3387,16 +3387,16 @@
+ $(VBOX_GCC_WARN) -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) $(VBOX_GCC_fdiagnostics-show-option) \
+ -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \
+ -Wimplicit-function-declaration -Werror-implicit-function-declaration \
+- -O2 -fformat-extensions -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
++ -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
+-TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
++TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
+ 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
+ TEMPLATE_VBOXR0DRV_CXXFLAGS = -fno-exceptions -fno-rtti \
+ $(VBOX_GCC_WARN) -Wpointer-arith -Winline \
+- -O2 -fno-format-extensions -fno-strict-aliasing -fno-common -finline-limit=8000 \
++ -O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \
+ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
+ -nostdinc
+ TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
+@@ -3630,8 +3630,6 @@
+ /usr/X11R6/include \
+ /usr/local/include
+ TEMPLATE_VBOXR3EXE_LIBPATH += \
+- /usr/lib \
+- /usr/X11R6/lib \
+ /usr/local/lib
+ else ifeq ($(KBUILD_TARGET),solaris)
+ TEMPLATE_VBOXR3EXE_TOOL = GXX3PLAIN
+@@ -4206,8 +4204,6 @@
+ /usr/X11R6/include \
+ /usr/local/include
+ TEMPLATE_VBOXMAINEXE_LIBPATH += \
+- /usr/lib \
+- /usr/X11R6/lib \
+ /usr/local/lib
+ else ifeq ($(KBUILD_TARGET),solaris)
+ TEMPLATE_VBOXMAINEXE_TOOL = GXX3PLAIN
+@@ -4673,8 +4669,6 @@
+ /usr/X11R6/include \
+ /usr/local/include
+ TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \
+- /usr/lib \
+- /usr/X11R6/lib \
+ /usr/local/lib
+ endif
+ ifeq ($(KBUILD_TARGET),solaris)
+@@ -4869,8 +4863,6 @@
+ /usr/X11R6/include \
+ /usr/local/include
+ TEMPLATE_VBOXBLDPROG_LIBPATH += \
+- /usr/lib \
+- /usr/X11R6/lib \
+ /usr/local/lib
+ else ifeq ($(KBUILD_HOST),solaris)
+ TEMPLATE_VBOXBLDPROG_TOOL = GXX3PLAIN
diff --git a/emulators/virtualbox-ose-legacy/files/patch-configure b/emulators/virtualbox-ose-legacy/files/patch-configure
index d47c69b30074..4bea77d203cc 100644
--- a/emulators/virtualbox-ose-legacy/files/patch-configure
+++ b/emulators/virtualbox-ose-legacy/files/patch-configure
@@ -1,10 +1,21 @@
---- configure.orig 2011-05-30 17:11:26.000000000 +0200
-+++ configure 2011-06-06 10:01:12.000000000 +0200
-@@ -1920,7 +1920,7 @@
+--- configure.orig 2012-03-16 10:34:01.000000000 +0100
++++ configure 2012-03-24 18:52:57.271018829 +0100
+@@ -135,6 +135,8 @@
+ 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"
+@@ -1837,8 +1839,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
+- 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
diff --git a/emulators/virtualbox-ose-legacy/files/patch-include-iprt-types.h b/emulators/virtualbox-ose-legacy/files/patch-include-iprt-types.h
deleted file mode 100644
index 4c2070e3bb10..000000000000
--- a/emulators/virtualbox-ose-legacy/files/patch-include-iprt-types.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/iprt/types.h.orig 2012-03-05 10:48:48.000000000 +0100
-+++ include/iprt/types.h 2012-03-05 11:21:25.000000000 +0100
-@@ -82,6 +82,8 @@
- # include <stddef.h>
- # define _UINT64_T_DECLARED
- # define _INT64_T_DECLARED
-+# define _UINTPTR_T_DECLARED
-+# define _INTPTR_T_DECLARED
- # include <sys/types.h>
-
- # elif defined(RT_OS_LINUX) && defined(__KERNEL__)
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Devices-Audio-ossaudio.c b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Devices-Audio-ossaudio.c
new file mode 100644
index 000000000000..652430cb222e
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Devices-Audio-ossaudio.c
@@ -0,0 +1,19 @@
+Fix recording with OSS Audio backend to record at a proper volume
+
+Obtained from: https://www.virtualbox.org/ticket/10695
+--- src/VBox/Devices/Audio/ossaudio.c.orig 2012-12-19 19:26:32.000000000 +0100
++++ src/VBox/Devices/Audio/ossaudio.c 2012-12-20 12:23:18.476851732 +0100
+@@ -795,13 +795,8 @@
+ hw->info.align + 1);
+ }
+ read_samples += nread >> hwshift;
+-#ifndef VBOX
+ hw->conv (hw->conv_buf + bufs[i].add, p, nread >> hwshift,
+ &nominal_volume);
+-#else
+- hw->conv (hw->conv_buf + bufs[i].add, p, nread >> hwshift,
+- &pcm_in_volume);
+-#endif
+ }
+
+ if (bufs[i].len - nread) {
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Devices-Bus-DevPciIch9.cpp b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Devices-Bus-DevPciIch9.cpp
new file mode 100644
index 000000000000..6354f1e1ca65
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Devices-Bus-DevPciIch9.cpp
@@ -0,0 +1,22 @@
+Fix ich9 bios to correctly configure pci bridge1 and pci bridge2
+
+avg: I think that it is a valid report, the patch is not perfect, but
+avg: it fixes the problem for most configurations and demonstrates the problem well
+avg: the explanation for them is that FreeBSD (unlike Linux and maybe other OSes)
+avg: entirely relies on platform doing correct bus numbering
+avg: currently we can not do any re-numbering/corrections
+
+See: http://article.gmane.org/gmane.os.freebsd.devel.emulation/10438
+Submitted by: Gustau Perez i Querol <gperez@entel.upc.edu>
+--- src/VBox/Devices/Bus/DevPciIch9.cpp.orig 2012-06-15 21:22:15.000000000 +0200
++++ src/VBox/Devices/Bus/DevPciIch9.cpp 2012-09-02 14:17:49.804118887 +0200
+@@ -1812,7 +1812,8 @@
+ PICH9PCIBUS pChildBus = PDMINS_2_DATA(pBridge->pDevIns, PICH9PCIBUS);
+ ich9pciInitBridgeTopology(pGlobals, pChildBus);
+ }
+- PCIDevSetByte(pBridgeDev, VBOX_PCI_SUBORDINATE_BUS, pGlobals->uBus);
++ PCIDevSetByte(pBridgeDev, VBOX_PCI_PRIMARY_BUS, 0);
++ PCIDevSetByte(pBridgeDev, VBOX_PCI_SUBORDINATE_BUS, (pGlobals->uBus)-1);
+ Log2(("ich9pciInitBridgeTopology: for bus %p: primary=%d secondary=%d subordinate=%d\n",
+ pBus,
+ PCIDevGetByte(pBridgeDev, VBOX_PCI_PRIMARY_BUS),
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp
deleted file mode 100644
index 00e3d32c29d5..000000000000
--- a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-- Add support for files to VBoxManage createrawvmdk. Currently
-it only supports character devices so it failes like this:
-
-VBoxManage internalcommands createrawvmdk -filename test.vmdk -rawdisk /vbox/HardDisks/test.img
-VBoxManage: error: File '/vbox/HardDisks/test.img' is no character device
-VBoxManage: error: The raw disk vmdk file was not created
-
-Submitted by: Pawel Jakub Dawidek <pjd@FreeBSD.org>
---- src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp.orig 2011-12-13 11:18:43.424439415 +0100
-+++ src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp 2011-12-13 11:22:01.554438862 +0100
-@@ -1140,9 +1140,13 @@
- goto out;
- }
- }
-+ else if (S_ISREG(DevStat.st_mode))
-+ {
-+ cbSize = DevStat.st_size;
-+ }
- else
- {
-- RTMsgError("File '%s' is no character device", rawdisk.c_str());
-+ RTMsgError("File '%s' is neither character device nor regular file", rawdisk.c_str());
- vrc = VERR_INVALID_PARAMETER;
- goto out;
- }
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Frontends-VirtualBox-Makefile.kmk b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Frontends-VirtualBox-Makefile.kmk
new file mode 100644
index 000000000000..7723674c7961
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Frontends-VirtualBox-Makefile.kmk
@@ -0,0 +1,13 @@
+--- src/VBox/Frontends/VirtualBox/Makefile.kmk.orig 2013-10-16 21:47:09.588793988 +0400
++++ src/VBox/Frontends/VirtualBox/Makefile.kmk 2013-10-16 21:47:37.458794265 +0400
+@@ -175,10 +175,6 @@
+ # Necessary for the hdd backend enumeration
+ VirtualBox_LIBS = $(LIB_DDU)
+
+-if1of ($(KBUILD_TARGET), linux freebsd netbsd openbsd)
+- VirtualBox_LIBS += dl
+-endif
+-
+ # This library is required for multi-monitor support
+ VirtualBox_LIBS.linux += Xinerama
+ VirtualBox_LIBS.solaris += Xinerama
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-HostDrivers-Makefile.kmk b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-HostDrivers-Makefile.kmk
deleted file mode 100644
index 06c4a71db458..000000000000
--- a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-HostDrivers-Makefile.kmk
+++ /dev/null
@@ -1,27 +0,0 @@
---- src/VBox/HostDrivers/Makefile.kmk.orig 2010-03-04 12:59:54.000000000 +0100
-+++ src/VBox/HostDrivers/Makefile.kmk 2010-03-09 12:54:09.000000000 +0100
-@@ -40,7 +40,7 @@
- endif
- endif
-
-- if1of ($(KBUILD_TARGET),linux freebsd)
-+ if1of ($(KBUILD_TARGET),linux)
- #
- # Install the Makefile for module compliation on Linux and FreeBSD hosts
- #
-@@ -51,6 +51,7 @@
- HostDrivers-src_SOURCES.freebsd = freebsd/Makefile
- endif
-
-+if 0
- if1of ($(KBUILD_TARGET),freebsd)
- #
- # Install the export_modules script for tar'ing the module sources on FreeBSD hosts
-@@ -60,6 +61,7 @@
- HostDrivers-sh_MODE = a+rx,u+w
- HostDrivers-sh_SOURCES.freebsd = freebsd/export_modules
- endif
-+endif
- endif # !defined(VBOX_ONLY_DOCS) && !defined(VBOX_ONLY_TESTSUITE)
-
- # Let kBuild generate the rules.
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-HostServices-auth-pam-VBoxAuthPAM.c b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-HostServices-auth-pam-VBoxAuthPAM.c
deleted file mode 100644
index 1344f3f2bd60..000000000000
--- a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-HostServices-auth-pam-VBoxAuthPAM.c
+++ /dev/null
@@ -1,15 +0,0 @@
-- Fix path for libpam.so on FreeBSD
-
-Submitted by: Landon Fuller <landonf at plausible.coop>
-Sponsored by: Plausible Labs Cooperative, Inc.
---- src/VBox/HostServices/auth/pam/VBoxAuthPAM.c.orig 2012-04-03 14:11:56.000000000 +0200
-+++ src/VBox/HostServices/auth/pam/VBoxAuthPAM.c 2012-04-05 12:44:48.000000000 +0200
-@@ -62,6 +62,8 @@
- /* The name of the PAM library */
- # ifdef RT_OS_SOLARIS
- # define PAM_LIB_NAME "libpam.so.1"
-+# elif defined(RT_OS_FREEBSD)
-+# define PAM_LIB_NAME "libpam.so"
- # else
- # define PAM_LIB_NAME "libpam.so.0"
- # endif
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-scr-server-freebsd-PerformanceFreeBSD.cpp b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-scr-server-freebsd-PerformanceFreeBSD.cpp
new file mode 100644
index 000000000000..9ef5b64d7175
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-scr-server-freebsd-PerformanceFreeBSD.cpp
@@ -0,0 +1,13 @@
+--- src/VBox/Main/src-server/freebsd/PerformanceFreeBSD.cpp.orig 2012-10-19 19:51:26.256773940 +0400
++++ src/VBox/Main/src-server/freebsd/PerformanceFreeBSD.cpp 2012-10-19 19:51:49.835771918 +0400
+@@ -109,5 +109,10 @@
+ return E_NOTIMPL;
+ }
+
++int getDiskListByFs(const char *name, DiskList& list)
++{
++ return VERR_NOT_IMPLEMENTED;
++}
++
+ } /* namespace pm */
+
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-MachineImpl.cpp b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-MachineImpl.cpp
deleted file mode 100644
index fce7b85eefa3..000000000000
--- a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-MachineImpl.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-- Remove debugging fprintf in MachineImpl.cpp to fix build with GCC 4.6
-
-Submitted by: Andriy Gapon <avg at FreeBSD.org>
---- src/VBox/Main/src-server/MachineImpl.cpp.orig 2012-04-03 14:12:01.000000000 +0200
-+++ src/VBox/Main/src-server/MachineImpl.cpp 2012-04-13 10:49:25.000000000 +0200
-@@ -6643,7 +6643,6 @@
-
- Utf8Str idStr = mData->mUuid.toString();
- const char * args[] = {szPath, "--comment", mUserData->s.strName.c_str(), "--startvm", idStr.c_str(), 0 };
-- fprintf(stderr, "SDL=%s\n", szPath);
- vrc = RTProcCreate(szPath, args, env, 0, &pid);
- }
- #else /* !VBOX_WITH_VBOXSDL */
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-freebsd-HostHardwareFreeBSD.cpp b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-freebsd-HostHardwareFreeBSD.cpp
new file mode 100644
index 000000000000..c77c65da5b21
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-freebsd-HostHardwareFreeBSD.cpp
@@ -0,0 +1,10 @@
+--- src/VBox/Main/src-server/freebsd/HostHardwareFreeBSD.cpp.orig 2012-12-19 19:27:17.000000000 +0100
++++ src/VBox/Main/src-server/freebsd/HostHardwareFreeBSD.cpp 2012-12-20 14:55:59.501850255 +0100
+@@ -40,6 +40,7 @@
+ # include <sys/stat.h>
+ # include <unistd.h>
+ # include <sys/ioctl.h>
++# include <stdio.h>
+ # include <fcntl.h>
+ # include <cam/cam.h>
+ # include <cam/cam_ccb.h>
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-freebsd-NetIf-freebsd.cpp b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-freebsd-NetIf-freebsd.cpp
index bf6264a3b578..e55f2d2bb100 100644
--- a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-freebsd-NetIf-freebsd.cpp
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-src-server-freebsd-NetIf-freebsd.cpp
@@ -1,26 +1,10 @@
-This patch adds support for IFT_L2VLAN interfaces in the
-FreeBSD implementation of NetIfList(), treating them
-identically as IFT_ETHER interfaces.
-
-Submitted by: Landon J Fuller <landonf at plausible dot coop>
-Sponsored by: Plausible Labs Cooperative, Inc
---- src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp.orig 2012-04-10 11:28:41.552067907 -0400
-+++ src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp 2012-04-10 11:28:45.872069027 -0400
-@@ -268,7 +268,7 @@
- pNext += pIfAddrMsg->ifam_msglen;
- }
+--- src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp.orig 2012-12-19 19:27:17.000000000 +0100
++++ src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp 2012-12-20 14:55:59.492850918 +0100
+@@ -44,6 +44,7 @@
+ #include <netinet/in.h>
-- if (pSdl->sdl_type == IFT_ETHER)
-+ if (pSdl->sdl_type == IFT_ETHER || pSdl->sdl_type == IFT_L2VLAN)
- {
- struct ifreq IfReq;
- strcpy(IfReq.ifr_name, pNew->szShortName);
-@@ -373,7 +373,7 @@
- pNext += pIfAddrMsg->ifam_msglen;
- }
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <errno.h>
-- if (!fSkip && pSdl->sdl_type == IFT_ETHER)
-+ if (!fSkip && (pSdl->sdl_type == IFT_ETHER || pSdl->sdl_type == IFT_L2VLAN))
- {
- size_t cbNameLen = pSdl->sdl_nlen + 1;
- memcpy(pInfo->MACAddress.au8, LLADDR(pSdl), sizeof(pInfo->MACAddress.au8));
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-webservice-websrv-wsdl.xsl b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-webservice-websrv-wsdl.xsl
deleted file mode 100644
index 760b76cc01c3..000000000000
--- a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Main-webservice-websrv-wsdl.xsl
+++ /dev/null
@@ -1,254 +0,0 @@
-Fix building with libxslt newer than 1.1.26.
-
-Obtained from: https://www.virtualbox.org/ticket/10940
---- src/VBox/Main/webservice/websrv-wsdl.xsl 2012-10-26 18:24:53.000000000 +0200
-+++ src/VBox/Main/webservice/websrv-wsdl.xsl 2012-12-17 10:44:59.000001310 +0100
-@@ -93,6 +93,7 @@
- targetNamespace="http://schemas.xmlsoap.org/wsdl/"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:vbox="http://www.virtualbox.org/"
- xmlns:exsl="http://exslt.org/common"
-@@ -460,7 +461,7 @@
- <xsl:param name="_params" />
- <xsl:param name="_valuetype" /> <!-- optional, for attribute setter messages -->
-
-- <message>
-+ <wsdl:message>
- <xsl:attribute name="name"><xsl:value-of select="concat($_ifname, $G_classSeparator, $_methodname, $G_methodRequest)" /></xsl:attribute>
-
- <xsl:call-template name="convertTypeAndEmitPartOrElement">
-@@ -469,10 +470,10 @@
- <xsl:with-param name="name" select="'parameters'" />
- <xsl:with-param name="type" select="$G_typeIsGlobalRequestElementMarker" />
- <xsl:with-param name="safearray" select="'no'" />
-- <xsl:with-param name="elname" select="'part'" /> <!-- "part" or "element" -->
-+ <xsl:with-param name="elname" select="'wsdl:part'" /> <!-- "part" or "element" -->
- <xsl:with-param name="attrname" select="'element'" /> <!-- attrib of part of element: <part type=...> or <part element=...> or <element type=...> -->
- </xsl:call-template>
-- </message>
-+ </wsdl:message>
- </xsl:template>
-
- <!--
-@@ -485,7 +486,7 @@
- <xsl:param name="_params" /> <!-- set of parameter elements -->
- <xsl:param name="_resulttype" /> <!-- for attribute getter methods only -->
-
-- <message>
-+ <wsdl:message>
- <xsl:attribute name="name"><xsl:copy-of select="$_ifname" /><xsl:value-of select="$G_classSeparator" /><xsl:value-of select="$_methodname" /><xsl:copy-of select="$G_methodResponse" /></xsl:attribute>
-
- <!-- <xsl:variable name="cOutParams" select="count($_params[@dir='out']) + count($_params[@dir='return'])" /> -->
-@@ -495,10 +496,10 @@
- <xsl:with-param name="name" select="'parameters'" />
- <xsl:with-param name="type" select="$G_typeIsGlobalResponseElementMarker" />
- <xsl:with-param name="safearray" select="'no'" />
-- <xsl:with-param name="elname" select="'part'" /> <!-- "part" or "element" -->
-+ <xsl:with-param name="elname" select="'wsdl:part'" /> <!-- "part" or "element" -->
- <xsl:with-param name="attrname" select="'element'" /> <!-- attrib of part of element: <part type=...> or <part element=...> or <element type=...> -->
- </xsl:call-template>
-- </message>
-+ </wsdl:message>
- </xsl:template>
-
- <!--
-@@ -543,13 +544,13 @@
- <xsl:with-param name="_methodname" select="$attrSetter" />
- <xsl:with-param name="_params" select="/.." /> <!-- empty set -->
- <xsl:with-param name="_valuetype" select="$attrtype" />
-- <xsl:with-param name="elname" select="'part'" /> <!-- "part" or "element" -->
-+ <xsl:with-param name="elname" select="'wsdl:part'" /> <!-- "part" or "element" -->
- </xsl:call-template>
- <xsl:call-template name="emitResultMessage">
- <xsl:with-param name="_ifname" select="$ifname" />
- <xsl:with-param name="_methodname" select="$attrSetter" />
- <xsl:with-param name="_params" select="/.." /> <!-- empty set -->
-- <xsl:with-param name="elname" select="'part'" /> <!-- "part" or "element" -->
-+ <xsl:with-param name="elname" select="'wsdl:part'" /> <!-- "part" or "element" -->
- </xsl:call-template>
- </xsl:template>
-
-@@ -566,7 +567,7 @@
-
- <xsl:call-template name="debugMsg"><xsl:with-param name="msg" select="concat('....emitInOutOperation ', $_ifname, '::', $_methodname)" /></xsl:call-template>
-
-- <operation>
-+ <wsdl:operation>
- <xsl:attribute name="name">
- <xsl:value-of select="concat($_ifname, '_', $_methodname)" />
- </xsl:attribute>
-@@ -577,7 +578,7 @@
- <xsl:attribute name="style"><xsl:value-of select="$G_basefmt" /></xsl:attribute>
- </soap:operation>
- </xsl:if>
-- <input>
-+ <wsdl:input>
- <xsl:choose>
- <xsl:when test="$_fSoap">
- <soap:body>
-@@ -589,10 +590,10 @@
- <xsl:attribute name="message">vbox:<xsl:copy-of select="$_ifname" /><xsl:value-of select="$G_classSeparator" /><xsl:value-of select="$_methodname" /><xsl:copy-of select="$G_methodRequest" /></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
-- </input>
-+ </wsdl:input>
- <xsl:choose>
- <xsl:when test="$_resulttype">
-- <output>
-+ <wsdl:output>
- <xsl:choose>
- <xsl:when test="$_fSoap">
- <soap:body>
-@@ -604,11 +605,11 @@
- <xsl:attribute name="message">vbox:<xsl:copy-of select="$_ifname" /><xsl:value-of select="$G_classSeparator" /><xsl:value-of select="$_methodname" /><xsl:copy-of select="$G_methodResponse" /></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
-- </output>
-+ </wsdl:output>
- </xsl:when>
- <xsl:otherwise>
- <!-- <xsl:if test="count($_params[@dir='out'] | $_params[@dir='return']) > 0"> -->
-- <output>
-+ <wsdl:output>
- <xsl:choose>
- <xsl:when test="$_fSoap">
- <soap:body>
-@@ -620,29 +621,29 @@
- <xsl:attribute name="message">vbox:<xsl:copy-of select="$_ifname" /><xsl:value-of select="$G_classSeparator" /><xsl:value-of select="$_methodname" /><xsl:copy-of select="$G_methodResponse" /></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
-- </output>
-+ </wsdl:output>
- <!-- </xsl:if> -->
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="not($_fSoap)">
-- <fault name="InvalidObjectFault" message="vbox:InvalidObjectFaultMsg" />
-- <fault name="RuntimeFault" message="vbox:RuntimeFaultMsg" />
-+ <wsdl:fault name="InvalidObjectFault" message="vbox:InvalidObjectFaultMsg" />
-+ <wsdl:fault name="RuntimeFault" message="vbox:RuntimeFaultMsg" />
- </xsl:when>
- <xsl:otherwise>
-- <fault name="InvalidObjectFault">
-+ <wsdl:fault name="InvalidObjectFault">
- <soap:fault name="InvalidObjectFault">
- <xsl:attribute name="use"><xsl:value-of select="$G_parmfmt" /></xsl:attribute>
- </soap:fault>
-- </fault>
-- <fault name="RuntimeFault">
-+ </wsdl:fault>
-+ <wsdl:fault name="RuntimeFault">
- <soap:fault name="RuntimeFault">
- <xsl:attribute name="use"><xsl:value-of select="$G_parmfmt" /></xsl:attribute>
- </soap:fault>
-- </fault>
-+ </wsdl:fault>
- </xsl:otherwise>
- </xsl:choose>
-- </operation>
-+ </wsdl:operation>
- </xsl:template>
-
- <!--
-@@ -742,7 +743,7 @@
- <xsl:with-param name="_wsmap" select="$wsmap" />
- <xsl:with-param name="_methodname" select="$methodname" />
- <xsl:with-param name="_params" select="param" />
-- <xsl:with-param name="elname" select="'part'" /> <!-- "part" or "element" -->
-+ <xsl:with-param name="elname" select="'wsdl:part'" /> <!-- "part" or "element" -->
- </xsl:call-template>
- <!-- emit a second "result" message only if the method has "out" arguments or a return value -->
- <!-- <xsl:if test="(count(param[@dir='out'] | param[@dir='return']) > 0)"> -->
-@@ -751,7 +752,7 @@
- <xsl:with-param name="_wsmap" select="$wsmap" />
- <xsl:with-param name="_methodname" select="@name" />
- <xsl:with-param name="_params" select="param" />
-- <xsl:with-param name="elname" select="'part'" /> <!-- "part" or "element" -->
-+ <xsl:with-param name="elname" select="'wsdl:part'" /> <!-- "part" or "element" -->
- </xsl:call-template>
- <!-- </xsl:if> -->
- </xsl:otherwise>
-@@ -956,10 +957,9 @@
- and emit complexTypes for all method arguments and return values.
- -->
- <xsl:template match="library">
-- <definitions
-+ <wsdl:definitions
- name="VirtualBox"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
-- <xsl:attribute name="xmlns">http://schemas.xmlsoap.org/wsdl/</xsl:attribute>
- <xsl:attribute name="targetNamespace"><xsl:value-of select="$G_targetNamespace" /></xsl:attribute>
- <!-- at top of WSDL file, dump a <types> section with user-defined types -->
- <xsl:comment>
-@@ -969,7 +969,7 @@
- *
- ******************************************************
- </xsl:comment>
-- <types>
-+ <wsdl:types>
- <xsd:schema>
- <xsl:attribute name="targetNamespace"><xsl:value-of select='$G_targetNamespace' /></xsl:attribute>
-
-@@ -1193,14 +1193,14 @@
- </xsd:schema>
-
-
-- </types>
-+ </wsdl:types>
-
-- <message name="InvalidObjectFaultMsg">
-- <part name="fault" element="vbox:InvalidObjectFault" />
-- </message>
-- <message name="RuntimeFaultMsg">
-- <part name="fault" element="vbox:RuntimeFault" />
-- </message>
-+ <wsdl:message name="InvalidObjectFaultMsg">
-+ <wsdl:part name="fault" element="vbox:InvalidObjectFault" />
-+ </wsdl:message>
-+ <wsdl:message name="RuntimeFaultMsg">
-+ <wsdl:part name="fault" element="vbox:RuntimeFault" />
-+ </wsdl:message>
-
- <xsl:comment>
- ******************************************************
-@@ -1241,7 +1241,7 @@
- ******************************************************
- </xsl:comment>
-
-- <portType>
-+ <wsdl:portType>
- <xsl:attribute name="name"><xsl:copy-of select="'vbox'" /><xsl:value-of select="$G_portTypeSuffix" /></xsl:attribute>
-
- <xsl:for-each select="//interface">
-@@ -1261,7 +1261,7 @@
- </xsl:call-template>
- </xsl:if>
- </xsl:for-each>
-- </portType>
-+ </wsdl:portType>
-
- <xsl:comment>
- ******************************************************
-@@ -1271,7 +1271,7 @@
- ******************************************************
- </xsl:comment>
-
-- <binding>
-+ <wsdl:binding>
- <xsl:attribute name="name"><xsl:value-of select="concat('vbox', $G_bindingSuffix)" /></xsl:attribute>
- <xsl:attribute name="type"><xsl:value-of select="concat('vbox:vbox', $G_portTypeSuffix)" /></xsl:attribute>
-
-@@ -1297,9 +1297,9 @@
- </xsl:call-template>
- </xsl:if>
- </xsl:for-each>
-- </binding>
-+ </wsdl:binding>
-
-- </definitions>
-+ </wsdl:definitions>
- </xsl:template>
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-Makefile.kmk b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-Makefile.kmk
new file mode 100644
index 000000000000..32325a580314
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-Makefile.kmk
@@ -0,0 +1,11 @@
+--- src/VBox/Runtime/Makefile.kmk.orig 2013-06-21 16:27:18.000000000 +0400
++++ src/VBox/Runtime/Makefile.kmk 2013-06-30 14:57:33.248215681 +0400
+@@ -844,7 +844,7 @@
+ r3/posix/RTMemProtect-posix.cpp \
+ r3/posix/RTPathUserHome-posix.cpp \
+ r3/posix/RTSystemQueryOSInfo-posix.cpp \
+- r3/posix/RTSystemQueryTotalRam-posix.cpp \
++ r3/freebsd/RTSystemQueryTotalRam-freebsd.cpp \
+ r3/posix/RTTimeNow-posix.cpp \
+ r3/posix/RTTimeSet-posix.cpp \
+ r3/posix/dir-posix.cpp \
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c
new file mode 100644
index 000000000000..f8b9743c21c8
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c
@@ -0,0 +1,16 @@
+--- src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c 2013-09-06 06:30:30.000000000 -0600
++++ src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c 2013-09-18 12:01:45.000000000 -0600
+@@ -79,8 +79,13 @@
+ return VERR_NO_EXEC_MEMORY;
+
+ /* Addr contains a start address vm_map_find will start searching for suitable space at. */
++#if __FreeBSD_version >= 1000055
++ int rc = vm_map_find(kernel_map, pVmObject, 0, &Addr,
++ cbAllocated, 0, VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL, 0);
++#else
+ int rc = vm_map_find(kernel_map, pVmObject, 0, &Addr,
+ cbAllocated, TRUE, VM_PROT_ALL, VM_PROT_ALL, 0);
++#endif
+ if (rc == KERN_SUCCESS)
+ {
+ rc = vm_map_wire(kernel_map, Addr, Addr + cbAllocated,
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c
index 9c63505651b0..b666b7ed0362 100644
--- a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c
@@ -1,53 +1,56 @@
From Alan L. Cox on FreeBSD-current:
- I just glanced at the virtualbox code for a couple minutes. For
+ I just glanced at the virtualbox code for a couple minutes. For
FreeBSD 9 and 10, these lock acquires are completely unnecessary, and
- have been since FreeBSD 9.0. Just delete them. They may be equally
+ have been since FreeBSD 9.0. Just delete them. They may be equally
unnecessary under FreeBSD 8, but I didn't look carefully enough to
answer that question.
[1] http://lists.freebsd.org/pipermail/freebsd-current/2012-November/037963.html
+---
+ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
---- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2012-12-19 20:51:59.000000000 +0100
-+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2012-12-20 15:14:56.283850834 +0100
-@@ -136,7 +136,10 @@
- (vm_offset_t)pMemFreeBSD->Core.pv + pMemFreeBSD->Core.cb);
- AssertMsg(rc == KERN_SUCCESS, ("%#x", rc));
-
+diff --git a/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c b/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
+index 5c90cf3..1176b51 100644
+--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
+@@ -164,14 +164,19 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem)
+ {
+ VM_OBJECT_LOCK(pMemFreeBSD->pObject);
+ vm_page_t pPage = vm_page_find_least(pMemFreeBSD->pObject, 0);
+#if __FreeBSD_version < 900000
+ /* See http://lists.freebsd.org/pipermail/freebsd-current/2012-November/037963.html */
vm_page_lock_queues();
+#endif
- for (uint32_t iPage = 0; iPage < pMemFreeBSD->u.Phys.cPages; iPage++)
+ for (vm_page_t pPage = vm_page_find_least(pMemFreeBSD->pObject, 0);
+ pPage != NULL;
+ pPage = vm_page_next(pPage))
{
- vm_page_t pPage = pMemFreeBSD->u.Phys.apPages[iPage];
-@@ -191,7 +194,9 @@
- case RTR0MEMOBJTYPE_PHYS:
- case RTR0MEMOBJTYPE_PHYS_NC:
- {
+ vm_page_unwire(pPage, 0);
+ }
+#if __FreeBSD_version < 900000
- vm_page_lock_queues();
+ vm_page_unlock_queues();
+#endif
- for (uint32_t iPage = 0; iPage < pMemFreeBSD->u.Phys.cPages; iPage++)
+ VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
+ vm_object_deallocate(pMemFreeBSD->pObject);
+ break;
+@@ -263,11 +268,15 @@ static int rtR0MemObjFreeBSDPhysAllocHelper(vm_object_t pObject, u_long cPages,
+ while (iPage-- > 0)
{
- vm_page_t pPage = pMemFreeBSD->u.Phys.apPages[iPage];
-@@ -266,7 +271,9 @@
- while (iPage-- > 0)
- {
- pPage = pMemFreeBSD->u.Phys.apPages[iPage];
+ pPage = vm_page_lookup(pObject, iPage);
+#if __FreeBSD_version < 900000
- vm_page_lock_queues();
+ vm_page_lock_queues();
+#endif
+ if (fWire)
vm_page_unwire(pPage, 0);
- vm_page_free(pPage);
- vm_page_unlock_queues();
-@@ -448,7 +455,9 @@
- while (iPage-- > 0)
- {
- pPage = pMemFreeBSD->u.Phys.apPages[iPage];
+ vm_page_free(pPage);
+#if __FreeBSD_version < 900000
- vm_page_lock_queues();
+ vm_page_unlock_queues();
+#endif
- vm_page_unwire(pPage, 0);
- vm_page_free(pPage);
- vm_page_unlock_queues();
+ }
+ VM_OBJECT_UNLOCK(pObject);
+ return rcNoMem;
+--
+1.7.11.5
+
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c
new file mode 100644
index 000000000000..6dfe0b99208e
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c
@@ -0,0 +1,48 @@
+--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2013-09-06 12:30:30.000000000 +0000
++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-09-21 18:12:53.000000000 +0000
+@@ -286,9 +286,15 @@
+ pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, cPages);
+
+ /* No additional object reference for auto-deallocation upon unmapping. */
++#if __FreeBSD_version >= 1000055
++ rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0,
++ &MapAddress, pMemFreeBSD->Core.cb, 0, VMFS_ANY_SPACE,
++ fExecutable ? VM_PROT_ALL : VM_PROT_RW, VM_PROT_ALL, 0);
++#else
+ rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0,
+ &MapAddress, pMemFreeBSD->Core.cb, VMFS_ANY_SPACE,
+ fExecutable ? VM_PROT_ALL : VM_PROT_RW, VM_PROT_ALL, 0);
++#endif
+
+ if (rc == KERN_SUCCESS)
+ {
+@@ -551,6 +557,9 @@
+ 0, /* offset */
+ &MapAddress, /* addr (IN/OUT) */
+ cb, /* length */
++#if __FreeBSD_version >= 1000055
++ 0, /* max addr */
++#endif
+ pvFixed == (void *)-1 ? VMFS_ANY_SPACE : VMFS_NO_SPACE,
+ /* find_space */
+ VM_PROT_NONE, /* protection */
+@@ -628,6 +637,9 @@
+ offSub, /* Start offset in the object */
+ &Addr, /* Start address IN/OUT */
+ cbSub, /* Size of the mapping */
++#if __FreeBSD_version >= 1000055
++ 0, /* Upper bound of mapping */
++#endif
+ VMFS_ANY_SPACE, /* Whether a suitable address should be searched for first */
+ ProtectionFlags, /* protection flags */
+ VM_PROT_ALL, /* Maximum protection flags */
+@@ -704,6 +716,9 @@
+ 0, /* Start offset in the object */
+ &AddrR3, /* Start address IN/OUT */
+ pMemToMap->cb, /* Size of the mapping */
++#if __FreeBSD_version >= 1000055
++ 0, /* Upper bound of the mapping */
++#endif
+ R3PtrFixed == (RTR3PTR)-1 ? VMFS_ANY_SPACE : VMFS_NO_SPACE,
+ /* Whether a suitable address should be searched for first */
+ ProtectionFlags, /* protection flags */
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp
new file mode 100644
index 000000000000..4ecdf4265fa7
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp
@@ -0,0 +1,83 @@
+--- ./src/VBox/Runtime/r3/freebsd/RTSystemQueryTotalRam-freebsd.cpp.ORIG 2013-06-30 09:27:59.000000000 +0200
++++ ./src/VBox/Runtime/r3/freebsd/RTSystemQueryTotalRam-freebsd.cpp 2013-06-30 09:51:29.000000000 +0200
+@@ -0,0 +1,80 @@
++/* $Id: RTSystemQueryTotalRam-freebsd.cpp $ */
++/** @file
++ * IPRT - RTSystemQueryTotalRam, FreeBSD style
++ */
++
++/*
++ * Copyright (C) 2013 Martin Birgmeier, Oracle Corporation
++ *
++ * This file is part of VirtualBox Open Source Edition (OSE), as
++ * available from http://www.virtualbox.org. This file is free software;
++ * you can redistribute it and/or modify it under the terms of the GNU
++ * General Public License (GPL) as published by the Free Software
++ * Foundation, in version 2 as it comes in the "COPYING" file of the
++ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
++ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
++ *
++ * The contents of this file may alternatively be used under the terms
++ * of the Common Development and Distribution License Version 1.0
++ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
++ * VirtualBox OSE distribution, in which case the provisions of the
++ * CDDL are applicable instead of those of the GPL.
++ *
++ * You may elect to license modified versions of this file under the
++ * terms and conditions of either the GPL or the CDDL or both.
++ */
++
++
++/*******************************************************************************
++* Header Files *
++*******************************************************************************/
++#include <iprt/system.h>
++#include "internal/iprt.h"
++
++#include <iprt/err.h>
++#include <iprt/assert.h>
++#include <iprt/string.h>
++
++/* FreeBSD */
++#include <sys/types.h>
++#include <sys/sysctl.h>
++#include <sys/errno.h>
++
++RTDECL(int) RTSystemQueryTotalRam(uint64_t *pcb)
++{
++ int mib[2];
++ size_t pcblen = sizeof(*pcb);
++
++ AssertPtrReturn(pcb, VERR_INVALID_POINTER);
++
++ mib[0] = CTL_HW;
++ mib[1] = HW_PHYSMEM; /* HW_REALMEM is also possible, but
++ includes non-main memory as well */
++ *pcb = 0;
++ if (sysctl(mib, 2, pcb, &pcblen, NULL, 0) == 0) {
++ if (pcblen == sizeof(*pcb) || pcblen == sizeof(uint32_t))
++ return VINF_SUCCESS;
++ else
++ return VERR_NO_MEMORY; /* XXX */
++ }
++ return RTErrConvertFromErrno(errno);
++}
++
++RTDECL(int) RTSystemQueryAvailableRam(uint64_t *pcb)
++{
++ int mib[2];
++ size_t pcblen = sizeof(*pcb);
++
++ AssertPtrReturn(pcb, VERR_INVALID_POINTER);
++
++ mib[0] = CTL_HW;
++ mib[1] = HW_USERMEM;
++ *pcb = 0;
++ if (sysctl(mib, 2, pcb, &pcblen, NULL, 0) == 0) {
++ if (pcblen == sizeof(*pcb) || pcblen == sizeof(uint32_t))
++ return VINF_SUCCESS;
++ else
++ return VERR_NO_MEMORY; /* XXX */
++ }
++ return RTErrConvertFromErrno(errno);
++}
diff --git a/emulators/virtualbox-ose-legacy/files/vboxwatchdog.in b/emulators/virtualbox-ose-legacy/files/vboxwatchdog.in
new file mode 100644
index 000000000000..17be9c243bb5
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/vboxwatchdog.in
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: vboxwatchdog
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf[.local] to enable vboxwatchdog
+#
+# vboxwatchdog_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable vboxwatchdog.
+# vboxwatchdog_user (str): User account to run with.
+# vboxwatchdog_flags (str): Custom flags for VBoxWatchdog.
+
+. /etc/rc.subr
+
+name=vboxwatchdog
+rcvar=vboxwatchdog_enable
+
+command="%%PREFIX%%/bin/VBoxBalloonCtrl"
+pidfile="/var/run/${name}.pid"
+
+start_cmd="${name}_start"
+
+vboxwatchdog_start()
+{
+ local pid
+
+ HOME=$(/usr/sbin/pw usershow -7 -n "${vboxwatchdog_user}" | /usr/bin/cut -d: -f6)
+ pid=$(check_pidfile $pidfile $command)
+
+ if [ -n "${pid}" ]; then
+ echo "${name} already running? (pid=${pid})."
+ return 1
+ fi
+
+ # prevent inheriting this setting to VBoxSVC
+ unset VBOX_RELEASE_LOG_DEST
+
+ echo -n "Starting ${name}"
+ /usr/bin/install -o ${vboxwatchdog_user} -g wheel -m 644 /dev/null ${pidfile}
+ /usr/sbin/daemon -f -p ${pidfile} -u ${vboxwatchdog_user} ${command} ${vboxwatchdog_flags}
+ echo '.'
+}
+
+load_rc_config $name
+
+: ${vboxwatchdog_enable="NO"}
+: ${vboxwatchdog_user="%%VBOXUSER%%"}
+: ${vboxwatchdog_flags="-b"}
+
+run_rc_command "$1"
diff --git a/emulators/virtualbox-ose-legacy/pkg-descr b/emulators/virtualbox-ose-legacy/pkg-descr
index 0b1e16c034af..d10019c03792 100644
--- a/emulators/virtualbox-ose-legacy/pkg-descr
+++ b/emulators/virtualbox-ose-legacy/pkg-descr
@@ -4,4 +4,4 @@ feature rich, high performance product for enterprise customers, it
is also the only professional solution that is freely available as
Open Source Software under the terms of the GNU General Public License.
-WWW: http://www.virtualbox.org/
+WWW: http://www.virtualbox.org/
diff --git a/emulators/virtualbox-ose-legacy/pkg-plist b/emulators/virtualbox-ose-legacy/pkg-plist
index 8a1b7a2ad1fe..9347ddf05083 100644
--- a/emulators/virtualbox-ose-legacy/pkg-plist
+++ b/emulators/virtualbox-ose-legacy/pkg-plist
@@ -1,3 +1,4 @@
+bin/VBoxAutostart
bin/VBoxBalloonCtrl
%%X11%%bin/VBoxBFE
bin/VBoxHeadless
@@ -9,12 +10,13 @@ bin/VBoxSVC
%%QT4%%bin/VBoxTestOGL
bin/VBoxXPCOMIPCD
%%QT4%%bin/VirtualBox
-%%WEB%%bin/vboxwebsrv
-%%WEB%%bin/webtest
+%%WEBSERVICE%%bin/vboxwebsrv
+%%WEBSERVICE%%bin/webtest
%%X11%%lib/virtualbox/VBoxBFE
%%X11%%lib/virtualbox/VBoxBFE.so
lib/virtualbox/DBGCPlugInDiggers.so
lib/virtualbox/VBoxAuth.so
+lib/virtualbox/VBoxAutostart
lib/virtualbox/VBoxAuthSimple.so
lib/virtualbox/VBoxBalloonCtrl
%%QT4%%lib/virtualbox/VBoxDbg.so
@@ -28,6 +30,7 @@ lib/virtualbox/VBoxGuestControlSvc.so
lib/virtualbox/VBoxGuestPropSvc.so
lib/virtualbox/VBoxHeadless
lib/virtualbox/VBoxHeadless.so
+lib/virtualbox/VBoxHostChannel.so
%%X11%%lib/virtualbox/VBoxKeyboard.so
lib/virtualbox/VBoxManage
lib/virtualbox/VBoxNetAdpCtl
@@ -49,6 +52,7 @@ lib/virtualbox/VBoxSharedClipboard.so
%%X11%%lib/virtualbox/VBoxSharedCrOpenGL.so
lib/virtualbox/VBoxSharedFolders.so
lib/virtualbox/VBoxVMM.so
+lib/virtualbox/VBoxVMMPreload.so
lib/virtualbox/VBoxXPCOM.so
lib/virtualbox/VBoxXPCOMC.so
lib/virtualbox/VBoxXPCOMIPCD
@@ -63,24 +67,29 @@ lib/virtualbox/VBoxDDR0.r0
%%GUESTADDITIONS%%lib/virtualbox/additions/VBoxGuestAdditions_%%GUEST_VER%%.iso
lib/virtualbox/VBoxPython%%PYTHON_VERU%%.so
lib/virtualbox/VMMR0.r0
-%%WEB%%lib/virtualbox/vboxwebsrv
-%%WEB%%lib/virtualbox/webtest
+%%WEBSERVICE%%lib/virtualbox/vboxwebsrv
+%%WEBSERVICE%%lib/virtualbox/webtest
lib/virtualbox/components/VirtualBox_XPCOM.xpt
lib/virtualbox/components/VBoxXPCOMIPCC.so
lib/virtualbox/components/VBoxSVCM.so
lib/virtualbox/components/VBoxC.so
lib/virtualbox/components/VBoxXPCOMBase.xpt
-%%NLS%%%%DATADIR%%/nls/VirtualBox_ar.qm
+%%VNC%%lib/virtualbox/ExtensionPacks/VNC/%%ARCH%%/VBoxVNC.so
+%%VNC%%lib/virtualbox/ExtensionPacks/VNC/%%ARCH%%/VBoxVNCMain.so
+%%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
%%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_IR.qm
%%NLS%%%%DATADIR%%/nls/VirtualBox_fi.qm
%%NLS%%%%DATADIR%%/nls/VirtualBox_fr.qm
%%NLS%%%%DATADIR%%/nls/VirtualBox_gl_ES.qm
@@ -104,17 +113,16 @@ lib/virtualbox/components/VBoxXPCOMBase.xpt
%%NLS%%%%DATADIR%%/nls/VirtualBox_uk.qm
%%NLS%%%%DATADIR%%/nls/VirtualBox_zh_CN.qm
%%NLS%%%%DATADIR%%/nls/VirtualBox_zh_TW.qm
-%%NLS%%%%DATADIR%%/nls/qt_ar.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_IR.qm
%%NLS%%%%DATADIR%%/nls/qt_fi.qm
%%NLS%%%%DATADIR%%/nls/qt_fr.qm
%%NLS%%%%DATADIR%%/nls/qt_gl_ES.qm
@@ -234,14 +242,15 @@ lib/virtualbox/components/VBoxXPCOMBase.xpt
%%DATADIR%%/idl/VirtualBox_XPCOM.idl
%%DATADIR%%/samples/tstVBoxAPILinux.cpp
%%DATADIR%%/samples/Makefile
-%%WEB%%%%DATADIR%%/sdk/bindings/webservice/vboxweb.wsdl
-%%WEB%%%%DATADIR%%/sdk/bindings/webservice/vboxwebService.wsdl
+%%WEBSERVICE%%%%DATADIR%%/sdk/bindings/webservice/vboxweb.wsdl
+%%WEBSERVICE%%%%DATADIR%%/sdk/bindings/webservice/vboxwebService.wsdl
include/virtualbox/VBoxCAPI_v2_2.h
include/virtualbox/VBoxCAPI_v3_0.h
include/virtualbox/VBoxCAPI_v3_1.h
include/virtualbox/VBoxCAPI_v3_2.h
include/virtualbox/VBoxCAPI_v4_0.h
include/virtualbox/VBoxCAPI_v4_1.h
+include/virtualbox/VBoxCAPI_v4_2.h
include/virtualbox/VirtualBox_XPCOM.h
include/virtualbox/ipcIClientObserver.h
include/virtualbox/ipcIDConnectService.h
@@ -610,13 +619,17 @@ include/virtualbox/xpcom/xpcom-config.h
@dirrm include/virtualbox/nsprpub
@dirrm include/virtualbox/ipcd
@dirrm include/virtualbox
+%%VNC%%@dirrm lib/virtualbox/ExtensionPacks/VNC/%%ARCH%%
+%%VNC%%@dirrm lib/virtualbox/ExtensionPacks/VNC
+%%VNC%%@dirrmtry lib/virtualbox/ExtensionPacks
%%NLS%%@dirrm %%DATADIR%%/nls
-%%WEB%%@dirrm %%DATADIR%%/sdk/bindings/webservice
-%%WEB%%@dirrm %%DATADIR%%/sdk/bindings
-%%WEB%%@dirrm %%DATADIR%%/sdk
+%%WEBSERVICE%%@dirrm %%DATADIR%%/sdk/bindings/webservice
+%%WEBSERVICE%%@dirrm %%DATADIR%%/sdk/bindings
+%%WEBSERVICE%%@dirrm %%DATADIR%%/sdk
@dirrm %%DATADIR%%/samples
@dirrm %%DATADIR%%/idl
-@dirrm %%DATADIR%%
+@dirrmtry %%DATADIR%%
+%%QT4%%@dirrmtry share/applications
@dirrm lib/virtualbox/components
%%GUESTADDITIONS%%@dirrm lib/virtualbox/additions
-@dirrm lib/virtualbox
+@dirrmtry lib/virtualbox