Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jul 2016 20:28:01 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r418931 - in head/emulators: virtualbox-ose virtualbox-ose-additions virtualbox-ose-additions/files virtualbox-ose-kmod virtualbox-ose-kmod/files virtualbox-ose/files
Message-ID:  <201607222028.u6MKS15a060798@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Fri Jul 22 20:28:01 2016
New Revision: 418931
URL: https://svnweb.freebsd.org/changeset/ports/418931

Log:
  Update to 5.0.26.

Added:
  head/emulators/virtualbox-ose/files/extrapatch-src_VBox_Additions_freebsd_Makefile.kmk   (contents, props changed)
  head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_pam_pam__vbox.cpp   (contents, props changed)
  head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_Makefile.kmk   (contents, props changed)
  head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_x11_VBoxClient_display.cpp   (contents, props changed)
  head/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Audio_DrvHostALSAAudio.cpp   (contents, props changed)
  head/emulators/virtualbox-ose/files/patch-src_VBox_Devices_build_VBoxDD.cpp   (contents, props changed)
  head/emulators/virtualbox-ose/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageHelp.cpp   (contents, props changed)
  head/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c   (contents, props changed)
  head/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyServiceFreeBSD.cpp   (contents, props changed)
  head/emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r0drv_freebsd_thread-r0drv-freebsd.c   (contents, props changed)
  head/emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r0drv_freebsd_time-r0drv-freebsd.c   (contents, props changed)
Deleted:
  head/emulators/virtualbox-ose/files/extrapatch-src-VBox-Additions-x11-vboxvideo-Makefile.kmk.dri
  head/emulators/virtualbox-ose/files/extrapatch-src-VBox-Additions-x11-vboxvideo-Makefile.kmk.dri2
  head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-x11-vboxvideo-vboxvideo_dri.c
  head/emulators/virtualbox-ose/files/patch-src-VBox-Devices-Audio-ossaudio.c
  head/emulators/virtualbox-ose/files/patch-src-VBox-Devices-Input-PS2M.cpp
  head/emulators/virtualbox-ose/files/patch-src-VBox-Devices-Network-slirp-resolv_conf_parser.c
  head/emulators/virtualbox-ose/files/patch-src-VBox-Devices-USB-DevOHCI.cpp
  head/emulators/virtualbox-ose/files/patch-src-VBox-Devices-USB-freebsd-USBProxyDevice-freebsd.cpp
  head/emulators/virtualbox-ose/files/patch-src-VBox-Frontends-VBoxManage-VBoxManageModifyVM.cpp
  head/emulators/virtualbox-ose/files/patch-src-VBox-Frontends-VirtualBox-Makefile.kmk
  head/emulators/virtualbox-ose/files/patch-src-VBox-Frontends-VirtualBox-src-runtime-UIKeyboardHandler.cpp
  head/emulators/virtualbox-ose/files/patch-src-VBox-GuestHost-OpenGL-include-state-cr_line.h
  head/emulators/virtualbox-ose/files/patch-src-VBox-GuestHost-OpenGL-include-state-cr_point.h
  head/emulators/virtualbox-ose/files/patch-src-VBox-Main-Makefile.kmk
  head/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-client-ConsoleImpl2.cpp
  head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-common-checksum-manifest3.cpp
  head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-common-dbg-dbgmodcodeview.cpp
  head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp
  head/emulators/virtualbox-ose/files/patch-src_VBox_Devices_PC_vbox-cpuhotplug.dsl
Modified:
  head/emulators/virtualbox-ose-additions/Makefile
  head/emulators/virtualbox-ose-additions/distinfo
  head/emulators/virtualbox-ose-additions/files/vboxguest.in
  head/emulators/virtualbox-ose-additions/pkg-plist
  head/emulators/virtualbox-ose-kmod/Makefile
  head/emulators/virtualbox-ose-kmod/distinfo
  head/emulators/virtualbox-ose-kmod/files/vboxnet.in
  head/emulators/virtualbox-ose/Makefile
  head/emulators/virtualbox-ose/distinfo
  head/emulators/virtualbox-ose/files/extrapatch-Config.kmk
  head/emulators/virtualbox-ose/files/patch-Config.kmk
  head/emulators/virtualbox-ose/files/patch-configure
  head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c
  head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile
  head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-x11-vboxmouse-Makefile.kmk
  head/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Support-freebsd-Makefile
  head/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Support-freebsd-files_vboxdrv
  head/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-MachineImpl.cpp
  head/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-VirtualBoxImpl.cpp
  head/emulators/virtualbox-ose/files/patch-src-VBox-Main-src-server-freebsd-HostHardwareFreeBSD.cpp
  head/emulators/virtualbox-ose/files/patch-src-VBox-Main-webservice-Makefile.kmk
  head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-Makefile.kmk
  head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c
  head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-posix-utf8-posix.cpp
  head/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Makefile.kmk
  head/emulators/virtualbox-ose/files/vboxheadless.in
  head/emulators/virtualbox-ose/pkg-plist

Modified: head/emulators/virtualbox-ose-additions/Makefile
==============================================================================
--- head/emulators/virtualbox-ose-additions/Makefile	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose-additions/Makefile	Fri Jul 22 20:28:01 2016	(r418931)
@@ -2,13 +2,11 @@
 # $FreeBSD$
 
 PORTNAME=	virtualbox-ose
-DISTVERSION=	4.3.38
+PORTVERSION=	5.0.26
 CATEGORIES=	emulators
-MASTER_SITES=	http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
-		http://tmp.chruetertee.ch/ \
-		http://disasterarea.chruetertee.ch/
+MASTER_SITES=	http://download.virtualbox.org/virtualbox/${PORTVERSION}/
 PKGNAMESUFFIX=	-additions
-DISTNAME=	VirtualBox-${DISTVERSION}
+DISTNAME=	VirtualBox-${PORTVERSION}
 
 MAINTAINER=	vbox@FreeBSD.org
 COMMENT=	VirtualBox additions for FreeBSD guests
@@ -31,7 +29,6 @@ MAKE_JOBS_UNSAFE=	yes
 
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS+=	--disable-alsa \
-			--disable-dbus \
 			--disable-docs \
 			--disable-libvpx \
 			--disable-pulse \
@@ -40,19 +37,25 @@ CONFIGURE_ARGS+=	--disable-alsa \
 			--disable-xpcom
 CONFIGURE_ARGS+=	--nofatal --with-gcc="${CC}" --with-g++="${CXX}"
 
-CONFLICTS_INSTALL=	virtualbox-ose-[3,4]* \
+CONFLICTS_INSTALL=	virtualbox-ose-[3-5]* \
 			virtualbox-ose-additions-devel-[3,4]* \
 			virtualbox-ose-devel-[3,4]* \
 			virtualbox-ose-legacy-[3,4]*
 
-OPTIONS_DEFINE=	DEBUG OPENGL X11
-OPTIONS_DEFAULT=	X11
+OPTIONS_DEFINE=	DBUS DEBUG OPENGL X11
+OPTIONS_DEFAULT=	DBUS X11
 OPTIONS_SUB=	yes
 
