1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- Properly add VBoxClient glue to autostart in X11 [1]

- Add vboxservice startscript
- Fix VBoxClient install location
- Bump PORTREVISION

Thanks to:	tombsd (FreeBSD Forums) [1]
Feature safe:	yes
This commit is contained in:
Bernhard Froehlich 2011-01-31 23:06:45 +00:00
parent f946b44d8a
commit 4b7c4dd1fd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=268509
5 changed files with 91 additions and 5 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= virtualbox-ose
DISTVERSION= 3.2.12
PORTREVISION= 1
CATEGORIES= emulators kld
MASTER_SITES= http://tmp.chruetertee.ch/ \
http://freebsd.unixfreunde.de/sources/ \
@ -27,7 +28,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
UNIQUENAME= ${PORTNAME}${PKGNAMESUFFIX}
WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION}_OSE
USE_RC_SUBR= vboxguest
USE_RC_SUBR= vboxguest vboxservice
ONLY_FOR_ARCHS= i386 amd64
USE_BZIP2= yes
MAKE_JOBS_UNSAFE= yes
@ -122,7 +123,9 @@ post-patch:
${WRKSRC}/Config.kmk \
${WRKSRC}/configure \
${WRKSRC}/kBuild/units/qt4.kmk \
${WRKSRC}/kBuild/sdks/LIBSDL.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|${PREFIX}/bin/kmk_sed|g' ${WRKSRC}/configure
pre-build:
@ -146,7 +149,21 @@ do-install:
${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxService ${PREFIX}/sbin/
.if !defined(WITHOUT_X11)
${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxClient ${PREFIX}/sbin/
${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_17.so ${VIDEODIR}/vboxvideo_drv.so

View File

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

View File

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

View File

@ -0,0 +1,26 @@
#!/bin/sh
# $FreeBSD$
# 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=`set_rcvar`
command="%%PREFIX%%/sbin/VBoxService"
load_rc_config $name
: ${vboxservice_enable="NO"}
: ${vboxservice_flags=""}
run_rc_command "$1"

View File

@ -1,16 +1,22 @@
@comment $FreeBSD$
%%X11%%sbin/VBoxClient
%%X11%%bin/VBoxClient-all
%%X11%%bin/VBoxClient
%%X11%%etc/xdg/autostart/vboxclient.desktop
sbin/VBoxControl
sbin/VBoxService
%%X11%%share/autostart/vboxclient.desktop
%%X11%%lib/xorg/modules/drivers/vboxvideo_drv.so
%%X11%%lib/xorg/modules/input/vboxmouse_drv.so
%%HAL%%share/hal/fdi/policy/10osvendor/90-vboxguest.fdi
%%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
%%X11%%@dirrmtry lib
%%X11%%@dirrmtry etc/xdg/autostart
%%X11%%@dirrmtry etc/xdg
@cwd /
%%KMODDIR%%/vboxguest.ko
@exec /usr/sbin/kldxref /%%KMODDIR%%
@unexec /usr/sbin/kldxref /%%KMODDIR%%
@unexec /usr/sbin/kldxref /%%KMODDIR%%