From 5abb7f563929019e06c2cc4607e42e0bacfb2765dee63a88d69b2fe80693b213 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 5 Dec 2016 03:50:25 +0000 Subject: [PATCH] - Add patch file "Fix_for_server_1.19.patch" to support xorg-x11-server v. 1.19.0. The spec file now interrogates the rpm for the server and conditionally applies the patch, thus both versions build OK. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=297 --- Fix_for_server_1.19.patch | 66 +++++++++++++++++++++++++++++++++++++++ virtualbox.changes | 6 ++++ virtualbox.spec | 11 +++++++ 3 files changed, 83 insertions(+) create mode 100644 Fix_for_server_1.19.patch diff --git a/Fix_for_server_1.19.patch b/Fix_for_server_1.19.patch new file mode 100644 index 0000000..000ab93 --- /dev/null +++ b/Fix_for_server_1.19.patch @@ -0,0 +1,66 @@ +Index: VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/vboxvideo.h +=================================================================== +--- VirtualBox-5.1.10.orig/src/VBox/Additions/x11/vboxvideo/vboxvideo.h ++++ VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/vboxvideo.h +@@ -52,6 +52,8 @@ + #ifndef _VBOXVIDEO_H_ + #define _VBOXVIDEO_H_ + ++#include ++typedef __sigset_t sigset_t; + #include + #include + #include "version-generated.h" +Index: VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/helpers.c +=================================================================== +--- VirtualBox-5.1.10.orig/src/VBox/Additions/x11/vboxvideo/helpers.c ++++ VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/helpers.c +@@ -82,7 +82,7 @@ void vbvxSetIntegerPropery(ScrnInfoPtr p + + property_name = MakeAtom(pszName, strlen(pszName), TRUE); + VBVXASSERT(property_name != BAD_RESOURCE, ("Failed to set atom \"%s\"\n", pszName)); +- ChangeWindowProperty(ROOT_WINDOW(pScrn), property_name, XA_INTEGER, 32, PropModeReplace, cData, paData, fSendEvent); ++ dixChangeWindowProperty(serverClient, ROOT_WINDOW(pScrn), property_name, XA_INTEGER, 32, PropModeReplace, cData, paData, fSendEvent); + } + + void vbvxReprobeCursor(ScrnInfoPtr pScrn) +Index: VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/vboxvideo.c +=================================================================== +--- VirtualBox-5.1.10.orig/src/VBox/Additions/x11/vboxvideo/vboxvideo.c ++++ VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/vboxvideo.c +@@ -1229,8 +1229,7 @@ static Bool VBOXScreenInit(ScreenPtr pSc + updateGraphicsCapability(pScrn, TRUE); + + /* Register block and wake-up handlers for getting new screen size hints. */ +- RegisterBlockAndWakeupHandlers(vboxBlockHandler, (WakeupHandlerProcPtr)NoopDDA, (pointer)pScrn); +- ++ RegisterBlockAndWakeupHandlers(vboxBlockHandler, (ServerWakeupHandlerProcPtr)NoopDDA, (pointer)pScrn); + /* software cursor */ + miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); + +Index: VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/pointer.c +=================================================================== +--- VirtualBox-5.1.10.orig/src/VBox/Additions/x11/vboxvideo/pointer.c ++++ VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/pointer.c +@@ -15,6 +15,8 @@ + * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. + */ + ++#include ++typedef __sigset_t sigset_t; + #include + + #ifndef PCIACCESS +Index: VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/edid.c +=================================================================== +--- VirtualBox-5.1.10.orig/src/VBox/Additions/x11/vboxvideo/edid.c ++++ VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/edid.c +@@ -44,6 +44,8 @@ + * Dave Airlie + */ + ++#include ++typedef __sigset_t sigset_t; + #include + #include + #include diff --git a/virtualbox.changes b/virtualbox.changes index 34a3599..ca75e28 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Dec 4 16:59:29 UTC 2016 - Larry.Finger@lwfinger.net + +- Add patch file "Fix_for_server_1.19.patch" to support xorg-x11-server v. 1.19.0. + The spec file now interrogates the rpm for the server and conditionally applies the patch, thus both versions build OK. + ------------------------------------------------------------------- Wed Nov 30 16:45:43 UTC 2016 - asn@cryptomilk.org diff --git a/virtualbox.spec b/virtualbox.spec index bf56f61..6964138 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -92,6 +92,8 @@ Patch113: vbox_remove_smp_mflags.patch Patch114: vbox_fix_4.9_api_changes.patch # Add support for HiDPI in the management frontend Patch115: vbox_hidpi_support.patch +# Fix for missing include needed for server 1.19 +Patch116: Fix_for_server_1.19.patch # BuildRequires: LibVNCServer-devel BuildRequires: SDL-devel @@ -130,6 +132,7 @@ BuildRequires: update-desktop-files BuildRequires: which BuildRequires: xorg-x11 BuildRequires: xorg-x11-server +#BuildRequires: xorg-x11-server > 7.6_1.18.4-2.1 BuildRequires: xorg-x11-server-sdk BuildRequires: yasm BuildRequires: zlib-devel-static @@ -304,6 +307,9 @@ This package contains icons for guest desktop files that were created on the des ########################################### %prep +xserver_str=`rpm -q xorg-x11-server` +XSERVER_VERSION=`expr match "$xserver_str" '.*\(\([0-9]\.[0-9][0-9]\.[0-9]\)\)'` +#XSERVER_VERSION=`echo $XSERVER_VERSION | sed -e 's/\.//g'` %setup -q -n VirtualBox-%{version} %patch1 -p1 %patch2 -p1 @@ -328,6 +334,11 @@ This package contains icons for guest desktop files that were created on the des %patch113 -p1 %patch114 -p1 %patch115 -p1 +if [ "$XSERVER_VERSION" = "1.18.4" ] ; then + echo "Patch 116 not applied" +else +%patch116 -p1 +fi #copy user manual cp %{SOURCE1} UserManual.pdf