+DBUS_CONFIGURE_OFF=	--disable-dbus
+DBUS_LIB_DEPENDS=	libdbus-1.so:${PORTSDIR}/devel/dbus
 OPENGL_CONFIGURE_OFF=	--disable-opengl
 
 .include <bsd.port.options.mk>
 
+.if ${PORT_OPTIONS:MOPENGL} && empty(PORT_OPTIONS:MX11)
+BROKEN=		OPENGL requires X11 support. Run 'make config' again!
+.endif
+
 VIDEODIR=	${PREFIX}/lib/xorg/modules/drivers
 INPUTDIR=	${PREFIX}/lib/xorg/modules/input
 
@@ -73,7 +76,7 @@ MAKE_ARGS+=	DEBUG_FLAGS="-O1 -g"
 .endif
 
 .if ${PORT_OPTIONS:MOPENGL}
-USE_XORG+=	xcomposite xdamage xext xfixes
+USE_XORG=	xcomposite xdamage xfixes
 USE_GL=		gl
 VBOX_LIBS=	VBoxOGL.so \
 		VBoxOGLarrayspu.so \
@@ -82,11 +85,13 @@ VBOX_LIBS=	VBoxOGL.so \
 		VBoxOGLfeedbackspu.so \
 		VBoxOGLpackspu.so \
 		VBoxOGLpassthroughspu.so
+.else
+EXTRA_PATCHES=	${PATCHDIR}/extrapatch-src_VBox_Additions_freebsd_Makefile.kmk
 .endif
 
 .if ${PORT_OPTIONS:MX11}
 BUILD_DEPENDS+=	${LOCALBASE}/bin/X:x11-servers/xorg-server
-USE_XORG=	xcursor xmu inputproto xorg-server xrandr
+USE_XORG+=	inputproto x11 xcursor xext xmu xorg-server xrandr xt
 USES+=		pkgconfig
 VBOX_WITH_X11=	1
 XORG_DRV_ABI=	pkgconf --modversion xorg-server | \
@@ -101,10 +106,12 @@ KMK_ARCH=	freebsd.x86
 KMK_ARCH=	freebsd.${ARCH}
 .endif
 
+SUB_LIST+=	VBOX_KMODS="${VBOX_KMODS}"
+
 .include <bsd.port.pre.mk>
 
 .if ${COMPILER_TYPE} == clang
-EXTRA_PATCHES=	${PATCHDIR}/extrapatch-Config.kmk \
+EXTRA_PATCHES+=	${PATCHDIR}/extrapatch-Config.kmk \
 		${PATCHDIR}/extrapatch-src-VBox-Additions-x11-vboxvideo-Makefile.kmk \
 		${PATCHDIR}/extrapatch-src-VBox-Additions-x11-x11include-xorg-server-1.17.1-compiler.h
 .if ${COMPILER_FEATURES:Mlibc++}
@@ -112,15 +119,15 @@ EXTRA_PATCHES+=	${PATCHDIR}/extrapatch-s
 .endif
 .endif
 
-.if ${OSVERSION} < 1001514
-EXTRA_PATCHES+=	${PATCHDIR}/extrapatch-src-VBox-Additions-x11-vboxvideo-Makefile.kmk.dri
-.else
+.if ${OSVERSION} >= 1001514
 EXTRA_PATCHES+=	${PATCHDIR}/extrapatch-src-VBox-Additions-freebsd-drm-Makefile
 EXTRA_PATCHES+=	${PATCHDIR}/extrapatch-src-VBox-Additions-freebsd-drm-Makefile.kmk
-EXTRA_PATCHES+=	${PATCHDIR}/extrapatch-src-VBox-Additions-x11-vboxvideo-Makefile.kmk.dri2
 .endif
 
-SUB_LIST+=	KMODDIR=${KMODDIR}
+VBOX_KMODS=	vboxguest:pci/vboxguest
+.if ${PORT_OPTIONS:MOPENGL}
+VBOX_KMODS+=	vboxvideo:vgapci/vboxvideo
+.endif
 
 pre-everything::
 .if ${ARCH} == "amd64"
@@ -134,11 +141,15 @@ pre-everything::
 post-patch:
 	@${ECHO} 'VBOX_ONLY_ADDITIONS = 1' > ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_WITH_DRAG_AND_DROP = ${VBOX_WITH_X11}' >> ${WRKSRC}/LocalConfig.kmk
+	@${ECHO} 'VBOX_WITH_DRAG_AND_DROP_GH = ${VBOX_WITH_X11}' >> ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_WITH_X11_ADDITIONS = ${VBOX_WITH_X11}' >> ${WRKSRC}/LocalConfig.kmk
 .if ${COMPILER_TYPE} == clang
 	@${REINPLACE_CMD} -e 's| -finline-limit=8000||' \
 	    -e 's| -fno-merge-constants||' \
 	    -e 's| -mpreferred-stack-boundary=2||' ${WRKSRC}/Config.kmk
+.if ${COMPILER_FEATURES:Mlibc++}
+	@${ECHO} 'VBOX_GCC_std = -std=c++11' >> ${WRKSRC}/LocalConfig.kmk
+.endif
 	@${ECHO} 'VBOX_GCC_Wno-unused-parameter = -Wno-unused-parameter' >> ${WRKSRC}/LocalConfig.kmk
 .endif
 	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
@@ -173,6 +184,7 @@ do-install:
 .endif
 .endif
 
+	${INSTALL_LIB} ${VBOX_BIN}/pam_vbox.so ${STAGEDIR}${PREFIX}/lib
 	${INSTALL_PROGRAM} ${VBOX_SBINS:S|^|${VBOX_BIN}/|} \
 	    ${STAGEDIR}${PREFIX}/sbin/
 

Modified: head/emulators/virtualbox-ose-additions/distinfo
==============================================================================
--- head/emulators/virtualbox-ose-additions/distinfo	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose-additions/distinfo	Fri Jul 22 20:28:01 2016	(r418931)
@@ -1,2 +1,3 @@
-SHA256 (VirtualBox-4.3.38.tar.bz2) = 36f16d435acf04c1dce81df08ba0b522b7c3b10fe48f6ab5b95e9c8404d1f2e5
-SIZE (VirtualBox-4.3.38.tar.bz2) = 98437150
+TIMESTAMP = 1468866791
+SHA256 (VirtualBox-5.0.26.tar.bz2) = 78dec1369d2c8feefea3c682d95e76c0e99414c56626388035cf4061d4dad62e
+SIZE (VirtualBox-5.0.26.tar.bz2) = 111244869

Modified: head/emulators/virtualbox-ose-additions/files/vboxguest.in
==============================================================================
--- head/emulators/virtualbox-ose-additions/files/vboxguest.in	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose-additions/files/vboxguest.in	Fri Jul 22 20:28:01 2016	(r418931)
@@ -22,45 +22,42 @@ rcvar=vboxguest_enable
 start_cmd="vboxguest_start"
 stop_cmd="vboxguest_stop"
 
