socsvn commit: r254313 - in soc2013/oleksandr/ports: . emulators emulators/virtualbox-ose-additions emulators/virtualbox-ose-additions/files
oleksandr at FreeBSD.org
oleksandr at FreeBSD.org
Sun Jul 7 13:55:58 UTC 2013
Author: oleksandr
Date: Sun Jul 7 13:55:56 2013
New Revision: 254313
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=254313
Log:
Initial add virtualbox-ose-additions port
Added:
soc2013/oleksandr/ports/
soc2013/oleksandr/ports/emulators/
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/Makefile
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/distinfo
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-VBoxGuestLib-Makefile.kmk
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-crOpenGL-Makefile.kmk
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-crOpenGL-fakedri_drv.c
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-98vboxadd-xclient
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-vboxclient.desktop
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-vboxvideo-Makefile.kmk
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-the-freebsd-kernel.h
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/vboxguest.in
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/vboxservice.in
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/pkg-descr
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/pkg-message
soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/pkg-plist
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/Makefile Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,191 @@
+# Created by: Bernhard Froehlich <decke at bluelife.at>
+# $FreeBSD: emulators/virtualbox-ose-additions/Makefile 321665 2013-06-24 06:07:53Z decke $
+
+PORTNAME= virtualbox-ose
+DISTVERSION= 4.2.14
+CATEGORIES= emulators kld
+MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
+ http://tmp.chruetertee.ch/ \
+ http://disasterarea.chruetertee.ch/
+PKGNAMESUFFIX= -additions
+DISTNAME= VirtualBox-${DISTVERSION}
+
+MAINTAINER= vbox at FreeBSD.org
+COMMENT= VirtualBox additions for FreeBSD guests
+
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm \
+ as86:${PORTSDIR}/devel/dev86 \
+ kmk:${PORTSDIR}/devel/kBuild
+
+UNIQUENAME= ${PORTNAME}${PKGNAMESUFFIX}
+WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION}
+USE_RC_SUBR= vboxguest vboxservice
+ONLY_FOR_ARCHS= i386 amd64
+FETCH_ARGS= -pRr
+USE_BZIP2= yes
+MAKE_JOBS_UNSAFE= yes
+
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS+=--with-gcc="${CC}" --with-g++="${CXX}" --nofatal \
+ --disable-xpcom --disable-sdl-ttf --disable-pulse \
+ --disable-alsa --disable-dbus --disable-python
+
+CONFLICTS= bcc-[0-9]*
+CONFLICTS_INSTALL= virtualbox-ose-additions-devel-[3,4]* virtualbox-ose-[3,4]* virtualbox-ose-devel-[3,4]* virtualbox-ose-legacy-[3,4]*
+
+OPTIONS_DEFINE= DEBUG X11 OPENGL
+OPTIONS_DEFAULT= X11
+
+.include <bsd.port.options.mk>
+
+PLIST_SUB+= KMODDIR=${KMODDIR:C,^/,,}
+
+KMODDIR= /boot/modules
+SRC_BASE?= /usr/src
+VIDEODIR= ${PREFIX}/lib/xorg/modules/drivers
+INPUTDIR= ${PREFIX}/lib/xorg/modules/input
+
+VBOX_BIN= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/additions
+
+KMK_BUILDTYPE= release
+KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE}
+KMK_FLAGS=
+
+MAKE_FLAGS= SYSDIR=${SRC_BASE}/sys
+
+.if ${PORT_OPTIONS:MDEBUG}
+KMK_FLAGS+= BUILD_TYPE=debug
+KMK_BUILDTYPE= debug
+MAKE_FLAGS+= DEBUG_FLAGS="-O1 -g"
+PLIST_SUB+= WITH_DEBUG=""
+.else
+PLIST_SUB+= WITH_DEBUG="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MX11}
+VBOX_WITH_X11= 1
+USE_XORG= xcursor xmu inputproto xorg-server xrandr
+PLIST_SUB+= X11=""
+.else
+VBOX_WITH_X11=
+PLIST_SUB+= X11="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MOPENGL}
+USE_XORG+= xcomposite xdamage xext xfixes
+USE_GL= gl
+PLIST_SUB+= OPENGL=""
+.else
+CONFIGURE_ARGS+=--disable-opengl
+PLIST_SUB+= OPENGL="@comment "
+.endif
+
+.if ${ARCH} == i386
+KMK_ARCH= freebsd.x86
+.else
+KMK_ARCH= freebsd.${ARCH}
+.endif
+
+XSERVER_ABI:= ${XSERVER_VER:S/.//:R}
+
+.if !exists(${SRC_BASE}/sys/kern/bus_if.m)
+IGNORE= requires kernel sources
+.endif
+
+.include <bsd.port.pre.mk>
+
+pre-everything::
+.if ${ARCH} == "amd64"
+.if !exists(/usr/lib32/libc.so)
+ @${ECHO} 'Requires 32-bit libraries installed under /usr/lib32.'
+ @${ECHO} 'Do: cd /usr/src; make build32 install32; ldconfig -v -m -R /usr/lib32'
+ @${FALSE}
+.endif
+.endif
+
+post-patch:
+ @${ECHO} 'VBOX_ONLY_ADDITIONS = 1' > ${WRKSRC}/LocalConfig.kmk
+ @${ECHO} 'VBOX_WITH_X11_ADDITIONS = ${VBOX_WITH_X11}' >> ${WRKSRC}/LocalConfig.kmk
+ @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
+ ${WRKSRC}/Config.kmk \
+ ${WRKSRC}/configure \
+ ${WRKSRC}/kBuild/units/qt4.kmk \
+ ${WRKSRC}/kBuild/sdks/LIBSDL.kmk \
+ ${WRKSRC}/src/VBox/Additions/x11/Installer/98vboxadd-xclient \
+ ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop
+ @${REINPLACE_CMD} -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' ${WRKSRC}/configure
+
+pre-build:
+ @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|' \
+ ${WRKSRC}/env.sh \
+ ${WRKSRC}/src/VBox/Additions/freebsd/Installer/vboxguest.sh
+
+do-build:
+ cd ${WRKSRC} && ${SH} env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}
+ cd ${VBOX_BIN}/src && make ${MAKE_FLAGS}
+
+do-install:
+ ${MKDIR} ${KMODDIR}
+ ${INSTALL_KLD} ${VBOX_BIN}/src/vboxguest/vboxguest.ko ${KMODDIR}
+.if ${PORT_OPTIONS:MDEBUG}
+ ${INSTALL_KLD} ${VBOX_BIN}/src/vboxguest/vboxguest.ko.symbols ${KMODDIR}
+.endif
+.if ${PORT_OPTIONS:MX11}
+ ${INSTALL_KLD} ${VBOX_BIN}/vboxvideo.ko ${KMODDIR}
+.if ${PORT_OPTIONS:MDEBUG}
+ ${INSTALL_KLD} ${VBOX_BIN}/vboxvideo.ko.symbols ${KMODDIR}
+.endif
+.endif
+ @/usr/sbin/kldxref ${KMODDIR}
+
+ ${MKDIR} ${PREFIX}/etc/rc.d/
+
+ ${MKDIR} ${PREFIX}/sbin
+ ${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxControl ${PREFIX}/sbin/
+ ${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxService ${PREFIX}/sbin/
+
+.if ${PORT_OPTIONS:MX11}
+ ${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxClient ${PREFIX}/bin/
+
+ ${MKDIR} ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/src/VBox/Additions/x11/Installer/98vboxadd-xclient \
+ ${PREFIX}/bin/VBoxClient-all
+
+ # X11 autostart
+ ${MKDIR} ${PREFIX}/etc/xdg/autostart/
+ ${INSTALL_DATA} ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \
+ ${PREFIX}/etc/xdg/autostart/
+
+ # KDE autostart
+ ${MKDIR} ${PREFIX}/share/autostart/
+ ${INSTALL_DATA} ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \
+ ${PREFIX}/share/autostart/
+
+ ${MKDIR} ${VIDEODIR}
+ ${INSTALL_DATA} ${VBOX_BIN}/vboxvideo_drv_${XSERVER_ABI}.so ${VIDEODIR}/vboxvideo_drv.so
+
+ ${MKDIR} ${INPUTDIR}
+ ${INSTALL_DATA} ${VBOX_BIN}/vboxmouse_drv_${XSERVER_ABI}.so ${INPUTDIR}/vboxmouse_drv.so
+.endif
+
+.if ${PORT_OPTIONS:MOPENGL}
+ ${MKDIR} ${PREFIX}/lib
+ ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGL.so ${PREFIX}/lib/
+ ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGLarrayspu.so ${PREFIX}/lib/
+ ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGLcrutil.so ${PREFIX}/lib/
+ ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGLerrorspu.so ${PREFIX}/lib/
+ ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGLfeedbackspu.so ${PREFIX}/lib/
+ ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGLpackspu.so ${PREFIX}/lib/
+ ${INSTALL_DATA} ${VBOX_BIN}/VBoxOGLpassthroughspu.so ${PREFIX}/lib/
+
+ ${MKDIR} ${PREFIX}/lib/dri
+ ${LN} -sf ${PREFIX}/lib/VBoxOGL.so ${PREFIX}/lib/dri/vboxvideo_dri.so
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/distinfo Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,2 @@
+SHA256 (VirtualBox-4.2.14.tar.bz2) = f8f6dc19612f3c84a5c857b8e5c452b8db2cf3c8c52a678b6a00e5dd5831130d
+SIZE (VirtualBox-4.2.14.tar.bz2) = 76888627
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-VBoxGuestLib-Makefile.kmk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-VBoxGuestLib-Makefile.kmk Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,18 @@
+--- src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk.orig 2010-10-07 11:37:10.000000000 +0200
++++ src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk 2010-10-07 11:36:16.000000000 +0200
+@@ -140,6 +140,7 @@
+ # the X server runtime instead of IPRT, for use with old servers where the
+ # C library is not available.
+ #
++ifdef VBOX_WITH_X11_ADDITIONS
+ VBoxGuestR3LibXFree86_TEMPLATE = VBOXGUESTR3XF86LIB
+ VBoxGuestR3LibXFree86_DEFS = \
+ VBOX_WITH_HGCM \
+@@ -163,6 +164,7 @@
+ $(VBOX_PATH_X11_XFREE_4_3)/exports/include/X11
+
+ VBoxGuestR3LibRuntimeXF86.cpp_CXXFLAGS = -Wno-shadow
++endif
+
+ include $(KBUILD_PATH)/subfooter.kmk
+
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-crOpenGL-Makefile.kmk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-crOpenGL-Makefile.kmk Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,40 @@
+--- src/VBox/Additions/common/crOpenGL/Makefile.kmk.orig 2013-04-12 12:35:06.000000000 +0200
++++ src/VBox/Additions/common/crOpenGL/Makefile.kmk 2013-05-02 23:33:26.523212251 +0200
+@@ -42,7 +42,7 @@
+
+ if1of ($(KBUILD_TARGET), linux solaris freebsd)
+ #VBoxOGL_DRI = 1
+- ifn1of ($(KBUILD_TARGET),solaris freebsd) # No DRI on Solaris yet
++ ifn1of ($(KBUILD_TARGET),solaris) # No DRI on Solaris yet
+ VBoxOGL_FAKEDRI = 1
+ endif
+
+@@ -209,8 +209,13 @@
+ $(PATH_STAGE_LIB)/libXfixes.so \
+ $(PATH_STAGE_LIB)/libXext.so
+ ifdef VBoxOGL_FAKEDRI
+- VBoxOGL_LIBS += \
++ ifeq ($(KBUILD_TARGET), freebsd)
++ VBoxOGL_LIBS += \
++ elf
++ else
++ VBoxOGL_LIBS += \
+ dl
++ endif
+ endif
+ endif
+ ifdef VBOX_WITH_CRHGSMI
+@@ -368,6 +373,13 @@
+ | $$(dir $$@)
+ $(call MSG_GENERATE,python,$@,$<)
+ $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
++ else ifeq ($(KBUILD_TARGET),freebsd)
++$(VBOX_PATH_CROGL_GENFILES)/freebsd_exports.c: \
++ $(PATH_SUB_CURRENT)/FreeBSD_exports.py \
++ $(VBOX_CROGL_API_FILES) $(PATH_SUB_CURRENT)/entrypoints.py \
++ | $$(dir $$@)
++ $(call MSG_GENERATE,python,$@,$<)
++ $(QUIET)$(call VBOX_CROGL_PYTHON_ENV,$(VBOX_PATH_CROGL_PYTHON_INCLUDE),$@) $(VBOX_BLD_PYTHON) $< $(VBOX_PATH_CROGL_GLAPI)
+ else
+ $(VBOX_PATH_CROGL_GENFILES)/linux_exports.c: \
+ $(PATH_SUB_CURRENT)/Linux_exports.py \
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-crOpenGL-fakedri_drv.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-crOpenGL-fakedri_drv.c Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,120 @@
+--- src/VBox/Additions/common/crOpenGL/fakedri_drv.c.orig 2012-12-19 13:25:04.000000000 -0500
++++ src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2013-01-27 17:57:04.000000000 -0500
+@@ -29,6 +29,15 @@
+ #include <dlfcn.h>
+ #include <elf.h>
+ #include <unistd.h>
++
++#include <sys/param.h>
++#if defined(BSD)
++#include <fcntl.h>
++#include <gelf.h>
++#include <libelf.h>
++#include <string.h>
++#endif
++
+ /** X server message type definitions. */
+ typedef enum {
+ X_PROBED, /* Value was probed */
+@@ -50,11 +59,11 @@
+
+ //@todo this could be different...
+ #ifdef RT_ARCH_AMD64
+-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri"
+-# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
++# define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
++# define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
+ #else
+-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/dri:/usr/lib/i386-linux-gnu/dri"
+-# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
++# define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
++# define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
+ #endif
+
+ #ifdef DEBUG_DRI_CALLS
+@@ -209,6 +218,85 @@
+
+ #define FAKEDRI_JMP64_PATCH_SIZE 13
+
++#if defined(BSD)
++/* Provide basic dladdr1 flags */
++enum {
++ RTLD_DL_SYMENT = 1
++};
++
++/* Provide a minimal local version of dladdr1 */
++static int
++dladdr1(const void *address, Dl_info *dlip, void **info, int flags)
++{
++ static DRI_ELFSYM desym;
++ GElf_Sym sym;
++ GElf_Shdr shdr;
++ Elf *elf;
++ Elf_Scn *scn;
++ Elf_Data *data;
++ int ret, fd, count, i;
++
++ /* Initialize variables */
++ fd = -1;
++ elf = NULL;
++
++ /* Call dladdr first */
++ ret = dladdr(address, dlip);
++ if (ret == 0) goto err_exit;
++
++ /* Check for supported flags */
++ if (flags != RTLD_DL_SYMENT) return 1;
++
++ /* Open shared library's ELF file */
++ if (elf_version(EV_CURRENT) == EV_NONE) goto err_exit;
++ fd = open(dlip->dli_fname, O_RDONLY);
++ if (fd < 0) goto err_exit;
++ elf = elf_begin(fd, ELF_C_READ, NULL);
++ if (elf == NULL) goto err_exit;
++
++ /* Find the '.dynsym' section */
++ scn = elf_nextscn(elf, NULL);
++ while (scn != NULL) {
++ if (gelf_getshdr(scn, &shdr) == NULL) goto err_exit;
++ if (shdr.sh_type == SHT_DYNSYM) break;
++ scn = elf_nextscn(elf, scn);
++ }
++ if (scn == NULL) goto err_exit;
++
++ /* Search for the requested symbol by name and offset */
++ data = elf_getdata(scn, NULL);
++ count = shdr.sh_size / shdr.sh_entsize;
++ for (i = 0; i < count; i++) {
++ gelf_getsym(data, i, &sym);
++ if ((strcmp(dlip->dli_sname,
++ elf_strptr(elf, shdr.sh_link, sym.st_name)) == 0) &&
++ (sym.st_value == (dlip->dli_saddr - dlip->dli_fbase))) {
++ break;
++ }
++ }
++
++ /* Close ELF file */
++ elf_end(elf);
++ close(fd);
++
++ /* Return symbol entry in native format */
++ desym.st_name = sym.st_name;
++ desym.st_info = sym.st_info;
++ desym.st_other = sym.st_other;
++ desym.st_shndx = sym.st_shndx;
++ desym.st_value = sym.st_value;
++ desym.st_size = sym.st_size;
++ *info = &desym;
++ return 1;
++
++ /* Error handler */
++err_exit:
++ if (elf != NULL) elf_end(elf);
++ if (fd >= 0) close(fd);
++ return 0;
++}
++#endif
++
+ static void
+ vboxPatchMesaExport(const char* psFuncName, const void *pStart, const void *pEnd)
+ {
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-98vboxadd-xclient
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-98vboxadd-xclient Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,27 @@
+--- src/VBox/Additions/x11/Installer/98vboxadd-xclient.orig 2010-09-10 14:24:55.000000000 +0200
++++ src/VBox/Additions/x11/Installer/98vboxadd-xclient 2010-12-29 20:42:00.000000000 +0100
+@@ -28,8 +28,8 @@
+ xorgbin=Xorg
+ found=`which Xorg | grep "no Xorg"`
+ if test ! -z "$found"; then
+- if test -f "/usr/X11/bin/Xorg"; then
+- xorgbin=/usr/X11/bin/Xorg
++ if test -f "/usr/local/bin/Xorg"; then
++ xorgbin=/usr/local/bin/Xorg
+ else
+ exit 1
+ fi
+@@ -40,9 +40,9 @@
+ no_display=1
+ fi
+
+-/usr/bin/VBoxClient --clipboard
+-/usr/bin/VBoxClient --checkhostversion
++/usr/local/bin/VBoxClient --clipboard
++/usr/local/bin/VBoxClient --checkhostversion
+ test -z "$no_display" &&
+- /usr/bin/VBoxClient --display
++ /usr/local/bin/VBoxClient --display
+ test -z "$no_display" &&
+- /usr/bin/VBoxClient --seamless
++ /usr/local/bin/VBoxClient --seamless
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-vboxclient.desktop
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-vboxclient.desktop Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,10 @@
+--- src/VBox/Additions/x11/Installer/vboxclient.desktop.orig 2009-06-12 12:34:57.000000000 +0000
++++ src/VBox/Additions/x11/Installer/vboxclient.desktop 2011-01-13 22:07:37.000000000 +0000
+@@ -8,6 +8,6 @@
+ Comment=VirtualBox User Session Services
+ Comment[it]=Servizi di sessione utente di VirtualBox
+ Comment[pl]=Usługi sesji użytkownika VirtualBox
+-Exec=/usr/bin/VBoxClient-all
++Exec=/usr/local/bin/VBoxClient-all
+ X-GNOME-Autostart-enabled=true
+ X-KDE-autostart-after=panel
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-vboxvideo-Makefile.kmk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-vboxvideo-Makefile.kmk Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,20 @@
+--- src/VBox/Additions/x11/vboxvideo/Makefile.kmk.orig 2012-10-26 18:23:35.000000000 +0200
++++ src/VBox/Additions/x11/vboxvideo/Makefile.kmk 2012-10-28 16:54:59.074303788 +0100
+@@ -196,7 +196,7 @@
+ vboxvideo_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD
+ vboxvideo_drv_15_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
+ vboxvideo_drv_15_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100503000
+-if1of ($(KBUILD_TARGET), linux solaris)
++if1of ($(KBUILD_TARGET), freebsd linux solaris)
+ vboxvideo_drv_15_DEFS += VBOX_DRI
+ endif
+ vboxvideo_drv_15_INCS = \
+@@ -204,7 +204,7 @@
+ $(VBOX_PATH_X11_ROOT)/xorg-server-1.5.3
+ vboxvideo_drv_15_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
+ vboxvideo_drv_15_SOURCES = $(vboxvideo_drv_13_SOURCES)
+-if1of ($(KBUILD_TARGET), linux solaris)
++if1of ($(KBUILD_TARGET), freebsd linux solaris)
+ vboxvideo_drv_15_SOURCES += \
+ vboxvideo_dri.c
+ endif
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c Sun Jul 7 13:55:56 2013 (r254313)
@@ -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
+
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,132 @@
+$FreeBSD: emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c 317147 2013-05-02 20:54:04Z decke $
+
+--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-03-20 19:19:36.795745576 -0700
++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-03-20 19:15:35.164791970 -0700
+@@ -162,7 +162,11 @@
+ case RTR0MEMOBJTYPE_PHYS:
+ case RTR0MEMOBJTYPE_PHYS_NC:
+ {
++#if __FreeBSD_version >= 1000030
++ VM_OBJECT_WLOCK(pMemFreeBSD->pObject);
++#else
+ VM_OBJECT_LOCK(pMemFreeBSD->pObject);
++#endif
+ 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 */
+@@ -177,7 +181,12 @@
+ #if __FreeBSD_version < 900000
+ vm_page_unlock_queues();
+ #endif
++#if __FreeBSD_version >= 1000030
++ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject);
++#else
+ VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
++#endif
++
+ vm_object_deallocate(pMemFreeBSD->pObject);
+ break;
+ }
+@@ -205,10 +214,18 @@
+
+ while (cTries <= 1)
+ {
++#if __FreeBSD_version >= 1000030
++ VM_OBJECT_WLOCK(pObject);
++#else
+ VM_OBJECT_LOCK(pObject);
++#endif
+ pPages = vm_page_alloc_contig(pObject, iPIndex, fFlags, cPages, 0,
+ VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT);
++#if __FreeBSD_version >= 1000030
++ VM_OBJECT_WUNLOCK(pObject);
++#else
+ VM_OBJECT_UNLOCK(pObject);
++#endif
+ if (pPages)
+ break;
+ vm_pageout_grow_cache(cTries, 0, VmPhysAddrHigh);
+@@ -228,7 +245,11 @@
+
+ if (!pPages)
+ return pPages;
++#if __FreeBSD_version >= 1000030
++ VM_OBJECT_WLOCK(pObject);
++#else
+ VM_OBJECT_LOCK(pObject);
++#endif
+ for (vm_pindex_t iPage = 0; iPage < cPages; iPage++)
+ {
+ vm_page_t pPage = pPages + iPage;
+@@ -240,7 +261,11 @@
+ atomic_add_int(&cnt.v_wire_count, 1);
+ }
+ }
++#if __FreeBSD_version >= 1000030
++ VM_OBJECT_WUNLOCK(pObject);
++#else
+ VM_OBJECT_UNLOCK(pObject);
++#endif
+ return pPages;
+ #endif
+ }
+@@ -264,7 +289,11 @@
+ if (!pPage)
+ {
+ /* Free all allocated pages */
++#if __FreeBSD_version >= 1000030
++ VM_OBJECT_WLOCK(pObject);
++#else
+ VM_OBJECT_LOCK(pObject);
++#endif
+ while (iPage-- > 0)
+ {
+ pPage = vm_page_lookup(pObject, iPage);
+@@ -278,7 +307,11 @@
+ vm_page_unlock_queues();
+ #endif
+ }
++#if __FreeBSD_version >= 1000030
++ VM_OBJECT_WUNLOCK(pObject);
++#else
+ VM_OBJECT_UNLOCK(pObject);
++#endif
+ return rcNoMem;
+ }
+ }
+@@ -411,9 +444,17 @@
+ if (fContiguous)
+ {
+ Assert(enmType == RTR0MEMOBJTYPE_PHYS);
++#if __FreeBSD_version >= 1000030
++ VM_OBJECT_WLOCK(pMemFreeBSD->pObject);
++#else
+ VM_OBJECT_LOCK(pMemFreeBSD->pObject);
++#endif
+ pMemFreeBSD->Core.u.Phys.PhysBase = VM_PAGE_TO_PHYS(vm_page_find_least(pMemFreeBSD->pObject, 0));
++#if __FreeBSD_version >= 1000030
++ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject);
++#else
+ VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
++#endif
+ pMemFreeBSD->Core.u.Phys.fAllocated = true;
+ }
+
+@@ -823,9 +864,17 @@
+ case RTR0MEMOBJTYPE_PHYS_NC:
+ {
+ RTHCPHYS addr;
++#if __FreeBSD_version >= 1000030
++ VM_OBJECT_WLOCK(pMemFreeBSD->pObject);
++#else
+ VM_OBJECT_LOCK(pMemFreeBSD->pObject);
++#endif
+ addr = VM_PAGE_TO_PHYS(vm_page_lookup(pMemFreeBSD->pObject, iPage));
++#if __FreeBSD_version >= 1000030
++ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject);
++#else
+ VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
++#endif
+ return addr;
+ }
+
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-the-freebsd-kernel.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-the-freebsd-kernel.h Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,20 @@
+--- src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h.orig 2013-03-05 14:28:07.000000000 +0000
++++ src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h 2013-03-28 13:10:34.000000000 +0000
+@@ -50,6 +50,9 @@
+ #include <sys/unistd.h>
+ #include <sys/kthread.h>
+ #include <sys/lock.h>
++#if __FreeBSD_version >= 1000030
++#include <sys/rwlock.h>
++#endif
+ #include <sys/mutex.h>
+ #include <sys/sched.h>
+ #include <sys/callout.h>
+@@ -64,6 +67,7 @@
+ #include <vm/vm_kern.h>
+ #include <vm/vm_param.h> /* KERN_SUCCESS ++ */
+ #include <vm/vm_page.h>
++#include <vm/vm_pageout.h>
+ #include <vm/vm_phys.h> /* vm_phys_alloc_* */
+ #include <vm/vm_extern.h> /* kmem_alloc_attr */
+ #include <sys/vmmeter.h> /* cnt */
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/vboxguest.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/vboxguest.in Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# $FreeBSD: emulators/virtualbox-ose-additions/files/vboxguest.in 318265 2013-05-15 21:22:21Z decke $
+#
+
+# PROVIDE: vboxguest
+# REQUIRE: FILESYSTEMS
+# BEFORE: netif
+# KEYWORD: nojail
+
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# vboxguest_enable (bool): Set to NO by default.
+# Set it to YES to enable vboxguest on startup
+
+. /etc/rc.subr
+
+name="vboxguest"
+rcvar=vboxguest_enable
+start_cmd="vboxguest_start"
+stop_cmd="vboxguest_stop"
+
+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
+ if ! kldstat -q -m vgapci/vboxvideo;
+ then
+ if ! kldload vboxvideo > /dev/null 2>&1;
+ then
+ warn "Can't load vboxvideo module."
+ return 1
+ fi
+ fi
+}
+
+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
+ 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
+}
+
+load_rc_config $name
+
+: ${vboxguest_enable="NO"}
+
+run_rc_command "$1"
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/vboxservice.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/files/vboxservice.in Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# $FreeBSD: emulators/virtualbox-ose-additions/files/vboxservice.in 300896 2012-07-14 13:54:48Z beat $
+
+# PROVIDE: vboxservice
+# REQUIRE: DAEMON vboxguest
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+# Define vboxservice_enable in /etc/rc.conf[.local] to enable it.
+#
+# vboxservice_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable VBoxService.
+
+. /etc/rc.subr
+
+name="vboxservice"
+rcvar=vboxservice_enable
+command="%%PREFIX%%/sbin/VBoxService"
+
+load_rc_config $name
+
+: ${vboxservice_enable="NO"}
+
+run_rc_command "$1"
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/pkg-descr Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,9 @@
+These additions are for installation inside a FreeBSD guest.
+
+VirtualBox is a family of powerful x86 virtualization products for
+enterprise as well as home use. Not only is VirtualBox an extremely
+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/
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/pkg-message
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/pkg-message Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,21 @@
+=============================================================================
+
+VirtualBox Guest Additions were installed.
+
+
+You need to enable the vboxguest startscript to load the kernel module and
+vboxservice to use host time synchronization.
+
+vboxguest_enable="YES"
+vboxservice_enable="YES"
+
+You also have to add all X11 users that want to use any of the additional
+features (clipboard sharing, window scaling) to the wheel group.
+
+% pw groupmod wheel -m jerry
+
+Reboot the machine to load the needed kernel modules.
+
+For detailed informations please visit http://wiki.freebsd.org/VirtualBox
+
+=============================================================================
Added: soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/oleksandr/ports/emulators/virtualbox-ose-additions/pkg-plist Sun Jul 7 13:55:56 2013 (r254313)
@@ -0,0 +1,31 @@
+ at comment $FreeBSD: emulators/virtualbox-ose-additions/pkg-plist 318940 2013-05-24 09:47:12Z decke $
+%%X11%%bin/VBoxClient-all
+%%X11%%bin/VBoxClient
+%%X11%%etc/xdg/autostart/vboxclient.desktop
+sbin/VBoxControl
+sbin/VBoxService
+%%OPENGL%%lib/VBoxOGL.so
+%%OPENGL%%lib/VBoxOGLarrayspu.so
+%%OPENGL%%lib/VBoxOGLcrutil.so
+%%OPENGL%%lib/VBoxOGLerrorspu.so
+%%OPENGL%%lib/VBoxOGLfeedbackspu.so
+%%OPENGL%%lib/VBoxOGLpackspu.so
+%%OPENGL%%lib/VBoxOGLpassthroughspu.so
+%%OPENGL%%lib/dri/vboxvideo_dri.so
+%%X11%%share/autostart/vboxclient.desktop
+%%X11%%lib/xorg/modules/drivers/vboxvideo_drv.so
+%%X11%%lib/xorg/modules/input/vboxmouse_drv.so
+%%X11%%@dirrmtry share/autostart
+%%X11%%@dirrmtry lib/xorg/modules/drivers
+%%X11%%@dirrmtry lib/xorg/modules/input
+%%X11%%@dirrmtry lib/xorg/modules
+%%X11%%@dirrmtry lib/xorg
+%%OPENGL%%@dirrmtry lib/dri
+%%X11%%@dirrmtry lib
+ at cwd /
+%%KMODDIR%%/vboxguest.ko
+%%WITH_DEBUG%%%%KMODDIR%%/vboxguest.ko.symbols
+%%X11%%%%KMODDIR%%/vboxvideo.ko
+%%WITH_DEBUG%%%%X11%%%%KMODDIR%%/vboxvideo.ko
+ at exec /usr/sbin/kldxref /%%KMODDIR%%
+ at unexec /usr/sbin/kldxref /%%KMODDIR%%
More information about the svn-soc-all
mailing list