xf86-video-virtualbox: actually compile all libs and binaries now

This commit is contained in:
Lukas Rusak 2016-06-15 15:57:52 -07:00
parent bae25a917f
commit a78c122dd9
12 changed files with 268 additions and 46 deletions

View File

@ -1,31 +0,0 @@
Section "Device"
Identifier "Configured Video Device"
Driver "vboxvideo"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "InputDevice"
Identifier "vboxmouse"
Driver "vboxmouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen" 0 0
InputDevice "vboxmouse"
EndSection

View File

@ -1,2 +0,0 @@
# load vboxvideo kernel module
vboxvideo

View File

@ -22,8 +22,9 @@ PKG_REV="1"
PKG_ARCH="x86_64"
PKG_LICENSE="OSS"
PKG_SITE="http://www.virtualbox.org"
PKG_URL="${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain libXcomposite libXdamage libXfixes libXext libX11 libxcb libXau"
PKG_URL="http://download.virtualbox.org/virtualbox/$PKG_VERSION/VirtualBox-$PKG_VERSION.tar.bz2"
PKG_SOURCE_DIR="VirtualBox-$PKG_VERSION"
PKG_DEPENDS_TARGET="toolchain libXcomposite libXdamage libXfixes libXext libX11 libxcb libXau libXmu"
PKG_PRIORITY="optional"
PKG_SECTION="x11/driver"
PKG_SHORTDESC="xf86-video-virtualbox: The Xorg driver for virtualbox video"
@ -32,20 +33,51 @@ PKG_LONGDESC="xf86-video-virtualbox: The Xorg driver for virtualbox video"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
pre_configure_target() {
# let's use our sysroot instead
for include in x11 xorg pixman-1; do
sed -i "s| \(/usr/include/${include}\)| ${SYSROOT_PREFIX}\1|" $ROOT/$PKG_BUILD/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
done
}
configure_target() {
cd $ROOT/$PKG_BUILD
./configure --nofatal \
--disable-xpcom \
--disable-sdl-ttf \
--disable-pulse \
--disable-alsa \
--with-gcc=$CC \
--with-g++=$CXX \
--target-arch=amd64 \
--with-linux=$(kernel_path) \
--build-headless
}
make_target() {
: # nothing todo
. env.sh
export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
kmk TOOL_YASM_AS=yasm \
VBOX_USE_SYSTEM_XORG_HEADERS=1 \
KBUILD_PATH="$ROOT/$PKG_BUILD/kBuild" \
KBUILD_VERBOSE=2
}
makeinstall_target() {
mkdir -p $INSTALL/$XORG_PATH_MODULES/drivers
cp -P lib/VBoxGuestAdditions/vboxvideo_drv_118.so $INSTALL/$XORG_PATH_MODULES/drivers/vboxvideo_drv.so
mkdir -p $INSTALL/usr/sbin
cp -P $ROOT/$PKG_BUILD/out/linux.amd64/release/bin/additions/VBoxService $INSTALL/usr/sbin/vboxguest-service
cp -P $ROOT/$PKG_BUILD/out/linux.amd64/release/bin/additions/mount.vboxsf $INSTALL/usr/sbin
mkdir -p $INSTALL/usr/lib/dri
cp -P lib/VBoxOGL.so $INSTALL/usr/lib/dri/vboxvideo_dri.so
mkdir -p $INSTALL/usr/lib
cp -aP lib/* $INSTALL/usr/lib
mkdir -p $INSTALL/etc/X11
cp $PKG_DIR/config/*.conf $INSTALL/etc/X11
mkdir -p $INSTALL/usr/bin
cp -P $ROOT/$PKG_BUILD/out/linux.amd64/release/bin/additions/VBoxControl $INSTALL/usr/bin
cp -P $ROOT/$PKG_BUILD/out/linux.amd64/release/bin/additions/VBoxClient $INSTALL/usr/bin
}
post_install() {
# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
add_group vboxsf 300
enable_service virtualbox-display.service
enable_service virtualbox-guest-additions.service
}

View File

@ -0,0 +1,52 @@
--- VirtualBox-5.0.0_BETA3/configure
+++ VirtualBox-5.0.0_BETA3/configure
@@ -1258,10 +1258,7 @@
XCloseDisplay(dpy);
}
EOF
- [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
- if test_compile "$LIBX11 $I_INCX11" Xlibs Xlibs; then
- log_success "found"
- fi
+ test_compile "$LIBX11 $I_INCX11" Xlibs Xlibs
}
@@ -1415,21 +1412,6 @@
#include <GL/glu.h>
extern "C" int main(void)
{
- Display *dpy;
- int major, minor;
-
- dpy = XOpenDisplay(NULL);
- if (dpy)
- {
- Bool glx_version = glXQueryVersion(dpy, &major, &minor);
- XCloseDisplay(dpy);
- if (glx_version)
- {
- printf("found version %u.%u, OK.\n", major, minor);
- return 0;
- }
- }
- printf("found (inactive), OK.\n");
return 0;
}
EOF
@@ -2706,7 +2688,6 @@
# don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs
# [ "$OS" != "darwin" ] && check_yasm
[ "$OS" != "darwin" ] && check_xsltproc
- [ "$OS" != "darwin" ] && check_mkisofs
fi
# the libraries
@@ -2774,7 +2755,6 @@
check_compiler_h
[ $ONLY_ADDITIONS -eq 0 -a "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit
# tools/common/makeself*
- [ $OSE -ge 1 ] && check_makeself
fi
[ -n "$SETUP_WINE" ] && setup_wine

View File

@ -0,0 +1,13 @@
--- a/configure
+++ b/configure
@@ -1955,8 +1955,8 @@
HEADLESS=1
WITH_SDL=0
WITH_SDL_TTF=0
- WITH_X11=0
- WITH_OPENGL=0
+ WITH_X11=1
+ WITH_OPENGL=1
WITH_QT4=0
;;
--ose)

View File

@ -0,0 +1,11 @@
--- a/src/VBox/Additions/linux/drm/Makefile.module.kms 2016-04-28 09:08:06.000000000 -0400
+++ b/src/VBox/Additions/linux/drm/Makefile.module.kms 2016-05-03 15:11:22.134971872 -0400
@@ -38,7 +38,7 @@
MANGLING := $(KBUILD_EXTMOD)/include/VBox/VBoxGuestMangling.h
endif
MOD_CFLAGS = -Wno-declaration-after-statement -fshort-wchar -include $(MANGLING)
-MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include)
+MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
# What on earth is this?
MOD_INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxvideo,/ /include)
MOD_INCL += -Iinclude/drm

View File

@ -0,0 +1,35 @@
diff -Naur a/LocalConfig.kmk b/LocalConfig.kmk
--- a/LocalConfig.kmk 1969-12-31 16:00:00.000000000 -0800
+++ b/LocalConfig.kmk 2016-06-10 12:12:55.192544196 -0700
@@ -0,0 +1,31 @@
+# -*- Makefile -*-
+#
+# Overwrite some default kBuild settings
+#
+
+#
+# Copyright (C) 2006-2008 Sun Microsystems, Inc.
+#
+# This file is part of VirtualBox Open Source Edition (OSE), as
+# available from http://www.virtualbox.org. This file is free software;
+# you can redistribute it and/or modify it under the terms of the GNU
+# General Public License as published by the Free Software Foundation,
+# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
+# distribution. VirtualBox OSE is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY of any kind.
+#
+
+# don't build testcases to save time, they are not needed for the package
+VBOX_WITH_TESTCASES :=
+VBOX_WITH_VALIDATIONKIT :=
+
+KBUILD_MSG_STYLE := brief
+
+## paths, origin, hardening
+VBOX_WITH_HARDENING := 0
+VBOX_WITH_ORIGIN :=
+VBOX_ONLY_ADDITIONS := 1
+
+TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.release =
+TEMPLATE_VBOXGUESTR3XORGMOD_LDFLAGS = $(TEMPLATE_VBOXGUESTR3DLL_LDFLAGS)
+

View File

@ -0,0 +1,18 @@
diff -Naur a/src/VBox/Additions/common/crOpenGL/Makefile.kmk b/src/VBox/Additions/common/crOpenGL/Makefile.kmk
--- a/src/VBox/Additions/common/crOpenGL/Makefile.kmk 2016-04-28 06:08:03.000000000 -0700
+++ b/src/VBox/Additions/common/crOpenGL/Makefile.kmk 2016-06-10 14:13:21.014010384 -0700
@@ -214,10 +214,10 @@
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGL_LIBS += \
- $(PATH_STAGE_LIB)/libXcomposite.so \
- $(PATH_STAGE_LIB)/libXdamage.so \
- $(PATH_STAGE_LIB)/libXfixes.so \
- $(PATH_STAGE_LIB)/libXext.so
+ Xcomposite \
+ Xdamage \
+ Xfixes \
+ Xext
ifdef VBoxOGL_FAKEDRI
ifeq ($(KBUILD_TARGET), freebsd)
VBoxOGL_LIBS += \

View File

@ -0,0 +1,14 @@
diff -Naur a/Config.kmk b/Config.kmk
--- a/Config.kmk 2016-04-28 06:07:46.000000000 -0700
+++ b/Config.kmk 2016-06-12 12:58:09.503823599 -0700
@@ -428,10 +428,6 @@
if1of ($(KBUILD_TARGET), linux solaris)
VBOX_WITH_DBUS = 1
endif
-# Enable building PAM modules.
-if1of ($(KBUILD_TARGET), linux solaris)
- VBOX_WITH_PAM = 1
-endif
# Disable WINMM support for Windows (not implemented).
VBOX_WITH_WINMM =
# Enable internal networking.

View File

@ -0,0 +1,51 @@
diff -Naur a/Config.kmk b/Config.kmk
--- a/Config.kmk 2016-04-28 06:07:46.000000000 -0700
+++ b/Config.kmk 2016-06-12 14:11:25.638509165 -0700
@@ -622,8 +622,6 @@
endif
# Enable shared folders
VBOX_WITH_SHARED_FOLDERS = 1
-# Enable shared clipboard
-VBOX_WITH_SHARED_CLIPBOARD = 1
# Enable the host/guest information service (aka guest properties).
VBOX_WITH_GUEST_PROPS = 1
# Enable this to prevent the guest from writing guest properties.
diff -Naur a/src/VBox/Additions/x11/VBoxClient/main.cpp b/src/VBox/Additions/x11/VBoxClient/main.cpp
--- a/src/VBox/Additions/x11/VBoxClient/main.cpp 2016-04-28 06:08:08.000000000 -0700
+++ b/src/VBox/Additions/x11/VBoxClient/main.cpp 2016-06-12 14:40:00.163521913 -0700
@@ -167,7 +167,6 @@
"--seamless|check3d [-d|--nodaemon]\n", pcszFileName);
RTPrintf("Starts the VirtualBox X Window System guest services.\n\n");
RTPrintf("Options:\n");
- RTPrintf(" --clipboard starts the shared clipboard service\n");
#ifdef VBOX_WITH_DRAG_AND_DROP
RTPrintf(" --draganddrop starts the drag and drop service\n");
#endif
@@ -228,12 +227,6 @@
{
fRespawn = false;
}
- else if (!strcmp(argv[i], "--clipboard"))
- {
- if (g_pService)
- break;
- g_pService = VBClGetClipboardService();
- }
else if (!strcmp(argv[i], "--display"))
{
if (g_pService)
diff -Naur a/src/VBox/Additions/x11/VBoxClient/Makefile.kmk b/src/VBox/Additions/x11/VBoxClient/Makefile.kmk
--- a/src/VBox/Additions/x11/VBoxClient/Makefile.kmk 2016-04-28 06:08:08.000000000 -0700
+++ b/src/VBox/Additions/x11/VBoxClient/Makefile.kmk 2016-06-12 14:39:25.451177811 -0700
@@ -31,10 +31,7 @@
VBoxClient_DEFS.linux += _GNU_SOURCE
VBoxClient_SOURCES = \
main.cpp
-VBoxClient_SOURCES += \
- $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-helper.cpp \
- $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp \
- clipboard.cpp
+VBoxClient_SOURCES +=
VBoxClient_LIBPATH = \
$(VBOX_LIBPATH32_X11)
VBoxClient_LIBS.freebsd = \

View File

@ -0,0 +1,13 @@
[Unit]
Description=VirtualBox Client Display Daemon
ConditionVirtualization=oracle
After=systemd-modules-load.service
[Service]
Environment=DISPLAY=:0.0
ExecStart=/usr/bin/VBoxClient --display --nodaemon
Restart=on-failure
RestartSec=2
[Install]
WantedBy=graphical.target

View File

@ -0,0 +1,16 @@
[Unit]
Description=VirtualBox Guest Additions
ConditionVirtualization=oracle
Before=graphical.target
[Service]
Type=simple
ExecStartPre=/sbin/modprobe vboxguest
ExecStartPre=/sbin/modprobe vboxsf
ExecStart=/usr/sbin/vboxguest-service --foreground
ExecStopPost=/sbin/modprobe -r vboxsf
ExecStopPost=/sbin/modprobe -r vboxguest
PIDFile=/var/run/vboxguest-service.pid
[Install]
WantedBy=multi-user.target