+vboxguest_modules="%%VBOX_KMODS%%"
+
 vboxguest_start()
 {
-	if ! kldstat -q -m pci/vboxguest;
-	then
-		if ! kldload vboxguest > /dev/null 2>&1;
-		then
-			warn "Can't load vboxguest module."
-			return 1
-		fi
-	fi
-	test -f "%%KMODDIR%%/vboxvideo.ko" || return 0
-	if ! kldstat -q -m vgapci/vboxvideo;
-	then
-		if ! kldload vboxvideo > /dev/null 2>&1;
-		then
-			warn "Can't load vboxvideo module."
-			return 1
+	local _k _m
+
+	for _m in ${vboxguest_modules}; do
+		_k=${_m%:*}
+		_m=${_m#*:}
+		if ! kldstat -q -m ${_m}; then
+			if ! kldload ${_k} > /dev/null 2>&1; then
+				warn "Can't load ${_k} module."
+				return 1
+			fi
 		fi
-	fi
+	done
 }
 
 vboxguest_stop()
 {
-	if kldstat -q -m vgapci/vboxvideo;
-	then
-		if ! kldunload vboxvideo > /dev/null 2>&1;
-		then
-			warn "Can't unload vboxvideo module."
-			return 1
+	local _k _m _r
+
+	_r=
+	for _m in ${vboxguest_modules}; do
+		_r="${_m} ${_r}"
+	done
+	for _m in ${_r}; do
+		_k=${_m%:*}
+		_m=${_m#*:}
+		if kldstat -q -m ${_m}; then
+			if ! kldunload ${_k} > /dev/null 2>&1; then
+				warn "Can't unload ${_k} module."
+				return 1
+			fi
 		fi
-	fi
-        if kldstat -q -m pci/vboxguest;
-        then
-                if ! kldunload vboxguest > /dev/null 2>&1;
-                then
-                        warn "Can't unload vboxguest module."
-                        return 1
-                fi
-        fi
+	done
 }
 
 load_rc_config $name

Modified: head/emulators/virtualbox-ose-additions/pkg-plist
==============================================================================
--- head/emulators/virtualbox-ose-additions/pkg-plist	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose-additions/pkg-plist	Fri Jul 22 20:28:01 2016	(r418931)
@@ -8,6 +8,7 @@
 %%OPENGL%%lib/VBoxOGLfeedbackspu.so
 %%OPENGL%%lib/VBoxOGLpackspu.so
 %%OPENGL%%lib/VBoxOGLpassthroughspu.so
+lib/pam_vbox.so
 %%OPENGL%%lib/dri/vboxvideo_dri.so
 %%X11%%lib/xorg/modules/drivers/vboxvideo_drv.so
 %%X11%%lib/xorg/modules/input/vboxmouse_drv.so

Modified: head/emulators/virtualbox-ose-kmod/Makefile
==============================================================================
--- head/emulators/virtualbox-ose-kmod/Makefile	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose-kmod/Makefile	Fri Jul 22 20:28:01 2016	(r418931)
@@ -2,13 +2,11 @@
 # $FreeBSD$
 
 PORTNAME=	virtualbox-ose
-DISTVERSION=	4.3.38
+PORTVERSION=	5.0.26
 CATEGORIES=	emulators
-MASTER_SITES=	http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
-		http://tmp.chruetertee.ch/ \
-		http://disasterarea.chruetertee.ch/
+MASTER_SITES=	http://download.virtualbox.org/virtualbox/${PORTVERSION}/
 PKGNAMESUFFIX=	-kmod
-DISTNAME=	VirtualBox-${DISTVERSION}
+DISTNAME=	VirtualBox-${PORTVERSION}
 
 MAINTAINER=	vbox@FreeBSD.org
 COMMENT=	VirtualBox kernel module for FreeBSD

Modified: head/emulators/virtualbox-ose-kmod/distinfo
==============================================================================
--- head/emulators/virtualbox-ose-kmod/distinfo	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose-kmod/distinfo	Fri Jul 22 20:28:01 2016	(r418931)
@@ -1,2 +1,3 @@
-SHA256 (VirtualBox-4.3.38.tar.bz2) = 36f16d435acf04c1dce81df08ba0b522b7c3b10fe48f6ab5b95e9c8404d1f2e5
-SIZE (VirtualBox-4.3.38.tar.bz2) = 98437150
+TIMESTAMP = 1468866759
+SHA256 (VirtualBox-5.0.26.tar.bz2) = 78dec1369d2c8feefea3c682d95e76c0e99414c56626388035cf4061d4dad62e
+SIZE (VirtualBox-5.0.26.tar.bz2) = 111244869

Modified: head/emulators/virtualbox-ose-kmod/files/vboxnet.in
==============================================================================
--- head/emulators/virtualbox-ose-kmod/files/vboxnet.in	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose-kmod/files/vboxnet.in	Fri Jul 22 20:28:01 2016	(r418931)
@@ -22,25 +22,22 @@ rcvar=vboxnet_enable
 start_cmd="vboxnet_start"
 stop_cmd="vboxnet_stop"
 
+vboxnet_modules="vboxdrv vboxnetflt:ng_vboxnetflt vboxnetadp"
+
 vboxnet_start()
 {
-	if ! kldstat -q -m ng_vboxnetflt;
-	then
-		if ! kldload vboxnetflt > /dev/null 2>&1;
-		then
-			warn "Can't load vboxnetflt module."
-			return 1
-		fi
-	fi
+	local _k _m
 
-	if ! kldstat -q -m vboxnetadp;
-	then
-		if ! kldload vboxnetadp > /dev/null 2>&1;
-		then
-			warn "Can't load vboxnetadp module."
-			return 1
+	for _m in ${vboxnet_modules}; do
+		_k=${_m%:*}
+		_m=${_m#*:}
+		if ! kldstat -q -m ${_m}; then
+			if ! kldload ${_k} > /dev/null 2>&1; then
+				warn "Can't load ${_k} module."
+				return 1
+			fi
 		fi
-	fi
+	done
 
 	# initialize configured host-only interfaces
 	LD_LIBRARY_PATH=%%PREFIX%%/lib %%PREFIX%%/bin/VBoxManage list hostonlyifs >/dev/null
@@ -48,23 +45,22 @@ vboxnet_start()
 
 vboxnet_stop()
 {
-	if kldstat -q -m vboxnetadp;
-	then
-		if ! kldunload vboxnetadp > /dev/null 2>&1;
-		then
-			warn "Can't unload vboxnetadp module."
-			return 1
-		fi
-	fi
+	local _k _m _r
 
-	if kldstat -q -m ng_vboxnetflt;
-	then
-		if ! kldunload vboxnetflt > /dev/null 2>&1;
-		then
-			warn "Can't unload vboxnetflt module."
-			return 1
+	_r=
+	for _m in ${vboxnet_modules}; do
+		_r="${_m} ${_r}"
+	done
+	for _m in ${_r}; do
+		_k=${_m%:*}
+		_m=${_m#*:}
+		if kldstat -q -m ${_m}; then
+			if ! kldunload ${_k} > /dev/null 2>&1; then
+				warn "Can't unload ${_k} module."
+				return 1
+			fi
 		fi
-	fi
+	done
 }
 
 load_rc_config $name

Modified: head/emulators/virtualbox-ose/Makefile
==============================================================================
--- head/emulators/virtualbox-ose/Makefile	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose/Makefile	Fri Jul 22 20:28:01 2016	(r418931)
@@ -2,15 +2,11 @@
 # $FreeBSD$
 
 PORTNAME=	virtualbox-ose
-DISTVERSION=	4.3.38
-PORTREVISION=	1
+PORTVERSION=	5.0.26
 CATEGORIES=	emulators
-MASTER_SITES=	http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
-		http://tmp.chruetertee.ch/ \
-		http://disasterarea.chruetertee.ch/ \
-		http://download.virtualbox.org/virtualbox/${VBOX_GUEST_VER}/:guestadditions
-DISTFILES=	VirtualBox-${DISTVERSION}${EXTRACT_SUFX} ${GADISTFILES}
-EXTRACT_ONLY=	VirtualBox-${DISTVERSION}${EXTRACT_SUFX}
+MASTER_SITES=	http://download.virtualbox.org/virtualbox/${PORTVERSION}/
+DISTFILES=	VirtualBox-${PORTVERSION}${EXTRACT_SUFX} ${GUESTADDITIONS}
+EXTRACT_ONLY=	VirtualBox-${PORTVERSION}${EXTRACT_SUFX}
 
 MAINTAINER?=	vbox@FreeBSD.org
 COMMENT=	General-purpose full virtualizer for x86 hardware
@@ -34,26 +30,28 @@ CPE_PRODUCT=	vm_virtualbox
 
 WRKSRC=		${WRKDIR}/VirtualBox-${PORTVERSION}
 ONLY_FOR_ARCHS=	i386 amd64
-USES=		compiler cpe iconv pkgconfig tar:bzip2
-USE_GNOME=	libidl
-USE_LDCONFIG=	${VBOX_DIR}
-USE_OPENSSL=	yes
+USES=		compiler cpe iconv pkgconfig ssl tar:bzip2
+USE_GNOME=	libidl libxml2
 
 HAS_CONFIGURE=	yes
-CONFIGURE_ARGS+=	--disable-java --passive-mesa
+CONFIGURE_ARGS=	--disable-java --passive-mesa
 CONFIGURE_ARGS+=	--with-gcc="${CC}" --with-g++="${CXX}"
 
-CONFLICTS_INSTALL=	virtualbox-ose-additions-4* \
+CONFLICTS_INSTALL=	virtualbox-ose-additions-[4,5]* \
 			virtualbox-ose-additions-devel-4* \
 			virtualbox-ose-devel-4* \
 			virtualbox-ose-legacy-4*
 
 .if defined(LITE)
-PKGNAMESUFFIX+=		-lite
-CONFLICTS_INSTALL+=      ${PORTNAME}-[0-9]*
-WITHOUT+=      		NLS
+CONFIGURE_ARGS+=	--disable-alsa --disable-dbus --disable-docs \
+			--disable-pulse --disable-qt4 --disable-libvpx \
+			--build-headless
+CONFLICTS_INSTALL+=	${PORTNAME}-[4,5]*
+PKGNAMESUFFIX=		-lite
+PLIST_SUB=		GUESTADDITIONS="@comment " MANUAL="@comment " \
+			NLS="@comment " QT4="@comment " X11="@comment "
 .else
-CONFLICTS_INSTALL+=      ${PORTNAME}-lite-[0-9]*
+CONFLICTS_INSTALL+=	${PORTNAME}-lite-[4,5]*
 .endif
 
 VBOXUSER?=	vboxusers
@@ -67,14 +65,12 @@ VBOX_PROGS=	VBoxAutostart VBoxBalloonCtr
 VBOX_UTILS=	VBoxExtPackHelperApp VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT \
 		VBoxSVC VBoxXPCOMIPCD
 
-VBOX_GUEST_VER=	${PORTVERSION}
-
-OPTIONS_DEFINE=	DBUS DEBUG GUESTADDITIONS MANUAL NLS PULSEAUDIO PYTHON \
-		QT4 R0LOGGING UDPTUNNEL VDE VNC VPX WEBSERVICE X11
-.if defined(LITE)
+OPTIONS_DEFINE=		PYTHON R0LOGGING UDPTUNNEL VDE VNC WEBSERVICE
 OPTIONS_DEFAULT=	UDPTUNNEL VNC
-.else
-OPTIONS_DEFAULT=	DBUS PYTHON QT4 UDPTUNNEL VNC WEBSERVICE X11
+.if !defined(LITE)
+OPTIONS_DEFINE+=	ALSA DBUS DEBUG GUESTADDITIONS MANUAL NLS PULSEAUDIO
+OPTIONS_DEFINE+=	QT4 VPX X11
+OPTIONS_DEFAULT+=	DBUS PYTHON QT4 WEBSERVICE X11
 .endif
 OPTIONS_SUB=	yes
 
@@ -89,24 +85,28 @@ VNC_DESC=	Build with VNC support
 VPX_DESC=	Use vpx for video capturing
 WEBSERVICE_DESC=	Build Webservice
 
-DBUS_LIB_DEPENDS=	libdbus-1.so:devel/dbus
-PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
-VNC_LIB_DEPENDS=	libvncserver.so:net/libvncserver
-VPX_LIB_DEPENDS=	libvpx.so:multimedia/libvpx
-
+MANUAL_BUILD_DEPENDS=	${LOCALBASE}/share/xml/docbook/4.4/docbookx.dtd:textproc/docbook-xml
+PYTHON_CONFIGURE_OFF=	--disable-python
+UDPTUNNEL_CONFIGURE_OFF=	--disable-udptunnel
+VDE_CONFIGURE_ON=	--enable-vde
 VDE_RUN_DEPENDS=	vde_switch:net/vde2
+VNC_CONFIGURE_ON=	--enable-vnc
+VNC_LIB_DEPENDS=	libvncserver.so:net/libvncserver
 
+.if !defined(LITE)
+ALSA_CONFIGURE_OFF=	--disable-alsa
+ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
 DBUS_CONFIGURE_OFF=	--disable-dbus
+DBUS_LIB_DEPENDS=	libdbus-1.so:devel/dbus
 DEBUG_CONFIGURE_ON=	--build-debug
 MANUAL_CONFIGURE_OFF=	--disable-docs
 PULSEAUDIO_CONFIGURE_OFF=	--disable-pulse
-PYTHON_CONFIGURE_OFF=	--disable-python
+PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
 QT4_CONFIGURE_OFF=	--disable-qt4
-UDPTUNNEL_CONFIGURE_OFF=	--disable-udptunnel
-VDE_CONFIGURE_ON=	--enable-vde
-VNC_CONFIGURE_ON=	--enable-vnc
 VPX_CONFIGURE_OFF=	--disable-libvpx
+VPX_LIB_DEPENDS=	libvpx.so:multimedia/libvpx
 X11_CONFIGURE_OFF=	--build-headless
+.endif
 
 # bmake doesn't know about unsetenv=true
 .if defined(.PARSEDIR)
@@ -116,7 +116,7 @@ ENV=
 .SHELL:		path="/bin/sh" unsetenv=true
 .endif
 
-PLIST_SUB+=	GUEST_VER=${VBOX_GUEST_VER} \
+PLIST_SUB+=	GUEST_VER=${PORTVERSION} \
 		PYTHON_VER=${PYTHON_VER} \
 		PYTHON_VERU=${PYTHON_VER:S/./_/} \
 		VBOXGROUP=${VBOXGROUP}
@@ -128,11 +128,11 @@ USE_RC_SUBR+=	vboxheadless vboxwatchdog
 
 .include <bsd.port.options.mk>
 
-.if empty(PORT_OPTIONS:MQT4) && !empty(PORT_OPTIONS:MNLS)
+.if ${PORT_OPTIONS:MNLS} && empty(PORT_OPTIONS:MQT4) && !defined(LITE)
 BROKEN=		NLS support requires QT4 frontend. Run 'make config' again!
 .endif
 
-.if empty(PORT_OPTIONS:MX11) && !empty(PORT_OPTIONS:MQT4)
+.if ${PORT_OPTIONS:MQT4} && empty(PORT_OPTIONS:MX11)
 BROKEN=		QT4 frontend requires X11 support. Run 'make config' again!
 .endif
 
@@ -148,13 +148,14 @@ BROKEN=		R0 logging requires debug build
 .endif
 
 .if ${PORT_OPTIONS:MGUESTADDITIONS}
-GUESTADDITIONS=	VBoxGuestAdditions_${VBOX_GUEST_VER}.iso
-GADISTFILES=	${GUESTADDITIONS}:guestadditions
+GUESTADDITIONS=	VBoxGuestAdditions_${PORTVERSION}.iso
 RESTRICTED=	for personal use only
 RESTRICTED_FILES=	${GUESTADDITIONS}
 .endif
 
 .if ${PORT_OPTIONS:MMANUAL}
+DBKXMLDIR=	${LOCALBASE}/share/xml/docbook/4.4
+DBKXSLDIR=	${LOCALBASE}/share/xsl/docbook
 USE_TEX=	dvipsk:build formats:build
 .endif
 
@@ -169,8 +170,9 @@ USES+=		python:build
 
 .if ${PORT_OPTIONS:MQT4}
 QT_NONSTANDARD=	yes
-USE_QT4=	linguist_build moc_build rcc_build uic_build
-USE_QT4+=	gui network opengl
+USE_GL=		gl
+USE_QT4=	corelib gui linguist_build moc_build network
+USE_QT4+=	opengl rcc_build uic_build
 INSTALLS_ICONS=	yes
 VBOX_PROGS+=	VirtualBox
 VBOX_UTILS+=	VBoxTestOGL
@@ -188,7 +190,7 @@ VBOX_UTILS+=	vboxwebsrv webtest
 
 .if ${PORT_OPTIONS:MX11}
 USE_SDL=	sdl
-USE_XORG=	xcursor xmu inputproto xinerama
+USE_XORG=	inputproto x11 xcursor xext xinerama xmu xt
 VBOX_PROGS+=	VBoxSDL
 .endif
 
@@ -235,7 +237,12 @@ pre-everything::
 .endif
 
 post-patch:
-	@${ECHO} 'VBOX_PATH_APP_PRIVATE_ARCH = ${VBOX_DIR}' > \
+	@${ECHO} 'TOOL_QT4_BIN_SUFF = -qt4' > ${WRKSRC}/LocalConfig.kmk
+	@${ECHO} 'VBOX_PATH_APP_PRIVATE_ARCH = ${VBOX_DIR}' >> \
+	    ${WRKSRC}/LocalConfig.kmk
+	@${ECHO} 'VBOX_PATH_DOCBOOK = ${DBKXSLDIR}' >> \
+	    ${WRKSRC}/LocalConfig.kmk
+	@${ECHO} 'VBOX_PATH_DOCBOOK_DTD = ${DBKXMLDIR}' >> \
 	    ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_PATH_SHARED_LIBS = ${VBOX_DIR}' >> \
 	    ${WRKSRC}/LocalConfig.kmk
@@ -243,6 +250,7 @@ post-patch:
 	    ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_PATH_APP_PRIVATE = ${DATADIR}' >> ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_PATH_APP_DOCS = ${DOCSDIR}' >> ${WRKSRC}/LocalConfig.kmk
+	@${ECHO} 'VBOX_WITH_EXTPACK_VBOXDTRACE =' >> ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_WITH_INSTALLER = 1' >> ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_WITH_VBOXDRV =' >> ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_WITH_TESTCASES =' >> ${WRKSRC}/LocalConfig.kmk
@@ -250,6 +258,8 @@ post-patch:
 	@${ECHO} 'SDK_VBOX_LIBPNG_LIBS = png' >> ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_WITH_ADDITIONS =' >> ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_WITH_DRAG_AND_DROP = ${VBOX_WITH_QT4}' >> ${WRKSRC}/LocalConfig.kmk
+	@${ECHO} 'VBOX_WITH_DRAG_AND_DROP_GH = ${VBOX_WITH_QT4}' >> ${WRKSRC}/LocalConfig.kmk
+	@${ECHO} 'VBOX_WITH_VALIDATIONKIT =' >> ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_WITH_X11_ADDITIONS =' >> ${WRKSRC}/LocalConfig.kmk
 .if ${PORT_OPTIONS:MWEBSERVICE}
 	@${ECHO} 'VBOX_WITH_WEBSERVICES = 1' >> ${WRKSRC}/LocalConfig.kmk
@@ -277,7 +287,8 @@ post-patch:
 		${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py
 	@${REINPLACE_CMD} -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' ${WRKSRC}/configure
 .if empty(ICONV_LIB)
-	@${REINPLACE_CMD} -e 's|iconv||' ${WRKSRC}/Config.kmk ${WRKSRC}/src/VBox/Runtime/Makefile.kmk
+	@${REINPLACE_CMD} -e 's|iconv||' ${WRKSRC}/Config.kmk \
+	    ${WRKSRC}/src/VBox/Runtime/Makefile.kmk
 	@${ECHO} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk
 .endif
 	@${REINPLACE_CMD} -e 's|/usr/local/lib/virtualbox|${VBOX_DIR}|' \
@@ -286,7 +297,7 @@ post-patch:
 
 do-build:
 	cd ${WRKSRC} && \
-	    ${SH} -c '. env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}'
+	    ${SH} -c '. ${WRKSRC}/env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}'
 .if ${PORT_OPTIONS:MPYTHON}
 	${PYTHON_CMD} -mcompileall ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/python/xpcom
 .endif
@@ -300,7 +311,7 @@ do-install:
 
 	${MKDIR} ${STAGEDIR}${VBOX_DIR}
 	cd ${KMK_BUILDDIR}/bin && ${COPYTREE_SHARE} \
-	    "*.so *.gc *.r0 *.fd components" ${STAGEDIR}${VBOX_DIR}
+	    "*.fd *.r0 *.rc *.so components" ${STAGEDIR}${VBOX_DIR}
 	${LN} -sf ${DATADIR}/sdk ${STAGEDIR}${VBOX_DIR}
 
 	${INSTALL_SCRIPT} ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh \
@@ -328,7 +339,7 @@ do-install:
 	${INSTALL_DATA} ${KMK_BUILDDIR}/bin/UserManual*.pdf ${STAGEDIR}${DOCSDIR}
 .endif
 
-.if ${PORT_OPTIONS:MNLS}
+.if ${PORT_OPTIONS:MNLS} && !defined(LITE)
 	cd ${KMK_BUILDDIR}/obj/VirtualBox/qtnls && ${COPYTREE_SHARE} "*.qm" ${STAGEDIR}${DATADIR}/nls
 .endif
 

Modified: head/emulators/virtualbox-ose/distinfo
==============================================================================
--- head/emulators/virtualbox-ose/distinfo	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose/distinfo	Fri Jul 22 20:28:01 2016	(r418931)
@@ -1,4 +1,5 @@
-SHA256 (VirtualBox-4.3.38.tar.bz2) = 36f16d435acf04c1dce81df08ba0b522b7c3b10fe48f6ab5b95e9c8404d1f2e5
-SIZE (VirtualBox-4.3.38.tar.bz2) = 98437150
-SHA256 (VBoxGuestAdditions_4.3.38.iso) = 0aabbc9d548658e90f3b30d08e76a023ba93402cd2b833dd153530f122ea0502
-SIZE (VBoxGuestAdditions_4.3.38.iso) = 57085952
+TIMESTAMP = 1468866832
+SHA256 (VirtualBox-5.0.26.tar.bz2) = 78dec1369d2c8feefea3c682d95e76c0e99414c56626388035cf4061d4dad62e
+SIZE (VirtualBox-5.0.26.tar.bz2) = 111244869
+SHA256 (VBoxGuestAdditions_5.0.26.iso) = 7458ee5a7121a7d243fd6a7528ba427945d9120c5efc7cd75b3951fb01f09c59
+SIZE (VBoxGuestAdditions_5.0.26.iso) = 58232832

Modified: head/emulators/virtualbox-ose/files/extrapatch-Config.kmk
==============================================================================
--- head/emulators/virtualbox-ose/files/extrapatch-Config.kmk	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose/files/extrapatch-Config.kmk	Fri Jul 22 20:28:01 2016	(r418931)
@@ -1,22 +1,22 @@
---- Config.kmk.orig	2014-03-26 15:12:14.000000000 -0400
-+++ Config.kmk	2014-05-07 16:07:36.000000000 -0400
-@@ -3042,6 +3042,7 @@
-  ifeq ($(VBOX_LDR_FMT32),elf)
+--- Config.kmk.orig	2016-07-18 11:50:32 UTC
++++ Config.kmk
+@@ -3537,6 +3537,7 @@ ifdef VBOX_WITH_RAW_MODE
   TEMPLATE_VBoxRc_TOOL                = $(VBOX_GCC32_TOOL)
-  TEMPLATE_VBoxRc_CXXFLAGS            = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti
+  TEMPLATE_VBoxRc_CXXFLAGS            = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
+  TEMPLATE_VBoxRc_CFLAGS              = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C)   $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_IPRT_FMT_CHECK)
 + TEMPLATE_VBoxRc_CXXFLAGS.freebsd    = -fno-builtin
-  TEMPLATE_VBoxRc_CFLAGS              = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C)   $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden)
    ifeq ($(KBUILD_TARGET),solaris)
     TEMPLATE_VBoxRc_LDFLAGS           = -r
-@@ -3170,6 +3171,7 @@
+   else
+@@ -3677,6 +3678,7 @@ ifeq ($(VBOX_LDR_FMT),elf)
  TEMPLATE_VBoxR0_TOOL                = $(VBOX_GCC_TOOL)
- TEMPLATE_VBoxR0_CFLAGS              = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C)   $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99
- TEMPLATE_VBoxR0_CXXFLAGS            = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti
+ TEMPLATE_VBoxR0_CFLAGS              = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C)   $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK)
+ TEMPLATE_VBoxR0_CXXFLAGS            = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
 +TEMPLATE_VBoxR0_CXXFLAGS.freebsd    = -fno-builtin
  TEMPLATE_VBoxR0_CFLAGS.amd64        = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables -ffreestanding
  TEMPLATE_VBoxR0_CXXFLAGS.amd64      = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables
  ifeq ($(KBUILD_TARGET),solaris)
