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/

Please see http://wiki.freebsd.org/VirtualBox for installation
instructions.

Many thanks to the VirtualBox developers, all tester, patch submitter and
the whole vbox@ team.

On behalf of:	vbox@ (decke, dhn, itetcu, miwi, nox)
This commit is contained in:
Beat Gaetzi 2010-01-13 08:10:34 +00:00
parent 078a314586
commit 070446e682
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=247789
7 changed files with 230 additions and 0 deletions

View File

@ -176,6 +176,7 @@
SUBDIR += vgba-bin
SUBDIR += vice
SUBDIR += virtualbox-ose
SUBDIR += virtualbox-ose-additions
SUBDIR += virtualbox-ose-kmod
SUBDIR += visualos
SUBDIR += vmips

View File

@ -0,0 +1,140 @@
# New ports collection makefile for: virtualbox-ose-additions
# Date created: 2009-09-21
# Whom: Bernhard Froehlich <decke@bluelife.at>
#
# $FreeBSD$
#
PORTNAME= virtualbox-ose
DISTVERSION= 3.1.51r25618
CATEGORIES= emulators kld
MASTER_SITES= http://tmp.chruetertee.ch/ \
http://freebsd.unixfreunde.de/sources/ \
http://disasterarea.chruetertee.ch/ \
http://mirror.4bit.ws/
PKGNAMESUFFIX= -additions
DISTNAME= VirtualBox-${DISTVERSION}-OSE
MAINTAINER= vbox@FreeBSD.org
COMMENT= VirtualBox additions for FreeBSD guests
BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm \
as86:${PORTSDIR}/devel/dev86 \
kmk:${PORTSDIR}/devel/kBuild
WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION}_OSE
USE_RC_SUBR= vboxguest
ONLY_FOR_ARCHS= i386 amd64
USE_BZIP2= 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 \
--build-headless
CONFLICTS= bcc-[0-9]*
OPTIONS= DEBUG "Build with debugging symbols" off \
X11 "Build with X11 support" on \
OPENGL "Build with OpenGL support" off
.include <bsd.port.options.mk>
PLIST_SUB+= KMODDIR=${KMODDIR:C,^/,,}
KMODDIR= /boot/modules
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=
.if defined(WITH_DEBUG)
KMK_FLAGS+= BUILD_TYPE=debug
KMK_BUILDTYPE= debug
.endif
.if !defined(WITHOUT_X11)
VBOX_WITH_X11= 1
USE_XORG= xcursor xmu inputproto
PLIST_SUB+= X11=""
.else
VBOX_WITH_X11=
PLIST_SUB+= X11="@comment "
.endif
.if defined(WITHOUT_OPENGL)
CONFIGURE_ARGS+=--disable-opengl
.else
USE_GL= gl
.endif
.if ${OSVERSION} < 700000
BROKEN= Does not compile on FreeBSD 6.X
.endif
.if ${ARCH} == i386
KMK_ARCH= freebsd.x86
.else
KMK_ARCH= freebsd.${ARCH}
.endif
.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)
@${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
@${REINPLACE_CMD} -e 's|\$$KBUILDDIR_BIN/kmk_sed|${PREFIX}/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
do-install:
${MKDIR} ${KMODDIR}
${INSTALL_KLD} ${VBOX_BIN}/src/vboxguest/vboxguest.ko ${KMODDIR}
${MKDIR} ${PREFIX}/etc/rc.d/
${MKDIR} ${PREFIX}/sbin
${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxControl ${PREFIX}/sbin/
${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxService ${PREFIX}/sbin/
.if !defined(WITHOUT_X11)
${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxClient ${PREFIX}/sbin/
${MKDIR} ${VIDEODIR}
${INSTALL_DATA} ${VBOX_BIN}/vboxvideo_drv_16.so ${VIDEODIR}/vboxvideo_drv.so
${MKDIR} ${INPUTDIR}
${INSTALL_DATA} ${VBOX_BIN}/vboxmouse_drv_16.so ${INPUTDIR}/vboxmouse_drv.so
.endif
.include <bsd.port.post.mk>

View File

@ -0,0 +1,3 @@
MD5 (VirtualBox-3.1.51r25618-OSE.tar.bz2) = 45663a81fc71cda1f116837d20af02bf
SHA256 (VirtualBox-3.1.51r25618-OSE.tar.bz2) = 1c59d40c24497f13e4c22984d54bbbbe68f1f6400a50004d14c02245a3eaf19f
SIZE (VirtualBox-3.1.51r25618-OSE.tar.bz2) = 55665982

View File

@ -0,0 +1,11 @@
--- src/VBox/Additions/freebsd/Makefile.kmk.orig 2010-01-04 09:55:35.000000000 +0100
+++ src/VBox/Additions/freebsd/Makefile.kmk 2010-01-04 09:55:42.000000000 +0100
@@ -28,7 +28,7 @@
# 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

View File

@ -0,0 +1,53 @@
#!/bin/sh
#
# $FreeBSD$
#
# 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
. %%RC_SUBR%%
name="vboxguest"
rcvar=${name}_enable
start_cmd="vboxguest_start"
stop_cmd="vboxguest_stop"
vboxguest_start()
{
if ! kldstat -q -m vboxguest;
then
if ! kldload vboxguest > /dev/null 2>&1;
then
warn "Can't load vboxguest module."
return 1
fi
fi
}
vboxguest_stop()
{
if kldstat -q -m 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"

View File

@ -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/

View File

@ -0,0 +1,13 @@
@comment $FreeBSD$
%%X11%%sbin/VBoxClient
sbin/VBoxControl
sbin/VBoxService
%%X11%%lib/xorg/modules/drivers/vboxvideo_drv.so
%%X11%%lib/xorg/modules/input/vboxmouse_drv.so
%%X11%%@dirrmtry lib/xorg/modules/drivers
%%X11%%@dirrmtry lib/xorg/modules/input
%%X11%%@dirrmtry lib/xorg/modules
%%X11%%@dirrmtry lib/xorg
%%X11%%@dirrmtry lib
@cwd /
%%KMODDIR%%/vboxguest.ko