aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authordecke <decke@FreeBSD.org>2011-02-01 07:06:45 +0800
committerdecke <decke@FreeBSD.org>2011-02-01 07:06:45 +0800
commit8e17daef3c6d247cf0efbd16954a5a7a50f1c333 (patch)
treecc2bf64e0ff79b4155877b50b4cf393dc17e85c4 /emulators
parenta83d545e7807cbb4783a5d781a134c00474113e4 (diff)
downloadfreebsd-ports-gnome-8e17daef3c6d247cf0efbd16954a5a7a50f1c333.tar.gz
freebsd-ports-gnome-8e17daef3c6d247cf0efbd16954a5a7a50f1c333.tar.zst
freebsd-ports-gnome-8e17daef3c6d247cf0efbd16954a5a7a50f1c333.zip
- 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
Diffstat (limited to 'emulators')
-rw-r--r--emulators/virtualbox-ose-additions/Makefile23
-rw-r--r--emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-98vboxadd-xclient27
-rw-r--r--emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-vboxclient.desktop10
-rw-r--r--emulators/virtualbox-ose-additions/files/vboxservice.in26
-rw-r--r--emulators/virtualbox-ose-additions/pkg-plist10
5 files changed, 91 insertions, 5 deletions
diff --git a/emulators/virtualbox-ose-additions/Makefile b/emulators/virtualbox-ose-additions/Makefile
index 93f3a4d0b59b..69647ecd78c7 100644
--- a/emulators/virtualbox-ose-additions/Makefile
+++ b/emulators/virtualbox-ose-additions/Makefile
@@ -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
diff --git a/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-98vboxadd-xclient b/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-98vboxadd-xclient
new file mode 100644
index 000000000000..edb9514f95c5
--- /dev/null
+++ b/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-98vboxadd-xclient
@@ -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
diff --git a/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-vboxclient.desktop b/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-vboxclient.desktop
new file mode 100644
index 000000000000..fadd31bc4d48
--- /dev/null
+++ b/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-x11-Installer-vboxclient.desktop
@@ -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
diff --git a/emulators/virtualbox-ose-additions/files/vboxservice.in b/emulators/virtualbox-ose-additions/files/vboxservice.in
new file mode 100644
index 000000000000..cdf0cb7903e1
--- /dev/null
+++ b/emulators/virtualbox-ose-additions/files/vboxservice.in
@@ -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"
diff --git a/emulators/virtualbox-ose-additions/pkg-plist b/emulators/virtualbox-ose-additions/pkg-plist
index 7b1b3a50f819..5d9e70dff841 100644
--- a/emulators/virtualbox-ose-additions/pkg-plist
+++ b/emulators/virtualbox-ose-additions/pkg-plist
@@ -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%% \ No newline at end of file
+@unexec /usr/sbin/kldxref /%%KMODDIR%%