-@@ -3435,7 +3437,7 @@
+@@ -3945,7 +3947,7 @@ define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CM
  		| xargs -J% objcopy % $(out)
  
  ## Strip debug info (comment out if debugging or something).

Added: head/emulators/virtualbox-ose/files/extrapatch-src_VBox_Additions_freebsd_Makefile.kmk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/virtualbox-ose/files/extrapatch-src_VBox_Additions_freebsd_Makefile.kmk	Fri Jul 22 20:28:01 2016	(r418931)
@@ -0,0 +1,11 @@
+--- src/VBox/Additions/freebsd/Makefile.kmk.orig	2016-07-18 11:50:44 UTC
++++ src/VBox/Additions/freebsd/Makefile.kmk
+@@ -24,7 +24,7 @@ endif
+ 
+ # Include sub-makefiles.
+ #include $(PATH_SUB_CURRENT)/vboxvfs/Makefile.kmk
+-include $(PATH_SUB_CURRENT)/drm/Makefile.kmk
++#include $(PATH_SUB_CURRENT)/drm/Makefile.kmk
+ 
+ #
+ # Globals

Modified: head/emulators/virtualbox-ose/files/patch-Config.kmk
==============================================================================
--- head/emulators/virtualbox-ose/files/patch-Config.kmk	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose/files/patch-Config.kmk	Fri Jul 22 20:28:01 2016	(r418931)
@@ -1,6 +1,6 @@
---- Config.kmk.orig	2014-07-16 16:59:27.000000000 -0400
-+++ Config.kmk	2014-07-16 17:12:48.000000000 -0400
-@@ -339,7 +339,7 @@
+--- Config.kmk.orig	2016-07-18 11:50:32 UTC
++++ Config.kmk
+@@ -341,7 +341,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,7 +9,34 @@
   VBOX_WITH_DOCS_CHM = 1
  endif
  # By default only include translations in documentation-only builds
