summaryrefslogtreecommitdiffstats
path: root/tigervnc/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2012-07-29 10:37:18 +0000
committer Eric Hameleers <alien@slackware.com>2012-07-29 10:37:18 +0000
commitea2e0d51b8df85568b1285580ec35416e16500d2 (patch)
tree3e35827e5775cb775b1731c4565d0f869af5852d /tigervnc/build
parentc63b2292d1acbcc7412860c8fb4a1ea3efb0b5ff (diff)
downloadasb-ea2e0d51b8df85568b1285580ec35416e16500d2.tar.gz
asb-ea2e0d51b8df85568b1285580ec35416e16500d2.tar.xz
Initial revision
Diffstat (limited to 'tigervnc/build')
-rw-r--r--tigervnc/build/tigervnc11-xorg111.patch236
-rw-r--r--tigervnc/build/tigervnc11-xorg113.patch171
-rw-r--r--tigervnc/build/xorg_headers_fix_reservedwords.patch25
3 files changed, 432 insertions, 0 deletions
diff --git a/tigervnc/build/tigervnc11-xorg111.patch b/tigervnc/build/tigervnc11-xorg111.patch
new file mode 100644
index 00000000..690ca6be
--- /dev/null
+++ b/tigervnc/build/tigervnc11-xorg111.patch
@@ -0,0 +1,236 @@
+diff -up xserver/hw/vnc/Input.cc.xorg111 xserver/hw/vnc/Input.cc
+--- xserver/hw/vnc/Input.cc.xorg111 2011-08-09 23:16:36.000000000 +0200
++++ xserver/hw/vnc/Input.cc 2011-11-11 11:59:14.226819903 +0100
+@@ -82,10 +82,11 @@ static KeyCode KeysymToKeycode(KeySymsPt
+ /* Event queue is shared between all devices. */
+ #if XORG == 15
+ static xEvent *eventq = NULL;
+-#else
++#elif XORG < 111
+ static EventList *eventq = NULL;
+ #endif
+
++#if XORG < 111
+ static void initEventq(void)
+ {
+ /* eventq is never free()-ed because it exists during server life. */
+@@ -100,7 +101,9 @@ static void initEventq(void)
+ #endif
+ }
+ }
++#endif /* XORG < 111 */
+
++#if XORG < 111
+ static void enqueueEvents(DeviceIntPtr dev, int n)
+ {
+ int i;
+@@ -122,6 +125,7 @@ static void enqueueEvents(DeviceIntPtr d
+ );
+ }
+ }
++#endif /* XORG < 111 */
+
+ InputDevice::InputDevice(rfb::VNCServerST *_server)
+ : server(_server), oldButtonMask(0)
+@@ -141,12 +145,17 @@ InputDevice::InputDevice(rfb::VNCServerS
+ keyboardProc, TRUE);
+ RegisterKeyboardDevice(keyboardDev);
+ #endif
++#if XORG < 111
+ initEventq();
++#endif
+ }
+
+ void InputDevice::PointerButtonAction(int buttonMask)
+ {
+- int i, n;
++ int i;
++#if XORG < 111
++ int n;
++#endif
+ #if XORG >= 110
+ ValuatorMask mask;
+ #endif
+@@ -160,13 +169,17 @@ void InputDevice::PointerButtonAction(in
+ #if XORG < 110
+ n = GetPointerEvents(eventq, pointerDev, action, i + 1,
+ POINTER_RELATIVE, 0, 0, NULL);
+-#else
++ enqueueEvents(pointerDev, n);
++#elif XORG < 111
+ valuator_mask_set_range(&mask, 0, 0, NULL);
+ n = GetPointerEvents(eventq, pointerDev, action, i + 1,
+ POINTER_RELATIVE, &mask);
+-#endif
+ enqueueEvents(pointerDev, n);
+-
++#else
++ valuator_mask_set_range(&mask, 0, 0, NULL);
++ QueuePointerEvents(pointerDev, action, i + 1,
++ POINTER_RELATIVE, &mask);
++#endif
+ }
+ }
+
+@@ -175,7 +188,10 @@ void InputDevice::PointerButtonAction(in
+
+ void InputDevice::PointerMove(const rfb::Point &pos)
+ {
+- int n, valuators[2];
++ int valuators[2];
++#if XORG < 111
++ int n;
++#endif
+ #if XORG >= 110
+ ValuatorMask mask;
+ #endif
+@@ -190,12 +206,16 @@ void InputDevice::PointerMove(const rfb:
+ #if XORG < 110
+ n = GetPointerEvents(eventq, pointerDev, MotionNotify, 0, POINTER_ABSOLUTE, 0,
+ 2, valuators);
+-#else
++ enqueueEvents(pointerDev, n);
++#elif XORG < 111
+ valuator_mask_set_range(&mask, 0, 2, valuators);
+ n = GetPointerEvents(eventq, pointerDev, MotionNotify, 0, POINTER_ABSOLUTE,
+ &mask);
+-#endif
+ enqueueEvents(pointerDev, n);
++#else
++ valuator_mask_set_range(&mask, 0, 2, valuators);
++ QueuePointerEvents(pointerDev, MotionNotify, 0, POINTER_ABSOLUTE, &mask);
++#endif
+
+ cursorPos = pos;
+ }
+@@ -299,14 +319,20 @@ void InputDevice::initInputDevice(void)
+ static inline void pressKey(DeviceIntPtr dev, int kc, bool down, const char *msg)
+ {
+ int action;
++#if XORG < 111
+ unsigned int n;
++#endif
+
+ if (msg != NULL)
+ vlog.debug("%s %d %s", msg, kc, down ? "down" : "up");
+
+ action = down ? KeyPress : KeyRelease;
+- n = GetKeyboardEvents(eventq, dev, action, kc);
++#if XORG < 111
++ n = GetKeyboardEvents(eventq, dev, action, kc, NULL);
+ enqueueEvents(dev, n);
++#else
++ QueueKeyboardEvents(dev, action, kc, NULL);
++#endif
+ }
+
+ #define IS_PRESSED(keyc, keycode) \
+@@ -341,8 +367,11 @@ public:
+ int state, maxKeysPerMod, keycode;
+ #if XORG >= 17
+ KeyCode *modmap = NULL;
+-
++#if XORG >= 111
++ state = XkbStateFieldFromRec(&dev->master->key->xkbInfo->state);
++#else /* XORG >= 111 */
+ state = XkbStateFieldFromRec(&dev->u.master->key->xkbInfo->state);
++#endif /* XORG >= 111 */
+ #else
+ KeyClassPtr keyc = dev->key;
+ state = keyc->state;
+@@ -380,7 +409,11 @@ public:
+ #if XORG >= 17
+ KeyCode *modmap = NULL;
+
++#if XORG >= 111
++ keyc = dev->master->key;
++#else /* XORG >= 111 */
+ keyc = dev->u.master->key;
++#endif /* XORG >= 111 */
+ state = XkbStateFieldFromRec(&keyc->xkbInfo->state);
+ #else
+ keyc = dev->key;
+@@ -596,7 +629,11 @@ void InputDevice::keyEvent(rdr::U32 keys
+ }
+
+ #if XORG >= 17
++#if XORG >= 111
++ keyc = keyboardDev->master->key;
++#else /* XORG >= 111 */
+ keyc = keyboardDev->u.master->key;
++#endif /* XORG >= 111 */
+
+ keymap = XkbGetCoreMap(keyboardDev);
+ if (!keymap) {
+@@ -753,7 +790,11 @@ ModeSwitchFound:
+ XkbApplyMappingChange(keyboardDev, keymap, minKeyCode,
+ maxKeyCode - minKeyCode + 1,
+ NULL, serverClient);
++#if XORG >= 111
++ XkbCopyDeviceKeymap(keyboardDev->master, keyboardDev);
++#else
+ XkbCopyDeviceKeymap(keyboardDev->u.master, keyboardDev);
++#endif
+ #endif /* XORG < 17 */
+ break;
+ }
+diff -up xserver/hw/vnc/xorg-version.h.xorg111 xserver/hw/vnc/xorg-version.h
+--- xserver/hw/vnc/xorg-version.h.xorg111 2011-08-09 23:16:36.000000000 +0200
++++ xserver/hw/vnc/xorg-version.h 2011-11-11 11:55:32.255835319 +0100
+@@ -36,6 +36,8 @@
+ #define XORG 19
+ #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (10 * 100000) + (99 * 1000))
+ #define XORG 110
++#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (11 * 100000) + (99 * 1000))
++#define XORG 111
+ #else
+ #error "X.Org newer than 1.10 is not supported"
+ #endif
+diff -up xserver/hw/vnc/xvnc.cc.xorg111 xserver/hw/vnc/xvnc.cc
+--- xserver/hw/vnc/xvnc.cc.xorg111 2011-08-09 23:16:36.000000000 +0200
++++ xserver/hw/vnc/xvnc.cc 2011-11-11 11:55:32.256835319 +0100
+@@ -211,7 +211,11 @@ static void vfbFreeFramebufferMemory(vfb
+
+ extern "C" {
+
++#if XORG < 111
+ void ddxGiveUp()
++#else
++void ddxGiveUp(enum ExitCode error)
++#endif
+ {
+ int i;
+
+@@ -221,9 +225,17 @@ void ddxGiveUp()
+ }
+
+ void
++#if XORG < 111
+ AbortDDX()
++#else
++AbortDDX(enum ExitCode error)
++#endif
+ {
++#if XORG < 111
+ ddxGiveUp();
++#else
++ ddxGiveUp(error);
++#endif
+ }
+
+ #ifdef __DARWIN__
+@@ -668,8 +680,13 @@ vfbUninstallColormap(ColormapPtr pmap)
+ {
+ if (pmap->mid != pmap->pScreen->defColormap)
+ {
++#if XORG < 111
+ curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap,
+ RT_COLORMAP);
++#else
++ dixLookupResourceByType((pointer *) &curpmap, pmap->pScreen->defColormap,
++ RT_COLORMAP, serverClient, DixUnknownAccess);
++#endif
+ (*pmap->pScreen->InstallColormap)(curpmap);
+ }
+ }
+
diff --git a/tigervnc/build/tigervnc11-xorg113.patch b/tigervnc/build/tigervnc11-xorg113.patch
new file mode 100644
index 00000000..f12cb2f9
--- /dev/null
+++ b/tigervnc/build/tigervnc11-xorg113.patch
@@ -0,0 +1,171 @@
+diff -up xserver/hw/vnc/Makefile.am.xorg113 xserver/hw/vnc/Makefile.am
+--- xserver/hw/vnc/Makefile.am.xorg113 2012-07-19 21:42:46.297455970 -0400
++++ xserver/hw/vnc/Makefile.am 2012-07-19 21:19:22.526005528 -0400
+@@ -62,7 +62,7 @@ EXTRA_DIST = Xvnc.man
+ BUILT_SOURCES = $(nodist_Xvnc_SOURCES)
+
+ fb.h: $(top_srcdir)/fb/fb.h
+- cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fb.h
++ cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,g' -e 's,xor,c_xor,g' > $(srcdir)/fb.h
+
+ pixman.h: $(includedir)/pixman-1/pixman.h
+ cat $(includedir)/pixman-1/pixman.h | sed 's/xor/c_xor/' > $(srcdir)/pixman.h
+diff -up xserver/hw/vnc/vncHooks.cc.xorg113 xserver/hw/vnc/vncHooks.cc
+--- xserver/hw/vnc/vncHooks.cc.xorg113 2012-07-19 21:31:37.191820942 -0400
++++ xserver/hw/vnc/vncHooks.cc 2012-07-19 21:36:00.327531293 -0400
+@@ -116,7 +116,7 @@ static DevPrivateKeyRec vncHooksGCKeyRec
+
+ // screen functions
+
+-static Bool vncHooksCloseScreen(int i, ScreenPtr pScreen);
++static Bool vncHooksCloseScreen(ScreenPtr pScreen);
+ static Bool vncHooksCreateGC(GCPtr pGC);
+ static void vncHooksCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
+ RegionPtr pOldRegion);
+@@ -133,7 +133,7 @@ static Bool vncHooksDisplayCursor(
+ DeviceIntPtr pDev,
+ #endif
+ ScreenPtr pScreen, CursorPtr cursor);
+-static void vncHooksBlockHandler(int i, pointer blockData, pointer pTimeout,
++static void vncHooksBlockHandler(ScreenPtr pScreen_, pointer pTimeout,
+ pointer pReadmask);
+ #ifdef RENDER
+ static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
+@@ -335,7 +335,7 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
+ // CloseScreen - unwrap the screen functions and call the original CloseScreen
+ // function
+
+-static Bool vncHooksCloseScreen(int i, ScreenPtr pScreen_)
++static Bool vncHooksCloseScreen(ScreenPtr pScreen_)
+ {
+ SCREEN_UNWRAP(pScreen_, CloseScreen);
+
+@@ -366,7 +366,7 @@ static Bool vncHooksCloseScreen(int i, S
+
+ DBGPRINT((stderr,"vncHooksCloseScreen: unwrapped screen functions\n"));
+
+- return (*pScreen->CloseScreen)(i, pScreen);
++ return (*pScreen->CloseScreen)(pScreen);
+ }
+
+ // CreateGC - wrap the "GC funcs"
+@@ -531,14 +531,14 @@ static Bool vncHooksDisplayCursor(
+ // BlockHandler - ignore any changes during the block handler - it's likely
+ // these are just drawing the cursor.
+
+-static void vncHooksBlockHandler(int i, pointer blockData, pointer pTimeout,
++static void vncHooksBlockHandler(ScreenPtr pScreen_, pointer pTimeout,
+ pointer pReadmask)
+ {
+- SCREEN_UNWRAP(screenInfo.screens[i], BlockHandler);
++ SCREEN_UNWRAP(pScreen_, BlockHandler);
+
+ vncHooksScreen->desktop->ignoreHooks(true);
+
+- (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
++ (*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
+
+ vncHooksScreen->desktop->ignoreHooks(false);
+
+diff -up xserver/hw/vnc/xf86vncModule.cc.xorg113 xserver/hw/vnc/xf86vncModule.cc
+--- xserver/hw/vnc/xf86vncModule.cc.xorg113 2012-07-19 21:19:27.558942606 -0400
++++ xserver/hw/vnc/xf86vncModule.cc 2012-07-19 21:19:27.574942408 -0400
+@@ -53,8 +53,6 @@ ExtensionModule vncExt =
+ {
+ vncExtensionInitWithParams,
+ "VNC",
+- NULL,
+- NULL,
+ NULL
+ };
+
+diff -up xserver/hw/vnc/xorg-version.h.xorg113 xserver/hw/vnc/xorg-version.h
+--- xserver/hw/vnc/xorg-version.h.xorg113 2012-07-19 21:19:27.560942582 -0400
++++ xserver/hw/vnc/xorg-version.h 2012-07-19 21:19:27.576942382 -0400
+@@ -40,6 +40,8 @@
+ #define XORG 111
+ #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (12 * 100000) + (99 * 1000))
+ #define XORG 112
++#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (13 * 100000) + (99 * 1000))
++#define XORG 113
+ #else
+ #error "X.Org newer than 1.10 is not supported"
+ #endif
+diff -up xserver/hw/vnc/xvnc.cc.xorg113 xserver/hw/vnc/xvnc.cc
+--- xserver/hw/vnc/xvnc.cc.xorg113 2012-07-19 21:36:33.078121854 -0400
++++ xserver/hw/vnc/xvnc.cc 2012-07-19 21:39:49.685663920 -0400
+@@ -267,7 +267,7 @@ OsVendorInit()
+ }
+
+ void
+-OsVendorFatalError()
++OsVendorFatalError(const char *f, va_list args)
+ {
+ }
+
+@@ -1135,9 +1135,9 @@ static Bool vncRandRSetConfig (ScreenPtr
+ #endif
+
+ static Bool
+-vfbCloseScreen(int index, ScreenPtr pScreen)
++vfbCloseScreen(ScreenPtr pScreen)
+ {
+- vfbScreenInfoPtr pvfb = &vfbScreens[index];
++ vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum];
+ int i;
+
+ pScreen->CloseScreen = pvfb->closeScreen;
+@@ -1149,13 +1149,13 @@ vfbCloseScreen(int index, ScreenPtr pScr
+ for (i = 0; i < MAXSCREENS; i++)
+ InstalledMaps[i] = NULL;
+
+- return pScreen->CloseScreen(index, pScreen);
++ return pScreen->CloseScreen(pScreen);
+ }
+
+ static Bool
+-vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
++vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
+ {
+- vfbScreenInfoPtr pvfb = &vfbScreens[index];
++ vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum];
+ int dpi;
+ int ret;
+ void *pbits;
+@@ -1167,8 +1167,8 @@ vfbScreenInit(int index, ScreenPtr pScre
+
+ pbits = vfbAllocateFramebufferMemory(&pvfb->fb);
+ if (!pbits) return FALSE;
+- vncFbptr[index] = pbits;
+- vncFbstride[index] = pvfb->fb.paddedWidth;
++ vncFbptr[pScreen->myNum] = pbits;
++ vncFbstride[pScreen->myNum] = pvfb->fb.paddedWidth;
+
+ miSetPixmapDepths();
+
+diff -up xserver/include/screenint.h.xorg113 xserver/include/screenint.h
+--- xserver/include/screenint.h.xorg113 2012-07-19 21:30:38.258557709 -0400
++++ xserver/include/screenint.h 2012-07-19 21:30:45.415468235 -0400
+@@ -72,18 +72,18 @@ extern _X_EXPORT int AddGPUScreen(Bool (
+ extern _X_EXPORT void RemoveGPUScreen(ScreenPtr pScreen);
+
+ extern _X_EXPORT void
+-AttachUnboundGPU(ScreenPtr pScreen, ScreenPtr new);
++AttachUnboundGPU(ScreenPtr pScreen, ScreenPtr);
+ extern _X_EXPORT void
+ DetachUnboundGPU(ScreenPtr unbound);
+
+ extern _X_EXPORT void
+-AttachOutputGPU(ScreenPtr pScreen, ScreenPtr new);
++AttachOutputGPU(ScreenPtr pScreen, ScreenPtr);
+
+ extern _X_EXPORT void
+ DetachOutputGPU(ScreenPtr output);
+
+ extern _X_EXPORT void
+-AttachOffloadGPU(ScreenPtr pScreen, ScreenPtr new);
++AttachOffloadGPU(ScreenPtr pScreen, ScreenPtr);
+
+ extern _X_EXPORT void
+ DetachOffloadGPU(ScreenPtr slave);
+
diff --git a/tigervnc/build/xorg_headers_fix_reservedwords.patch b/tigervnc/build/xorg_headers_fix_reservedwords.patch
new file mode 100644
index 00000000..5497052b
--- /dev/null
+++ b/tigervnc/build/xorg_headers_fix_reservedwords.patch
@@ -0,0 +1,25 @@
+--- tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am~ 2011-10-31 09:14:40.000000000 +0100
++++ tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am 2012-04-19 08:15:51.849379891 +0200
+@@ -63,7 +63,7 @@
+ BUILT_SOURCES = $(nodist_Xvnc_SOURCES)
+
+ fb.h: $(top_srcdir)/fb/fb.h
+- cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fb.h
++ cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,g' -e 's,xor,c_xor,g' > $(srcdir)/fb.h
+
+ pixman.h:
+ for i in ${XSERVERLIBS_CFLAGS}; do \
+@@ -72,10 +72,10 @@
+ fi; \
+ done; \
+ if [ ! "$$PIXMANINCDIR" = "" ]; then \
+- cat $$PIXMANINCDIR/pixman.h | sed 's/xor/c_xor/' > $(srcdir)/pixman.h; \
++ cat $$PIXMANINCDIR/pixman.h | sed 's/xor/c_xor/g' > $(srcdir)/pixman.h; \
+ else \
+ echo Pixman include directory not set in XSERVERLIBS_CFLAGS \(perhaps Pixman was not found by configure?\); \
+ fi
+
+ fbrop.h: $(top_srcdir)/fb/fbrop.h
+- cat $(top_srcdir)/fb/fbrop.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fbrop.h
++ cat $(top_srcdir)/fb/fbrop.h | sed -e 's,and,c_and,g' -e 's,xor,c_xor,g' > $(srcdir)/fbrop.h
+