- I now have the necessary preprocessor symbol to modify the source depending on whether the server is 1.19.0 or greater.
It is no longer necessary to detect the server version in the spec file, thus the solution is cleaner. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=299
This commit is contained in:
parent
9ae9af5d05
commit
7bebcb99dc
@ -2,12 +2,14 @@ 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.orig/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
|
||||||
+++ VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
|
+++ VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/vboxvideo.h
|
||||||
@@ -52,6 +52,8 @@
|
@@ -52,6 +52,10 @@
|
||||||
#ifndef _VBOXVIDEO_H_
|
#ifndef _VBOXVIDEO_H_
|
||||||
#define _VBOXVIDEO_H_
|
#define _VBOXVIDEO_H_
|
||||||
|
|
||||||
|
+#if XORG_VERSION_CURRENT >= 11900000
|
||||||
+#include <bits/sigset.h>
|
+#include <bits/sigset.h>
|
||||||
+typedef __sigset_t sigset_t;
|
+typedef __sigset_t sigset_t;
|
||||||
|
+#endif
|
||||||
#include <VBox/VBoxVideoGuest.h>
|
#include <VBox/VBoxVideoGuest.h>
|
||||||
#include <VBox/VBoxVideo.h>
|
#include <VBox/VBoxVideo.h>
|
||||||
#include "version-generated.h"
|
#include "version-generated.h"
|
||||||
@ -15,12 +17,15 @@ 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.orig/src/VBox/Additions/x11/vboxvideo/helpers.c
|
||||||
+++ VirtualBox-5.1.10/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
|
@@ -82,7 +82,11 @@ void vbvxSetIntegerPropery(ScrnInfoPtr p
|
||||||
|
|
||||||
property_name = MakeAtom(pszName, strlen(pszName), TRUE);
|
property_name = MakeAtom(pszName, strlen(pszName), TRUE);
|
||||||
VBVXASSERT(property_name != BAD_RESOURCE, ("Failed to set atom \"%s\"\n", pszName));
|
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);
|
+#if XORG_VERSION_CURRENT >= 11900000
|
||||||
+ dixChangeWindowProperty(serverClient, 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);
|
||||||
|
+#else
|
||||||
|
ChangeWindowProperty(ROOT_WINDOW(pScrn), property_name, XA_INTEGER, 32, PropModeReplace, cData, paData, fSendEvent);
|
||||||
|
+#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void vbvxReprobeCursor(ScrnInfoPtr pScrn)
|
void vbvxReprobeCursor(ScrnInfoPtr pScrn)
|
||||||
@ -28,26 +33,30 @@ 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.orig/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
|
||||||
+++ VirtualBox-5.1.10/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
|
@@ -1229,7 +1229,11 @@ static Bool VBOXScreenInit(ScreenPtr pSc
|
||||||
updateGraphicsCapability(pScrn, TRUE);
|
updateGraphicsCapability(pScrn, TRUE);
|
||||||
|
|
||||||
/* Register block and wake-up handlers for getting new screen size hints. */
|
/* Register block and wake-up handlers for getting new screen size hints. */
|
||||||
- RegisterBlockAndWakeupHandlers(vboxBlockHandler, (WakeupHandlerProcPtr)NoopDDA, (pointer)pScrn);
|
+#if XORG_VERSION_CURRENT >= 11900000
|
||||||
-
|
|
||||||
+ RegisterBlockAndWakeupHandlers(vboxBlockHandler, (ServerWakeupHandlerProcPtr)NoopDDA, (pointer)pScrn);
|
+ RegisterBlockAndWakeupHandlers(vboxBlockHandler, (ServerWakeupHandlerProcPtr)NoopDDA, (pointer)pScrn);
|
||||||
|
+#else
|
||||||
|
RegisterBlockAndWakeupHandlers(vboxBlockHandler, (WakeupHandlerProcPtr)NoopDDA, (pointer)pScrn);
|
||||||
|
+#endif
|
||||||
|
|
||||||
/* software cursor */
|
/* software cursor */
|
||||||
miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
|
miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
|
||||||
|
|
||||||
Index: VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/pointer.c
|
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.orig/src/VBox/Additions/x11/vboxvideo/pointer.c
|
||||||
+++ VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/pointer.c
|
+++ VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/pointer.c
|
||||||
@@ -15,6 +15,8 @@
|
@@ -15,6 +15,10 @@
|
||||||
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
+#if XORG_VERSION_CURRENT >= 11900000
|
||||||
+#include <bits/sigset.h>
|
+#include <bits/sigset.h>
|
||||||
+typedef __sigset_t sigset_t;
|
+typedef __sigset_t sigset_t;
|
||||||
|
+#endif
|
||||||
#include <VBox/VBoxGuestLib.h>
|
#include <VBox/VBoxGuestLib.h>
|
||||||
|
|
||||||
#ifndef PCIACCESS
|
#ifndef PCIACCESS
|
||||||
@ -55,12 +64,14 @@ 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.orig/src/VBox/Additions/x11/vboxvideo/edid.c
|
||||||
+++ VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/edid.c
|
+++ VirtualBox-5.1.10/src/VBox/Additions/x11/vboxvideo/edid.c
|
||||||
@@ -44,6 +44,8 @@
|
@@ -44,6 +44,10 @@
|
||||||
* Dave Airlie <airlied@redhat.com>
|
* Dave Airlie <airlied@redhat.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
+#if XORG_VERSION_CURRENT >= 11900000
|
||||||
+#include <bits/sigset.h>
|
+#include <bits/sigset.h>
|
||||||
+typedef __sigset_t sigset_t;
|
+typedef __sigset_t sigset_t;
|
||||||
|
+#endif
|
||||||
#include <misc.h>
|
#include <misc.h>
|
||||||
#include <xf86DDC.h>
|
#include <xf86DDC.h>
|
||||||
#include <xf86Crtc.h>
|
#include <xf86Crtc.h>
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 5 22:34:34 UTC 2016 - Larry.Finger@lwfinger.net
|
||||||
|
|
||||||
|
- I now have the necessary preprocessor symbol to modify the source depending on whether the server is 1.19.0 or greater.
|
||||||
|
It is no longer necessary to detect the server version in the spec file, thus the solution is cleaner.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Dec 5 17:03:34 UTC 2016 - Larry.Finger@lwfinger.net
|
Mon Dec 5 17:03:34 UTC 2016 - Larry.Finger@lwfinger.net
|
||||||
|
|
||||||
|
@ -307,9 +307,6 @@ This package contains icons for guest desktop files that were created on the des
|
|||||||
###########################################
|
###########################################
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
xserver_str=`rpm -q xorg-x11-server`
|
|
||||||
XSERVER_VERSION=`expr match "$xserver_str" '.*\(\([0-9]\.[0-9][0-9]\)\)'`
|
|
||||||
#XSERVER_VERSION=`echo $XSERVER_VERSION | sed -e 's/\.//g'`
|
|
||||||
%setup -q -n VirtualBox-%{version}
|
%setup -q -n VirtualBox-%{version}
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
@ -334,11 +331,7 @@ XSERVER_VERSION=`expr match "$xserver_str" '.*\(\([0-9]\.[0-9][0-9]\)\)'`
|
|||||||
%patch113 -p1
|
%patch113 -p1
|
||||||
%patch114 -p1
|
%patch114 -p1
|
||||||
%patch115 -p1
|
%patch115 -p1
|
||||||
if [ "$XSERVER_VERSION" = "1.18" ] ; then
|
|
||||||
echo "Patch 116 not applied"
|
|
||||||
else
|
|
||||||
%patch116 -p1
|
%patch116 -p1
|
||||||
fi
|
|
||||||
|
|
||||||
#copy user manual
|
#copy user manual
|
||||||
cp %{SOURCE1} UserManual.pdf
|
cp %{SOURCE1} UserManual.pdf
|
||||||
|
Loading…
Reference in New Issue
Block a user