-@@ -602,7 +602,7 @@
+@@ -422,22 +422,22 @@ ifn1of ($(KBUILD_TARGET), win darwin)
+  # Enable OSS audio support.
+  VBOX_WITH_OSS = 1
+ endif
+-if1of ($(KBUILD_TARGET), linux)
++if1of ($(KBUILD_TARGET), freebsd linux)
+  # Enable ALSA audio support.
+  VBOX_WITH_ALSA = 1
+ endif
+-if1of ($(KBUILD_TARGET), linux)
++if1of ($(KBUILD_TARGET), freebsd linux)
+  # Enable PulseAudio audio support.
+  VBOX_WITH_PULSE = 1
+ endif
+ # Enable PCI passthrough support.
+ VBOX_WITH_PCI_PASSTHROUGH = 1
+ # Enable statically linked dbus support.
+-if1of ($(KBUILD_TARGET), linux solaris)
++if1of ($(KBUILD_TARGET), freebsd linux solaris)
+  VBOX_WITH_DBUS = 1
+ endif
+ # Enable building PAM modules.
+-if1of ($(KBUILD_TARGET), linux solaris)
++if1of ($(KBUILD_TARGET), freebsd linux solaris)
+  VBOX_WITH_PAM = 1
+ endif
+ # Disable WINMM support for Windows (not implemented).
+@@ -627,7 +627,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
@@ -18,7 +45,7 @@
   VBOX_WITH_VPX = 1
  endif
  # Enable shared folders
