aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/virtualbox-ose
diff options
context:
space:
mode:
authordecke <decke@FreeBSD.org>2013-01-03 21:40:28 +0800
committerdecke <decke@FreeBSD.org>2013-01-03 21:40:28 +0800
commitaf9575423c3c4578346909e28f9fcd81a98f1c35 (patch)
tree59eff296e33d715a6d2a468dd75404beca0511d9 /emulators/virtualbox-ose
parentd00e1f2e66a25163d7fb18ddf782957ec3ab38e5 (diff)
downloadfreebsd-ports-gnome-af9575423c3c4578346909e28f9fcd81a98f1c35.tar.gz
freebsd-ports-gnome-af9575423c3c4578346909e28f9fcd81a98f1c35.tar.zst
freebsd-ports-gnome-af9575423c3c4578346909e28f9fcd81a98f1c35.zip
- Update to 4.2.6
- Remove custom FreeBSD compiler flags that are only supported by our old base GCC 4.2 [1] - Fix building with ports GCC 4.6 [1] - Fix build on 10-CURRENT after removal of vm_page_lock_queues() in r242941 [2] - Improve waits for periods shorter than a single tick [1] - Fix dependency check when building with custom KMODDIR [3] - Fix recording with OSS Audio backend to record at a proper volume [4] - Initialize host-only interfaces at boot time so that other scripts and daemons can properly use them [2] - Fix build if $ENV not ash-compatible [5] - Fix ich9 bios to correctly configure pci bridge1 and pci bridge2 [6] - Add VLAN trunking support to vboxnetflt [7] PR: ports/171730 [1], ports/167521 [5] Submitted by: Andriy Gapon <avg@FreeBSD.org> [1] Submitted by: Ed Maste <emaste@FreeBSD.org> [2] Submitted by: Kurt Jaeger <fbsd-ports@opsec.eu> [5] Submitted by: Gustau Perez i Querol <gperez@entel.upc.edu> [6] Submitted by: Landon J Fuller <landonf at plausible.coop> [7] Reported by: Daniel Braniss <danny@cs.huji.ac.il> [3] Obtained from: https://www.virtualbox.org/ticket/10695 [4] See: http://article.gmane.org/gmane.os.freebsd.devel.emulation/10438 [6]
Diffstat (limited to 'emulators/virtualbox-ose')
-rw-r--r--emulators/virtualbox-ose/Makefile47
-rw-r--r--emulators/virtualbox-ose/distinfo8
-rw-r--r--emulators/virtualbox-ose/files/extrapatch-include-iprt-string.h10
-rw-r--r--emulators/virtualbox-ose/files/patch-Config.kmk56
-rw-r--r--emulators/virtualbox-ose/files/patch-configure19
-rw-r--r--emulators/virtualbox-ose/files/patch-include-iprt-types.h11
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-Devices-Audio-ossaudio.c19
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-Devices-Bus-DevPciIch9.cpp22
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp25
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Makefile.kmk27
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-HostServices-auth-pam-VBoxAuthPAM.c15
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-Main-scr-server-freebsd-PerformanceFreeBSD.cpp13
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-MachineImpl.cpp13
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-freebsd-HostHardwareFreeBSD.cpp10
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-freebsd-NetIf-freebsd.cpp32
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c56
-rw-r--r--emulators/virtualbox-ose/pkg-message2
-rw-r--r--emulators/virtualbox-ose/pkg-plist24
18 files changed, 249 insertions, 160 deletions
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile
index cbc30aae1b86..10a28632770a 100644
--- a/emulators/virtualbox-ose/Makefile
+++ b/emulators/virtualbox-ose/Makefile
@@ -1,12 +1,8 @@
-# New ports collection makefile for: virtualbox-ose
-# Date created: 2009-05-02
-# Whom: Bernhard Froehlich <decke@bluelife.at>
-#
+# Created by: Bernhard Froehlich <decke@bluelife.at>
# $FreeBSD$
-#
PORTNAME= virtualbox-ose
-DISTVERSION= 4.1.22
+DISTVERSION= 4.2.6
CATEGORIES= emulators
MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
http://tmp.chruetertee.ch/ \
@@ -25,15 +21,16 @@ LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm \
as86:${PORTSDIR}/devel/dev86 \
xsltproc:${PORTSDIR}/textproc/libxslt \
- kmk:${PORTSDIR}/devel/kBuild-devel \
+ kmk:${PORTSDIR}/devel/kBuild \
gtar:${PORTSDIR}/archivers/gtar
LIB_DEPENDS= png15:${PORTSDIR}/graphics/png \
xslt.2:${PORTSDIR}/textproc/libxslt \
curl.6:${PORTSDIR}/ftp/curl
-RUN_DEPENDS= /boot/modules/vboxdrv.ko:${PORTSDIR}/emulators/virtualbox-ose-kmod
+RUN_DEPENDS= ${KMODDIR}/vboxdrv.ko:${PORTSDIR}/emulators/virtualbox-ose-kmod
WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION}
ONLY_FOR_ARCHS= i386 amd64
+FETCH_ARGS= -pRr
USE_CDRTOOLS= yes
USE_GCC= any
USE_GNOME= libidl
@@ -49,7 +46,6 @@ CONFIGURE_ARGS+=--with-gcc="${CC}" --with-g++="${CXX}" --passive-mesa
USE_LDCONFIG= ${PREFIX}/lib/virtualbox
CONFLICTS= bcc-[0-9]*
-CONFLICTS_BUILD= kBuild-[0-9]*
CONFLICTS_INSTALL= virtualbox-ose-devel-[3,4]* virtualbox-ose-legacy-[3,4]* virtualbox-ose-additions-[3,4]* virtualbox-ose-additions-devel-[3,4]*
VBOXUSER?= vboxusers
@@ -57,11 +53,12 @@ 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
+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,8 +66,12 @@ VDE_DESC= Build with VDE support
VNC_DESC= Build with VNC support
WEBSERVICE_DESC= Build Webservice
+.SHELL: path="/bin/sh" unsetenv=true
+
.include <bsd.port.options.mk>
+KMODDIR?= /boot/modules
+
PLIST_SUB+= PYTHON_VER=${PYTHON_VER} \
PYTHON_VERU=${PYTHON_VER:S/./_/} \
GUEST_VER=${VBOX_GUEST_VER}
@@ -80,7 +81,7 @@ USE_RC_SUBR+= vboxheadless
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!
@@ -116,15 +117,14 @@ GUESTADDITIONS= VBoxGuestAdditions_${VBOX_GUEST_VER}.iso
GADISTFILES= ${GUESTADDITIONS}:guestadditions
RESTRICTED= for personal use only
RESTRICTED_FILES= ${GUESTADDITIONS}
-FETCH_ARGS= -pRr
PLIST_SUB+= GUESTADDITIONS=""
.else
PLIST_SUB+= GUESTADDITIONS="@comment "
.endif
.if ${PORT_OPTIONS:MDEBUG}
-KMK_FLAGS+= BUILD_TYPE=debug
KMK_BUILDTYPE= debug
+KMK_FLAGS+= BUILD_TYPE=debug
.endif
.if ${PORT_OPTIONS:MDBUS}
@@ -141,6 +141,10 @@ CONFIGURE_ARGS+=--disable-pulse
.if ${PORT_OPTIONS:MVNC}
LIB_DEPENDS+= vncserver.0:${PORTSDIR}/net/libvncserver
+CONFIGURE_ARGS+=--enable-vnc
+PLIST_SUB+= VNC=""
+.else
+PLIST_SUB+= VNC="@comment "
.endif
.if ${PORT_OPTIONS:MNLS}
@@ -172,16 +176,14 @@ KMK_ARCH= freebsd.${ARCH}
PLIST_SUB+= I386="@comment "
.endif
+PLIST_SUB+= ARCH="${KMK_ARCH}"
+
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 802000
BROKEN= Does not compile on FreeBSD < 8.2
.endif
-.if ${OSVERSION} > 900012
-EXTRA_PATCHES+= ${FILESDIR}/extrapatch-include-iprt-string.h
-.endif
-
.if ${OSVERSION} < 900000 && ${OSVERSION} > 801500
EXTRA_PATCHES+= ${FILESDIR}/extrapatch-src-VBox-Devices-PC-vbox.dsl
.endif
@@ -212,7 +214,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
+ @${ECHO} 'VBOX_WITH_EXTPACK_VNC = 1' >> ${WRKSRC}/LocalConfig.kmk
.endif
.if ${OSVERSION} < 800069
@${ECHO} 'VBOX_WITH_USB=' >> ${WRKSRC}/LocalConfig.kmk
@@ -271,8 +273,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
diff --git a/emulators/virtualbox-ose/distinfo b/emulators/virtualbox-ose/distinfo
index 92a47201ad28..2f40b5284d39 100644
--- a/emulators/virtualbox-ose/distinfo
+++ b/emulators/virtualbox-ose/distinfo
@@ -1,4 +1,4 @@
-SHA256 (VirtualBox-4.1.22.tar.bz2) = 7abb506203dd0d69b4b408fd999b5b9a479a9adce5f80e9b5569641c053dd153
-SIZE (VirtualBox-4.1.22.tar.bz2) = 73385514
-SHA256 (VBoxGuestAdditions_4.1.22.iso) = 5c7d9a4a31c8a926ba6dbae2b9704a561638e94ea0fc4f805a9231dd4f932d46
-SIZE (VBoxGuestAdditions_4.1.22.iso) = 52207616
+SHA256 (VirtualBox-4.2.6.tar.bz2) = 54526091bc2aa66b88ca878dd9ecc4466f96d607db2f6678a9d673ecf6646ae3
+SIZE (VirtualBox-4.2.6.tar.bz2) = 76291326
+SHA256 (VBoxGuestAdditions_4.2.6.iso) = b9afd356d85fe6822fd28009fd63faddd2ac7cbd75c415ea4ce6a22925243ed3
+SIZE (VBoxGuestAdditions_4.2.6.iso) = 57401344
diff --git a/emulators/virtualbox-ose/files/extrapatch-include-iprt-string.h b/emulators/virtualbox-ose/files/extrapatch-include-iprt-string.h
deleted file mode 100644
index c22eebe25952..000000000000
--- a/emulators/virtualbox-ose/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/files/patch-Config.kmk b/emulators/virtualbox-ose/files/patch-Config.kmk
new file mode 100644
index 000000000000..d7edc886bb4a
--- /dev/null
+++ b/emulators/virtualbox-ose/files/patch-Config.kmk
@@ -0,0 +1,56 @@
+--- Config.kmk.orig 2012-12-20 14:44:38.260858319 +0100
++++ Config.kmk 2012-12-20 14:55:59.491850177 +0100
+@@ -3239,7 +3239,7 @@
+ $(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
+@@ -3248,7 +3248,7 @@
+ -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)
+@@ -3465,8 +3465,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
+@@ -3955,8 +3953,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
+@@ -4371,8 +4367,6 @@
+ /usr/X11R6/include \
+ /usr/local/include
+ TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \
+- /usr/lib \
+- /usr/X11R6/lib \
+ /usr/local/lib
+ endif
+ ifeq ($(KBUILD_TARGET),solaris)
+@@ -4555,8 +4549,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/files/patch-configure b/emulators/virtualbox-ose/files/patch-configure
index d47c69b30074..4bea77d203cc 100644
--- a/emulators/virtualbox-ose/files/patch-configure
+++ b/emulators/virtualbox-ose/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/files/patch-include-iprt-types.h b/emulators/virtualbox-ose/files/patch-include-iprt-types.h
deleted file mode 100644
index 4c2070e3bb10..000000000000
--- a/emulators/virtualbox-ose/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/files/patch-src-VBox-Devices-Audio-ossaudio.c b/emulators/virtualbox-ose/files/patch-src-VBox-Devices-Audio-ossaudio.c
new file mode 100644
index 000000000000..652430cb222e
--- /dev/null
+++ b/emulators/virtualbox-ose/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/files/patch-src-VBox-Devices-Bus-DevPciIch9.cpp b/emulators/virtualbox-ose/files/patch-src-VBox-Devices-Bus-DevPciIch9.cpp
new file mode 100644
index 000000000000..6354f1e1ca65
--- /dev/null
+++ b/emulators/virtualbox-ose/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/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp b/emulators/virtualbox-ose/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp
deleted file mode 100644
index 00e3d32c29d5..000000000000
--- a/emulators/virtualbox-ose/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/files/patch-src-VBox-HostDrivers-Makefile.kmk b/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Makefile.kmk
deleted file mode 100644
index 06c4a71db458..000000000000
--- a/emulators/virtualbox-ose/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/files/patch-src-VBox-HostServices-auth-pam-VBoxAuthPAM.c b/emulators/virtualbox-ose/files/patch-src-VBox-HostServices-auth-pam-VBoxAuthPAM.c
deleted file mode 100644
index 1344f3f2bd60..000000000000
--- a/emulators/virtualbox-ose/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/files/patch-src-VBox-Main-scr-server-freebsd-PerformanceFreeBSD.cpp b/emulators/virtualbox-ose/files/patch-src-VBox-Main-scr-server-freebsd-PerformanceFreeBSD.cpp
new file mode 100644
index 000000000000..9ef5b64d7175
--- /dev/null
+++ b/emulators/virtualbox-ose/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/files/patch-src-VBox-Main-src-server-MachineImpl.cpp b/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-MachineImpl.cpp
deleted file mode 100644
index fce7b85eefa3..000000000000
--- a/emulators/virtualbox-ose/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/files/patch-src-VBox-Main-src-server-freebsd-HostHardwareFreeBSD.cpp b/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-freebsd-HostHardwareFreeBSD.cpp
new file mode 100644
index 000000000000..c77c65da5b21
--- /dev/null
+++ b/emulators/virtualbox-ose/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/files/patch-src-VBox-Main-src-server-freebsd-NetIf-freebsd.cpp b/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-freebsd-NetIf-freebsd.cpp
index bf6264a3b578..e55f2d2bb100 100644
--- a/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-freebsd-NetIf-freebsd.cpp
+++ b/emulators/virtualbox-ose/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/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c b/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c
new file mode 100644
index 000000000000..b666b7ed0362
--- /dev/null
+++ b/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c
@@ -0,0 +1,56 @@
+From Alan L. Cox on FreeBSD-current:
+
+ 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
+ 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(+)
+
+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 (vm_page_t pPage = vm_page_find_least(pMemFreeBSD->pObject, 0);
+ pPage != NULL;
+ pPage = vm_page_next(pPage))
+ {
+ vm_page_unwire(pPage, 0);
+ }
++#if __FreeBSD_version < 900000
+ vm_page_unlock_queues();
++#endif
+ 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)
+ {
+ pPage = vm_page_lookup(pObject, iPage);
++#if __FreeBSD_version < 900000
+ vm_page_lock_queues();
++#endif
+ if (fWire)
+ vm_page_unwire(pPage, 0);
+ vm_page_free(pPage);
++#if __FreeBSD_version < 900000
+ vm_page_unlock_queues();
++#endif
+ }
+ VM_OBJECT_UNLOCK(pObject);
+ return rcNoMem;
+--
+1.7.11.5
+
diff --git a/emulators/virtualbox-ose/pkg-message b/emulators/virtualbox-ose/pkg-message
index b850f64a86c3..93aa94f86927 100644
--- a/emulators/virtualbox-ose/pkg-message
+++ b/emulators/virtualbox-ose/pkg-message
@@ -50,7 +50,7 @@ Running VirtualBox as non-root user may fail with a fatal error
NS_ERROR_FACTORY_NOT_REGISTERED. In this case delete /tmp/.vbox-*-ipc file.
Check wiki page for known issues and troubleshooting:
-http://wiki.freebsd.org/VirtualBox/ToDo
+http://wiki.freebsd.org/VirtualBox
Please report any problems to emulation@. Thanks!
diff --git a/emulators/virtualbox-ose/pkg-plist b/emulators/virtualbox-ose/pkg-plist
index 1e60acad9deb..4e6258648787 100644
--- a/emulators/virtualbox-ose/pkg-plist
+++ b/emulators/virtualbox-ose/pkg-plist
@@ -1,3 +1,4 @@
+bin/VBoxAutostart
bin/VBoxBalloonCtrl
%%X11%%bin/VBoxBFE
bin/VBoxHeadless
@@ -15,6 +16,7 @@ bin/VBoxXPCOMIPCD
%%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
@@ -70,17 +74,22 @@ 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
@@ -242,6 +250,7 @@ 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,14 +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
@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