-@@ -891,10 +891,6 @@
+@@ -935,10 +935,6 @@ ifeq ($(KBUILD_TARGET),darwin)
   VBOX_WITH_VBOXSDL=
  endif
  
@@ -29,21 +56,17 @@
  ifeq ($(KBUILD_TARGET),haiku)
   # Don't bother with SDL ttf for now.
   VBOX_WITH_SECURELABEL=
-@@ -1050,7 +1046,7 @@
-  VBOX_WITH_SECURELABEL=
+@@ -1096,7 +1092,7 @@ ifdef VBOX_OSE
   VBOX_WITH_KCHMVIEWER=
   VBOX_WITH_PLUGIN_CRYPT=
+  VBOX_WITH_DRAG_AND_DROP_PROMISES=
 - ifn1of ($(KBUILD_TARGET), linux)
 + ifn1of ($(KBUILD_TARGET), freebsd linux)
    VBOX_WITH_DOCS=
    VBOX_WITH_DOCS_PACKING=
   endif
-@@ -3476,16 +3472,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 \
+@@ -3912,7 +3908,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
 -TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
@@ -51,14 +74,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
- 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)
-@@ -3719,12 +3715,8 @@
+@@ -4158,12 +4154,8 @@ TEMPLATE_VBOXR3EXE_LDFLAGS            +=
  TEMPLATE_VBOXR3EXE_TOOL                = GXX3
  TEMPLATE_VBOXR3EXE_LIBS                = pthread
  TEMPLATE_VBOXR3EXE_INCS               += \
@@ -71,7 +87,7 @@
  	/usr/local/lib
   else ifeq ($(KBUILD_TARGET),solaris)
  TEMPLATE_VBOXR3EXE_TOOL                = GXX3PLAIN
-@@ -3982,7 +3974,7 @@
+@@ -4420,7 +4412,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)
@@ -80,7 +96,7 @@
   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
-@@ -4370,12 +4362,8 @@
+@@ -4898,12 +4890,8 @@ TEMPLATE_VBOXMAINEXE_LIBS               
  TEMPLATE_VBOXMAINEXE_TOOL                = GXX3
  TEMPLATE_VBOXMAINEXE_LIBS                = $(LIB_RUNTIME)
  TEMPLATE_VBOXMAINEXE_INCS               += \
@@ -93,7 +109,7 @@
  	/usr/local/lib
  else ifeq ($(KBUILD_TARGET),solaris)
  TEMPLATE_VBOXMAINEXE_TOOL                = GXX3PLAIN
-@@ -4838,12 +4826,8 @@
+@@ -5371,12 +5359,8 @@ ifdef VBOX_WITH_QTGUI
  	$(VBOX_LIBPATH_X11)
     ifeq ($(KBUILD_TARGET),freebsd)
      TEMPLATE_VBOXQT4GUIEXE_INCS += \
@@ -106,7 +122,7 @@
  	/usr/local/lib
     endif
     ifeq ($(KBUILD_TARGET),solaris)
-@@ -5035,12 +5019,8 @@
+@@ -5587,12 +5571,8 @@ TEMPLATE_VBoxBldProg_LIBPATH            
  TEMPLATE_VBoxBldProg_TOOL                = GXX3
  TEMPLATE_VBoxBldProg_LIBS                = pthread
  TEMPLATE_VBoxBldProg_INCS               += \
@@ -119,7 +135,7 @@
  	/usr/local/lib
   else ifeq ($(KBUILD_HOST),solaris)
  TEMPLATE_VBoxBldProg_TOOL                = GXX3PLAIN
-@@ -5427,6 +5407,7 @@
+@@ -5954,6 +5934,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

Modified: head/emulators/virtualbox-ose/files/patch-configure
==============================================================================
--- head/emulators/virtualbox-ose/files/patch-configure	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose/files/patch-configure	Fri Jul 22 20:28:01 2016	(r418931)
@@ -1,6 +1,12 @@
---- configure.orig	2015-05-13 11:08:57.000000000 -0400
-+++ configure	2015-05-15 14:16:05.988372000 -0400
-@@ -140,6 +140,8 @@
+--- configure.orig	2015-06-01 13:50:10.000000000 -0400
++++ configure	2015-06-10 19:40:14.170742000 -0400
+@@ -137,10 +137,14 @@
+ if [ "$OS" = "freebsd" ]; then
+   INCCURL="-I/usr/local/include"
+   LIBCURL="-L/usr/local/lib -lcurl"
++  INCALSA="-I/usr/local/include"
++  LIBALSA="-L/usr/local/lib"
+   INCPULSE="-I/usr/local/include"
    LIBPULSE="-L/usr/local/lib"
    INCPNG="-I/usr/local/include"
    LIBPNG="-L/usr/local/lib -lpng"
@@ -9,7 +15,16 @@
  else
    INCCURL=""
    LIBCURL="-lcurl"
-@@ -1947,8 +1949,8 @@
+@@ -1200,7 +1204,7 @@
+ #endif
+ }
+ EOF
+-  if test_compile "-lasound" asound asound; then
++  if test_compile "$INCALSA $LIBALSA -lasound" asound asound; then
+     test_execute
+   fi
+ }
+@@ -1949,8 +1953,8 @@
          echo "compiling the following source file:" >> $LOG
          cat $ODIR.tmp_src.cc >> $LOG
          echo "using the following command line:" >> $LOG
@@ -20,12 +35,35 @@
          if [ $? -eq 0 ]; then
            found=1
            break
-@@ -2357,7 +2359,7 @@
-     --with-openssl-dir=*)
-       OPENSSLDIR=`echo $option | cut -d'=' -f2`
-       INCCRYPTO="-I${OPENSSLDIR}/include"
--      LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a ${OPENSSLDIR}/lib/libssl.a"
-+      LIBCRYPTO="-L${OPENSSLDIR}/lib -lcrypto -lssl"
-       ;;
-     --with-ow-dir=*)
-       WATCOM=`echo $option | cut -d'=' -f2`
+@@ -2733,8 +2737,15 @@
+   [ $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 [ $WITH_ALSA -eq 1 ]; then
++      check_alsa
++    else
++      cnf_append "VBOX_WITH_ALSA" ""
++    fi
+     if [ $WITH_PULSE -eq 1 ]; then
+       check_pulse
+     elif [ $WITH_PULSE -eq 0 ]; then
+@@ -2756,14 +2767,6 @@
+     cnf_append "VBOX_WITH_ADDITION_DRIVERS" ""
+   fi
+   if [ $ONLY_ADDITIONS -eq 0 ]; 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_DEVMAPPER -eq 1 ]; then
+       check_libdevmapper
+     else

Modified: head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c
==============================================================================
--- head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c	Fri Jul 22 20:27:57 2016	(r418930)
+++ head/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c	Fri Jul 22 20:28:01 2016	(r418931)
@@ -1,6 +1,6 @@
---- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig	2015-03-02 10:06:54.000000000 -0500
-+++ src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c	2015-03-09 18:02:36.502945000 -0400
-@@ -80,8 +80,6 @@
+--- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig	2015-11-10 17:00:16 UTC
++++ src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c
+@@ -92,8 +92,6 @@ struct VBoxGuestDeviceState
      struct resource   *pIrqRes;
      /** Pointer to the IRQ handler. */
      void              *pfnIrqHandler;
@@ -8,53 +8,41 @@
 -    uint32_t           u32Version;
  };
  
- static MALLOC_DEFINE(M_VBOXDEV, "vboxdev_pci", "VirtualBox Guest driver PCI");
-@@ -89,8 +87,7 @@
+ 
+@@ -103,8 +101,7 @@ struct VBoxGuestDeviceState
  /*
   * Character device file handlers.
   */
--static d_fdopen_t VBoxGuestFreeBSDOpen;
--static d_close_t  VBoxGuestFreeBSDClose;
-+static d_open_t   VBoxGuestFreeBSDOpen;
- static d_ioctl_t  VBoxGuestFreeBSDIOCtl;
- static d_write_t  VBoxGuestFreeBSDWrite;
- static d_read_t   VBoxGuestFreeBSDRead;
-@@ -103,13 +100,6 @@
- static int  VBoxGuestFreeBSDAddIRQ(device_t pDevice, void *pvState);
- static int  VBoxGuestFreeBSDISR(void *pvState);
- 
--/*
-- * Available functions for kernel drivers.
-- */
--DECLVBGL(int)    VBoxGuestFreeBSDServiceCall(void *pvSession, unsigned uCmd, void *pvData, size_t cbData, size_t *pcbDataReturned);
--DECLVBGL(void *) VBoxGuestFreeBSDServiceOpen(uint32_t *pu32Version);
--DECLVBGL(int)    VBoxGuestFreeBSDServiceClose(void *pvSession);
--
- #ifndef D_NEEDMINOR
- # define D_NEEDMINOR 0
- #endif
-@@ -121,8 +111,7 @@
+-static d_fdopen_t vgdrvFreeBSDOpen;
+-static d_close_t  vgdrvFreeBSDClose;
++static d_open_t   vgdrvFreeBSDOpen;
+ static d_ioctl_t  vgdrvFreeBSDIOCtl;
+ static d_write_t  vgdrvFreeBSDWrite;
+ static d_read_t   vgdrvFreeBSDRead;
+@@ -134,8 +131,7 @@ static struct cdevsw    g_vgdrvFreeBSDCh
  {
      .d_version =        D_VERSION,
      .d_flags =          D_TRACKCLOSE | D_NEEDMINOR,
--    .d_fdopen =         VBoxGuestFreeBSDOpen,
--    .d_close =          VBoxGuestFreeBSDClose,
-+    .d_open =           VBoxGuestFreeBSDOpen,
-     .d_ioctl =          VBoxGuestFreeBSDIOCtl,
-     .d_read =           VBoxGuestFreeBSDRead,
-     .d_write =          VBoxGuestFreeBSDWrite,
-@@ -130,106 +119,45 @@
-     .d_name =           DEVICE_NAME
+-    .d_fdopen =         vgdrvFreeBSDOpen,
+-    .d_close =          vgdrvFreeBSDClose,
++    .d_open =           vgdrvFreeBSDOpen,
+     .d_ioctl =          vgdrvFreeBSDIOCtl,
+     .d_read =           vgdrvFreeBSDRead,
+     .d_write =          vgdrvFreeBSDWrite,
+@@ -143,81 +139,28 @@ static struct cdevsw    g_vgdrvFreeBSDCh
+     .d_name =           "vboxguest"
  };
  
 +/** Device structure. */
 +static struct cdev         *g_pDev;
++
  /** Device extention & session data association structure. */
  static VBOXGUESTDEVEXT      g_DevExt;
+ 
 -/** List of cloned device. Managed by the kernel. */
--static struct clonedevs    *g_pVBoxGuestFreeBSDClones;
+-static struct clonedevs    *g_pvgdrvFreeBSDClones;
 -/** The dev_clone event handler tag. */
--static eventhandler_tag     g_VBoxGuestFreeBSDEHTag;
+-static eventhandler_tag     g_vgdrvFreeBSDEHTag;
  /** Reference counter */
  static volatile uint32_t    cUsers;
  /** selinfo structure used for polling. */
@@ -63,13 +51,13 @@
 -/**
 - * DEVFS event handler.
 - */
--static void VBoxGuestFreeBSDClone(void *pvArg, struct ucred *pCred, char *pszName, int cchName, struct cdev **ppDev)
-+static void VBoxGuestFreeBSDDtr(void *pSession)
+-static void vgdrvFreeBSDClone(void *pvArg, struct ucred *pCred, char *pszName, int cchName, struct cdev **ppDev)
++static void vgdrvFreeBSDDtr(void *pSession)
  {
 -    int iUnit;
 -    int rc;
 -
--    Log(("VBoxGuestFreeBSDClone: pszName=%s ppDev=%p\n", pszName, ppDev));
+-    Log(("vgdrvFreeBSDClone: pszName=%s ppDev=%p\n", pszName, ppDev));
 -
 -    /*
 -     * One device node per user, si_drv1 points to the session.
@@ -83,17 +71,17 @@
 -        return;
 -    if (iUnit >= 256)
 -    {
--        Log(("VBoxGuestFreeBSDClone: iUnit=%d >= 256 - rejected\n", iUnit));
+-        Log(("vgdrvFreeBSDClone: iUnit=%d >= 256 - rejected\n", iUnit));
 -        return;
 -    }
 -
--    Log(("VBoxGuestFreeBSDClone: pszName=%s iUnit=%d\n", pszName, iUnit));
+-    Log(("vgdrvFreeBSDClone: pszName=%s iUnit=%d\n", pszName, iUnit));
 -
--    rc = clone_create(&g_pVBoxGuestFreeBSDClones, &g_VBoxGuestFreeBSDChrDevSW, &iUnit, ppDev, 0);
--    Log(("VBoxGuestFreeBSDClone: clone_create -> %d; iUnit=%d\n", rc, iUnit));
+-    rc = clone_create(&g_pvgdrvFreeBSDClones, &g_vgdrvFreeBSDChrDevSW, &iUnit, ppDev, 0);
+-    Log(("vgdrvFreeBSDClone: clone_create -> %d; iUnit=%d\n", rc, iUnit));
 -    if (rc)
 -    {
--        *ppDev = make_dev(&g_VBoxGuestFreeBSDChrDevSW,
+-        *ppDev = make_dev(&g_vgdrvFreeBSDChrDevSW,
 -                          iUnit,
 -                          UID_ROOT,
 -                          GID_WHEEL,
@@ -103,17 +91,17 @@

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607222028.u6MKS15a060798>