diff --git a/0001-Check-harder-for-primary-PCI-device.patch b/0001-Check-harder-for-primary-PCI-device.patch index 49b89e4..4a19ee9 100644 --- a/0001-Check-harder-for-primary-PCI-device.patch +++ b/0001-Check-harder-for-primary-PCI-device.patch @@ -10,58 +10,61 @@ redo the check and also check if IO resoures are also enabled, if this still doesn't turn up a unique result also check for the presence of a BIOS rom. ================================================================================ ---- xorg-server-1.7.99/hw/xfree86/common/xf86pciBus.c -+++ xorg-server-1.7.99/hw/xfree86/common/xf86pciBus.c -@@ -140,9 +140,49 @@ - primaryBus.type = BUS_PCI; - primaryBus.id.pci = info; - } else { -- xf86Msg(X_NOTICE, -- "More than one possible primary device found\n"); -- primaryBus.type ^= (BusType)(-1); -+ /* -+ * Ok, we found more than one possible primary device with this heuristic -+ * Now also check if IO is enabled. -+ */ +Index: xorg-server-1.12.1/hw/xfree86/common/xf86pciBus.c +=================================================================== +--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86pciBus.c ++++ xorg-server-1.12.1/hw/xfree86/common/xf86pciBus.c +@@ -134,9 +134,50 @@ xf86PciProbe(void) + primaryBus.id.pci = info; + } + else { +- xf86Msg(X_NOTICE, +- "More than one possible primary device found\n"); +- primaryBus.type ^= (BusType) (-1); ++ /* ++ * Ok, we found more than one possible primary device with this heuristic ++ * Now also check if IO is enabled. ++ */ + int j; -+ -+ primaryBus.type = BUS_NONE; -+ for (j = 0; j < num; j++) { -+ info = xf86PciVideoInfo[j]; -+ pci_device_cfg_read_u16(info, & command, 4); + -+ if ((command & PCI_CMD_MEM_ENABLE) -+ && (command & PCI_CMD_IO_ENABLE) -+ && (IS_VGA(info->device_class))) { -+ if (primaryBus.type == BUS_NONE) { -+ primaryBus.type = BUS_PCI; -+ primaryBus.id.pci = info; -+ } else { -+ primaryBus.type = BUS_NONE; -+ for (j = 0; j < num; j++) { -+ info = xf86PciVideoInfo[j]; -+ pci_device_cfg_read_u16(info, & command, 4); -+ -+ if ((command & PCI_CMD_MEM_ENABLE) -+ && (command & PCI_CMD_IO_ENABLE) -+ && (IS_VGA(info->device_class)) -+ && info->rom_size) { -+ if (primaryBus.type == BUS_NONE) { -+ primaryBus.type = BUS_PCI; ++ primaryBus.type = BUS_NONE; ++ for (j = 0; j < num; j++) { ++ info = xf86PciVideoInfo[j]; ++ pci_device_cfg_read_u16(info, & command, 4); ++ ++ if ((command & PCI_CMD_MEM_ENABLE) ++ && (command & PCI_CMD_IO_ENABLE) ++ && (IS_VGA(info->device_class))) { ++ if (primaryBus.type == BUS_NONE) { ++ primaryBus.type = BUS_PCI; + primaryBus.id.pci = info; -+ } else { -+ xf86Msg(X_NOTICE, -+ "More than one possible primary device found\n"); -+ primaryBus.type ^= (BusType)(-1); ++ } else { ++ primaryBus.type = BUS_NONE; ++ for (j = 0; j < num; j++) { ++ info = xf86PciVideoInfo[j]; ++ pci_device_cfg_read_u16(info, & command, 4); ++ ++ if ((command & PCI_CMD_MEM_ENABLE) ++ && (command & PCI_CMD_IO_ENABLE) ++ && (IS_VGA(info->device_class)) ++ && info->rom_size) { ++ if (primaryBus.type == BUS_NONE) { ++ primaryBus.type = BUS_PCI; ++ primaryBus.id.pci = info; ++ } else { ++ xf86Msg(X_NOTICE, ++ "More than one possible primary device found\n"); ++ primaryBus.type ^= (BusType)(-1); ++ break; ++ } ++ } ++ } + break; -+ } + } -+ } -+ break; + } -+ } + } + break; - } - } - } ++ + } + } + } diff --git a/0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch b/0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch index 57c84ad..8866d04 100644 --- a/0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch +++ b/0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch @@ -1,10 +1,12 @@ ---- xorg-server-1.9.0/mi/misprite.c.orig 2010-07-23 21:40:56.000000000 +0200 -+++ xorg-server-1.9.0/mi/misprite.c 2010-08-23 15:44:51.000000000 +0200 -@@ -384,6 +384,7 @@ miSpriteCloseScreen (int i, ScreenPtr pS +Index: xorg-server-1.12.1/mi/misprite.c +=================================================================== +--- xorg-server-1.12.1.orig/mi/misprite.c ++++ xorg-server-1.12.1/mi/misprite.c +@@ -378,6 +378,7 @@ miSpriteCloseScreen(int i, ScreenPtr pSc pScreen->InstallColormap = pScreenPriv->InstallColormap; pScreen->StoreColors = pScreenPriv->StoreColors; + miSpriteDisableDamage(pScreen, pScreenPriv); - DamageDestroy (pScreenPriv->pDamage); + DamageDestroy(pScreenPriv->pDamage); free(pScreenPriv); diff --git a/N-VNC-Add-proto.diff b/N-VNC-Add-proto.diff new file mode 100644 index 0000000..68acf24 --- /dev/null +++ b/N-VNC-Add-proto.diff @@ -0,0 +1,27 @@ +From: Mike Gorse +Date: Wed Apr 18 22:52:23 UTC 2012 +Subject: [PATCH] VNC: Add a missing prototype +Patch-Mainline: Currently no upstream project. +--- +diff -ur xorg-server-1.12.1.orig/hw/vnc/rfbkeyb.c xorg-server-1.12.1/hw/vnc/rfbkeyb.c +--- xorg-server-1.12.1.orig/hw/vnc/rfbkeyb.c 2012-04-18 17:38:08.302219053 -0500 ++++ xorg-server-1.12.1/hw/vnc/rfbkeyb.c 2012-04-18 16:44:12.873667473 -0500 +@@ -44,6 +44,7 @@ + #endif + #else + #include ++#include + #include + #endif + #include "rfb.h" +diff -ur xorg-server-1.12.1.orig/hw/vnc/rfbmouse.c xorg-server-1.12.1/hw/vnc/rfbmouse.c +--- xorg-server-1.12.1.orig/hw/vnc/rfbmouse.c 2012-04-18 17:38:08.302219053 -0500 ++++ xorg-server-1.12.1/hw/vnc/rfbmouse.c 2012-04-18 16:43:28.843217928 -0500 +@@ -46,6 +46,7 @@ + + #else + #include ++#include + #include + #endif + #include "rfb.h" diff --git a/N-VNC-Add-support-for-VNC.patch b/N-VNC-Add-support-for-VNC.patch index 9827d3b..731b7f2 100644 --- a/N-VNC-Add-support-for-VNC.patch +++ b/N-VNC-Add-support-for-VNC.patch @@ -9,158 +9,13 @@ This is based upon http://people.freedesktop.org/~dbn/xorg-server-xf4vnc.patch but has been modified heavily to apply and compile with 10.3. Signed-off-by: Egbert Eich ---- - Makefile.am | 5 + - configure.ac | 54 + - hw/Makefile.am | 7 +- - hw/dmx/Makefile.am | 12 +- - hw/dmx/dmxinit.c | 7 + - hw/dmx/dmxsync.c | 7 + - hw/dmx/dmxvnc.h | 9 + - hw/dmx/input/dmxinputinit.c | 12 +- - hw/dmx/input/dmxinputinit.h | 5 + - hw/dmx/vnc/.gitignore | 36 + - hw/dmx/vnc/Makefile.am | 43 + - hw/dmx/vnc/vncInit.c | 441 ++++++++ - hw/dmx/vnc/vncint.h | 150 +++ - hw/vnc/LICENCE.TXT | 340 ++++++ - hw/vnc/Makefile.am | 55 + - hw/vnc/README | 14 + - hw/vnc/auth.c | 554 ++++++++++ - hw/vnc/cmap.c | 159 +++ - hw/vnc/corre.c | 343 ++++++ - hw/vnc/cursor.c | 398 +++++++ - hw/vnc/cutpaste.c | 86 ++ - hw/vnc/d3des.c | 428 ++++++++ - hw/vnc/d3des.h | 51 + - hw/vnc/dispcur.c | 784 ++++++++++++++ - hw/vnc/dpmsstubs.c | 52 + - hw/vnc/draw.c | 1942 ++++++++++++++++++++++++++++++++++ - hw/vnc/hextile.c | 341 ++++++ - hw/vnc/httpd.c | 519 +++++++++ - hw/vnc/init.c | 1054 +++++++++++++++++++ - hw/vnc/kbdptr.c | 616 +++++++++++ - hw/vnc/keyboard.h | 34 + - hw/vnc/loginauth.c | 142 +++ - hw/vnc/rdp.c | 145 +++ - hw/vnc/rfb.h | 747 +++++++++++++ - hw/vnc/rfbkeyb.c | 519 +++++++++ - hw/vnc/rfbmouse.c | 260 +++++ - hw/vnc/rfbproto.h | 1362 ++++++++++++++++++++++++ - hw/vnc/rfbserver.c | 2269 ++++++++++++++++++++++++++++++++++++++++ - hw/vnc/rre.c | 317 ++++++ - hw/vnc/sockets.c | 648 ++++++++++++ - hw/vnc/sprite.c | 2088 ++++++++++++++++++++++++++++++++++++ - hw/vnc/sprite.h | 131 +++ - hw/vnc/spritest.h | 134 +++ - hw/vnc/stats.c | 117 ++ - hw/vnc/symlink-vnc.sh | 198 ++++ - hw/vnc/tableinitcmtemplate.c | 95 ++ - hw/vnc/tableinittctemplate.c | 146 +++ - hw/vnc/tabletranstemplate.c | 135 +++ - hw/vnc/tight.c | 1774 +++++++++++++++++++++++++++++++ - hw/vnc/translate.c | 496 +++++++++ - hw/vnc/vncauth.c | 252 +++++ - hw/vnc/vncauth.h | 33 + - hw/vnc/vncext.c | 807 ++++++++++++++ - hw/vnc/xistubs.c | 312 ++++++ - hw/vnc/zlib.c | 308 ++++++ - hw/xfree86/Makefile.am | 5 + - hw/xfree86/dixmods/Makefile.am | 10 + - hw/xfree86/vnc/.gitignore | 36 + - hw/xfree86/vnc/Makefile.am | 51 + - hw/xfree86/vnc/README | 1 + - hw/xfree86/vnc/vncInit.c | 626 +++++++++++ - hw/xfree86/vnc/vncint.h | 148 +++ - mi/miinitext.c | 12 + - xcliplist/Makefile.am | 16 + - xcliplist/cliplist.c | 128 +++ - xcliplist/cliplistmod.c | 49 + - 66 files changed, 23072 insertions(+), 3 deletions(-) - create mode 100644 hw/dmx/dmxvnc.h - create mode 100644 hw/dmx/vnc/.gitignore - create mode 100644 hw/dmx/vnc/Makefile.am - create mode 100644 hw/dmx/vnc/vncInit.c - create mode 100644 hw/dmx/vnc/vncint.h - create mode 100644 hw/vnc/LICENCE.TXT - create mode 100644 hw/vnc/Makefile.am - create mode 100644 hw/vnc/README - create mode 100644 hw/vnc/auth.c - create mode 100644 hw/vnc/cmap.c - create mode 100644 hw/vnc/corre.c - create mode 100644 hw/vnc/cursor.c - create mode 100644 hw/vnc/cutpaste.c - create mode 100644 hw/vnc/d3des.c - create mode 100644 hw/vnc/d3des.h - create mode 100644 hw/vnc/dispcur.c - create mode 100644 hw/vnc/dpmsstubs.c - create mode 100644 hw/vnc/draw.c - create mode 100644 hw/vnc/hextile.c - create mode 100644 hw/vnc/httpd.c - create mode 100644 hw/vnc/init.c - create mode 100644 hw/vnc/kbdptr.c - create mode 100644 hw/vnc/keyboard.h - create mode 100644 hw/vnc/loginauth.c - create mode 100644 hw/vnc/rdp.c - create mode 100644 hw/vnc/rfb.h - create mode 100644 hw/vnc/rfbkeyb.c - create mode 100644 hw/vnc/rfbmouse.c - create mode 100644 hw/vnc/rfbproto.h - create mode 100644 hw/vnc/rfbserver.c - create mode 100644 hw/vnc/rre.c - create mode 100644 hw/vnc/sockets.c - create mode 100644 hw/vnc/sprite.c - create mode 100644 hw/vnc/sprite.h - create mode 100644 hw/vnc/spritest.h - create mode 100644 hw/vnc/stats.c - create mode 100644 hw/vnc/symlink-vnc.sh - create mode 100644 hw/vnc/tableinitcmtemplate.c - create mode 100644 hw/vnc/tableinittctemplate.c - create mode 100644 hw/vnc/tabletranstemplate.c - create mode 100644 hw/vnc/tight.c - create mode 100644 hw/vnc/translate.c - create mode 100644 hw/vnc/vncauth.c - create mode 100644 hw/vnc/vncauth.h - create mode 100644 hw/vnc/vncext.c - create mode 100644 hw/vnc/xistubs.c - create mode 100644 hw/vnc/zlib.c - create mode 100644 hw/xfree86/vnc/.gitignore - create mode 100644 hw/xfree86/vnc/Makefile.am - create mode 100644 hw/xfree86/vnc/README - create mode 100644 hw/xfree86/vnc/vncInit.c - create mode 100644 hw/xfree86/vnc/vncint.h - create mode 100644 xcliplist/Makefile.am - create mode 100644 xcliplist/cliplist.c - create mode 100644 xcliplist/cliplistmod.c -diff --git a/Makefile.am b/Makefile.am -index 62c8d95..69b8d22 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -17,6 +17,10 @@ if RECORD - RECORD_DIR=record - endif - -+if XCLIPLIST -+XCLIPLIST_DIR=xcliplist -+endif -+ - SUBDIRS = \ - doc \ - include \ -@@ -36,6 +40,7 @@ SUBDIRS = \ - damageext \ - $(COMPOSITE_DIR) \ - $(GLX_DIR) \ -+ $(XCLIPLIST_DIR) \ - exa \ - config \ - hw \ -diff --git a/configure.ac b/configure.ac -index 781a6b0..7e708c3 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -647,6 +647,8 @@ AC_ARG_ENABLE(libdrm, AS_HELP_STRING([--enable-libdrm], [Build Xorg with +Adapted for 1.12.1 by Mike Gorse +--- +diff -pruN xorg-server-1.12.1.orig/configure.ac xorg-server-1.12.1/configure.ac +--- xorg-server-1.12.1.orig/configure.ac 2012-04-13 17:44:02.000000000 -0500 ++++ xorg-server-1.12.1/configure.ac 2012-04-18 14:45:21.568821053 -0500 +@@ -629,6 +629,8 @@ AC_ARG_ENABLE(pciaccess, AS_HELP_STRING( dnl DDXes. AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto]) @@ -169,7 +24,7 @@ index 781a6b0..7e708c3 100644 AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: auto)]), [DMX=$enableval], [DMX=auto]) AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes]) AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto]) -@@ -1160,6 +1162,20 @@ AM_CONDITIONAL(VGAHW, test "x$VGAHW" = xyes) +@@ -1191,6 +1193,20 @@ AM_CONDITIONAL(VGAHW, test "x$VGAHW" = x AM_CONDITIONAL(VBE, test "x$VBE" = xyes) AM_CONDITIONAL(INT10MODULE, test "x$INT10MODULE" = xyes) @@ -190,7 +45,7 @@ index 781a6b0..7e708c3 100644 AC_DEFINE(SHAPE, 1, [Support SHAPE extension]) AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBPATH, [Path to XKB data]) -@@ -1500,6 +1516,40 @@ dnl --------------------------------------------------------------------------- +@@ -1480,6 +1496,40 @@ dnl ------------------------------------ dnl DDX section. dnl --------------------------------------------------------------------------- @@ -231,7 +86,7 @@ index 781a6b0..7e708c3 100644 dnl Xvfb DDX AC_MSG_CHECKING([whether to build Xvfb DDX]) -@@ -2209,6 +2259,7 @@ Xext/Makefile +@@ -2159,6 +2209,7 @@ Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile @@ -239,7 +94,7 @@ index 781a6b0..7e708c3 100644 hw/Makefile hw/xfree86/Makefile hw/xfree86/common/Makefile -@@ -2242,6 +2293,7 @@ hw/xfree86/ramdac/Makefile +@@ -2191,6 +2242,7 @@ hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile @@ -247,7 +102,7 @@ index 781a6b0..7e708c3 100644 hw/xfree86/x86emu/Makefile hw/xfree86/xaa/Makefile hw/xfree86/utils/Makefile -@@ -2257,6 +2309,8 @@ hw/dmx/input/Makefile +@@ -2207,6 +2259,8 @@ hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/dmx/man/Makefile @@ -256,40 +111,117 @@ index 781a6b0..7e708c3 100644 hw/vfb/Makefile hw/vfb/man/Makefile hw/xnest/Makefile -diff --git a/hw/Makefile.am b/hw/Makefile.am -index 6c2cc6b..6c98f21 100644 ---- a/hw/Makefile.am -+++ b/hw/Makefile.am -@@ -22,6 +22,10 @@ if KDRIVE - KDRIVE_SUBDIRS = kdrive - endif +diff -pruN xorg-server-1.12.1.orig/hw/dmx/dmxinit.c xorg-server-1.12.1/hw/dmx/dmxinit.c +--- xorg-server-1.12.1.orig/hw/dmx/dmxinit.c 2012-03-30 22:04:18.000000000 -0500 ++++ xorg-server-1.12.1/hw/dmx/dmxinit.c 2012-04-18 14:45:21.569821040 -0500 +@@ -72,6 +72,10 @@ + #include + #endif /* GLXEXT */ -+if VNC -+VNC_SUBDIRS = vnc -+endif ++#ifdef DMXVNC ++extern void VNCInitForDMX(void); ++#endif + - if XQUARTZ - XQUARTZ_SUBDIRS = xquartz - endif -@@ -32,10 +36,11 @@ SUBDIRS = \ - $(XVFB_SUBDIRS) \ - $(XNEST_SUBDIRS) \ - $(DMX_SUBDIRS) \ -+ $(VNC_SUBDIRS) \ - $(KDRIVE_SUBDIRS) \ - $(XQUARTZ_SUBDIRS) + /* Global variables available to all Xserver/hw/dmx routines. */ + int dmxNumScreens; + DMXScreenInfo *dmxScreens; +@@ -837,6 +841,9 @@ InitOutput(ScreenInfo * pScreenInfo, int --DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive -+DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive vnc + dmxLog(dmxInfo, "Shadow framebuffer support %s\n", + dmxShadowFB ? "enabled" : "disabled"); ++#ifdef DMXVNC ++ VNCInitForDMX(); ++#endif + } - relink: - $(AM_V_at)for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink || exit 1 ; done -diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am -index e0b201b..4def812 100644 ---- a/hw/dmx/Makefile.am -+++ b/hw/dmx/Makefile.am + /* RATS: Assuming the fp string (which comes from the command-line argv +diff -pruN xorg-server-1.12.1.orig/hw/dmx/dmxsync.c xorg-server-1.12.1/hw/dmx/dmxsync.c +--- xorg-server-1.12.1.orig/hw/dmx/dmxsync.c 2012-03-29 21:57:25.000000000 -0500 ++++ xorg-server-1.12.1/hw/dmx/dmxsync.c 2012-04-18 14:45:21.569821040 -0500 +@@ -104,9 +104,16 @@ dmxSyncBlockHandler(pointer blockData, O + TimerForce(dmxSyncTimer); + } + ++#ifdef DMXVNC ++extern void rfbWakeupHandlerDMX(void); ++#endif ++ + static void + dmxSyncWakeupHandler(pointer blockData, int result, pointer pReadMask) + { ++#ifdef DMXVNC ++ rfbWakeupHandlerDMX(); ++#endif + } + + /** Request the XSync() batching optimization with the specified \a +diff -pruN xorg-server-1.12.1.orig/hw/dmx/dmxvnc.h xorg-server-1.12.1/hw/dmx/dmxvnc.h +--- xorg-server-1.12.1.orig/hw/dmx/dmxvnc.h 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/dmx/dmxvnc.h 2012-04-18 14:45:21.569821040 -0500 +@@ -0,0 +1,9 @@ ++#ifndef _DMX_VNC_H_ ++# define _DMX_VNC_H_ ++ ++int ChangePointerDevice (DeviceIntPtr old_dev, DeviceIntPtr new_dev, ++ unsigned char x, unsigned char y); ++ ++int ChangeKeyboardDevice (DeviceIntPtr old_dev, DeviceIntPtr new_dev); ++ ++#endif +diff -pruN xorg-server-1.12.1.orig/hw/dmx/input/dmxinputinit.c xorg-server-1.12.1/hw/dmx/input/dmxinputinit.c +--- xorg-server-1.12.1.orig/hw/dmx/input/dmxinputinit.c 2012-03-29 21:57:25.000000000 -0500 ++++ xorg-server-1.12.1/hw/dmx/input/dmxinputinit.c 2012-04-18 14:45:21.570821028 -0500 +@@ -376,6 +376,11 @@ static int + dmxKeyboardOn(DeviceIntPtr pDevice, DMXLocalInitInfo * info) + { + GETDMXINPUTFROMPDEVICE; ++ ++#ifdef DMXVNC ++ vncSetKeyboardDevice(pDevice); ++#endif ++ + XkbRMLVOSet rmlvo; + + rmlvo.rules = dmxConfigGetXkbRules(); +@@ -456,7 +461,9 @@ dmxDeviceOnOff(DeviceIntPtr pDevice, int + } + if (info.keyClass) { + XkbRMLVOSet rmlvo; +- ++#ifdef DMXVNC ++ vncSetKeyboardDevice(pDevice); ++#endif + rmlvo.rules = dmxConfigGetXkbRules(); + rmlvo.model = dmxConfigGetXkbModel(); + rmlvo.layout = dmxConfigGetXkbLayout(); +@@ -505,6 +512,9 @@ dmxDeviceOnOff(DeviceIntPtr pDevice, int + info.res[i], info.minres[i], + info.maxres[i], Absolute); + } ++#ifdef DMXVNC ++ vncSetPointerDevice(pDevice); ++#endif + } + if (info.focusClass) + InitFocusClassDeviceStruct(pDevice); +diff -pruN xorg-server-1.12.1.orig/hw/dmx/input/dmxinputinit.h xorg-server-1.12.1/hw/dmx/input/dmxinputinit.h +--- xorg-server-1.12.1.orig/hw/dmx/input/dmxinputinit.h 2012-03-29 21:57:25.000000000 -0500 ++++ xorg-server-1.12.1/hw/dmx/input/dmxinputinit.h 2012-04-18 14:45:21.570821028 -0500 +@@ -281,4 +281,9 @@ extern DMXInputInfo *dmxInputLocateId(in + extern int dmxInputAttachConsole(const char *name, int isCore, int *id); + extern int dmxInputAttachBackend(int physicalScreen, int isCore, int *id); + ++#ifdef DMXVNC ++extern void vncSetKeyboardDevice(DeviceIntPtr kbd); ++extern void vncSetPointerDevice(DeviceIntPtr ptr); ++#endif ++ + #endif +diff -pruN xorg-server-1.12.1.orig/hw/dmx/Makefile.am xorg-server-1.12.1/hw/dmx/Makefile.am +--- xorg-server-1.12.1.orig/hw/dmx/Makefile.am 2011-09-22 20:39:53.000000000 -0500 ++++ xorg-server-1.12.1/hw/dmx/Makefile.am 2012-04-18 14:45:21.570821028 -0500 @@ -2,6 +2,16 @@ - SUBDIRS = input config examples doc man + SUBDIRS = input config examples doc doxygen man bin_PROGRAMS = Xdmx +if VNC @@ -314,123 +246,9 @@ index e0b201b..4def812 100644 relink: $(AM_V_at)rm -f Xdmx$(EXEEXT) && $(MAKE) Xdmx$(EXEEXT) -diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c -index 74b3582..a0c9511 100644 ---- a/hw/dmx/dmxinit.c -+++ b/hw/dmx/dmxinit.c -@@ -71,6 +71,10 @@ - #include - #endif /* GLXEXT */ - -+#ifdef DMXVNC -+extern void VNCInitForDMX(void); -+#endif -+ - /* Global variables available to all Xserver/hw/dmx routines. */ - int dmxNumScreens; - DMXScreenInfo *dmxScreens; -@@ -794,6 +798,9 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[]) - - dmxLog(dmxInfo, "Shadow framebuffer support %s\n", - dmxShadowFB ? "enabled" : "disabled"); -+#ifdef DMXVNC -+ VNCInitForDMX(); -+#endif - } - - /* RATS: Assuming the fp string (which comes from the command-line argv -diff --git a/hw/dmx/dmxsync.c b/hw/dmx/dmxsync.c -index 2c7ccb8..b6c3ebe 100644 ---- a/hw/dmx/dmxsync.c -+++ b/hw/dmx/dmxsync.c -@@ -99,9 +99,16 @@ static void dmxSyncBlockHandler(pointer blockData, OSTimePtr pTimeout, - TimerForce(dmxSyncTimer); - } - -+#ifdef DMXVNC -+extern void rfbWakeupHandlerDMX(void); -+#endif -+ - static void dmxSyncWakeupHandler(pointer blockData, int result, - pointer pReadMask) - { -+#ifdef DMXVNC -+ rfbWakeupHandlerDMX(); -+#endif - } - - /** Request the XSync() batching optimization with the specified \a -diff --git a/hw/dmx/dmxvnc.h b/hw/dmx/dmxvnc.h -new file mode 100644 -index 0000000..cde7895 ---- /dev/null -+++ b/hw/dmx/dmxvnc.h -@@ -0,0 +1,9 @@ -+#ifndef _DMX_VNC_H_ -+# define _DMX_VNC_H_ -+ -+int ChangePointerDevice (DeviceIntPtr old_dev, DeviceIntPtr new_dev, -+ unsigned char x, unsigned char y); -+ -+int ChangeKeyboardDevice (DeviceIntPtr old_dev, DeviceIntPtr new_dev); -+ -+#endif -diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c -index 5cbd620..47dcd17 100644 ---- a/hw/dmx/input/dmxinputinit.c -+++ b/hw/dmx/input/dmxinputinit.c -@@ -364,6 +364,11 @@ static void dmxKeyboardFreeNames(XkbComponentNamesPtr names) - static int dmxKeyboardOn(DeviceIntPtr pDevice, DMXLocalInitInfo *info) - { - GETDMXINPUTFROMPDEVICE; -+ -+#ifdef DMXVNC -+ vncSetKeyboardDevice(pDevice); -+#endif -+ - XkbRMLVOSet rmlvo; - - rmlvo.rules = dmxConfigGetXkbRules(); -@@ -443,7 +448,9 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) - } - if (info.keyClass) { - XkbRMLVOSet rmlvo; -- -+#ifdef DMXVNC -+ vncSetKeyboardDevice(pDevice); -+#endif - rmlvo.rules = dmxConfigGetXkbRules(); - rmlvo.model = dmxConfigGetXkbModel(); - rmlvo.layout = dmxConfigGetXkbLayout(); -@@ -493,6 +500,9 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) - info.res[i], info.minres[i], - info.maxres[i], Absolute); - } -+#ifdef DMXVNC -+ vncSetPointerDevice(pDevice); -+#endif - } - if (info.focusClass) InitFocusClassDeviceStruct(pDevice); - if (info.proximityClass) InitProximityClassDeviceStruct(pDevice); -diff --git a/hw/dmx/input/dmxinputinit.h b/hw/dmx/input/dmxinputinit.h -index 5a4a410..8ec7501 100644 ---- a/hw/dmx/input/dmxinputinit.h -+++ b/hw/dmx/input/dmxinputinit.h -@@ -288,4 +288,9 @@ extern int dmxInputAttachConsole(const char *name, int isCore, - extern int dmxInputAttachBackend(int physicalScreen, int isCore, - int *id); - -+#ifdef DMXVNC -+extern void vncSetKeyboardDevice(DeviceIntPtr kbd); -+extern void vncSetPointerDevice(DeviceIntPtr ptr); -+#endif -+ - #endif -diff --git a/hw/dmx/vnc/.gitignore b/hw/dmx/vnc/.gitignore -new file mode 100644 -index 0000000..d14621f ---- /dev/null -+++ b/hw/dmx/vnc/.gitignore +diff -pruN xorg-server-1.12.1.orig/hw/dmx/vnc/.gitignore xorg-server-1.12.1/hw/dmx/vnc/.gitignore +--- xorg-server-1.12.1.orig/hw/dmx/vnc/.gitignore 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/dmx/vnc/.gitignore 2012-04-18 14:45:21.570821028 -0500 @@ -0,0 +1,36 @@ +auth.c +cmap.c @@ -468,11 +286,9 @@ index 0000000..d14621f +vncext.c +xistubs.c +zlib.c -diff --git a/hw/dmx/vnc/Makefile.am b/hw/dmx/vnc/Makefile.am -new file mode 100644 -index 0000000..48c07bd ---- /dev/null -+++ b/hw/dmx/vnc/Makefile.am +diff -pruN xorg-server-1.12.1.orig/hw/dmx/vnc/Makefile.am xorg-server-1.12.1/hw/dmx/vnc/Makefile.am +--- xorg-server-1.12.1.orig/hw/dmx/vnc/Makefile.am 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/dmx/vnc/Makefile.am 2012-04-18 14:45:21.570821028 -0500 @@ -0,0 +1,43 @@ +noinst_LIBRARIES = libdmxvnc.a + @@ -517,11 +333,9 @@ index 0000000..48c07bd + @DMXMODULES_CFLAGS@ + +###EXTRA_DIST = dmxdetach.c -diff --git a/hw/dmx/vnc/vncInit.c b/hw/dmx/vnc/vncInit.c -new file mode 100644 -index 0000000..81b6a18 ---- /dev/null -+++ b/hw/dmx/vnc/vncInit.c +diff -pruN xorg-server-1.12.1.orig/hw/dmx/vnc/vncInit.c xorg-server-1.12.1/hw/dmx/vnc/vncInit.c +--- xorg-server-1.12.1.orig/hw/dmx/vnc/vncInit.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/dmx/vnc/vncInit.c 2012-04-18 14:45:21.571821016 -0500 @@ -0,0 +1,441 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. @@ -964,11 +778,9 @@ index 0000000..81b6a18 + rfbCheckFds(pScreen); + httpCheckFds(pScreen); +} -diff --git a/hw/dmx/vnc/vncint.h b/hw/dmx/vnc/vncint.h -new file mode 100644 -index 0000000..6b6cd91 ---- /dev/null -+++ b/hw/dmx/vnc/vncint.h +diff -pruN xorg-server-1.12.1.orig/hw/dmx/vnc/vncint.h xorg-server-1.12.1/hw/dmx/vnc/vncint.h +--- xorg-server-1.12.1.orig/hw/dmx/vnc/vncint.h 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/dmx/vnc/vncint.h 2012-04-18 14:45:21.571821016 -0500 @@ -0,0 +1,150 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. @@ -1120,438 +932,41 @@ index 0000000..6b6cd91 + +#endif /* _VNCINT_H_ */ + -diff --git a/hw/vnc/LICENCE.TXT b/hw/vnc/LICENCE.TXT -new file mode 100644 -index 0000000..ae3b531 ---- /dev/null -+++ b/hw/vnc/LICENCE.TXT -@@ -0,0 +1,340 @@ -+ GNU GENERAL PUBLIC LICENSE -+ Version 2, June 1991 -+ -+ Copyright (C) 1989, 1991 Free Software Foundation, Inc. -+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA -+ Everyone is permitted to copy and distribute verbatim copies -+ of this license document, but changing it is not allowed. -+ -+ Preamble -+ -+ The licenses for most software are designed to take away your -+freedom to share and change it. By contrast, the GNU General Public -+License is intended to guarantee your freedom to share and change free -+software--to make sure the software is free for all its users. This -+General Public License applies to most of the Free Software -+Foundation's software and to any other program whose authors commit to -+using it. (Some other Free Software Foundation software is covered by -+the GNU Library General Public License instead.) You can apply it to -+your programs, too. -+ -+ When we speak of free software, we are referring to freedom, not -+price. Our General Public Licenses are designed to make sure that you -+have the freedom to distribute copies of free software (and charge for -+this service if you wish), that you receive source code or can get it -+if you want it, that you can change the software or use pieces of it -+in new free programs; and that you know you can do these things. -+ -+ To protect your rights, we need to make restrictions that forbid -+anyone to deny you these rights or to ask you to surrender the rights. -+These restrictions translate to certain responsibilities for you if you -+distribute copies of the software, or if you modify it. -+ -+ For example, if you distribute copies of such a program, whether -+gratis or for a fee, you must give the recipients all the rights that -+you have. You must make sure that they, too, receive or can get the -+source code. And you must show them these terms so they know their -+rights. -+ -+ We protect your rights with two steps: (1) copyright the software, and -+(2) offer you this license which gives you legal permission to copy, -+distribute and/or modify the software. -+ -+ Also, for each author's protection and ours, we want to make certain -+that everyone understands that there is no warranty for this free -+software. If the software is modified by someone else and passed on, we -+want its recipients to know that what they have is not the original, so -+that any problems introduced by others will not reflect on the original -+authors' reputations. -+ -+ Finally, any free program is threatened constantly by software -+patents. We wish to avoid the danger that redistributors of a free -+program will individually obtain patent licenses, in effect making the -+program proprietary. To prevent this, we have made it clear that any -+patent must be licensed for everyone's free use or not licensed at all. -+ -+ The precise terms and conditions for copying, distribution and -+modification follow. -+ -+ GNU GENERAL PUBLIC LICENSE -+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -+ -+ 0. This License applies to any program or other work which contains -+a notice placed by the copyright holder saying it may be distributed -+under the terms of this General Public License. The "Program", below, -+refers to any such program or work, and a "work based on the Program" -+means either the Program or any derivative work under copyright law: -+that is to say, a work containing the Program or a portion of it, -+either verbatim or with modifications and/or translated into another -+language. (Hereinafter, translation is included without limitation in -+the term "modification".) Each licensee is addressed as "you". -+ -+Activities other than copying, distribution and modification are not -+covered by this License; they are outside its scope. The act of -+running the Program is not restricted, and the output from the Program -+is covered only if its contents constitute a work based on the -+Program (independent of having been made by running the Program). -+Whether that is true depends on what the Program does. -+ -+ 1. You may copy and distribute verbatim copies of the Program's -+source code as you receive it, in any medium, provided that you -+conspicuously and appropriately publish on each copy an appropriate -+copyright notice and disclaimer of warranty; keep intact all the -+notices that refer to this License and to the absence of any warranty; -+and give any other recipients of the Program a copy of this License -+along with the Program. -+ -+You may charge a fee for the physical act of transferring a copy, and -+you may at your option offer warranty protection in exchange for a fee. -+ -+ 2. You may modify your copy or copies of the Program or any portion -+of it, thus forming a work based on the Program, and copy and -+distribute such modifications or work under the terms of Section 1 -+above, provided that you also meet all of these conditions: -+ -+ a) You must cause the modified files to carry prominent notices -+ stating that you changed the files and the date of any change. -+ -+ b) You must cause any work that you distribute or publish, that in -+ whole or in part contains or is derived from the Program or any -+ part thereof, to be licensed as a whole at no charge to all third -+ parties under the terms of this License. -+ -+ c) If the modified program normally reads commands interactively -+ when run, you must cause it, when started running for such -+ interactive use in the most ordinary way, to print or display an -+ announcement including an appropriate copyright notice and a -+ notice that there is no warranty (or else, saying that you provide -+ a warranty) and that users may redistribute the program under -+ these conditions, and telling the user how to view a copy of this -+ License. (Exception: if the Program itself is interactive but -+ does not normally print such an announcement, your work based on -+ the Program is not required to print an announcement.) -+ -+These requirements apply to the modified work as a whole. If -+identifiable sections of that work are not derived from the Program, -+and can be reasonably considered independent and separate works in -+themselves, then this License, and its terms, do not apply to those -+sections when you distribute them as separate works. But when you -+distribute the same sections as part of a whole which is a work based -+on the Program, the distribution of the whole must be on the terms of -+this License, whose permissions for other licensees extend to the -+entire whole, and thus to each and every part regardless of who wrote it. -+ -+Thus, it is not the intent of this section to claim rights or contest -+your rights to work written entirely by you; rather, the intent is to -+exercise the right to control the distribution of derivative or -+collective works based on the Program. -+ -+In addition, mere aggregation of another work not based on the Program -+with the Program (or with a work based on the Program) on a volume of -+a storage or distribution medium does not bring the other work under -+the scope of this License. -+ -+ 3. You may copy and distribute the Program (or a work based on it, -+under Section 2) in object code or executable form under the terms of -+Sections 1 and 2 above provided that you also do one of the following: -+ -+ a) Accompany it with the complete corresponding machine-readable -+ source code, which must be distributed under the terms of Sections -+ 1 and 2 above on a medium customarily used for software interchange; or, -+ -+ b) Accompany it with a written offer, valid for at least three -+ years, to give any third party, for a charge no more than your -+ cost of physically performing source distribution, a complete -+ machine-readable copy of the corresponding source code, to be -+ distributed under the terms of Sections 1 and 2 above on a medium -+ customarily used for software interchange; or, -+ -+ c) Accompany it with the information you received as to the offer -+ to distribute corresponding source code. (This alternative is -+ allowed only for noncommercial distribution and only if you -+ received the program in object code or executable form with such -+ an offer, in accord with Subsection b above.) -+ -+The source code for a work means the preferred form of the work for -+making modifications to it. For an executable work, complete source -+code means all the source code for all modules it contains, plus any -+associated interface definition files, plus the scripts used to -+control compilation and installation of the executable. However, as a -+special exception, the source code distributed need not include -+anything that is normally distributed (in either source or binary -+form) with the major components (compiler, kernel, and so on) of the -+operating system on which the executable runs, unless that component -+itself accompanies the executable. -+ -+If distribution of executable or object code is made by offering -+access to copy from a designated place, then offering equivalent -+access to copy the source code from the same place counts as -+distribution of the source code, even though third parties are not -+compelled to copy the source along with the object code. -+ -+ 4. You may not copy, modify, sublicense, or distribute the Program -+except as expressly provided under this License. Any attempt -+otherwise to copy, modify, sublicense or distribute the Program is -+void, and will automatically terminate your rights under this License. -+However, parties who have received copies, or rights, from you under -+this License will not have their licenses terminated so long as such -+parties remain in full compliance. -+ -+ 5. You are not required to accept this License, since you have not -+signed it. However, nothing else grants you permission to modify or -+distribute the Program or its derivative works. These actions are -+prohibited by law if you do not accept this License. Therefore, by -+modifying or distributing the Program (or any work based on the -+Program), you indicate your acceptance of this License to do so, and -+all its terms and conditions for copying, distributing or modifying -+the Program or works based on it. -+ -+ 6. Each time you redistribute the Program (or any work based on the -+Program), the recipient automatically receives a license from the -+original licensor to copy, distribute or modify the Program subject to -+these terms and conditions. You may not impose any further -+restrictions on the recipients' exercise of the rights granted herein. -+You are not responsible for enforcing compliance by third parties to -+this License. -+ -+ 7. If, as a consequence of a court judgment or allegation of patent -+infringement or for any other reason (not limited to patent issues), -+conditions are imposed on you (whether by court order, agreement or -+otherwise) that contradict the conditions of this License, they do not -+excuse you from the conditions of this License. If you cannot -+distribute so as to satisfy simultaneously your obligations under this -+License and any other pertinent obligations, then as a consequence you -+may not distribute the Program at all. For example, if a patent -+license would not permit royalty-free redistribution of the Program by -+all those who receive copies directly or indirectly through you, then -+the only way you could satisfy both it and this License would be to -+refrain entirely from distribution of the Program. -+ -+If any portion of this section is held invalid or unenforceable under -+any particular circumstance, the balance of the section is intended to -+apply and the section as a whole is intended to apply in other -+circumstances. -+ -+It is not the purpose of this section to induce you to infringe any -+patents or other property right claims or to contest validity of any -+such claims; this section has the sole purpose of protecting the -+integrity of the free software distribution system, which is -+implemented by public license practices. Many people have made -+generous contributions to the wide range of software distributed -+through that system in reliance on consistent application of that -+system; it is up to the author/donor to decide if he or she is willing -+to distribute software through any other system and a licensee cannot -+impose that choice. -+ -+This section is intended to make thoroughly clear what is believed to -+be a consequence of the rest of this License. -+ -+ 8. If the distribution and/or use of the Program is restricted in -+certain countries either by patents or by copyrighted interfaces, the -+original copyright holder who places the Program under this License -+may add an explicit geographical distribution limitation excluding -+those countries, so that distribution is permitted only in or among -+countries not thus excluded. In such case, this License incorporates -+the limitation as if written in the body of this License. -+ -+ 9. The Free Software Foundation may publish revised and/or new versions -+of the General Public License from time to time. Such new versions will -+be similar in spirit to the present version, but may differ in detail to -+address new problems or concerns. -+ -+Each version is given a distinguishing version number. If the Program -+specifies a version number of this License which applies to it and "any -+later version", you have the option of following the terms and conditions -+either of that version or of any later version published by the Free -+Software Foundation. If the Program does not specify a version number of -+this License, you may choose any version ever published by the Free Software -+Foundation. -+ -+ 10. If you wish to incorporate parts of the Program into other free -+programs whose distribution conditions are different, write to the author -+to ask for permission. For software which is copyrighted by the Free -+Software Foundation, write to the Free Software Foundation; we sometimes -+make exceptions for this. Our decision will be guided by the two goals -+of preserving the free status of all derivatives of our free software and -+of promoting the sharing and reuse of software generally. -+ -+ NO WARRANTY -+ -+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -+REPAIR OR CORRECTION. -+ -+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -+POSSIBILITY OF SUCH DAMAGES. -+ -+ END OF TERMS AND CONDITIONS -+ -+ Appendix: How to Apply These Terms to Your New Programs -+ -+ If you develop a new program, and you want it to be of the greatest -+possible use to the public, the best way to achieve this is to make it -+free software which everyone can redistribute and change under these terms. -+ -+ To do so, attach the following notices to the program. It is safest -+to attach them to the start of each source file to most effectively -+convey the exclusion of warranty; and each file should have at least -+the "copyright" line and a pointer to where the full notice is found. -+ -+ -+ Copyright (C) 19yy -+ -+ This program 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; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+ USA. -+ -+Also add information on how to contact you by electronic and paper mail. -+ -+If the program is interactive, make it output a short notice like this -+when it starts in an interactive mode: -+ -+ Gnomovision version 69, Copyright (C) 19yy name of author -+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -+ This is free software, and you are welcome to redistribute it -+ under certain conditions; type `show c' for details. -+ -+The hypothetical commands `show w' and `show c' should show the appropriate -+parts of the General Public License. Of course, the commands you use may -+be called something other than `show w' and `show c'; they could even be -+mouse-clicks or menu items--whatever suits your program. -+ -+You should also get your employer (if you work as a programmer) or your -+school, if any, to sign a "copyright disclaimer" for the program, if -+necessary. Here is a sample; alter the names: -+ -+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program -+ `Gnomovision' (which makes passes at compilers) written by James Hacker. -+ -+ , 1 April 1989 -+ Ty Coon, President of Vice -+ -+This General Public License does not permit incorporating your program into -+proprietary programs. If your program is a subroutine library, you may -+consider it more useful to permit linking proprietary applications with the -+library. If this is what you want to do, use the GNU Library General -+Public License instead of this License. -diff --git a/hw/vnc/Makefile.am b/hw/vnc/Makefile.am -new file mode 100644 -index 0000000..36a88c6 ---- /dev/null -+++ b/hw/vnc/Makefile.am -@@ -0,0 +1,55 @@ -+# XXX This Makefile.am probably needs some work. -+ -+bin_PROGRAMS = Xvnc -+ -+Xvnc_SOURCES = \ -+ $(top_srcdir)/fb/fbcmap_mi.c \ -+ $(top_srcdir)/mi/miinitext.c \ -+ auth.c \ -+ cmap.c \ -+ corre.c \ -+ cursor.c \ -+ cutpaste.c \ -+ d3des.c \ -+ dispcur.c \ -+ dpmsstubs.c \ -+ draw.c \ -+ hextile.c \ -+ httpd.c \ -+ init.c \ -+ kbdptr.c \ -+ loginauth.c \ -+ rfbkeyb.c \ -+ rfbmouse.c \ -+ rfbserver.c \ -+ rre.c \ -+ sprite.c \ -+ sockets.c \ -+ stats.c \ -+ tight.c \ -+ translate.c \ -+ vncauth.c \ -+ vncext.c \ -+ xistubs.c \ -+ zlib.c -+ -+ -+JPEG_LIBS = -ljpeg -+CRYPT_LIBS = -lcrypt -+Z_LIBS = -lz -+ -+AM_CFLAGS = $(DIX_CFLAGS) $(XVNC_CFLAGS) -I$(top_srcdir)/hw/dmx/vnc -DCHROMIUM=1 -+ -+Xvnc_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -+Xvnc_LDADD = \ -+ $(XORG_CORE_LIBS) \ -+ $(XVNC_LIBS) \ -+ $(JPEG_LIBS) \ -+ $(CRYPT_LIBS) \ -+ $(XSERVER_SYS_LIBS) \ -+ $(VNCMODULES_LIBS) \ -+ $(Z_LIBS) -+ -+ -+relink: -+ rm -f Xvnc && $(MAKE) Xvnc -diff --git a/hw/vnc/README b/hw/vnc/README -new file mode 100644 -index 0000000..d65d560 ---- /dev/null -+++ b/hw/vnc/README -@@ -0,0 +1,14 @@ -+ -+This is the directory containing the code specific to the TightVNC X server (Xvnc). -+Note that within this directory the name RFB is still used instead of VNC. -+ -+NOTE: -+ -+The is the new XFree86 v4 architecture VNC server code. -+ -+Modified entirely by Alan Hourihane -+ -+For information please visit http://xf4vnc.sourceforge.net -+ -+Moved to X.org modular tree by Brian Paul. -+ -diff --git a/hw/vnc/auth.c b/hw/vnc/auth.c -new file mode 100644 -index 0000000..47a5a92 ---- /dev/null -+++ b/hw/vnc/auth.c +diff -pruN xorg-server-1.12.1.orig/hw/Makefile.am xorg-server-1.12.1/hw/Makefile.am +--- xorg-server-1.12.1.orig/hw/Makefile.am 2011-09-22 20:39:53.000000000 -0500 ++++ xorg-server-1.12.1/hw/Makefile.am 2012-04-18 14:45:21.571821016 -0500 +@@ -22,6 +22,10 @@ if KDRIVE + KDRIVE_SUBDIRS = kdrive + endif + ++if VNC ++VNC_SUBDIRS = vnc ++endif ++ + if XQUARTZ + XQUARTZ_SUBDIRS = xquartz + endif +@@ -32,10 +36,11 @@ SUBDIRS = \ + $(XVFB_SUBDIRS) \ + $(XNEST_SUBDIRS) \ + $(DMX_SUBDIRS) \ ++ $(VNC_SUBDIRS) \ + $(KDRIVE_SUBDIRS) \ + $(XQUARTZ_SUBDIRS) + +-DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive ++DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive vnc + + relink: + $(AM_V_at)for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink || exit 1 ; done +diff -pruN xorg-server-1.12.1.orig/hw/vnc/a xorg-server-1.12.1/hw/vnc/a +--- xorg-server-1.12.1.orig/hw/vnc/a 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/a 2012-04-18 16:12:11.152692289 -0500 +@@ -0,0 +1 @@ ++#include "extinit.h" /* needed for AssignTypeANdName */ +diff -pruN xorg-server-1.12.1.orig/hw/vnc/auth.c xorg-server-1.12.1/hw/vnc/auth.c +--- xorg-server-1.12.1.orig/hw/vnc/auth.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/auth.c 2012-04-18 14:45:21.571821016 -0500 @@ -0,0 +1,554 @@ +/* + * auth.c - deal with authentication. @@ -2107,11 +1522,9 @@ index 0000000..47a5a92 + return pVNC->rfbAuthTooManyTries; +} + -diff --git a/hw/vnc/cmap.c b/hw/vnc/cmap.c -new file mode 100644 -index 0000000..67a3812 ---- /dev/null -+++ b/hw/vnc/cmap.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/cmap.c xorg-server-1.12.1/hw/vnc/cmap.c +--- xorg-server-1.12.1.orig/hw/vnc/cmap.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/cmap.c 2012-04-18 14:45:21.572821004 -0500 @@ -0,0 +1,159 @@ +/* + * cmap.c @@ -2272,11 +1685,9 @@ index 0000000..67a3812 + pmap->pScreen->StoreColors = rfbStoreColors; +#endif +} -diff --git a/hw/vnc/corre.c b/hw/vnc/corre.c -new file mode 100644 -index 0000000..5f7f087 ---- /dev/null -+++ b/hw/vnc/corre.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/corre.c xorg-server-1.12.1/hw/vnc/corre.c +--- xorg-server-1.12.1.orig/hw/vnc/corre.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/corre.c 2012-04-18 14:45:21.572821004 -0500 @@ -0,0 +1,343 @@ +/* + * corre.c @@ -2621,11 +2032,9 @@ index 0000000..5f7f087 + + return maxclr; +} -diff --git a/hw/vnc/cursor.c b/hw/vnc/cursor.c -new file mode 100644 -index 0000000..2892393 ---- /dev/null -+++ b/hw/vnc/cursor.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/cursor.c xorg-server-1.12.1/hw/vnc/cursor.c +--- xorg-server-1.12.1.orig/hw/vnc/cursor.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/cursor.c 2012-04-18 14:45:21.572821004 -0500 @@ -0,0 +1,398 @@ +/* + * cursor.c - support for cursor shape updates. @@ -3025,11 +2434,9 @@ index 0000000..2892393 +DEFINE_RICH_ENCODE(16) +DEFINE_RICH_ENCODE(32) + -diff --git a/hw/vnc/cutpaste.c b/hw/vnc/cutpaste.c -new file mode 100644 -index 0000000..bdb0d44 ---- /dev/null -+++ b/hw/vnc/cutpaste.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/cutpaste.c xorg-server-1.12.1/hw/vnc/cutpaste.c +--- xorg-server-1.12.1.orig/hw/vnc/cutpaste.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/cutpaste.c 2012-04-18 14:45:21.572821004 -0500 @@ -0,0 +1,86 @@ +/* + * cutpaste.c - routines to deal with cut & paste buffers / selection. @@ -3117,11 +2524,9 @@ index 0000000..bdb0d44 + if (!inSetXCutText) + rfbSendServerCutText(str, len); +} -diff --git a/hw/vnc/d3des.c b/hw/vnc/d3des.c -new file mode 100644 -index 0000000..e9f57ca ---- /dev/null -+++ b/hw/vnc/d3des.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/d3des.c xorg-server-1.12.1/hw/vnc/d3des.c +--- xorg-server-1.12.1.orig/hw/vnc/d3des.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/d3des.c 2012-04-18 14:45:21.573820992 -0500 @@ -0,0 +1,428 @@ +/* + * This is D3DES (V5.09) by Richard Outerbridge with the double and @@ -3551,11 +2956,9 @@ index 0000000..e9f57ca + * + * d3des V5.0a rwo 9208.07 18:44 Graven Imagery + **********************************************************************/ -diff --git a/hw/vnc/d3des.h b/hw/vnc/d3des.h -new file mode 100644 -index 0000000..ea3da44 ---- /dev/null -+++ b/hw/vnc/d3des.h +diff -pruN xorg-server-1.12.1.orig/hw/vnc/d3des.h xorg-server-1.12.1/hw/vnc/d3des.h +--- xorg-server-1.12.1.orig/hw/vnc/d3des.h 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/d3des.h 2012-04-18 14:45:21.573820992 -0500 @@ -0,0 +1,51 @@ +/* + * This is D3DES (V5.09) by Richard Outerbridge with the double and @@ -3608,11 +3011,9 @@ index 0000000..ea3da44 + +/* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery + ********************************************************************/ -diff --git a/hw/vnc/dispcur.c b/hw/vnc/dispcur.c -new file mode 100644 -index 0000000..96d4137 ---- /dev/null -+++ b/hw/vnc/dispcur.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/dispcur.c xorg-server-1.12.1/hw/vnc/dispcur.c +--- xorg-server-1.12.1.orig/hw/vnc/dispcur.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/dispcur.c 2012-04-18 14:45:21.573820992 -0500 @@ -0,0 +1,784 @@ +/* + * dispcur.c @@ -4398,11 +3799,9 @@ index 0000000..96d4137 + 0, 0, w, h, x, y); + return TRUE; +} -diff --git a/hw/vnc/dpmsstubs.c b/hw/vnc/dpmsstubs.c -new file mode 100644 -index 0000000..ae32324 ---- /dev/null -+++ b/hw/vnc/dpmsstubs.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/dpmsstubs.c xorg-server-1.12.1/hw/vnc/dpmsstubs.c +--- xorg-server-1.12.1.orig/hw/vnc/dpmsstubs.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/dpmsstubs.c 2012-04-18 14:45:21.574820980 -0500 @@ -0,0 +1,52 @@ +/* $Xorg: dpmsstubs.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */ +/***************************************************************** @@ -4456,11 +3855,9 @@ index 0000000..ae32324 +{ + return FALSE; +} -diff --git a/hw/vnc/draw.c b/hw/vnc/draw.c -new file mode 100644 -index 0000000..5269c0f ---- /dev/null -+++ b/hw/vnc/draw.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/draw.c xorg-server-1.12.1/hw/vnc/draw.c +--- xorg-server-1.12.1.orig/hw/vnc/draw.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/draw.c 2012-04-18 14:45:21.575820967 -0500 @@ -0,0 +1,1942 @@ +/* + * draw.c - drawing routines for the RFB X server. This is a set of @@ -6404,11 +5801,9 @@ index 0000000..5269c0f + VNCSCREENPTR(pScreen); + SCHEDULE_FB_UPDATE(pScreen, pVNC); +} -diff --git a/hw/vnc/hextile.c b/hw/vnc/hextile.c -new file mode 100644 -index 0000000..9e92c42 ---- /dev/null -+++ b/hw/vnc/hextile.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/hextile.c xorg-server-1.12.1/hw/vnc/hextile.c +--- xorg-server-1.12.1.orig/hw/vnc/hextile.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/hextile.c 2012-04-18 14:45:21.575820967 -0500 @@ -0,0 +1,341 @@ +/* + * hextile.c @@ -6751,11 +6146,9 @@ index 0000000..9e92c42 +DEFINE_SEND_HEXTILES(8) +DEFINE_SEND_HEXTILES(16) +DEFINE_SEND_HEXTILES(32) -diff --git a/hw/vnc/httpd.c b/hw/vnc/httpd.c -new file mode 100644 -index 0000000..5f56ad6 ---- /dev/null -+++ b/hw/vnc/httpd.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/httpd.c xorg-server-1.12.1/hw/vnc/httpd.c +--- xorg-server-1.12.1.orig/hw/vnc/httpd.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/httpd.c 2012-04-18 14:45:21.575820967 -0500 @@ -0,0 +1,519 @@ +/* + * httpd.c - a simple HTTP server @@ -7276,11 +6669,9 @@ index 0000000..5f56ad6 + return TRUE; +} + -diff --git a/hw/vnc/init.c b/hw/vnc/init.c -new file mode 100644 -index 0000000..0977fee ---- /dev/null -+++ b/hw/vnc/init.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/init.c xorg-server-1.12.1/hw/vnc/init.c +--- xorg-server-1.12.1.orig/hw/vnc/init.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/init.c 2012-04-18 15:57:06.373003593 -0500 @@ -0,0 +1,1054 @@ +/* + * init.c @@ -8220,7 +7611,7 @@ index 0000000..0977fee +} + +void -+ddxGiveUp(void) ++ddxGiveUp(enum ExitCode error) +{ + free(rfbScreen.pfbMemory); + if (initOutputCalled) { @@ -8234,9 +7625,9 @@ index 0000000..0977fee +} + +void -+AbortDDX(void) ++AbortDDX(enum ExitCode error) +{ -+ ddxGiveUp(); ++ ddxGiveUp(error); +} + +void @@ -8336,12 +7727,10 @@ index 0000000..0977fee + rfbLog(""); + perror(str); +} -diff --git a/hw/vnc/kbdptr.c b/hw/vnc/kbdptr.c -new file mode 100644 -index 0000000..f306022 ---- /dev/null -+++ b/hw/vnc/kbdptr.c -@@ -0,0 +1,616 @@ +diff -pruN xorg-server-1.12.1.orig/hw/vnc/kbdptr.c xorg-server-1.12.1/hw/vnc/kbdptr.c +--- xorg-server-1.12.1.orig/hw/vnc/kbdptr.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/kbdptr.c 2012-04-18 14:45:21.576820954 -0500 +@@ -0,0 +1,599 @@ +/* + * kbdptr.c - deal with keyboard and pointer device over TCP & UDP. + * @@ -8570,22 +7959,17 @@ index 0000000..f306022 +static void +EnqueueMotion(DeviceIntPtr ptrDev, int x, int y) +{ -+ int detail = 0, valuators[2], nevents, i; -+ EventListPtr events; ++ int detail = 0, valuators[2]; + ValuatorMask mask; + valuators[0] = x; + valuators[1] = y; -+ GetEventList(&events); + + if (!ptrDev) { + ErrorF("VNC: In EnqueueMotion() ptrDev=NULL\n"); + return; + } + valuator_mask_set_range(&mask,0, 2, valuators); -+ nevents = GetPointerEvents(events, ptrDev, MotionNotify, detail, -+ POINTER_ABSOLUTE, &mask); -+ for (i = 0; i < nevents; i++) -+ mieqEnqueue(ptrDev, (InternalEvent*)(events + i)->event); ++ QueuePointerEvents(ptrDev, MotionNotify, detail, POINTER_ABSOLUTE, &mask); +} +#endif + @@ -8593,35 +7977,23 @@ index 0000000..f306022 +static void +EnqueueButton(DeviceIntPtr ptrDev, int type, int detail) +{ -+ int nevents, i; -+ EventListPtr events; -+ GetEventList(&events); -+ + if (!ptrDev) { + ErrorF("VNC: In EnqueueButton() ptrDev=NULL\n"); + return; + } -+ nevents = GetPointerEvents(events, ptrDev, type, detail, -+ POINTER_ABSOLUTE, NULL/*valuators*/); -+ for (i = 0; i < nevents; i++) -+ mieqEnqueue(ptrDev, (InternalEvent*)(events + i)->event); ++ QueuePointerEvents(ptrDev, type, detail, ++ POINTER_ABSOLUTE, NULL/*valuators*/); +} + + +static void +EnqueueKey(DeviceIntPtr kbdDev, int type, int detail) +{ -+ int nevents, i; -+ EventListPtr events; -+ GetEventList(&events); -+ + if (!kbdDev) { + ErrorF("VNC: In EnqueueKey() kbdDev=NULL\n"); + return; + } -+ nevents = GetKeyboardEvents(events, kbdDev, type, detail); -+ for (i = 0; i < nevents; i++) -+ mieqEnqueue(kbdDev, (InternalEvent*)(events + i)->event); ++ QueueKeyboardEvents(kbdDev, type, detail, NULL); +} + +/* @@ -8958,11 +8330,9 @@ index 0000000..f306022 + break; + } +} -diff --git a/hw/vnc/keyboard.h b/hw/vnc/keyboard.h -new file mode 100644 -index 0000000..d223b6b ---- /dev/null -+++ b/hw/vnc/keyboard.h +diff -pruN xorg-server-1.12.1.orig/hw/vnc/keyboard.h xorg-server-1.12.1/hw/vnc/keyboard.h +--- xorg-server-1.12.1.orig/hw/vnc/keyboard.h 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/keyboard.h 2012-04-18 14:45:21.577820941 -0500 @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. @@ -8998,11 +8368,353 @@ index 0000000..d223b6b +#define META_R_KEY_CODE (MIN_KEY_CODE + 108) +#define ALT_L_KEY_CODE (MIN_KEY_CODE + 56) +#define ALT_R_KEY_CODE (MIN_KEY_CODE + 105) -diff --git a/hw/vnc/loginauth.c b/hw/vnc/loginauth.c -new file mode 100644 -index 0000000..5729f36 ---- /dev/null -+++ b/hw/vnc/loginauth.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/LICENCE.TXT xorg-server-1.12.1/hw/vnc/LICENCE.TXT +--- xorg-server-1.12.1.orig/hw/vnc/LICENCE.TXT 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/LICENCE.TXT 2012-04-18 14:45:21.577820941 -0500 +@@ -0,0 +1,340 @@ ++ GNU GENERAL PUBLIC LICENSE ++ Version 2, June 1991 ++ ++ Copyright (C) 1989, 1991 Free Software Foundation, Inc. ++ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++License is intended to guarantee your freedom to share and change free ++software--to make sure the software is free for all its users. This ++General Public License applies to most of the Free Software ++Foundation's software and to any other program whose authors commit to ++using it. (Some other Free Software Foundation software is covered by ++the GNU Library General Public License instead.) You can apply it to ++your programs, too. ++ ++ When we speak of free software, we are referring to freedom, not ++price. Our General Public Licenses are designed to make sure that you ++have the freedom to distribute copies of free software (and charge for ++this service if you wish), that you receive source code or can get it ++if you want it, that you can change the software or use pieces of it ++in new free programs; and that you know you can do these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++anyone to deny you these rights or to ask you to surrender the rights. ++These restrictions translate to certain responsibilities for you if you ++distribute copies of the software, or if you modify it. ++ ++ For example, if you distribute copies of such a program, whether ++gratis or for a fee, you must give the recipients all the rights that ++you have. You must make sure that they, too, receive or can get the ++source code. And you must show them these terms so they know their ++rights. ++ ++ We protect your rights with two steps: (1) copyright the software, and ++(2) offer you this license which gives you legal permission to copy, ++distribute and/or modify the software. ++ ++ Also, for each author's protection and ours, we want to make certain ++that everyone understands that there is no warranty for this free ++software. If the software is modified by someone else and passed on, we ++want its recipients to know that what they have is not the original, so ++that any problems introduced by others will not reflect on the original ++authors' reputations. ++ ++ Finally, any free program is threatened constantly by software ++patents. We wish to avoid the danger that redistributors of a free ++program will individually obtain patent licenses, in effect making the ++program proprietary. To prevent this, we have made it clear that any ++patent must be licensed for everyone's free use or not licensed at all. ++ ++ The precise terms and conditions for copying, distribution and ++modification follow. ++ ++ GNU GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License applies to any program or other work which contains ++a notice placed by the copyright holder saying it may be distributed ++under the terms of this General Public License. The "Program", below, ++refers to any such program or work, and a "work based on the Program" ++means either the Program or any derivative work under copyright law: ++that is to say, a work containing the Program or a portion of it, ++either verbatim or with modifications and/or translated into another ++language. (Hereinafter, translation is included without limitation in ++the term "modification".) Each licensee is addressed as "you". ++ ++Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running the Program is not restricted, and the output from the Program ++is covered only if its contents constitute a work based on the ++Program (independent of having been made by running the Program). ++Whether that is true depends on what the Program does. ++ ++ 1. You may copy and distribute verbatim copies of the Program's ++source code as you receive it, in any medium, provided that you ++conspicuously and appropriately publish on each copy an appropriate ++copyright notice and disclaimer of warranty; keep intact all the ++notices that refer to this License and to the absence of any warranty; ++and give any other recipients of the Program a copy of this License ++along with the Program. ++ ++You may charge a fee for the physical act of transferring a copy, and ++you may at your option offer warranty protection in exchange for a fee. ++ ++ 2. You may modify your copy or copies of the Program or any portion ++of it, thus forming a work based on the Program, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: ++ ++ a) You must cause the modified files to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ b) You must cause any work that you distribute or publish, that in ++ whole or in part contains or is derived from the Program or any ++ part thereof, to be licensed as a whole at no charge to all third ++ parties under the terms of this License. ++ ++ c) If the modified program normally reads commands interactively ++ when run, you must cause it, when started running for such ++ interactive use in the most ordinary way, to print or display an ++ announcement including an appropriate copyright notice and a ++ notice that there is no warranty (or else, saying that you provide ++ a warranty) and that users may redistribute the program under ++ these conditions, and telling the user how to view a copy of this ++ License. (Exception: if the Program itself is interactive but ++ does not normally print such an announcement, your work based on ++ the Program is not required to print an announcement.) ++ ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Program, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Program, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote it. ++ ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Program. ++ ++In addition, mere aggregation of another work not based on the Program ++with the Program (or with a work based on the Program) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. ++ ++ 3. You may copy and distribute the Program (or a work based on it, ++under Section 2) in object code or executable form under the terms of ++Sections 1 and 2 above provided that you also do one of the following: ++ ++ a) Accompany it with the complete corresponding machine-readable ++ source code, which must be distributed under the terms of Sections ++ 1 and 2 above on a medium customarily used for software interchange; or, ++ ++ b) Accompany it with a written offer, valid for at least three ++ years, to give any third party, for a charge no more than your ++ cost of physically performing source distribution, a complete ++ machine-readable copy of the corresponding source code, to be ++ distributed under the terms of Sections 1 and 2 above on a medium ++ customarily used for software interchange; or, ++ ++ c) Accompany it with the information you received as to the offer ++ to distribute corresponding source code. (This alternative is ++ allowed only for noncommercial distribution and only if you ++ received the program in object code or executable form with such ++ an offer, in accord with Subsection b above.) ++ ++The source code for a work means the preferred form of the work for ++making modifications to it. For an executable work, complete source ++code means all the source code for all modules it contains, plus any ++associated interface definition files, plus the scripts used to ++control compilation and installation of the executable. However, as a ++special exception, the source code distributed need not include ++anything that is normally distributed (in either source or binary ++form) with the major components (compiler, kernel, and so on) of the ++operating system on which the executable runs, unless that component ++itself accompanies the executable. ++ ++If distribution of executable or object code is made by offering ++access to copy from a designated place, then offering equivalent ++access to copy the source code from the same place counts as ++distribution of the source code, even though third parties are not ++compelled to copy the source along with the object code. ++ ++ 4. You may not copy, modify, sublicense, or distribute the Program ++except as expressly provided under this License. Any attempt ++otherwise to copy, modify, sublicense or distribute the Program is ++void, and will automatically terminate your rights under this License. ++However, parties who have received copies, or rights, from you under ++this License will not have their licenses terminated so long as such ++parties remain in full compliance. ++ ++ 5. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Program or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Program (or any work based on the ++Program), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Program or works based on it. ++ ++ 6. Each time you redistribute the Program (or any work based on the ++Program), the recipient automatically receives a license from the ++original licensor to copy, distribute or modify the Program subject to ++these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties to ++this License. ++ ++ 7. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Program at all. For example, if a patent ++license would not permit royalty-free redistribution of the Program by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Program. ++ ++If any portion of this section is held invalid or unenforceable under ++any particular circumstance, the balance of the section is intended to ++apply and the section as a whole is intended to apply in other ++circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system, which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 8. If the distribution and/or use of the Program is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Program under this License ++may add an explicit geographical distribution limitation excluding ++those countries, so that distribution is permitted only in or among ++countries not thus excluded. In such case, this License incorporates ++the limitation as if written in the body of this License. ++ ++ 9. The Free Software Foundation may publish revised and/or new versions ++of the General Public License from time to time. Such new versions will ++be similar in spirit to the present version, but may differ in detail to ++address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Program ++specifies a version number of this License which applies to it and "any ++later version", you have the option of following the terms and conditions ++either of that version or of any later version published by the Free ++Software Foundation. If the Program does not specify a version number of ++this License, you may choose any version ever published by the Free Software ++Foundation. ++ ++ 10. If you wish to incorporate parts of the Program into other free ++programs whose distribution conditions are different, write to the author ++to ask for permission. For software which is copyrighted by the Free ++Software Foundation, write to the Free Software Foundation; we sometimes ++make exceptions for this. Our decision will be guided by the two goals ++of preserving the free status of all derivatives of our free software and ++of promoting the sharing and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY ++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN ++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES ++PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED ++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS ++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE ++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, ++REPAIR OR CORRECTION. ++ ++ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING ++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR ++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, ++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING ++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED ++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY ++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER ++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ Appendix: How to Apply These Terms to Your New Programs ++ ++ If you develop a new program, and you want it to be of the greatest ++possible use to the public, the best way to achieve this is to make it ++free software which everyone can redistribute and change under these terms. ++ ++ To do so, attach the following notices to the program. It is safest ++to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least ++the "copyright" line and a pointer to where the full notice is found. ++ ++ ++ Copyright (C) 19yy ++ ++ This program 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; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++ USA. ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++If the program is interactive, make it output a short notice like this ++when it starts in an interactive mode: ++ ++ Gnomovision version 69, Copyright (C) 19yy name of author ++ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. ++ This is free software, and you are welcome to redistribute it ++ under certain conditions; type `show c' for details. ++ ++The hypothetical commands `show w' and `show c' should show the appropriate ++parts of the General Public License. Of course, the commands you use may ++be called something other than `show w' and `show c'; they could even be ++mouse-clicks or menu items--whatever suits your program. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the program, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the program ++ `Gnomovision' (which makes passes at compilers) written by James Hacker. ++ ++ , 1 April 1989 ++ Ty Coon, President of Vice ++ ++This General Public License does not permit incorporating your program into ++proprietary programs. If your program is a subroutine library, you may ++consider it more useful to permit linking proprietary applications with the ++library. If this is what you want to do, use the GNU Library General ++Public License instead of this License. +diff -pruN xorg-server-1.12.1.orig/hw/vnc/loginauth.c xorg-server-1.12.1/hw/vnc/loginauth.c +--- xorg-server-1.12.1.orig/hw/vnc/loginauth.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/loginauth.c 2012-04-18 14:45:21.577820941 -0500 @@ -0,0 +1,142 @@ +/* + * loginauth.c - deal with login-style Unix authentication. @@ -9146,11 +8858,68 @@ index 0000000..5729f36 + cl->state = RFB_INITIALISATION; +} + -diff --git a/hw/vnc/rdp.c b/hw/vnc/rdp.c -new file mode 100644 -index 0000000..3174209 ---- /dev/null -+++ b/hw/vnc/rdp.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/Makefile.am xorg-server-1.12.1/hw/vnc/Makefile.am +--- xorg-server-1.12.1.orig/hw/vnc/Makefile.am 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/Makefile.am 2012-04-18 14:45:21.577820941 -0500 +@@ -0,0 +1,55 @@ ++# XXX This Makefile.am probably needs some work. ++ ++bin_PROGRAMS = Xvnc ++ ++Xvnc_SOURCES = \ ++ $(top_srcdir)/fb/fbcmap_mi.c \ ++ $(top_srcdir)/mi/miinitext.c \ ++ auth.c \ ++ cmap.c \ ++ corre.c \ ++ cursor.c \ ++ cutpaste.c \ ++ d3des.c \ ++ dispcur.c \ ++ dpmsstubs.c \ ++ draw.c \ ++ hextile.c \ ++ httpd.c \ ++ init.c \ ++ kbdptr.c \ ++ loginauth.c \ ++ rfbkeyb.c \ ++ rfbmouse.c \ ++ rfbserver.c \ ++ rre.c \ ++ sprite.c \ ++ sockets.c \ ++ stats.c \ ++ tight.c \ ++ translate.c \ ++ vncauth.c \ ++ vncext.c \ ++ xistubs.c \ ++ zlib.c ++ ++ ++JPEG_LIBS = -ljpeg ++CRYPT_LIBS = -lcrypt ++Z_LIBS = -lz ++ ++AM_CFLAGS = $(DIX_CFLAGS) $(XVNC_CFLAGS) -I$(top_srcdir)/hw/dmx/vnc -DCHROMIUM=1 ++ ++Xvnc_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) ++Xvnc_LDADD = \ ++ $(XORG_CORE_LIBS) \ ++ $(XVNC_LIBS) \ ++ $(JPEG_LIBS) \ ++ $(CRYPT_LIBS) \ ++ $(XSERVER_SYS_LIBS) \ ++ $(VNCMODULES_LIBS) \ ++ $(Z_LIBS) ++ ++ ++relink: ++ rm -f Xvnc && $(MAKE) Xvnc +diff -pruN xorg-server-1.12.1.orig/hw/vnc/rdp.c xorg-server-1.12.1/hw/vnc/rdp.c +--- xorg-server-1.12.1.orig/hw/vnc/rdp.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/rdp.c 2012-04-18 14:45:21.577820941 -0500 @@ -0,0 +1,145 @@ +/* + * Copyright (C) 2004 Alan Hourihane. All Rights Reserved. @@ -9297,11 +9066,27 @@ index 0000000..3174209 + } +} +#endif -diff --git a/hw/vnc/rfb.h b/hw/vnc/rfb.h -new file mode 100644 -index 0000000..70b1a45 ---- /dev/null -+++ b/hw/vnc/rfb.h +diff -pruN xorg-server-1.12.1.orig/hw/vnc/README xorg-server-1.12.1/hw/vnc/README +--- xorg-server-1.12.1.orig/hw/vnc/README 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/README 2012-04-18 14:45:21.577820941 -0500 +@@ -0,0 +1,14 @@ ++ ++This is the directory containing the code specific to the TightVNC X server (Xvnc). ++Note that within this directory the name RFB is still used instead of VNC. ++ ++NOTE: ++ ++The is the new XFree86 v4 architecture VNC server code. ++ ++Modified entirely by Alan Hourihane ++ ++For information please visit http://xf4vnc.sourceforge.net ++ ++Moved to X.org modular tree by Brian Paul. ++ +diff -pruN xorg-server-1.12.1.orig/hw/vnc/rfb.h xorg-server-1.12.1/hw/vnc/rfb.h +--- xorg-server-1.12.1.orig/hw/vnc/rfb.h 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/rfb.h 2012-04-18 15:58:19.960083626 -0500 @@ -0,0 +1,747 @@ +/* + * rfb.h - header file for RFB DDX implementation. @@ -10050,11 +9835,9 @@ index 0000000..70b1a45 + + +#endif /* RFB_H_INCLUDED */ -diff --git a/hw/vnc/rfbkeyb.c b/hw/vnc/rfbkeyb.c -new file mode 100644 -index 0000000..4da29c2 ---- /dev/null -+++ b/hw/vnc/rfbkeyb.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/rfbkeyb.c xorg-server-1.12.1/hw/vnc/rfbkeyb.c +--- xorg-server-1.12.1.orig/hw/vnc/rfbkeyb.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/rfbkeyb.c 2012-04-18 16:18:07.674235155 -0500 @@ -0,0 +1,519 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. @@ -10575,11 +10358,9 @@ index 0000000..4da29c2 + +#endif /* XFree86LOADER */ +#endif -diff --git a/hw/vnc/rfbmouse.c b/hw/vnc/rfbmouse.c -new file mode 100644 -index 0000000..4657128 ---- /dev/null -+++ b/hw/vnc/rfbmouse.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/rfbmouse.c xorg-server-1.12.1/hw/vnc/rfbmouse.c +--- xorg-server-1.12.1.orig/hw/vnc/rfbmouse.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/rfbmouse.c 2012-04-18 16:18:14.644148022 -0500 @@ -0,0 +1,260 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. @@ -10841,11 +10622,9 @@ index 0000000..4657128 + +#endif /* XFree86LOADER */ +#endif -diff --git a/hw/vnc/rfbproto.h b/hw/vnc/rfbproto.h -new file mode 100644 -index 0000000..5ed86c5 ---- /dev/null -+++ b/hw/vnc/rfbproto.h +diff -pruN xorg-server-1.12.1.orig/hw/vnc/rfbproto.h xorg-server-1.12.1/hw/vnc/rfbproto.h +--- xorg-server-1.12.1.orig/hw/vnc/rfbproto.h 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/rfbproto.h 2012-04-18 14:45:21.580820903 -0500 @@ -0,0 +1,1362 @@ +/* + * Copyright (C) 2000-2004 Constantin Kaplinsky. All Rights Reserved. @@ -12209,11 +11988,9 @@ index 0000000..5ed86c5 + rfbChromiumStopMsg csd; + rfbChromiumExposeMsg cse; +} rfbClientToServerMsg; -diff --git a/hw/vnc/rfbserver.c b/hw/vnc/rfbserver.c -new file mode 100644 -index 0000000..4a12847 ---- /dev/null -+++ b/hw/vnc/rfbserver.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/rfbserver.c xorg-server-1.12.1/hw/vnc/rfbserver.c +--- xorg-server-1.12.1.orig/hw/vnc/rfbserver.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/rfbserver.c 2012-04-18 14:45:21.581820891 -0500 @@ -0,0 +1,2269 @@ +/* + * rfbserver.c - deal with server-side of the RFB protocol. @@ -14484,11 +14261,9 @@ index 0000000..4a12847 + rfbDisconnectUDPSock(pScreen); + } +} -diff --git a/hw/vnc/rre.c b/hw/vnc/rre.c -new file mode 100644 -index 0000000..1848980 ---- /dev/null -+++ b/hw/vnc/rre.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/rre.c xorg-server-1.12.1/hw/vnc/rre.c +--- xorg-server-1.12.1.orig/hw/vnc/rre.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/rre.c 2012-04-18 14:45:21.581820891 -0500 @@ -0,0 +1,317 @@ +/* + * rre.c @@ -14807,11 +14582,9 @@ index 0000000..1848980 + + return maxclr; +} -diff --git a/hw/vnc/sockets.c b/hw/vnc/sockets.c -new file mode 100644 -index 0000000..39eb88a ---- /dev/null -+++ b/hw/vnc/sockets.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/sockets.c xorg-server-1.12.1/hw/vnc/sockets.c +--- xorg-server-1.12.1.orig/hw/vnc/sockets.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/sockets.c 2012-04-18 14:45:21.582820879 -0500 @@ -0,0 +1,648 @@ +/* + * sockets.c - deal with TCP & UDP sockets. @@ -15461,11 +15234,9 @@ index 0000000..39eb88a + return TRUE; +} +#endif -diff --git a/hw/vnc/sprite.c b/hw/vnc/sprite.c -new file mode 100644 -index 0000000..0b7f252 ---- /dev/null -+++ b/hw/vnc/sprite.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/sprite.c xorg-server-1.12.1/hw/vnc/sprite.c +--- xorg-server-1.12.1.orig/hw/vnc/sprite.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/sprite.c 2012-04-18 14:45:21.583820867 -0500 @@ -0,0 +1,2088 @@ +/* + * sprite.c @@ -17555,11 +17326,9 @@ index 0000000..0b7f252 + *py = pScreenPriv->y; +} + -diff --git a/hw/vnc/sprite.h b/hw/vnc/sprite.h -new file mode 100644 -index 0000000..d913249 ---- /dev/null -+++ b/hw/vnc/sprite.h +diff -pruN xorg-server-1.12.1.orig/hw/vnc/sprite.h xorg-server-1.12.1/hw/vnc/sprite.h +--- xorg-server-1.12.1.orig/hw/vnc/sprite.h 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/sprite.h 2012-04-18 14:45:21.583820867 -0500 @@ -0,0 +1,131 @@ +/* + * sprite.h @@ -17692,11 +17461,9 @@ index 0000000..d913249 + int * /*px*/, + int * /*py*/ +); -diff --git a/hw/vnc/spritest.h b/hw/vnc/spritest.h -new file mode 100644 -index 0000000..f983dd5 ---- /dev/null -+++ b/hw/vnc/spritest.h +diff -pruN xorg-server-1.12.1.orig/hw/vnc/spritest.h xorg-server-1.12.1/hw/vnc/spritest.h +--- xorg-server-1.12.1.orig/hw/vnc/spritest.h 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/spritest.h 2012-04-18 14:45:21.583820867 -0500 @@ -0,0 +1,134 @@ +/* + * spritest.h @@ -17832,11 +17599,9 @@ index 0000000..f983dd5 + +#define LINE_OVERLAP(pCbox,x1,y1,x2,y2,lw2) \ + BOX_OVERLAP((pCbox), (x1)-(lw2), (y1)-(lw2), (x2)+(lw2), (y2)+(lw2)) -diff --git a/hw/vnc/stats.c b/hw/vnc/stats.c -new file mode 100644 -index 0000000..83366ec ---- /dev/null -+++ b/hw/vnc/stats.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/stats.c xorg-server-1.12.1/hw/vnc/stats.c +--- xorg-server-1.12.1.orig/hw/vnc/stats.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/stats.c 2012-04-18 14:45:21.583820867 -0500 @@ -0,0 +1,117 @@ +/* + * stats.c @@ -17955,11 +17720,9 @@ index 0000000..83366ec + cl->rfbLastRectBytesSent)); + } +} -diff --git a/hw/vnc/symlink-vnc.sh b/hw/vnc/symlink-vnc.sh -new file mode 100644 -index 0000000..b4347a1 ---- /dev/null -+++ b/hw/vnc/symlink-vnc.sh +diff -pruN xorg-server-1.12.1.orig/hw/vnc/symlink-vnc.sh xorg-server-1.12.1/hw/vnc/symlink-vnc.sh +--- xorg-server-1.12.1.orig/hw/vnc/symlink-vnc.sh 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/symlink-vnc.sh 2012-04-18 14:45:21.583820867 -0500 @@ -0,0 +1,198 @@ +#!/bin/sh + @@ -18159,11 +17922,9 @@ index 0000000..b4347a1 +} + +main $1 $2 -diff --git a/hw/vnc/tableinitcmtemplate.c b/hw/vnc/tableinitcmtemplate.c -new file mode 100644 -index 0000000..233c8a3 ---- /dev/null -+++ b/hw/vnc/tableinitcmtemplate.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/tableinitcmtemplate.c xorg-server-1.12.1/hw/vnc/tableinitcmtemplate.c +--- xorg-server-1.12.1.orig/hw/vnc/tableinitcmtemplate.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/tableinitcmtemplate.c 2012-04-18 14:45:21.584820855 -0500 @@ -0,0 +1,95 @@ +/* + * tableinitcmtemplate.c - template for initialising lookup tables for @@ -18260,11 +18021,9 @@ index 0000000..233c8a3 +#undef OUT_T +#undef SwapOUT +#undef rfbInitColourMapSingleTableOUT -diff --git a/hw/vnc/tableinittctemplate.c b/hw/vnc/tableinittctemplate.c -new file mode 100644 -index 0000000..1af8a06 ---- /dev/null -+++ b/hw/vnc/tableinittctemplate.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/tableinittctemplate.c xorg-server-1.12.1/hw/vnc/tableinittctemplate.c +--- xorg-server-1.12.1.orig/hw/vnc/tableinittctemplate.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/tableinittctemplate.c 2012-04-18 14:45:21.584820855 -0500 @@ -0,0 +1,146 @@ +/* + * tableinittctemplate.c - template for initialising lookup tables for @@ -18412,11 +18171,9 @@ index 0000000..1af8a06 +#undef rfbInitTrueColourSingleTableOUT +#undef rfbInitTrueColourRGBTablesOUT +#undef rfbInitOneRGBTableOUT -diff --git a/hw/vnc/tabletranstemplate.c b/hw/vnc/tabletranstemplate.c -new file mode 100644 -index 0000000..87fce96 ---- /dev/null -+++ b/hw/vnc/tabletranstemplate.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/tabletranstemplate.c xorg-server-1.12.1/hw/vnc/tabletranstemplate.c +--- xorg-server-1.12.1.orig/hw/vnc/tabletranstemplate.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/tabletranstemplate.c 2012-04-18 14:45:21.584820855 -0500 @@ -0,0 +1,135 @@ +/* + * tabletranstemplate.c - template for translation using lookup tables. @@ -18553,11 +18310,9 @@ index 0000000..87fce96 +#undef OUT_T +#undef rfbTranslateWithSingleTableINtoOUT +#undef rfbTranslateWithRGBTablesINtoOUT -diff --git a/hw/vnc/tight.c b/hw/vnc/tight.c -new file mode 100644 -index 0000000..5c54736 ---- /dev/null -+++ b/hw/vnc/tight.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/tight.c xorg-server-1.12.1/hw/vnc/tight.c +--- xorg-server-1.12.1.orig/hw/vnc/tight.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/tight.c 2012-04-18 14:45:21.585820842 -0500 @@ -0,0 +1,1774 @@ +/* + * tight.c @@ -20333,11 +20088,9 @@ index 0000000..5c54736 + cinfo->dest = &jpegDstManager; +} + -diff --git a/hw/vnc/translate.c b/hw/vnc/translate.c -new file mode 100644 -index 0000000..5cc57a3 ---- /dev/null -+++ b/hw/vnc/translate.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/translate.c xorg-server-1.12.1/hw/vnc/translate.c +--- xorg-server-1.12.1.orig/hw/vnc/translate.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/translate.c 2012-04-18 14:45:21.586820829 -0500 @@ -0,0 +1,496 @@ +/* + * translate.c - translate between different pixel formats @@ -20835,11 +20588,9 @@ index 0000000..5cc57a3 + } + } +} -diff --git a/hw/vnc/vncauth.c b/hw/vnc/vncauth.c -new file mode 100644 -index 0000000..a70cfa5 ---- /dev/null -+++ b/hw/vnc/vncauth.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/vncauth.c xorg-server-1.12.1/hw/vnc/vncauth.c +--- xorg-server-1.12.1.orig/hw/vnc/vncauth.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/vncauth.c 2012-04-18 14:45:21.586820829 -0500 @@ -0,0 +1,252 @@ +/* + * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. @@ -21093,11 +20844,9 @@ index 0000000..a70cfa5 + des(bytes+i, bytes+i); + } +} -diff --git a/hw/vnc/vncauth.h b/hw/vnc/vncauth.h -new file mode 100644 -index 0000000..adc280b ---- /dev/null -+++ b/hw/vnc/vncauth.h +diff -pruN xorg-server-1.12.1.orig/hw/vnc/vncauth.h xorg-server-1.12.1/hw/vnc/vncauth.h +--- xorg-server-1.12.1.orig/hw/vnc/vncauth.h 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/vncauth.h 2012-04-18 14:45:21.586820829 -0500 @@ -0,0 +1,33 @@ +/* + * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. @@ -21132,12 +20881,10 @@ index 0000000..adc280b +extern int vncEncryptAndStorePasswd2(char *passwd, char *passwdViewOnly, char *fname); +extern int vncDecryptPasswdFromFile2(char *fname, char *passwdFullControl, char *passwdViewOnly); + -diff --git a/hw/vnc/vncext.c b/hw/vnc/vncext.c -new file mode 100644 -index 0000000..ea913b7 ---- /dev/null -+++ b/hw/vnc/vncext.c -@@ -0,0 +1,807 @@ +diff -pruN xorg-server-1.12.1.orig/hw/vnc/vncext.c xorg-server-1.12.1/hw/vnc/vncext.c +--- xorg-server-1.12.1.orig/hw/vnc/vncext.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/vncext.c 2012-04-18 15:30:57.637615484 -0500 +@@ -0,0 +1,794 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. + * @@ -21307,10 +21054,9 @@ index 0000000..ea913b7 + rep.minorVersion = VNC_MINOR_VERSION; + if(client->swapped) + { -+ register char n; -+ swaps(&rep.sequenceNumber, n); -+ swaps(&rep.majorVersion, n); -+ swaps(&rep.minorVersion, n); ++ swaps(&rep.sequenceNumber); ++ swaps(&rep.majorVersion); ++ swaps(&rep.minorVersion); + } + (void)WriteToClient(client, SIZEOF(xVncQueryVersionReply), + (char *)&rep); @@ -21333,10 +21079,9 @@ index 0000000..ea913b7 + rep.accept = 0; + if(client->swapped) + { -+ register char n; -+ swaps(&rep.sequenceNumber, n); -+ swaps(&rep.sock, n); -+ swaps(&rep.accept, n); ++ swaps(&rep.sequenceNumber); ++ swaps(&rep.sock); ++ swaps(&rep.accept); + } + (void)WriteToClient(client, SIZEOF(xVncConnectionReply), + (char *)&rep); @@ -21357,8 +21102,7 @@ index 0000000..ea913b7 + rep.length = 0; + if(client->swapped) + { -+ register char n; -+ swaps(&rep.sequenceNumber, n); ++ swaps(&rep.sequenceNumber); + } + (void)WriteToClient(client, SIZEOF(xVncSelectNotifyReply), + (char *)&rep); @@ -21396,9 +21140,8 @@ index 0000000..ea913b7 + rep.length = count * sizeof(xVncConnectionListInfo) >> 2; + if(client->swapped) + { -+ register char n; -+ swaps(&rep.sequenceNumber, n); -+ swaps(&rep.count, n); ++ swaps(&rep.sequenceNumber); ++ swapl(&rep.count); + } + (void)WriteToClient(client, SIZEOF(xVncListConnectionsReply), + (char *)&rep); @@ -21437,8 +21180,7 @@ index 0000000..ea913b7 + rep.length = 0; + if(client->swapped) + { -+ register char n; -+ swaps(&rep.sequenceNumber, n); ++ swaps(&rep.sequenceNumber); + } + (void)WriteToClient(client, SIZEOF(xVncChromiumStartReply), + (char *)&rep); @@ -21459,8 +21201,7 @@ index 0000000..ea913b7 + rep.length = 0; + if(client->swapped) + { -+ register char n; -+ swaps(&rep.sequenceNumber, n); ++ swaps(&rep.sequenceNumber); + } + (void)WriteToClient(client, SIZEOF(xVncChromiumMonitorReply), + (char *)&rep); @@ -21498,12 +21239,11 @@ index 0000000..ea913b7 +SProcVncQueryVersion(ClientPtr client) +{ + REQUEST(xVncQueryVersionReq); -+ register char n; + -+ swaps(&stuff->length, n); ++ swaps(&stuff->length); + REQUEST_SIZE_MATCH(xVncQueryVersionReq); -+ swaps(&stuff->majorVersion, n); -+ swaps(&stuff->minorVersion,n); ++ swaps(&stuff->majorVersion); ++ swaps(&stuff->minorVersion); + return ProcVncQueryVersion(client); +} /* SProcVncQueryVersion */ + @@ -21511,9 +21251,8 @@ index 0000000..ea913b7 +SProcVncSelectNotify(ClientPtr client) +{ + REQUEST(xVncSelectNotifyReq); -+ register char n; + -+ swaps(&stuff->length, n); ++ swaps(&stuff->length); + REQUEST_SIZE_MATCH(xVncSelectNotifyReq); + return ProcVncSelectNotify(client); +} /* SProcVncSelectNotify */ @@ -21522,9 +21261,8 @@ index 0000000..ea913b7 +SProcVncListConnections(ClientPtr client) +{ + REQUEST(xVncListConnectionsReq); -+ register char n; + -+ swaps(&stuff->length, n); ++ swaps(&stuff->length); + REQUEST_SIZE_MATCH(xVncListConnectionsReq); + return ProcVncListConnections(client); +} /* SProcVncListConnections */ @@ -21534,12 +21272,11 @@ index 0000000..ea913b7 +SProcVncChromiumStart(ClientPtr client) +{ + REQUEST(xVncChromiumStartReq); -+ register char n; + -+ swaps(&stuff->ipaddress, n); -+ swaps(&stuff->crServerPort, n); -+ swaps(&stuff->mothershipPort, n); -+ swaps(&stuff->length, n); ++ swapl(&stuff->ipaddress); ++ swapl(&stuff->crServerPort); ++ swapl(&stuff->mothershipPort); ++ swaps(&stuff->length); + REQUEST_SIZE_MATCH(xVncChromiumStartReq); + return ProcVncChromiumStart(client); +} /* SProcVncChromiumStart */ @@ -21548,11 +21285,10 @@ index 0000000..ea913b7 +SProcVncChromiumMonitor(ClientPtr client) +{ + REQUEST(xVncChromiumMonitorReq); -+ register char n; + -+ swaps(&stuff->length, n); -+ swaps(&stuff->windowid, n); -+ swaps(&stuff->cr_windowid, n); ++ swaps(&stuff->length); ++ swapl(&stuff->windowid); ++ swapl(&stuff->cr_windowid); + REQUEST_SIZE_MATCH(xVncChromiumMonitorReq); + return ProcVncChromiumMonitor(client); +} /* SProcVncChromiumMonitor */ @@ -21562,13 +21298,11 @@ index 0000000..ea913b7 +SProcVncConnection(ClientPtr client) +{ + REQUEST(xVncConnectionReq); -+ register char n; + -+ -+ swaps(&stuff->length, n); ++ swaps(&stuff->length); + REQUEST_SIZE_MATCH(xVncConnectionReq); -+ swaps(&stuff->sock, n); -+ swaps(&stuff->accept,n); ++ swaps(&stuff->sock); ++ swaps(&stuff->accept); + return ProcVncConnection(client); +} /* SProcVncConnection */ + @@ -21945,11 +21679,9 @@ index 0000000..ea913b7 + (EventSwapPtr)SwapVncChromiumConnectedEvent; +#endif +} /* VncExtensionInit */ -diff --git a/hw/vnc/xistubs.c b/hw/vnc/xistubs.c -new file mode 100644 -index 0000000..cffba99 ---- /dev/null -+++ b/hw/vnc/xistubs.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/xistubs.c xorg-server-1.12.1/hw/vnc/xistubs.c +--- xorg-server-1.12.1.orig/hw/vnc/xistubs.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/xistubs.c 2012-04-18 14:45:21.587820816 -0500 @@ -0,0 +1,312 @@ +/* $Xorg: stubs.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ + @@ -22263,11 +21995,9 @@ index 0000000..cffba99 + return (BadMatch); + } + } -diff --git a/hw/vnc/zlib.c b/hw/vnc/zlib.c -new file mode 100644 -index 0000000..c749ec6 ---- /dev/null -+++ b/hw/vnc/zlib.c +diff -pruN xorg-server-1.12.1.orig/hw/vnc/zlib.c xorg-server-1.12.1/hw/vnc/zlib.c +--- xorg-server-1.12.1.orig/hw/vnc/zlib.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/vnc/zlib.c 2012-04-18 14:45:21.587820816 -0500 @@ -0,0 +1,308 @@ +/* + * zlib.c @@ -22577,26 +22307,9 @@ index 0000000..c749ec6 +} + + -diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am -index 93995c6..171c889 100644 ---- a/hw/xfree86/Makefile.am -+++ b/hw/xfree86/Makefile.am -@@ -39,6 +39,11 @@ DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ - loader dixmods dri dri2 exa modes \ - utils doc - -+if VNC -+SUBDIRS += vnc -+DIST_SUBDIRS += vnc -+endif -+ - bin_PROGRAMS = Xorg - Xorg_SOURCES = xorg.c - -diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am -index 365f006..5ff2aa9 100644 ---- a/hw/xfree86/dixmods/Makefile.am -+++ b/hw/xfree86/dixmods/Makefile.am +diff -pruN xorg-server-1.12.1.orig/hw/xfree86/dixmods/Makefile.am xorg-server-1.12.1/hw/xfree86/dixmods/Makefile.am +--- xorg-server-1.12.1.orig/hw/xfree86/dixmods/Makefile.am 2012-01-18 13:52:23.000000000 -0600 ++++ xorg-server-1.12.1/hw/xfree86/dixmods/Makefile.am 2012-04-18 14:45:21.587820816 -0500 @@ -10,6 +10,10 @@ if DBE DBEMOD = libdbe.la endif @@ -22622,7 +22335,7 @@ index 365f006..5ff2aa9 100644 -I$(top_srcdir)/hw/xfree86/loader \ -I$(top_srcdir)/miext/shadow \ -I$(top_srcdir)/glx -@@ -34,6 +40,10 @@ libdbe_la_LDFLAGS = -avoid-version +@@ -34,6 +40,10 @@ libdbe_la_LDFLAGS = -module -avoid-versi libdbe_la_LIBADD = $(top_builddir)/dbe/libdbe.la libdbe_la_SOURCES = dbemodule.c @@ -22630,14 +22343,27 @@ index 365f006..5ff2aa9 100644 +libxcliplist_la_LIBADD = $(top_builddir)/xcliplist/libxcliplist.la +libxcliplist_la_SOURCES = $(top_srcdir)/xcliplist/cliplistmod.c + - libfb_la_LDFLAGS = -avoid-version + libfb_la_LDFLAGS = -module -avoid-version libfb_la_LIBADD = $(top_builddir)/fb/libfb.la libfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c -diff --git a/hw/xfree86/vnc/.gitignore b/hw/xfree86/vnc/.gitignore -new file mode 100644 -index 0000000..d14621f ---- /dev/null -+++ b/hw/xfree86/vnc/.gitignore +diff -pruN xorg-server-1.12.1.orig/hw/xfree86/Makefile.am xorg-server-1.12.1/hw/xfree86/Makefile.am +--- xorg-server-1.12.1.orig/hw/xfree86/Makefile.am 2012-03-30 22:04:18.000000000 -0500 ++++ xorg-server-1.12.1/hw/xfree86/Makefile.am 2012-04-18 14:45:21.587820816 -0500 +@@ -35,6 +35,11 @@ DIST_SUBDIRS = common ddc i2c x86emu int + loader dixmods dri dri2 exa modes \ + utils doc man + ++if VNC ++SUBDIRS += vnc ++DIST_SUBDIRS += vnc ++endif ++ + bin_PROGRAMS = Xorg + nodist_Xorg_SOURCES = sdksyms.c + +diff -pruN xorg-server-1.12.1.orig/hw/xfree86/vnc/.gitignore xorg-server-1.12.1/hw/xfree86/vnc/.gitignore +--- xorg-server-1.12.1.orig/hw/xfree86/vnc/.gitignore 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/xfree86/vnc/.gitignore 2012-04-18 14:45:21.588820803 -0500 @@ -0,0 +1,36 @@ +auth.c +cmap.c @@ -22675,11 +22401,9 @@ index 0000000..d14621f +vncext.c +xistubs.c +zlib.c -diff --git a/hw/xfree86/vnc/Makefile.am b/hw/xfree86/vnc/Makefile.am -new file mode 100644 -index 0000000..6f5cd76 ---- /dev/null -+++ b/hw/xfree86/vnc/Makefile.am +diff -pruN xorg-server-1.12.1.orig/hw/xfree86/vnc/Makefile.am xorg-server-1.12.1/hw/xfree86/vnc/Makefile.am +--- xorg-server-1.12.1.orig/hw/xfree86/vnc/Makefile.am 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/xfree86/vnc/Makefile.am 2012-04-18 14:45:21.588820803 -0500 @@ -0,0 +1,51 @@ +AM_CFLAGS = $(DIX_CFLAGS) + @@ -22732,18 +22456,14 @@ index 0000000..6f5cd76 + zlib.c + +#sdk_HEADERS = vncint.h -diff --git a/hw/xfree86/vnc/README b/hw/xfree86/vnc/README -new file mode 100644 -index 0000000..64aa888 ---- /dev/null -+++ b/hw/xfree86/vnc/README +diff -pruN xorg-server-1.12.1.orig/hw/xfree86/vnc/README xorg-server-1.12.1/hw/xfree86/vnc/README +--- xorg-server-1.12.1.orig/hw/xfree86/vnc/README 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/xfree86/vnc/README 2012-04-18 14:45:21.588820803 -0500 @@ -0,0 +1 @@ +This directory contains the sources for building the vnc.so server extension module. -diff --git a/hw/xfree86/vnc/vncInit.c b/hw/xfree86/vnc/vncInit.c -new file mode 100644 -index 0000000..4a124fb ---- /dev/null -+++ b/hw/xfree86/vnc/vncInit.c +diff -pruN xorg-server-1.12.1.orig/hw/xfree86/vnc/vncInit.c xorg-server-1.12.1/hw/xfree86/vnc/vncInit.c +--- xorg-server-1.12.1.orig/hw/xfree86/vnc/vncInit.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/xfree86/vnc/vncInit.c 2012-04-18 14:45:21.588820803 -0500 @@ -0,0 +1,626 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. @@ -23371,11 +23091,9 @@ index 0000000..4a124fb + return (pointer)TRUE; +} +#endif -diff --git a/hw/xfree86/vnc/vncint.h b/hw/xfree86/vnc/vncint.h -new file mode 100644 -index 0000000..18a3630 ---- /dev/null -+++ b/hw/xfree86/vnc/vncint.h +diff -pruN xorg-server-1.12.1.orig/hw/xfree86/vnc/vncint.h xorg-server-1.12.1/hw/xfree86/vnc/vncint.h +--- xorg-server-1.12.1.orig/hw/xfree86/vnc/vncint.h 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/hw/xfree86/vnc/vncint.h 2012-04-18 14:45:21.588820803 -0500 @@ -0,0 +1,148 @@ +/* + * Copyright (C) 2002 Alan Hourihane. All Rights Reserved. @@ -23525,11 +23243,32 @@ index 0000000..18a3630 + +#endif /* _VNC_H_ */ + -diff --git a/mi/miinitext.c b/mi/miinitext.c -index 4499f37..26acd82 100644 ---- a/mi/miinitext.c -+++ b/mi/miinitext.c -@@ -89,6 +89,18 @@ SOFTWARE. +diff -pruN xorg-server-1.12.1.orig/Makefile.am xorg-server-1.12.1/Makefile.am +--- xorg-server-1.12.1.orig/Makefile.am 2011-09-22 20:39:52.000000000 -0500 ++++ xorg-server-1.12.1/Makefile.am 2012-04-18 14:45:21.589820790 -0500 +@@ -17,6 +17,10 @@ if RECORD + RECORD_DIR=record + endif + ++if XCLIPLIST ++XCLIPLIST_DIR=xcliplist ++endif ++ + SUBDIRS = \ + doc \ + man \ +@@ -37,6 +41,7 @@ SUBDIRS = \ + damageext \ + $(COMPOSITE_DIR) \ + $(GLX_DIR) \ ++ $(XCLIPLIST_DIR) \ + exa \ + config \ + hw \ +diff -pruN xorg-server-1.12.1.orig/mi/miinitext.c xorg-server-1.12.1/mi/miinitext.c +--- xorg-server-1.12.1.orig/mi/miinitext.c 2012-03-29 21:57:27.000000000 -0500 ++++ xorg-server-1.12.1/mi/miinitext.c 2012-04-18 14:45:21.589820790 -0500 +@@ -88,6 +88,18 @@ SOFTWARE. #undef XF86VIDMODE #endif @@ -23548,33 +23287,9 @@ index 4499f37..26acd82 100644 #include "misc.h" #include "extension.h" #include "micmap.h" -diff --git a/xcliplist/Makefile.am b/xcliplist/Makefile.am -new file mode 100644 -index 0000000..334acb6 ---- /dev/null -+++ b/xcliplist/Makefile.am -@@ -0,0 +1,16 @@ -+#noinst_LTLIBRARIES = libxcliplist.la -+libxcliplist_la_LTLIBRARIES = libxcliplist.la -+ -+#AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ -+AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -+ -+libxcliplist_la_LDFLAGS = -module -avoid-version -+libxcliplist_ladir = $(moduledir)/extensions -+ -+libxcliplist_la_SOURCES = \ -+ cliplist.c \ -+ cliplistmod.c -+ -+if XORG -+sdk_HEADERS = -+endif -diff --git a/xcliplist/cliplist.c b/xcliplist/cliplist.c -new file mode 100644 -index 0000000..290eb79 ---- /dev/null -+++ b/xcliplist/cliplist.c +diff -pruN xorg-server-1.12.1.orig/xcliplist/cliplist.c xorg-server-1.12.1/xcliplist/cliplist.c +--- xorg-server-1.12.1.orig/xcliplist/cliplist.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/xcliplist/cliplist.c 2012-04-18 14:45:21.589820790 -0500 @@ -0,0 +1,128 @@ +/* + * Server-side code for the Xcliplist extension @@ -23704,11 +23419,9 @@ index 0000000..290eb79 + XClipListErrorBase = extEntry->errorBase; + } +} -diff --git a/xcliplist/cliplistmod.c b/xcliplist/cliplistmod.c -new file mode 100644 -index 0000000..b0dd4f7 ---- /dev/null -+++ b/xcliplist/cliplistmod.c +diff -pruN xorg-server-1.12.1.orig/xcliplist/cliplistmod.c xorg-server-1.12.1/xcliplist/cliplistmod.c +--- xorg-server-1.12.1.orig/xcliplist/cliplistmod.c 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/xcliplist/cliplistmod.c 2012-04-18 14:45:21.589820790 -0500 @@ -0,0 +1,49 @@ +#ifdef HAVE_XORG_CONFIG_H +#include @@ -23759,6 +23472,23 @@ index 0000000..b0dd4f7 + return (pointer)1; +} + --- -1.7.3.4 - +diff -pruN xorg-server-1.12.1.orig/xcliplist/Makefile.am xorg-server-1.12.1/xcliplist/Makefile.am +--- xorg-server-1.12.1.orig/xcliplist/Makefile.am 1969-12-31 18:00:00.000000000 -0600 ++++ xorg-server-1.12.1/xcliplist/Makefile.am 2012-04-18 14:45:21.589820790 -0500 +@@ -0,0 +1,16 @@ ++#noinst_LTLIBRARIES = libxcliplist.la ++libxcliplist_la_LTLIBRARIES = libxcliplist.la ++ ++#AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ ++AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) ++ ++libxcliplist_la_LDFLAGS = -module -avoid-version ++libxcliplist_ladir = $(moduledir)/extensions ++ ++libxcliplist_la_SOURCES = \ ++ cliplist.c \ ++ cliplistmod.c ++ ++if XORG ++sdk_HEADERS = ++endif diff --git a/N-VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch b/N-VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch index 9e0e8b8..f04aef8 100644 --- a/N-VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch +++ b/N-VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch @@ -28,15 +28,12 @@ Changes: - Add tons of debug output (disabled). Signed-off-by: Egbert Eich ---- - hw/vnc/kbdptr.c | 289 +++++++++++++++++++++++++++++++++++++++++------------ - hw/vnc/keyboard.h | 1 + - 2 files changed, 228 insertions(+), 62 deletions(-) -diff --git a/hw/vnc/kbdptr.c b/hw/vnc/kbdptr.c -index f306022..b3b0e68 100644 ---- a/hw/vnc/kbdptr.c -+++ b/hw/vnc/kbdptr.c +Rebased to 1.12.1 by Mike Gorse +--- +diff -pruN xorg-server-1.12.1.orig/hw/vnc/kbdptr.c xorg-server-1.12.1/hw/vnc/kbdptr.c +--- xorg-server-1.12.1.orig/hw/vnc/kbdptr.c 2012-04-18 14:14:07.436250934 -0500 ++++ xorg-server-1.12.1/hw/vnc/kbdptr.c 2012-04-18 14:15:27.656248047 -0500 @@ -34,6 +34,8 @@ #include "X11/Xproto.h" #include "inputstr.h" @@ -54,7 +51,7 @@ index f306022..b3b0e68 100644 #if !XFREE86VNC #define MIN_KEY_CODE 8 -@@ -196,21 +199,20 @@ static KeySym map[MAX_KEY_CODE * GLYPHS_PER_KEY] = { +@@ -196,21 +199,20 @@ static KeySym map[MAX_KEY_CODE * GLYPHS_ #define N_PREDEFINED_KEYS (sizeof(map) / (sizeof(KeySym) * GLYPHS_PER_KEY)) #endif @@ -80,8 +77,8 @@ index f306022..b3b0e68 100644 } -@@ -280,6 +282,29 @@ EnqueueKey(DeviceIntPtr kbdDev, int type, int detail) - mieqEnqueue(kbdDev, (InternalEvent*)(events + i)->event); +@@ -263,6 +265,29 @@ EnqueueKey(DeviceIntPtr kbdDev, int type + QueueKeyboardEvents(kbdDev, type, detail, NULL); } +/* In-server and highly changed version of XkbKeycodeToKeysym */ @@ -110,7 +107,7 @@ index f306022..b3b0e68 100644 /* * Called when the rfbserver receives a rfbKeyEvent event from a client. * Put an X keyboard event into the event queue. -@@ -288,21 +313,35 @@ void +@@ -271,21 +296,35 @@ void KbdAddEvent(Bool down, KeySym keySym, rfbClientPtr cl) { const int type = down ? KeyPress : KeyRelease; @@ -154,7 +151,7 @@ index f306022..b3b0e68 100644 #ifdef CORBA if (cl) { -@@ -320,6 +359,12 @@ KbdAddEvent(Bool down, KeySym keySym, rfbClientPtr cl) +@@ -303,6 +342,12 @@ KbdAddEvent(Bool down, KeySym keySym, rf * * Alan. */ @@ -167,7 +164,7 @@ index f306022..b3b0e68 100644 #if !XFREE86VNC /* First check if it's one of our predefined keys. If so then we can make some attempt at allowing an xmodmap inside a VNC desktop behave -@@ -346,107 +391,227 @@ KbdAddEvent(Bool down, KeySym keySym, rfbClientPtr cl) +@@ -329,107 +374,227 @@ KbdAddEvent(Bool down, KeySym keySym, rf } } #endif @@ -183,16 +180,6 @@ index f306022..b3b0e68 100644 - "less than 2 keysyms per keycode (KeySym 0x%x)\n", (int)keySym); - return; - } -- -- for (i = 0; i < NO_OF_KEYS * keySyms->mapWidth; i++) { -- if (keySym == keySyms->map[i]) { -- keyCode = MIN_KEY_CODE + i / keySyms->mapWidth; -- -- if (keySyms->map[(i / keySyms->mapWidth) -- * keySyms->mapWidth + 1] != NoSymbol) { -- -- /* this keycode has more than one symbol associated with -- it, so shift state is important */ + for (keyCode = MIN_KEY_CODE; keyCode < MIN_KEY_CODE + NO_OF_KEYS; keyCode++) { + /* Check all keycodes, but only continue on those where + * backconversion results in keySym. @@ -215,6 +202,16 @@ index f306022..b3b0e68 100644 + ErrorF ("\n"); +#endif +- for (i = 0; i < NO_OF_KEYS * keySyms->mapWidth; i++) { +- if (keySym == keySyms->map[i]) { +- keyCode = MIN_KEY_CODE + i / keySyms->mapWidth; +- +- if (keySyms->map[(i / keySyms->mapWidth) +- * keySyms->mapWidth + 1] != NoSymbol) { +- +- /* this keycode has more than one symbol associated with +- it, so shift state is important */ +- - if ((i % keySyms->mapWidth) == 0) - shiftMustBeReleased = TRUE; - else @@ -440,7 +437,7 @@ index f306022..b3b0e68 100644 } } -@@ -497,15 +662,15 @@ KbdReleaseAllKeys(void) +@@ -480,15 +645,15 @@ KbdReleaseAllKeys(void) { int i, j; @@ -460,15 +457,11 @@ index f306022..b3b0e68 100644 } } } -diff --git a/hw/vnc/keyboard.h b/hw/vnc/keyboard.h -index d223b6b..beb948a 100644 ---- a/hw/vnc/keyboard.h -+++ b/hw/vnc/keyboard.h +diff -pruN xorg-server-1.12.1.orig/hw/vnc/keyboard.h xorg-server-1.12.1/hw/vnc/keyboard.h +--- xorg-server-1.12.1.orig/hw/vnc/keyboard.h 2012-04-18 14:14:07.437250922 -0500 ++++ xorg-server-1.12.1/hw/vnc/keyboard.h 2012-04-18 14:15:27.657248035 -0500 @@ -32,3 +32,4 @@ #define META_R_KEY_CODE (MIN_KEY_CODE + 108) #define ALT_L_KEY_CODE (MIN_KEY_CODE + 56) #define ALT_R_KEY_CODE (MIN_KEY_CODE + 105) +#define ISO_LEVEL3_KEY_CODE ALT_R_KEY_CODE --- -1.7.3.4 - diff --git a/U_Don-t-call-deleted-Block-WakeupHandler.patch b/U_Don-t-call-deleted-Block-WakeupHandler.patch deleted file mode 100644 index 06c6034..0000000 --- a/U_Don-t-call-deleted-Block-WakeupHandler.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Egbert Eich -Date: Tue Oct 18 20:22:38 2011 +0200 -Subject: [PATCH] Don't call deleted Bloxk/WakeupHandler() -Patch-Mainline: Upstream/2ee85d95 -Git-commit: b93eda251f0b6d0a1601511a55b060604919cc81 -References: bnc #723777 -Signed-off-by: Egbert Eich - -When Block/WakeupHandlers are unregistered from within a handler the -list of handlers is not corrected right away but they are marked as -deleted. -If a deleted handler in the handler list is located after the handler -that calls the unregister function it was still called, as the list was -only corrected after all handlers were processed. This could cause a -crash if the handler got passed a pointer to a data structure which was -no longer existing. -A check for the deleted flag solves this problem. - -Signed-off-by: Egbert Eich ---- - xorg-server-1.10.4/dix/dixutils.c | 10 ++++++---- - 1 files changed, 6 insertions(+), 4 deletions(-) - -diff --git a/xorg-server-1.10.4/dix/dixutils.c b/xorg-server-1.10.4/dix/dixutils.c -index 104363b..dd1c318 100644 ---- a/xorg-server-1.10.4/dix/dixutils.c -+++ b/xorg-server-1.10.4/dix/dixutils.c -@@ -386,8 +386,9 @@ BlockHandler(pointer pTimeout, pointer pReadmask) - screenInfo.screens[i]->blockData, - pTimeout, pReadmask); - for (i = 0; i < numHandlers; i++) -- (*handlers[i].BlockHandler) (handlers[i].blockData, -- pTimeout, pReadmask); -+ if (!handlers[i].deleted) -+ (*handlers[i].BlockHandler) (handlers[i].blockData, -+ pTimeout, pReadmask); - if (handlerDeleted) - { - for (i = 0; i < numHandlers;) -@@ -416,8 +417,9 @@ WakeupHandler(int result, pointer pReadmask) - - ++inHandler; - for (i = numHandlers - 1; i >= 0; i--) -- (*handlers[i].WakeupHandler) (handlers[i].blockData, -- result, pReadmask); -+ if (!handlers[i].deleted) -+ (*handlers[i].WakeupHandler) (handlers[i].blockData, -+ result, pReadmask); - for (i = 0; i < screenInfo.numScreens; i++) - (* screenInfo.screens[i]->WakeupHandler)(i, - screenInfo.screens[i]->wakeupData, diff --git a/U_dix-on-PointerRootWin-send-a-FocusIn-to-the-sprite-w.patch b/U_dix-on-PointerRootWin-send-a-FocusIn-to-the-sprite-w.patch deleted file mode 100644 index 083857f..0000000 --- a/U_dix-on-PointerRootWin-send-a-FocusIn-to-the-sprite-w.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 3ce102c362cadcd7087bdcf48440d9498eaf77d0 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 5 Jan 2012 07:08:01 -0500 -Subject: [PATCH] dix: on PointerRootWin send a FocusIn to the sprite window - too - -XTS XSetDeviceFocus-7 - -Signed-off-by: Peter Hutterer -Reviewed-by: Chase Douglas ---- - dix/enterleave.c | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/dix/enterleave.c b/dix/enterleave.c -index 2b8c7c5..89a82ab 100644 ---- a/dix/enterleave.c -+++ b/dix/enterleave.c -@@ -1299,7 +1299,10 @@ DeviceFocusEvents(DeviceIntPtr dev, - for (i = 0; i < nscreens; i++) - DeviceFocusEvent(dev, XI_FocusIn, mode, in, screenInfo.screens[i]->root); - if (to == PointerRootWin) -+ { - DeviceFocusInEvents(dev, GetCurrentRootWindow(dev), sprite->win, mode, NotifyPointer); -+ DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyPointer, sprite->win); -+ } - } - else - { --- -1.7.7 - diff --git a/U_dix-send-focus-events-to-the-immediate-parent-44079.patch b/U_dix-send-focus-events-to-the-immediate-parent-44079.patch deleted file mode 100644 index dab812f..0000000 --- a/U_dix-send-focus-events-to-the-immediate-parent-44079.patch +++ /dev/null @@ -1,52 +0,0 @@ -From a125aabda3a5cf27aa98cb61f16e49280b66f451 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Thu, 5 Jan 2012 07:02:51 -0500 -Subject: [PATCH] dix: send focus events to the immediate parent (#44079) - -For a transition from windows A to B, A->parent did not receive an event. -DeviceFocusOutEvents sends to windows ]from, to[, so start with the actual -window, not it's parent. - -X.Org Bug 44079 - -Signed-off-by: Peter Hutterer -Reviewed-by: Chase Douglas -Reviewed-by: Keith Packard ---- - dix/enterleave.c | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/dix/enterleave.c b/dix/enterleave.c -index a39e640..2b8c7c5 100644 ---- a/dix/enterleave.c -+++ b/dix/enterleave.c -@@ -1292,7 +1292,7 @@ DeviceFocusEvents(DeviceIntPtr dev, - NotifyPointer); - DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); - /* next call catches the root too, if the screen changed */ -- DeviceFocusOutEvents(dev, from->parent, NullWindow, mode, -+ DeviceFocusOutEvents(dev, from, NullWindow, mode, - NotifyNonlinearVirtual); - } - /* Notify all the roots */ -@@ -1321,7 +1321,7 @@ DeviceFocusEvents(DeviceIntPtr dev, - if (IsParent(to, from)) - { - DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyAncestor, from); -- DeviceFocusOutEvents(dev, from->parent, to, mode, -+ DeviceFocusOutEvents(dev, from, to, mode, - NotifyVirtual); - DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyInferior, to); - if ((IsParent(to, sprite->win)) && -@@ -1353,7 +1353,7 @@ DeviceFocusEvents(DeviceIntPtr dev, - NotifyPointer); - DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); - if (from->parent != NullWindow) -- DeviceFocusOutEvents(dev, from->parent, common, mode, -+ DeviceFocusOutEvents(dev, from, common, mode, - NotifyNonlinearVirtual); - if (to->parent != NullWindow) - DeviceFocusInEvents(dev, common, to, mode, NotifyNonlinearVirtual); --- -1.7.7 - diff --git a/autoconfig_fallback_fbdev_first.diff b/autoconfig_fallback_fbdev_first.diff index 23ce94f..be1a39f 100644 --- a/autoconfig_fallback_fbdev_first.diff +++ b/autoconfig_fallback_fbdev_first.diff @@ -1,22 +1,22 @@ Index: hw/xfree86/common/xf86AutoConfig.c -================================================================================ ---- hw/xfree86/common/xf86AutoConfig.c +=================================================================== +--- hw/xfree86/common/xf86AutoConfig.c.orig +++ hw/xfree86/common/xf86AutoConfig.c -@@ -506,7 +506,7 @@ +@@ -264,7 +264,7 @@ listPossibleVideoDrivers(char *matches[] /* Fallback to platform default hardware */ if (i < (nmatches - 1)) { #if defined(__i386__) || defined(__amd64__) || defined(__hurd__) -- matches[i++] = xnfstrdup("vesa"); -+ matches[i++] = xnfstrdup("fbdev"); +- matches[i++] = xnfstrdup("vesa"); ++ matches[i++] = xnfstrdup("fbdev"); #elif defined(__sparc__) && !defined(sun) - matches[i++] = xnfstrdup("sunffb"); + matches[i++] = xnfstrdup("sunffb"); #endif -@@ -517,7 +517,7 @@ +@@ -276,7 +276,7 @@ listPossibleVideoDrivers(char *matches[] #if !defined(__linux__) && defined(__sparc__) - matches[i++] = xnfstrdup("wsfb"); + matches[i++] = xnfstrdup("wsfb"); #else -- matches[i++] = xnfstrdup("fbdev"); -+ matches[i++] = xnfstrdup("vesa"); +- matches[i++] = xnfstrdup("fbdev"); ++ matches[i++] = xnfstrdup("vesa"); #endif } - } + #endif /* !sun */ diff --git a/bug-197858_dpms.diff b/bug-197858_dpms.diff index 7840f03..8fd555a 100644 --- a/bug-197858_dpms.diff +++ b/bug-197858_dpms.diff @@ -1,61 +1,62 @@ Index: hw/xfree86/common/xf86Events.c -================================================================================ ---- hw/xfree86/common/xf86Events.c +=================================================================== +--- hw/xfree86/common/xf86Events.c.orig +++ hw/xfree86/common/xf86Events.c -@@ -115,6 +115,7 @@ - InputHandlerProc ihproc; - pointer data; - Bool enabled; -+ Bool is_input; - struct x_IHRec * next; +@@ -115,6 +115,7 @@ typedef struct x_IHRec { + InputHandlerProc ihproc; + pointer data; + Bool enabled; ++ Bool is_input; + struct x_IHRec *next; } IHRec, *IHPtr; -@@ -449,8 +450,12 @@ - * Keep the order: Disable Device > LeaveVT - * EnterVT > EnableDevice - */ -- for (ih = InputHandlers; ih; ih = ih->next) -- xf86DisableInputHandler(ih); -+ for (ih = InputHandlers; ih; ih = ih->next) { -+ if (ih->is_input) -+ xf86DisableInputHandler(ih); -+ else -+ xf86DisableGeneralHandler(ih); -+ } - for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) { - if (pInfo->dev) { - xf86ReleaseKeys(pInfo->dev); -@@ -492,8 +497,12 @@ - EnableDevice(pInfo->dev, TRUE); - pInfo = pInfo->next; - } -- for (ih = InputHandlers; ih; ih = ih->next) -- xf86EnableInputHandler(ih); -+ for (ih = InputHandlers; ih; ih = ih->next) { -+ if (ih->is_input) -+ xf86EnableInputHandler(ih); -+ else -+ xf86EnableGeneralHandler(ih); -+ } +@@ -445,9 +446,13 @@ xf86VTSwitch(void) + * Keep the order: Disable Device > LeaveVT + * EnterVT > EnableDevice + */ +- for (ih = InputHandlers; ih; ih = ih->next) ++ for (ih = InputHandlers; ih; ih = ih->next) { ++ if (ih->is_input) + xf86DisableInputHandler(ih); +- for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) { ++ else ++ xf86DisableGeneralHandler(ih); ++ } ++ for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) { + if (pInfo->dev) { + xf86ReleaseKeys(pInfo->dev); + ProcessInputEvents(); +@@ -486,8 +491,12 @@ xf86VTSwitch(void) + EnableDevice(pInfo->dev, TRUE); + pInfo = pInfo->next; + } +- for (ih = InputHandlers; ih; ih = ih->next) +- xf86EnableInputHandler(ih); ++ for (ih = InputHandlers; ih; ih = ih->next) { ++ if (ih->is_input) ++ xf86EnableInputHandler(ih); ++ else ++ xf86EnableGeneralHandler(ih); ++ } - xf86UnblockSIGIO(prevSIGIO); + xf86UnblockSIGIO(prevSIGIO); -@@ -549,8 +558,12 @@ - pInfo = pInfo->next; +@@ -542,8 +551,12 @@ xf86VTSwitch(void) + pInfo = pInfo->next; + } + +- for (ih = InputHandlers; ih; ih = ih->next) +- xf86EnableInputHandler(ih); ++ for (ih = InputHandlers; ih; ih = ih->next) { ++ if (ih->is_input) ++ xf86EnableInputHandler(ih); ++ else ++ xf86EnableGeneralHandler(ih); ++ } + + xf86UnblockSIGIO(prevSIGIO); } - -- for (ih = InputHandlers; ih; ih = ih->next) -- xf86EnableInputHandler(ih); -+ for (ih = InputHandlers; ih; ih = ih->next) { -+ if (ih->is_input) -+ xf86EnableInputHandler(ih); -+ else -+ xf86EnableGeneralHandler(ih); -+ } - - xf86UnblockSIGIO(prevSIGIO); - } -@@ -587,8 +600,10 @@ +@@ -579,8 +592,10 @@ xf86AddInputHandler(int fd, InputHandler { IHPtr ih = addInputHandler(fd, proc, data); diff --git a/bug534768-prefer_local_symbols.patch b/bug534768-prefer_local_symbols.patch index b7e4e6c..e9739e5 100644 --- a/bug534768-prefer_local_symbols.patch +++ b/bug534768-prefer_local_symbols.patch @@ -1,11 +1,13 @@ -Index: xorg-server-1.6.3.901/hw/xfree86/loader/dlloader.c -================================================================================ ---- xorg-server-1.7.99/hw/xfree86/loader/loader.c -+++ xorg-server-1.7.99/hw/xfree86/loader/loader.c -@@ -120,5 +120,5 @@ +Index: xorg-server-1.12.1/hw/xfree86/loader/loader.c +=================================================================== +--- xorg-server-1.12.1.orig/hw/xfree86/loader/loader.c ++++ xorg-server-1.12.1/hw/xfree86/loader/loader.c +@@ -152,7 +152,7 @@ LoaderSymbol(const char *name) + return p; if (!global_scope) -- global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL); -+ global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL | RTLD_DEEPBIND); +- global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL); ++ global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL | RTLD_DEEPBIND); if (global_scope) + return dlsym(global_scope, name); diff --git a/confine_to_shape.diff b/confine_to_shape.diff index fdb3b77..a98dc1d 100644 --- a/confine_to_shape.diff +++ b/confine_to_shape.diff @@ -1,108 +1,100 @@ -Index: dix/events.c -================================================================================ ---- dix/events.c -+++ dix/events.c -@@ -661,37 +661,80 @@ +--- dix/events.c.orig 2012-04-17 11:34:39.714915372 -0500 ++++ dix/events.c 2012-04-17 11:26:54.735728478 -0500 +@@ -671,32 +671,77 @@ { BoxRec box; int x = *px, y = *py; - int incx = 1, incy = 1; - SpritePtr pSprite; + int nbox; + BoxPtr pbox; + int d, min = (~0U >> 1), dx2, dy2, x_r, y_r; - pSprite = pDev->spriteInfo->sprite; if (RegionContainsPoint(shape, x, y, &box)) - return; + return; - box = *RegionExtents(shape); - /* this is rather crude */ - do { -- x += incx; -- if (x >= box.x2) -- { -- incx = -1; -- x = *px - 1; +- x += incx; +- if (x >= box.x2) { +- incx = -1; +- x = *px - 1; + + for (nbox = REGION_NUM_RECTS (shape), + pbox = REGION_RECTS(shape); + nbox--; + pbox++) + { -+ if (pbox->x1 < x && pbox->x2 > x) { -+ d = pbox->y1 - y; -+ if (d >= 0) { -+ d *= d; -+ if (d < min) { -+ *px = x; -+ *py = pbox->y1 + 1; -+ min = d; -+ } -+ } else { -+ d = pbox->y2 - y; d *= d; -+ if (d < min) { -+ *px = x; -+ *py = pbox->y2 - 1; -+ min = d; -+ } -+ } - } -- else if (x < box.x1) -- { -- incx = 1; -- x = *px; -- y += incy; -- if (y >= box.y2) -- { -- incy = -1; -- y = *py - 1; -+ else if (pbox->y1 < y && pbox->y2 > y) { -+ d = pbox->x1 - x; -+ if (d >= 0) { -+ d *= d; -+ if (d < min) { -+ *px = pbox->x1 + 1; -+ *py = y; -+ min = d; -+ } -+ } else { -+ d = pbox->x2 - x; d *= d; -+ if (d < min) { -+ *px = pbox->x2 - 1; -+ *py = y; -+ min = d; -+ } -+ } -+ -+ } else { -+ dx2 = pbox->x1 - x; -+ if (dx2 >= 0) { -+ dx2 *= dx2; -+ x_r = pbox->x1 + 1; -+ } else { -+ dx2 = pbox->x2 - x; dx2 *= dx2; -+ x_r = pbox->x2 - 1; -+ } -+ dy2 = pbox->y1 - y; -+ if (dy2 >= 0) { -+ dy2 *= dy2; -+ y_r = pbox->y1 + 1; -+ } else { -+ dy2 = pbox->y2 - y; dy2 *= dy2; -+ y_r = pbox->y2 - 1; -+ } -+ if ((d = dx2 + dy2) < min) { -+ *px = x_r; -+ *py = y_r; -+ min = d; - } -- else if (y < box.y1) -- return; /* should never get here! */ - } ++ if (pbox->x1 < x && pbox->x2 > x) { ++ d = pbox->y1 - y; ++ if (d >= 0) { ++ d *= d; ++ if (d < min) { ++ *px = x; ++ *py = pbox->y1 + 1; ++ min = d; ++ } ++ } else { ++ d = pbox->y2 - y; d *= d; ++ if (d < min) { ++ *px = x; ++ *py = pbox->y2 - 1; ++ min = d; ++ } ++ } + } +- else if (x < box.x1) { +- incx = 1; +- x = *px; +- y += incy; +- if (y >= box.y2) { +- incy = -1; +- y = *py - 1; ++ else if (pbox->y1 < y && pbox->y2 > y) { ++ d = pbox->x1 - x; ++ if (d >= 0) { ++ d *= d; ++ if (d < min) { ++ *px = pbox->x1 + 1; ++ *py = y; ++ min = d; ++ } ++ } else { ++ d = pbox->x2 - x; d *= d; ++ if (d < min) { ++ *px = pbox->x2 - 1; ++ *py = y; ++ min = d; ++ } ++ } ++ } else { ++ dx2 = pbox->x1 - x; ++ if (dx2 >= 0) { ++ dx2 *= dx2; ++ x_r = pbox->x1 + 1; ++ } else { ++ dx2 = pbox->x2 - x; dx2 *= dx2; ++ x_r = pbox->x2 - 1; ++ } ++ dy2 = pbox->y1 - y; ++ if (dy2 >= 0) { ++ dy2 *= dy2; ++ y_r = pbox->y1 + 1; ++ } else { ++ dy2 = pbox->y2 - y; dy2 *= dy2; ++ y_r = pbox->y2 - 1; ++ } ++ if ((d = dx2 + dy2) < min) { ++ *px = x_r; ++ *py = y_r; ++ min = d; + } +- else if (y < box.y1) +- return; /* should never get here! */ + } - } while (!RegionContainsPoint(shape, x, y, &box)); - *px = x; - *py = y; -+ } ++ } } static void diff --git a/dpms_screensaver.diff b/dpms_screensaver.diff index 0bb6a67..61b0985 100644 --- a/dpms_screensaver.diff +++ b/dpms_screensaver.diff @@ -1,14 +1,14 @@ -Index: xorg-server-1.6.3.901/hw/xfree86/common/xf86DPMS.c -================================================================================ ---- xorg-server-1.7.99/hw/xfree86/common/xf86DPMS.c -+++ xorg-server-1.7.99/hw/xfree86/common/xf86DPMS.c -@@ -156,7 +156,8 @@ - rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive); - if (rc != Success) - return rc; +Index: xorg-server-1.12.1/hw/xfree86/common/xf86DPMS.c +=================================================================== +--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86DPMS.c ++++ xorg-server-1.12.1/hw/xfree86/common/xf86DPMS.c +@@ -151,7 +151,8 @@ DPMSSet(ClientPtr client, int level) + rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive); + if (rc != Success) + return rc; - } + } else -+ dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverReset); ++ dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverReset); /* For each screen, set the DPMS level */ for (i = 0; i < xf86NumScreens; i++) { diff --git a/driver-autoconfig.diff b/driver-autoconfig.diff index 503ad77..9e58324 100644 --- a/driver-autoconfig.diff +++ b/driver-autoconfig.diff @@ -1,38 +1,40 @@ ---- hw/xfree86/common/xf86pciBus.c +Index: hw/xfree86/common/xf86pciBus.c +=================================================================== +--- hw/xfree86/common/xf86pciBus.c.orig +++ hw/xfree86/common/xf86pciBus.c -@@ -176,7 +176,11 @@ - case 0x1142: driverList[0] = "apm"; break; - case 0xedd8: driverList[0] = "ark"; break; - case 0x1a03: driverList[0] = "ast"; break; -- case 0x1002: driverList[0] = "ati"; break; -+ case 0x1002: -+ driverList[0] = "fglrx"; -+ driverList[1] = "radeonhd"; -+ driverList[2] = "ati"; -+ break; - case 0x102c: driverList[0] = "chips"; break; - case 0x1013: driverList[0] = "cirrus"; break; - case 0x3d3d: driverList[0] = "glint"; break; -@@ -192,8 +196,20 @@ - break; - case 0x102b: driverList[0] = "mga"; break; - case 0x10c8: driverList[0] = "neomagic"; break; -- case 0x10de: case 0x12d2: driverList[0] = "nv"; break; -- case 0x1106: driverList[0] = "openchrome"; break; -+ case 0x12d2: driverList[0] = "nv"; break; -+ case 0x10de: -+ driverList[0] = "nvidia"; -+ driverList[1] = "nouveau"; -+ /* GeForce 6150SE support broken (bnc #465190/544674) */ -+ if (dev->device_id != 0x03D0) { -+ driverList[2] = "nv"; -+ } -+ break; -+ case 0x1106: -+ driverList[0] = "via"; -+ driverList[1] = "openchrome"; -+ driverList[2] = "unichrome"; -+ break; - case 0x1b36: driverList[0] = "qxl"; break; - case 0x1163: driverList[0] = "rendition"; break; - case 0x5333: +@@ -1107,7 +1107,9 @@ videoPtrToDriverList(struct pci_device * + driverList[0] = "ast"; + break; + case 0x1002: +- driverList[0] = "ati"; ++ driverList[0] = "fglrx"; ++ driverList[1] = "radeonhd"; ++ driverList[2] = "ati"; + break; + case 0x102c: + driverList[0] = "chips"; +@@ -1139,6 +1141,13 @@ videoPtrToDriverList(struct pci_device * + driverList[0] = "neomagic"; + break; + case 0x10de: ++ driverList[0] = "nvidia"; ++ driverList[1] = "nouveau"; ++ /* GeForce 6150SE support broken (bnc #465190/544674) */ ++ if (dev->device_id != 0x03D0) { ++ driverList[2] = "nv"; ++ } ++ break; + case 0x12d2: + { + int idx = 0; +@@ -1150,7 +1159,9 @@ videoPtrToDriverList(struct pci_device * + break; + } + case 0x1106: +- driverList[0] = "openchrome"; ++ driverList[0] = "via"; ++ driverList[1] = "openchrome"; ++ driverList[2] = "unichrome"; + break; + case 0x1b36: + driverList[0] = "qxl"; diff --git a/fbdevhw.diff b/fbdevhw.diff index 0b432ba..6302457 100644 --- a/fbdevhw.diff +++ b/fbdevhw.diff @@ -1,30 +1,30 @@ Index: hw/xfree86/fbdevhw/fbdevhw.c -================================================================================ ---- hw/xfree86/fbdevhw/fbdevhw.c +=================================================================== +--- hw/xfree86/fbdevhw/fbdevhw.c.orig +++ hw/xfree86/fbdevhw/fbdevhw.c -@@ -957,9 +957,10 @@ - return; - } +@@ -858,9 +858,10 @@ fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mo + return; + } -+ /* Novell Bug #146462 */ - if (-1 == ioctl(fPtr->fd, FBIOBLANK, (void *)fbmode)) -- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, -- "FBIOBLANK: %s\n", strerror(errno)); -+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, -+ "FBIOBLANK: %s (Screen blanking not supported by vesafb of Linux Kernel)\n", strerror(errno)); ++ /* Novell Bug #146462 */ + if (-1 == ioctl(fPtr->fd, FBIOBLANK, (void *) fbmode)) +- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, +- "FBIOBLANK: %s\n", strerror(errno)); ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, ++ "FBIOBLANK: %s (Screen blanking not supported by vesafb of Linux Kernel)\n", strerror(errno)); } Bool -@@ -975,9 +976,10 @@ +@@ -875,9 +876,10 @@ fbdevHWSaveScreen(ScreenPtr pScreen, int - unblank = xf86IsUnblank(mode); + unblank = xf86IsUnblank(mode); -+ /* Novell Bug #146462 */ - if (-1 == ioctl(fPtr->fd, FBIOBLANK, (void *)(1-unblank))) { -- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, -- "FBIOBLANK: %s\n", strerror(errno)); -+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, -+ "FBIOBLANK: %s (Screen blanking not supported by vesafb of Linux Kernel)\n", strerror(errno)); - return FALSE; - } ++ /* Novell Bug #146462 */ + if (-1 == ioctl(fPtr->fd, FBIOBLANK, (void *) (1 - unblank))) { +- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, +- "FBIOBLANK: %s\n", strerror(errno)); ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, ++ "FBIOBLANK: %s (Screen blanking not supported by vesafb of Linux Kernel)\n", strerror(errno)); + return FALSE; + } diff --git a/fix-dpi-values.diff b/fix-dpi-values.diff index 52e69c4..dc97e25 100644 --- a/fix-dpi-values.diff +++ b/fix-dpi-values.diff @@ -1,58 +1,58 @@ Index: hw/xfree86/common/xf86Helper.c -================================================================================ ---- hw/xfree86/common/xf86Helper.c +=================================================================== +--- hw/xfree86/common/xf86Helper.c.orig +++ hw/xfree86/common/xf86Helper.c -@@ -974,12 +974,22 @@ - } else if (pScrn->widthmm > 0 || pScrn->heightmm > 0) { - from = X_CONFIG; - if (pScrn->widthmm > 0) { -- pScrn->xDpi = -- (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm); -+ if (pScrn->modes && pScrn->modes->HDisplay > 0) { -+ pScrn->xDpi = -+ (int)((double) pScrn->modes->HDisplay * MMPERINCH / pScrn->widthmm); -+ } else { -+ pScrn->xDpi = -+ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm); -+ } - } - if (pScrn->heightmm > 0) { -- pScrn->yDpi = -- (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm); -+ if (pScrn->modes && pScrn->modes->VDisplay > 0) { -+ pScrn->yDpi = -+ (int)((double)pScrn->modes->VDisplay * MMPERINCH / pScrn->heightmm); -+ } else { -+ pScrn->yDpi = -+ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm); -+ } - } - if (pScrn->xDpi > 0 && pScrn->yDpi <= 0) - pScrn->yDpi = pScrn->xDpi; -@@ -1014,12 +1024,22 @@ - pScrn->widthmm = ddcWidthmm; - pScrn->heightmm = ddcHeightmm; - if (pScrn->widthmm > 0) { -- pScrn->xDpi = -- (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm); +@@ -922,12 +922,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int + else if (pScrn->widthmm > 0 || pScrn->heightmm > 0) { + from = X_CONFIG; + if (pScrn->widthmm > 0) { +- pScrn->xDpi = +- (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm); + if (pScrn->modes && pScrn->modes->HDisplay > 0) { + pScrn->xDpi = -+ (int)((double) pScrn->modes->HDisplay * MMPERINCH / pScrn->widthmm); ++ (int)((double) pScrn->modes->HDisplay * MMPERINCH / pScrn->widthmm); + } else { -+ pScrn->xDpi = -+ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm); ++ pScrn->xDpi = ++ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm); + } - } - if (pScrn->heightmm > 0) { -- pScrn->yDpi = -- (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm); -+ if (pScrn->modes && pScrn->modes->VDisplay > 0) { -+ pScrn->yDpi = -+ (int)((double)pScrn->modes->VDisplay * MMPERINCH / pScrn->heightmm); -+ } else { -+ pScrn->yDpi = -+ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm); -+ } - } - if (pScrn->xDpi > 0 && pScrn->yDpi <= 0) - pScrn->yDpi = pScrn->xDpi; + } + if (pScrn->heightmm > 0) { +- pScrn->yDpi = +- (int) ((double) pScrn->virtualY * MMPERINCH / pScrn->heightmm); ++ if (pScrn->modes && pScrn->modes->VDisplay > 0) { ++ pScrn->yDpi = ++ (int)((double)pScrn->modes->VDisplay * MMPERINCH / pScrn->heightmm); ++ } else { ++ pScrn->yDpi = ++ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm); ++ } + } + if (pScrn->xDpi > 0 && pScrn->yDpi <= 0) + pScrn->yDpi = pScrn->xDpi; +@@ -966,12 +976,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int + pScrn->widthmm = ddcWidthmm; + pScrn->heightmm = ddcHeightmm; + if (pScrn->widthmm > 0) { +- pScrn->xDpi = +- (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm); ++ if (pScrn->modes && pScrn->modes->HDisplay > 0) { ++ pScrn->xDpi = ++ (int)((double) pScrn->modes->HDisplay * MMPERINCH / pScrn->widthmm); ++ } else { ++ pScrn->xDpi = ++ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm); ++ } + } + if (pScrn->heightmm > 0) { +- pScrn->yDpi = +- (int) ((double) pScrn->virtualY * MMPERINCH / pScrn->heightmm); ++ if (pScrn->modes && pScrn->modes->VDisplay > 0) { ++ pScrn->yDpi = ++ (int)((double)pScrn->modes->VDisplay * MMPERINCH / pScrn->heightmm); ++ } else { ++ pScrn->yDpi = ++ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm); ++ } + } + if (pScrn->xDpi > 0 && pScrn->yDpi <= 0) + pScrn->yDpi = pScrn->xDpi; diff --git a/fix_fglrx_screendepth_issue.patch b/fix_fglrx_screendepth_issue.patch index 3141571..6cf873f 100644 --- a/fix_fglrx_screendepth_issue.patch +++ b/fix_fglrx_screendepth_issue.patch @@ -1,5 +1,7 @@ ---- hw/xfree86/common/xf86AutoConfig.c.orig 2010-03-23 19:36:35.242114919 +0100 -+++ hw/xfree86/common/xf86AutoConfig.c 2010-03-23 19:46:34.037124633 +0100 +Index: hw/xfree86/common/xf86AutoConfig.c +=================================================================== +--- hw/xfree86/common/xf86AutoConfig.c.orig ++++ hw/xfree86/common/xf86AutoConfig.c @@ -75,6 +75,13 @@ "\tDevice\t" BUILTIN_DEVICE_NAME "\n" \ "EndSection\n\n" @@ -14,15 +16,15 @@ #define BUILTIN_LAYOUT_SECTION_PRE \ "Section \"ServerLayout\"\n" \ "\tIdentifier\t\"Builtin Default Layout\"\n" -@@ -259,7 +266,10 @@ xf86AutoConfig(void) +@@ -153,7 +160,10 @@ xf86AutoConfig(void) for (p = deviceList; *p; p++) { - snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION, *p, 0, *p); - AppendToConfig(buf); -- snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, *p, 0, *p, 0); + snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION, *p, 0, *p); + AppendToConfig(buf); +- snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, *p, 0, *p, 0); + if( strcmp(*p, "fglrx") == 0 ) + snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION_FOR_FGLRX, *p, 0, *p, 0); + else + snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, *p, 0, *p, 0); - AppendToConfig(buf); + AppendToConfig(buf); } diff --git a/p_default-module-path.diff b/p_default-module-path.diff index 45e7451..a8020c0 100644 --- a/p_default-module-path.diff +++ b/p_default-module-path.diff @@ -1,9 +1,9 @@ Index: hw/xfree86/common/xf86Globals.c -================================================================================ ---- hw/xfree86/common/xf86Globals.c +=================================================================== +--- hw/xfree86/common/xf86Globals.c.orig +++ hw/xfree86/common/xf86Globals.c -@@ -144,7 +144,7 @@ - }; +@@ -135,7 +135,7 @@ xf86InfoRec xf86Info = { + const char *xf86ConfigFile = NULL; const char *xf86ConfigDir = NULL; -const char *xf86ModulePath = DEFAULT_MODULE_PATH; diff --git a/p_xnest-ignore-getimage-errors.diff b/p_xnest-ignore-getimage-errors.diff index a396bed..3be1156 100644 --- a/p_xnest-ignore-getimage-errors.diff +++ b/p_xnest-ignore-getimage-errors.diff @@ -1,9 +1,9 @@ -Index: build-GucBkyZ/xorg-server-1.6.3.901/hw/xnest/GCOps.c -================================================================================ ---- BUILD/xorg-server-1.7.99/hw/xnest/GCOps.c -+++ BUILD/xorg-server-1.7.99/hw/xnest/GCOps.c -@@ -94,6 +94,13 @@ - } +Index: xorg-server-1.12.1/hw/xnest/GCOps.c +=================================================================== +--- xorg-server-1.12.1.orig/hw/xnest/GCOps.c ++++ xorg-server-1.12.1/hw/xnest/GCOps.c +@@ -94,15 +94,26 @@ xnestPutImage(DrawablePtr pDrawable, GCP + } } +static int @@ -15,18 +15,17 @@ Index: build-GucBkyZ/xorg-server-1.6.3.901/hw/xnest/GCOps.c + void xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, - unsigned int format, unsigned long planeMask, -@@ -101,9 +108,13 @@ + unsigned int format, unsigned long planeMask, char *pImage) { - XImage *ximage; - int length; -+ int (*old_handler)(Display*, XErrorEvent*); + XImage *ximage; + int length; ++ int (*old_handler)(Display*, XErrorEvent*); -+ /* we may get BadMatch error when xnest window is minimized */ -+ old_handler = XSetErrorHandler (xnestIgnoreErrorHandler); - ximage = XGetImage(xnestDisplay, xnestDrawable(pDrawable), - x, y, w, h, planeMask, format); -+ XSetErrorHandler (old_handler); ++ /* we may get BadMatch error when xnest window is minimized */ ++ old_handler = XSetErrorHandler (xnestIgnoreErrorHandler); + ximage = XGetImage(xnestDisplay, xnestDrawable(pDrawable), + x, y, w, h, planeMask, format); ++ XSetErrorHandler (old_handler); - if (ximage) { - length = ximage->bytes_per_line * ximage->height; + if (ximage) { + length = ximage->bytes_per_line * ximage->height; diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..682b667 --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# pre_checking.sh +# Licensed under the same condition as the xorg-server. +# This script updates the .spec file (based on .spec.in) and inject versioned ABI Symbols from the X-Server, +# stored in a template file xorg-server-provides. The content of this file is verified during build, as the +# same script runs then again, extracting ABI versions from the source to be built. This ensures we can't +# publish a package with wrong ABI Versions being provided as part of the RPM Metadata. +# Driver-, Input and extension-packages are supposed to use the provided macros to ensure correct Requires. + +# extract ABI Versions... this function is copied from configure.ac +extract_abi() { + grep ^.define.*${1}_VERSION ${xorg_src}/hw/xfree86/common/xf86Module.h | tr '(),' ' .' | awk '{ print $4$5 }' +} + +if [ "$1" == "--tar" ]; then + tmpdir=$(mktemp -d) + tar xf "$2" -C ${tmpdir} + xorg_src=${tmpdir}/* +elif [ "$1" == "--verify" ]; then + xorg_src="$2" + prv_ext=".build" +else + echo "Wrong usage of this script" + echo "$0 can be started in two ways:" + echo "1: $0 --tar {xorg-server-xxxx.tar.bz2}" + echo "2: $0 --verify {source-folder}" + echo "Variant 1 creates the file xorg-server-provides to be included in the src rpm" + echo "Variant 2 is being called during build to ensure the ABI provides match the expectations." + echo "" + echo "" + echo "Trying to guess the right tarball" + sh $0 --tar xorg-server-*.tar.bz2 + echo "... Please verify if the result makes sense" + exit 2 +fi + +abi_ansic=`extract_abi ANSIC` +abi_videodrv=`extract_abi VIDEODRV` +abi_xinput=`extract_abi XINPUT` +abi_extension=`extract_abi EXTENSION` + +A="Provides: X11_ABI_XINPUT = ${abi_xinput}\nProvides: X11_ABI_VIDEODRV = ${abi_videodrv}\nProvides: X11_ABI_ANSIC = ${abi_ansic}\nProvides: X11_ABI_EXTENSION = ${abi_extension}" + +echo -e $A > xorg-server-provides${prv_ext} + +if [ "$1" == "--tar" ]; then + if [ -d ${tmpdir} ]; then + rm -rf ${tmpdir} + fi +elif [ "$1" == "--verify" ]; then + diff "$3" xorg-server-provides${prv_ext} + if [ $? -gt 0 ]; then + echo "The ABI verification failed... please run $0 before checking in" + exit 1 + fi +fi + diff --git a/pu_fixes.diff b/pu_fixes.diff index b97bb14..624b94a 100644 --- a/pu_fixes.diff +++ b/pu_fixes.diff @@ -1,21 +1,22 @@ Index: hw/xfree86/xaa/xaaImage.c -================================================================================ ---- hw/xfree86/xaa/xaaImage.c +=================================================================== +--- hw/xfree86/xaa/xaaImage.c.orig +++ hw/xfree86/xaa/xaaImage.c -@@ -238,12 +238,16 @@ - (*infoRec->SetupForImageWrite)(pScrn, rop, planemask, trans, bpp, depth); - (*infoRec->SubsequentImageWriteRect)(pScrn, x, y, w, h, skipleft); +@@ -240,6 +240,7 @@ XAAWritePixmap(ScrnInfoPtr pScrn, int x, + (*infoRec->SetupForImageWrite) (pScrn, rop, planemask, trans, bpp, depth); + (*infoRec->SubsequentImageWriteRect) (pScrn, x, y, w, h, skipleft); +#if 0 - if(beCareful) { - /* in cases with bad alignment we have to be careful not - to read beyond the end of the source */ - if(((x * Bpp) + (dwords << 2)) > srcwidth) h--; - else beCareful = FALSE; + if (beCareful) { + /* in cases with bad alignment we have to be careful not + to read beyond the end of the source */ +@@ -248,6 +249,9 @@ XAAWritePixmap(ScrnInfoPtr pScrn, int x, + else + beCareful = FALSE; } +#endif + if (beCareful) -+ h--; ++ h--; - if(dwords > infoRec->ImageWriteRange) { - while(h--) { + if (dwords > infoRec->ImageWriteRange) { + while (h--) { diff --git a/randr1_1-sig11.diff b/randr1_1-sig11.diff index 8f4644d..58853be 100644 --- a/randr1_1-sig11.diff +++ b/randr1_1-sig11.diff @@ -1,14 +1,14 @@ -Index: xorg-server-1.6.3.901/hw/xfree86/common/xf86RandR.c -================================================================================ ---- xorg-server-1.7.99/hw/xfree86/common/xf86RandR.c -+++ xorg-server-1.7.99/hw/xfree86/common/xf86RandR.c -@@ -247,6 +247,9 @@ - Bool useVirtual = FALSE; - Rotation oldRotation = randrp->rotation; +Index: xorg-server-1.12.1/hw/xfree86/common/xf86RandR.c +=================================================================== +--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86RandR.c ++++ xorg-server-1.12.1/hw/xfree86/common/xf86RandR.c +@@ -237,6 +237,9 @@ xf86RandRSetConfig(ScreenPtr pScreen, + DeviceIntPtr dev; + Bool view_adjusted = FALSE; + if (!scrp->vtSema) -+ return FALSE; ++ return FALSE; + - miPointerGetPosition(inputInfo.pointer, &px, &py); - for (mode = scrp->modes; ; mode = mode->next) - { + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (!IsMaster(dev) && !IsFloating(dev)) + continue; diff --git a/sync-fix.patch b/sync-fix.patch index 741a8a2..dc3d14d 100644 --- a/sync-fix.patch +++ b/sync-fix.patch @@ -1,8 +1,10 @@ ---- xorg-server-1.9.1/Xext/sync.c 2010-11-16 23:11:56.751124639 -0500 -+++ xorg-server-1.9.1/Xext/sync.c 2010-11-16 23:13:16.327862535 -0500 -@@ -2264,8 +2264,44 @@ +Index: xorg-server-1.12.1/Xext/sync.c +=================================================================== +--- xorg-server-1.12.1.orig/Xext/sync.c ++++ xorg-server-1.12.1/Xext/sync.c +@@ -2615,9 +2615,43 @@ static XSyncValue *pIdleTimeValueGreater static void - IdleTimeQueryValue (pointer pCounter, CARD64 *pValue_return) + IdleTimeQueryValue(pointer pCounter, CARD64 * pValue_return) { - CARD32 idle = GetTimeInMillis() - lastDeviceEventTime.milliseconds; + static CARD32 previousLastDeviceEventTimeMilliseconds = 0; @@ -10,9 +12,8 @@ + CARD32 idle = now - lastDeviceEventTime.milliseconds; + CARD32 previousIdle = now - previousLastDeviceEventTimeMilliseconds; + SyncCounter *pIdleTimeCounter = (SyncCounter*)pCounter; -+ - XSyncIntsToValue (pValue_return, idle, 0); -+ + + XSyncIntsToValue(pValue_return, idle, 0); + if (pCounter == NULL) + { + return; @@ -29,7 +30,7 @@ + /* no new user event, no need to change idle counter. */ + return; + } -+ previousLastDeviceEventTimeMilliseconds = lastDeviceEventTime.milliseconds; ++ previousLastDeviceEventTimeMilliseconds = lastDeviceEventTime.milliseconds; + + /* + * Some user event occured; now update idle counter with previous @@ -46,12 +47,12 @@ } static void -@@ -2342,7 +2378,7 @@ +@@ -2700,7 +2734,7 @@ IdleTimeWakeupHandler(pointer env, int r if (!pIdleTimeValueLess && !pIdleTimeValueGreater) - return; + return; -- IdleTimeQueryValue (NULL, &idle); -+ IdleTimeQueryValue (IdleTimeCounter, &idle); +- IdleTimeQueryValue(NULL, &idle); ++ IdleTimeQueryValue(IdleTimeCounter, &idle); if ((pIdleTimeValueGreater && - XSyncValueGreaterOrEqual (idle, *pIdleTimeValueGreater)) || + XSyncValueGreaterOrEqual(idle, *pIdleTimeValueGreater)) || diff --git a/u_OS-acpi-Reconnect-to-acpid-when-it-gets-restarted.patch b/u_OS-acpi-Reconnect-to-acpid-when-it-gets-restarted.patch deleted file mode 100644 index 42a3f9a..0000000 --- a/u_OS-acpi-Reconnect-to-acpid-when-it-gets-restarted.patch +++ /dev/null @@ -1,290 +0,0 @@ -From 142ba992065dd9c37a9d06dc6e96cfc9adfb6be0 Mon Sep 17 00:00:00 2001 -From: Egbert Eich -Date: Tue, 5 Jul 2011 06:56:43 +0200 -Subject: [PATCH] OS/acpi: Reconnect to acpid when it gets restarted. -Patch-mainline: To be upstreamed - -On Linux the Xserver connects to the ACPI daemon to -receive power management events. If this daemon isn't -started when the server starts or goes down the connection -is lost. -When this happens we add a timer which periodically -tries to reconnect. - -Signed-off-by: Egbert Eich ---- - hw/xfree86/os-support/linux/lnx_acpi.c | 68 ++++++++++++++++++++++++++----- - hw/xfree86/os-support/linux/lnx_apm.c | 9 ++++ - 2 files changed, 66 insertions(+), 11 deletions(-) - -diff --git a/hw/xfree86/os-support/linux/lnx_acpi.c b/hw/xfree86/os-support/linux/lnx_acpi.c -index 5fad194..8dd6881 100644 ---- a/hw/xfree86/os-support/linux/lnx_acpi.c -+++ b/hw/xfree86/os-support/linux/lnx_acpi.c -@@ -32,9 +32,12 @@ - #define ACPI_VIDEO_HEAD_INVALID (~0u - 1) - #define ACPI_VIDEO_HEAD_END (~0u) - -+static PMClose doLnxACPIOpen(void); - static void lnxCloseACPI(void); - static pointer ACPIihPtr = NULL; -+static OsTimerPtr acpiTimer = NULL; - PMClose lnxACPIOpen(void); -+PMClose lnxACPIPoll(void); - - /* in milliseconds */ - #define ACPI_REOPEN_DELAY 1000 -@@ -52,6 +55,22 @@ lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg) - - #define LINE_LENGTH 80 - -+static CARD32 -+lnxACPICheckTimer(OsTimerPtr timer, CARD32 now, pointer arg) -+{ -+#if DEBUG -+ ErrorF("ACPI: trying to reopen\n"); -+#endif -+ if (doLnxACPIOpen()) { -+#if DEBUG -+ ErrorF("ACPI: successfully reopened\n"); -+#endif -+ acpiTimer = NULL; -+ return 0; -+ } -+ return 10000; -+} -+ - static int - lnxACPIGetEventFromOs(int fd, pmEvent *events, int num) - { -@@ -127,33 +146,35 @@ lnxACPIConfirmEventToOs(int fd, pmEvent event) - } - } - --PMClose --lnxACPIOpen(void) -+static PMClose -+doLnxACPIOpen(void) - { -- int fd; -+ int fd = -1; - struct sockaddr_un addr; - int r = -1; - static int warned = 0; - -- DebugF("ACPI: OSPMOpen called\n"); - if (ACPIihPtr || !xf86Info.pmFlag) - return NULL; - - DebugF("ACPI: Opening device\n"); -- if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) > -1) { -+ fd = socket(AF_UNIX, SOCK_STREAM, 0); -+ if (fd > -1) { - memset(&addr, 0, sizeof(addr)); - addr.sun_family = AF_UNIX; - strcpy(addr.sun_path, ACPI_SOCKET); -- if ((r = connect(fd, (struct sockaddr*)&addr, sizeof(addr))) == -1) { -- if (!warned) -+ r = connect(fd, (struct sockaddr*)&addr, sizeof(addr)); -+ if (r == -1) { -+ if (errno != warned) - xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n", - ACPI_SOCKET, strerror(errno)); -- warned = 1; -- shutdown(fd, 2); -+ warned = errno; -+ shutdown(fd, SHUT_RDWR); - close(fd); - return NULL; - } -- } -+ } else -+ return NULL; - - xf86PMGetEventFromOs = lnxACPIGetEventFromOs; - xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs; -@@ -164,6 +185,25 @@ lnxACPIOpen(void) - return lnxCloseACPI; - } - -+PMClose -+lnxACPIPoll(void) -+{ -+ TimerSet(NULL, 0, 10000, lnxACPICheckTimer, NULL); -+ return lnxCloseACPI; -+} -+ -+PMClose -+lnxACPIOpen(void) -+{ -+ PMClose ret; -+#ifdef DEBUG -+ ErrorF("ACPI: OSPMOpen called\n"); -+#endif -+ ret = doLnxACPIOpen(); -+ -+ return ret; -+} -+ - static void - lnxCloseACPI(void) - { -@@ -172,8 +212,14 @@ lnxCloseACPI(void) - DebugF("ACPI: Closing device\n"); - if (ACPIihPtr) { - fd = xf86RemoveGeneralHandler(ACPIihPtr); -- shutdown(fd, 2); -+ shutdown(fd, SHUT_RDWR); - close(fd); - ACPIihPtr = NULL; -+ xf86PMGetEventFromOs = NULL; -+ xf86PMConfirmEventToOs = NULL; -+ if (acpiTimer) { -+ TimerCancel(acpiTimer); -+ acpiTimer = NULL; -+ } - } - } -diff --git a/hw/xfree86/os-support/linux/lnx_apm.c b/hw/xfree86/os-support/linux/lnx_apm.c -index 54c6989..c8b254f 100644 ---- a/hw/xfree86/os-support/linux/lnx_apm.c -+++ b/hw/xfree86/os-support/linux/lnx_apm.c -@@ -12,6 +12,7 @@ - - #ifdef HAVE_ACPI - extern PMClose lnxACPIOpen(void); -+extern PMClose lnxACPIPoll(void); - #endif - - #ifdef HAVE_APM -@@ -149,6 +150,14 @@ xf86OSPMOpen(void) - ret = lnxAPMOpen(); - #endif - -+#ifdef HAVE_ACPI -+ /* if we can neither open ACPI nor APM poll for an ACPI service to -+ become available */ -+ -+ if (!ret && !xf86acpiDisableFlag) -+ ret = lnxACPIPoll(); -+#endif -+ - return ret; - } - --- -1.6.0.2 - -From 3f35d15f7c7eb202de36e2d1040f27ef7b38c1d2 Mon Sep 17 00:00:00 2001 -From: Egbert Eich -Date: Thu, 7 Jul 2011 09:01:35 +0200 -Subject: [PATCH] OS/ACPI: Make socket to read from acpid non-blocking. - -If acpid for some reason does not service a connect() this -function may hang forever stalling the Xserver. To prevent -this make the socket non-blocking. If connect returns -EINPROGRESS use select() and getsockopt() to check for -completion of the connect request. -select() gets a different timeout depending if it is called -during startup or to do a reconnect. - -Signed-off-by: Egbert Eich ---- - hw/xfree86/os-support/linux/lnx_acpi.c | 34 +++++++++++++++++++++++++++---- - 1 files changed, 29 insertions(+), 5 deletions(-) - -diff --git a/hw/xfree86/os-support/linux/lnx_acpi.c b/hw/xfree86/os-support/linux/lnx_acpi.c -index 8dd6881..f0e6eb4 100644 ---- a/hw/xfree86/os-support/linux/lnx_acpi.c -+++ b/hw/xfree86/os-support/linux/lnx_acpi.c -@@ -32,7 +32,7 @@ - #define ACPI_VIDEO_HEAD_INVALID (~0u - 1) - #define ACPI_VIDEO_HEAD_END (~0u) - --static PMClose doLnxACPIOpen(void); -+static PMClose doLnxACPIOpen(struct timeval *); - static void lnxCloseACPI(void); - static pointer ACPIihPtr = NULL; - static OsTimerPtr acpiTimer = NULL; -@@ -58,10 +58,11 @@ lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg) - static CARD32 - lnxACPICheckTimer(OsTimerPtr timer, CARD32 now, pointer arg) - { -+ struct timeval timeval = { 0, 0 }; - #if DEBUG - ErrorF("ACPI: trying to reopen\n"); - #endif -- if (doLnxACPIOpen()) { -+ if (doLnxACPIOpen(&timeval)) { - #if DEBUG - ErrorF("ACPI: successfully reopened\n"); - #endif -@@ -147,7 +148,7 @@ lnxACPIConfirmEventToOs(int fd, pmEvent event) - } - - static PMClose --doLnxACPIOpen(void) -+doLnxACPIOpen(struct timeval *tv_p) - { - int fd = -1; - struct sockaddr_un addr; -@@ -158,13 +159,34 @@ doLnxACPIOpen(void) - return NULL; - - DebugF("ACPI: Opening device\n"); -- fd = socket(AF_UNIX, SOCK_STREAM, 0); -+ fd = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0); - if (fd > -1) { - memset(&addr, 0, sizeof(addr)); - addr.sun_family = AF_UNIX; - strcpy(addr.sun_path, ACPI_SOCKET); - r = connect(fd, (struct sockaddr*)&addr, sizeof(addr)); - if (r == -1) { -+ int sock_errno = errno; -+ if (sock_errno == EINPROGRESS) { -+ fd_set fds; -+ int result; -+ do { -+ FD_ZERO(&fds); -+ FD_SET(fd, &fds); -+ result = select(fd + 1, NULL, &fds, NULL, tv_p); -+ } while (result < 0 && errno == EINTR); -+ if (result < 0) -+ sock_errno = errno; -+ else if (result > 0) { -+ int sock_errno; -+ socklen_t size = sizeof(sock_errno); -+ if (0 > getsockopt(fd, SOL_SOCKET, SO_ERROR, &sock_errno, -+ &size)) -+ sock_errno = errno; -+ if (!sock_errno) -+ goto success; -+ } -+ } - if (errno != warned) - xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n", - ACPI_SOCKET, strerror(errno)); -@@ -176,6 +198,7 @@ doLnxACPIOpen(void) - } else - return NULL; - -+ success: - xf86PMGetEventFromOs = lnxACPIGetEventFromOs; - xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs; - ACPIihPtr = xf86AddGeneralHandler(fd,xf86HandlePMEvents,NULL); -@@ -196,10 +219,11 @@ PMClose - lnxACPIOpen(void) - { - PMClose ret; -+ struct timeval timeval = { 0, 30000 }; - #ifdef DEBUG - ErrorF("ACPI: OSPMOpen called\n"); - #endif -- ret = doLnxACPIOpen(); -+ ret = doLnxACPIOpen(&timeval); - - return ret; - } --- -1.7.3.4 - diff --git a/u_record-fix-sig11.patch b/u_record-fix-sig11.patch deleted file mode 100644 index 8504d2a..0000000 --- a/u_record-fix-sig11.patch +++ /dev/null @@ -1,36 +0,0 @@ -Date: Mon, 07 Nov 2011 22:09:34 -0800 -From: Keith Packard -Subject: Re: X server SIGSEGV? - -If you aren't using the Record extension (and you aren't), you can work -around the bug by moving the code which accesses the (non-existant) -request buffer inside the loop looking at the recording contexts (of -which there should be none): - -diff --git a/record/record.c b/record/record.c -index 68311ac..9e36103 100644 ---- a/record/record.c -+++ b/record/record.c -@@ -603,12 +603,10 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) - RecordContextPtr pContext; - RecordClientsAndProtocolPtr pRCAP; - int eci; -- int majorop; - ReplyInfoRec *pri = (ReplyInfoRec *)calldata; - ClientPtr client = pri->client; - REQUEST(xReq); - -- majorop = stuff->reqType; - for (eci = 0; eci < numEnabledContexts; eci++) - { - pContext = ppAllContexts[eci]; -@@ -616,6 +614,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) - NULL); - if (pRCAP) - { -+ int majorop = stuff->reqType; - if (pContext->continuedReply) - { - RecordAProtocolElement(pContext, client, XRecordFromServer, - -I'll see if I can't get someone to fix this for real... diff --git a/vidmode-sig11.diff b/vidmode-sig11.diff index 74744b2..4266ee2 100644 --- a/vidmode-sig11.diff +++ b/vidmode-sig11.diff @@ -1,13 +1,13 @@ Index: hw/xfree86/common/xf86VidMode.c -================================================================================ ---- hw/xfree86/common/xf86VidMode.c +=================================================================== +--- hw/xfree86/common/xf86VidMode.c.orig +++ hw/xfree86/common/xf86VidMode.c -@@ -220,6 +220,8 @@ +@@ -224,6 +224,8 @@ VidModeGetFirstModeline(int scrnIndex, p + return FALSE; - pScrn = xf86Screens[scrnIndex]; pVidMode = VMPTR(pScrn->pScreen); + if (!pScrn->modes) + return FALSE; pVidMode->First = pScrn->modes; - pVidMode->Next = pVidMode->First->next; + pVidMode->Next = pVidMode->First->next; diff --git a/xorg-detect-psb.patch b/xorg-detect-psb.patch index d5cc4d1..2277fe1 100644 --- a/xorg-detect-psb.patch +++ b/xorg-detect-psb.patch @@ -1,25 +1,34 @@ -Index: xorg-server-1.6.3.901/hw/xfree86/common/xf86pciBus.c -=============================================================================== ---- xorg-server-1.7.99/hw/xfree86/common/xf86pciBus.c -+++ xorg-server-1.7.99/hw/xfree86/common/xf86pciBus.c -@@ -186,12 +186,14 @@ - case 0x3d3d: driverList[0] = "glint"; break; - case 0x105d: driverList[0] = "i128"; break; - case 0x8086: -- if ((dev->device_id == 0x00d1) || (dev->device_id == 0x7800)) { -- driverList[0] = "i740"; -- } else if (dev->device_id == 0x8108) { -- break; /* "hooray" for poulsbo */ -- } else { -- driverList[0] = "intel"; -+ switch (dev->device_id) -+ { -+ case 0x00d1: case 0x7800: -+ driverList[0] = "i740"; break; -+ case 0x8109: case 0x8108: case 0x4102: -+ driverList[0] = "psb"; driverList[1] = "psb_drv"; break; +Index: xorg-server-1.12.1/hw/xfree86/common/xf86pciBus.c +=================================================================== +--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86pciBus.c ++++ xorg-server-1.12.1/hw/xfree86/common/xf86pciBus.c +@@ -1124,14 +1124,21 @@ videoPtrToDriverList(struct pci_device * + driverList[0] = "i128"; + break; + case 0x8086: +- if ((dev->device_id == 0x00d1) || (dev->device_id == 0x7800)) { +- driverList[0] = "i740"; +- } +- else if (dev->device_id == 0x8108) { +- break; /* "hooray" for poulsbo */ +- } +- else { +- driverList[0] = "intel"; ++ switch (dev->device_id) ++ { ++ case 0x00d1: ++ case 0x7800: ++ driverList[0] = "i740"; ++ break; ++ case 0x8109: ++ case 0x8108: ++ case 0x4102: ++ driverList[0] = "psb"; ++ driverList[1] = "psb_drv"; ++ break; + default: -+ driverList[0] = "intel"; break; - } - break; - case 0x102b: driverList[0] = "mga"; break; ++ driverList[0] = "intel"; ++ break; + } + break; + case 0x102b: diff --git a/xorg-docs-1.6.tar.bz2 b/xorg-docs-1.6.tar.bz2 deleted file mode 100644 index 851a068..0000000 --- a/xorg-docs-1.6.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f6b21bc486ab10fdf2bf1dfdf08f0aba22a4b87542165eeb395d0a6202f19d32 -size 345028 diff --git a/xorg-server-1.10.4.tar.bz2 b/xorg-server-1.10.4.tar.bz2 deleted file mode 100644 index 7cf0dce..0000000 --- a/xorg-server-1.10.4.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fafc16b97b9a61b62dfaa74e8d336baa0cea752ce9ed8103c4d212baa8031ca5 -size 5386174 diff --git a/xorg-server-1.12.1.tar.bz2 b/xorg-server-1.12.1.tar.bz2 new file mode 100644 index 0000000..400214a --- /dev/null +++ b/xorg-server-1.12.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d21dc1dac767975cf9872984c78dd0bff928a74420fbcb415267c6bdbd41b45a +size 5349351 diff --git a/xorg-server-provides b/xorg-server-provides new file mode 100644 index 0000000..0b1a143 --- /dev/null +++ b/xorg-server-provides @@ -0,0 +1,4 @@ +Provides: X11_ABI_XINPUT = 16.0 +Provides: X11_ABI_VIDEODRV = 12.0 +Provides: X11_ABI_ANSIC = 0.4 +Provides: X11_ABI_EXTENSION = 6.0 diff --git a/xorg-server-xdmcp.patch b/xorg-server-xdmcp.patch index 840c271..1815313 100644 --- a/xorg-server-xdmcp.patch +++ b/xorg-server-xdmcp.patch @@ -1,28 +1,30 @@ ---- xorg-server-1.6.5/os/access.c -+++ xorg-server-1.6.5/os/access.c -@@ -781,7 +781,9 @@ +Index: xorg-server-1.12.1/os/access.c +=================================================================== +--- xorg-server-1.12.1.orig/os/access.c ++++ xorg-server-1.12.1/os/access.c +@@ -714,7 +714,9 @@ DefineSelf(int fd) - /* - * ignore 'localhost' entries as they're not useful -- * on the other end of the wire -+ * on the other end of the wire and because on hosts -+ * with shared home dirs they'll result in conflic + /* + * ignore 'localhost' entries as they're not useful +- * on the other end of the wire ++ * on the other end of the wire and because on hosts ++ * with shared home dirs they'll result in conflicting + * entries in ~/.Xauthority - */ - if (ifr->ifa_flags & IFF_LOOPBACK) - continue; -@@ -804,6 +806,14 @@ - else if (family == FamilyInternet6 && - IN6_IS_ADDR_LOOPBACK((struct in6_addr *)addr)) - continue; + */ + if (ifr->ifa_flags & IFF_LOOPBACK) + continue; +@@ -735,6 +737,14 @@ DefineSelf(int fd) + else if (family == FamilyInternet6 && + IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr)) + continue; + -+ /* Ignore IPv6 link local addresses (fe80::/10), because -+ * they need a scope identifier, which we have no way -+ * of telling to the other end. -+ */ -+ if (family == FamilyInternet6 && -+ IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr)) -+ continue; ++ /* Ignore IPv6 link local addresses (fe80::/10), because ++ * they need a scope identifier, which we have no way ++ * of telling to the other end. ++ */ ++ if (family == FamilyInternet6 && ++ IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr)) ++ continue; #endif - XdmcpRegisterConnection(family, (char *)addr, len); + XdmcpRegisterConnection(family, (char *) addr, len); #if defined(IPv6) && defined(AF_INET6) diff --git a/xorg-x11-server-rpmmacros.patch b/xorg-x11-server-rpmmacros.patch new file mode 100644 index 0000000..c6d637c --- /dev/null +++ b/xorg-x11-server-rpmmacros.patch @@ -0,0 +1,10 @@ +Index: xorg-server-1.12.1/configure.ac +=================================================================== +--- xorg-server-1.12.1.orig/configure.ac ++++ xorg-server-1.12.1/configure.ac +@@ -2232,4 +2232,5 @@ test/Makefile + test/xi2/Makefile + xserver.ent + xorg-server.pc ++xorg-x11-server.macros + ]) diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index 6d88b73..0a12517 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,56 @@ +------------------------------------------------------------------- +Wed Apr 25 12:44:12 UTC 2012 - sndirsch@suse.com + +- remove BuildRequires to ghostscript-library, since it conflicts + with ghostscript-mini apparently now required by some other + package + +------------------------------------------------------------------- +Wed Apr 18 22:52:23 UTC 2012 - mgorse@suse.com + +- Rebase VNC patches + Rebase confine_to_shape.diff + +------------------------------------------------------------------- +Sun Apr 15 12:35:03 UTC 2012 - dimstar@opensuse.org + +- Update to version 1.12.1 +- Drop xorg-docs-1.6.tar.bz2: the docs are provided in a sep. + package. +- Add ABI Provides verification: + + pre_checkin.sh to be launched with --tar before checkin (no + parameter given will try to do the right thing). + + pre_checkin.sh is used during build to verify that the ABI + values match the expectations, to ensure we provide by rpm what + the binaries do. +- Add rpm macro file, allowing driver and input packages to specify + %x11_abi_videodrv_req, %x11_abi_xinput_req. +- Rebased patches to apply on 1.12.1 code base: + + 0001-Check-harder-for-primary-PCI-device.patch + + 0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch + + autoconfig_fallback_fbdev_first.diff + + bug534768-prefer_local_symbols.patch + + dpms_screensaver.diff + + driver-autoconfig.diff + + fbdevhw.diff + + fix-dpi-values.diff + + fix_fglrx_screendepth_issue.patch + + p_default-module-path.diff + + pu_fixes.diff + + p_xnest-ignore-getimage-errors.diff + + randr1_1-sig11.diff + + vidmode-sig11.diff + + xorg-detect-psb.patch + + xorg-server-xdmcp.patch + + zap_warning_xserver.diff + + sync-fix.patch +- Drop upstream fixed patches: + + U_dix-on-PointerRootWin-send-a-FocusIn-to-the-sprite-w.patch + + U_dix-send-focus-events-to-the-immediate-parent-44079.patch + + U_Don-t-call-deleted-Block-WakeupHandler.patch + + u_OS-acpi-Reconnect-to-acpid-when-it-gets-restarted.patch + + u_record-fix-sig11.patch + ------------------------------------------------------------------- Thu Mar 22 00:25:39 UTC 2012 - jengelh@medozas.de diff --git a/xorg-x11-server.macros.in b/xorg-x11-server.macros.in new file mode 100644 index 0000000..4007543 --- /dev/null +++ b/xorg-x11-server.macros.in @@ -0,0 +1,15 @@ +# RPM macros for XOrg ABI Definitions + +# Add a Requires for the correct VIDEO Driver ABI +%x11_abi_videodrv_req \ +Requires: X11_ABI_VIDEODRV = @abi_videodrv@ + +%x11_abi_xinput_req \ +Requires: X11_ABI_XINPUT = @abi_xinput@ + +%x11_abi_ansic_req \ +Requires: X11_ABI_ANSIC = @abi_ansic@ + +%x11_abi_extension_req \ +Requires: X11_ABI_EXTENSION = @abi_extension@ + diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 00ec1cc..f5b3eaa 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -14,13 +14,37 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + + Name: xorg-x11-server -%define dirsuffix 1.10.4 +%define dirsuffix 1.12.1 %define vnc 1 +License: GPL-2.0+ ; MIT +Summary: X +Group: System/X11/Servers/XF86_4 +Source0: xorg-server-%{dirsuffix}.tar.bz2 +Source1: sysconfig.displaymanager.template +Source3: README.updates +Source4: xorgcfg.tar.bz2 +Source5: modprobe.nvidia +Source8: xorg-backtrace +# RPM Macros to be installed. The ABI Versions will be injected by configure. +Source96: xorg-x11-server.macros.in +# Source98 and Source99 are used to ensure proper ABI provides. +Source98: xorg-server-provides +Source99: pre_checkin.sh +# PATCH-FEATURE-OPENSUSE xorg-x11-server-rpmmacros.patch dimstar@opensuse.org -- Provide RPM macros to require correct ABI Versions. +Patch0: xorg-x11-server-rpmmacros.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines +Patch2: p_default-module-path.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines +Patch6: pu_fixes.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines +Patch16: p_xnest-ignore-getimage-errors.diff BuildRequires: Mesa-devel BuildRequires: bison BuildRequires: flex -BuildRequires: ghostscript-library BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: xorg-x11 @@ -67,129 +91,158 @@ BuildRequires: pkgconfig(xtrans) >= 1.2.2 BuildRequires: pkgconfig(xtst) >= 1.0.99.2 BuildRequires: pkgconfig(xv) ### udev support (broken on openSUSE 11.2, see also bnc #589997) -%if %suse_version >= 1130 +%if 0%{?suse_version} >= 1130 BuildRequires: pkgconfig(libudev) >= 143 %endif %if %vnc BuildRequires: libjpeg-devel BuildRequires: pkgconfig(vncproto) %endif -Url: http://xorg.freedesktop.org/ Version: 7.6_%{dirsuffix} Release: 0 +Url: http://xorg.freedesktop.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build %ifnarch s390 s390x -PreReq: %fillup_prereq +Requires(pre): %fillup_prereq %endif -Requires: pkgconfig xorg-x11-fonts-core xorg-x11 +Requires: pkgconfig +Requires: xorg-x11 +Requires: xorg-x11-fonts-core %ifnarch s390 s390x -Provides: VIDEO_ABI_VERSION = 10 -Provides: INPUT_ABI_VERSION = 12 Requires: libpixman-1-0 >= 0.15.2 +%(cat %{SOURCE98}) %endif -Provides: xorg-x11-server-glx xorg-x11-Xvfb -Obsoletes: xorg-x11-server-glx xorg-x11-Xvfb -Summary: X.Org Server -License: GPL-2.0+ ; MIT -Group: System/X11/Servers/XF86_4 -Source: xorg-server-%{dirsuffix}.tar.bz2 -Source1: sysconfig.displaymanager.template -Source3: README.updates -Source4: xorgcfg.tar.bz2 -Source5: modprobe.nvidia -Source7: xorg-docs-1.6.tar.bz2 -Source8: xorg-backtrace -Patch2: p_default-module-path.diff -Patch6: pu_fixes.diff -Patch13: u_OS-acpi-Reconnect-to-acpid-when-it-gets-restarted.patch -Patch16: p_xnest-ignore-getimage-errors.diff +Provides: xorg-x11-Xvfb +Provides: xorg-x11-server-glx +Obsoletes: xorg-x11-Xvfb +Obsoletes: xorg-x11-server-glx %if %vnc +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch17: N-VNC-Add-support-for-VNC.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch18: N-VNC-Readd-timeout-when-vnc-viewer-connection-breaks.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch19: N-VNC-Fix-crash-when-no-depth-translation-is-required.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch20: N-VNC-Don-t-let-VNC-access-the-framebuffer-directly-an.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch21: N-VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch22: N-VNC-Fix-crash-due-to-unset-input-device-names.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch23: Xvnc-pthread.diff +Patch24: N-VNC-Add-proto.diff %endif +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch45: bug-197858_dpms.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch77: fbdevhw.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch79: edid_data_sanity_check.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch101: zap_warning_xserver.diff +# PATCH-NEEDS-REBASE Patch103: confine_to_shape.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch106: randr1_1-sig11.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch112: fix-dpi-values.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch123: vidmode-sig11.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch125: 0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch127: dpms_screensaver.diff +# PATCH-NEEDS-REBASE (might not be applicable at all anymore) Patch128: pci-legacy-mem-fallback.diff +# PATCH-NEEDS-REBASE (might not be applicable at all anymore) Patch129: bug474071-fix1.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch143: autoconfig_fallback_fbdev_first.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch145: driver-autoconfig.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch162: cache-xkbcomp-output-for-fast-start-up.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch163: xserver-bg-none-root.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch164: xorg-detect-psb.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch200: bug534768-prefer_local_symbols.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch202: 0001-Check-harder-for-primary-PCI-device.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch203: 0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch206: fix_fglrx_screendepth_issue.patch +# PATCH-NEEDS-REBASE (might not be applicable at all anymore) Patch210: pio_ia64.diff +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch211: 0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch213: xorg-server-xdmcp.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch220: Use-external-tool-for-creating-backtraces-on-crashes.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch222: sync-fix.patch -Patch223: U_Don-t-call-deleted-Block-WakeupHandler.patch -Patch224: u_record-fix-sig11.patch -Patch225: U_dix-send-focus-events-to-the-immediate-parent-44079.patch -Patch226: U_dix-on-PointerRootWin-send-a-FocusIn-to-the-sprite-w.patch %description This package contains the X.Org Server. - - %package extra Summary: Additional Xservers (Xdmx, Xephyr, Xnest) Group: System/X11/Servers/XF86_4 +Requires: Mesa +Requires: xkeyboard-config +Requires: xorg-x11 +Requires: xorg-x11-fonts-core Provides: xorg-x11-Xnest Obsoletes: xorg-x11-Xnest -Requires: xorg-x11-fonts-core xorg-x11 Mesa -Requires: xkeyboard-config %description extra This package contains additional Xservers (Xdmx, Xephyr, Xnest). - - %package sdk -Summary: X.Org Server SDK +Summary: X Group: System/Libraries +Requires: xorg-x11-proto-devel +Requires: xorg-x11-server +Requires: pkgconfig(fontconfig) +Requires: pkgconfig(fontenc) +Requires: pkgconfig(freetype2) +Requires: pkgconfig(ice) +Requires: pkgconfig(libdrm) +Requires: pkgconfig(sm) +Requires: pkgconfig(x11) +Requires: pkgconfig(xau) +Requires: pkgconfig(xdmcp) +Requires: pkgconfig(xext) +Requires: pkgconfig(xfixes) +Requires: pkgconfig(xkbfile) +Requires: pkgconfig(xmu) +Requires: pkgconfig(xp) +Requires: pkgconfig(xpm) +Requires: pkgconfig(xprintutil) +Requires: pkgconfig(xrender) +Requires: pkgconfig(xt) +Requires: pkgconfig(xtrans) +Requires: pkgconfig(xv) Provides: xorg-x11-sdk Obsoletes: xorg-x11-sdk -Requires: xorg-x11-proto-devel pkgconfig(xtrans) -Requires: pkgconfig(xau) pkgconfig(xdmcp) -Requires: pkgconfig(x11) pkgconfig(xext) -Requires: pkgconfig(xp) pkgconfig(xpm) -Requires: pkgconfig(xrender) pkgconfig(ice) -Requires: pkgconfig(sm) pkgconfig(xt) -Requires: pkgconfig(xmu) pkgconfig(xfixes) -Requires: pkgconfig(xkbfile) pkgconfig(fontenc) -Requires: pkgconfig(xv) pkgconfig(xprintutil) -Requires: pkgconfig(freetype2) pkgconfig(fontconfig) -Requires: pkgconfig(libdrm) xorg-x11-server %description sdk This package contains the X.Org Server SDK. - - %if %vnc %package -n xorg-x11-Xvnc Summary: VNC Server for the X Window System Group: System/X11/Servers/XF86_4 -Requires: xorg-x11-fonts-core xorg-x11 xkeyboard-config -Provides: vnc:/usr/X11R6/bin/Xvnc XFree86-Xvnc +Requires: xkeyboard-config +Requires: xorg-x11 +Requires: xorg-x11-fonts-core +Provides: XFree86-Xvnc +Provides: vnc:/usr/X11R6/bin/Xvnc Obsoletes: XFree86-Xvnc %ifarch ia64 Provides: vnc-x86 @@ -199,16 +252,17 @@ Obsoletes: vnc-x86 %description -n xorg-x11-Xvnc An X Window System server for Virtual Network Computing (VNC). - - %endif %prep -%setup -q -n xorg-server-%{dirsuffix} -a4 -a7 +%setup -q -n xorg-server-%{dirsuffix} -a4 +# Early verification if the ABI Defines are correct. Let's not waste build cycles if the Provides are wrong at the end. +sh %{SOURCE99} --verify . %{SOURCE98} +cp %{SOURCE96} . +%patch0 -p1 %patch2 %patch6 -%patch13 -p1 -%patch16 -p2 +%patch16 -p1 %if %vnc %patch17 -p1 %patch18 -p1 @@ -217,10 +271,9 @@ An X Window System server for Virtual Network Computing (VNC). %patch21 -p1 %patch22 -p1 %patch23 -p1 +%patch24 -p1 %endif %patch45 -p0 -pushd xorg-docs-* -popd %patch77 %patch79 -p1 %patch101 -p1 @@ -231,10 +284,10 @@ popd ### disabled for now #%patch125 -p1 %patch127 -p1 -%patch128 -pushd hw/xfree86/os-support/bus -%patch129 -p0 -popd +# NEeds rebase +#%patch128 +# Needs rebase +#%patch129 -p0 %patch143 -p0 %patch145 -p0 ### disabled for now @@ -246,26 +299,18 @@ popd %patch202 -p1 %patch203 -p1 %patch206 -p0 -%patch210 -p1 +# Needs Rebase +#%patch210 -p1 ### disabled for now #%patch211 -p1 %patch213 -p1 -# Disable backtrace generation patch for now +### Disable backtrace generation patch for now #%patch220 -p1 %patch222 -p1 -%patch223 -p2 -%patch224 -p1 -%patch225 -p1 -%patch226 -p1 %build -pushd xorg-docs-* autoreconf -fi -%configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -make %{?_smp_mflags} -popd -autoreconf -fi -%configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ +%configure CFLAGS="%{optflags} -fno-strict-aliasing" \ --sysconfdir=/etc \ --enable-builddocs \ --enable-install-libxf86config \ @@ -288,7 +333,7 @@ autoreconf -fi --disable-aiglx \ %else --enable-xorg \ -%if %suse_version > 1120 +%if 0%{?suse_version} > 1120 --enable-config-udev \ %endif %endif @@ -311,64 +356,64 @@ make %{?_smp_mflags} make -C hw/kdrive %{?_smp_mflags} %install -make -C xorg-docs-* install DESTDIR=$RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT -make -C hw/kdrive install DESTDIR=$RPM_BUILD_ROOT +%make_install +make -C hw/kdrive install DESTDIR=%{buildroot} %ifnarch s390 s390x # remove .la files -find $RPM_BUILD_ROOT/usr/%{_lib}/xorg/modules/ -name "*.la" | \ +find %{buildroot}%{_libdir}/xorg/modules/ -name "*.la" | \ xargs rm install -m 644 hw/xfree86/parser/{xf86Parser.h,xf86Optrec.h} \ - $RPM_BUILD_ROOT/usr/include/xorg + %{buildroot}%{_includedir}/xorg # bnc #632737 -chmod u-s $RPM_BUILD_ROOT/usr/bin/Xorg -mkdir -p $RPM_BUILD_ROOT/var/lib/X11 -ln -snf ../../../usr/bin/Xorg $RPM_BUILD_ROOT/var/lib/X11/X -ln -snf ../../var/lib/X11/X $RPM_BUILD_ROOT/usr/bin/X -%if %suse_version > 1120 +chmod u-s %{buildroot}%{_bindir}/Xorg +mkdir -p %{buildroot}%{_localstatedir}/lib/X11 +ln -snf ../../../usr/bin/Xorg %{buildroot}%{_localstatedir}/lib/X11/X +ln -snf ../../var/lib/X11/X %{buildroot}%{_bindir}/X +%if 0%{?suse_version} > 1120 %ifnarch s390 s390x -mkdir -p $RPM_BUILD_ROOT/etc/X11/xorg.conf.d -cp $RPM_BUILD_ROOT/%{_datadir}/X11/xorg.conf.d/10-evdev.conf $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/ +mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d +cp %{buildroot}/%{_datadir}/X11/xorg.conf.d/10-evdev.conf %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/ %endif %endif -mkdir -p $RPM_BUILD_ROOT/usr/%{_lib}/xorg/modules/updates/{fonts,input,linux,drivers,multimedia,extensions} -install -m 644 $RPM_SOURCE_DIR/README.updates $RPM_BUILD_ROOT/usr/%{_lib}/xorg/modules/updates -mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d -install -m 644 $RPM_SOURCE_DIR/modprobe.nvidia $RPM_BUILD_ROOT/etc/modprobe.d/50-nvidia.conf +mkdir -p %{buildroot}%{_libdir}/xorg/modules/updates/{fonts,input,linux,drivers,multimedia,extensions} +install -m 644 $RPM_SOURCE_DIR/README.updates %{buildroot}%{_libdir}/xorg/modules/updates +mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d +install -m 644 $RPM_SOURCE_DIR/modprobe.nvidia %{buildroot}%{_sysconfdir}/modprobe.d/50-nvidia.conf %else -rm -f $RPM_BUILD_ROOT/usr/share/aclocal/*.m4 +rm -f %{buildroot}%{_datadir}/aclocal/*.m4 %endif %if %vnc -mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services -cat > $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/%{name} << EOF +mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services +cat > %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} << EOF ## Name: VNC Server ## Description: Opens ports for VNC Server TCP="5801 5901" EOF %endif %ifarch s390 s390x -rm -f $RPM_BUILD_ROOT/etc/X11/10-evdev.conf +rm -f %{buildroot}%{_sysconfdir}/X11/10-evdev.conf make -C hw/xfree86/parser -mkdir -p $RPM_BUILD_ROOT/usr/include/xorg \ - $RPM_BUILD_ROOT/usr/%{_lib} +mkdir -p %{buildroot}%{_includedir}/xorg \ + %{buildroot}%{_libdir} install -m 644 hw/xfree86/parser/{xf86Parser.h,xf86Optrec.h} \ - $RPM_BUILD_ROOT/usr/include/xorg + %{buildroot}%{_includedir}/xorg install -m 644 include/list.h \ - $RPM_BUILD_ROOT/usr/include/xorg + %{buildroot}%{_includedir}/xorg if [ -f hw/xfree86/parser/.libs/libxf86config.a ] ; then install -m 644 hw/xfree86/parser/.libs/libxf86config.a \ - $RPM_BUILD_ROOT//usr/%{_lib} + %{buildroot}//usr/%{_lib} else install -m 644 hw/xfree86/parser/libxf86config.a \ - $RPM_BUILD_ROOT//usr/%{_lib} + %{buildroot}//usr/%{_lib} fi %endif %ifnarch s390 s390x -mkdir -p %buildroot/var/adm/fillup-templates +mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates install -m 644 %_sourcedir/sysconfig.displaymanager.template \ - %buildroot/var/adm/fillup-templates/sysconfig.displaymanager-%name + %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.displaymanager-%{name} %endif -install -m 755 $RPM_SOURCE_DIR/xorg-backtrace $RPM_BUILD_ROOT/usr/bin/xorg-backtrace +install -m 755 $RPM_SOURCE_DIR/xorg-backtrace %{buildroot}%{_bindir}/xorg-backtrace +install -D xorg-x11-server.macros %{buildroot}%{_sysconfdir}/rpm/macros.xorg-server %ifnarch s390 s390x %verifyscript @@ -403,80 +448,75 @@ exit 0 %files %defattr(-,root,root) %ifnarch s390 s390x -%if %suse_version > 1120 -%dir /etc/X11/xorg.conf.d -%config(noreplace) /etc/X11/xorg.conf.d/10-evdev.conf +%if 0%{?suse_version} > 1120 +%dir %{_sysconfdir}/X11/xorg.conf.d +%config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/10-evdev.conf %dir %{_datadir}/X11/xorg.conf.d %{_datadir}/X11/xorg.conf.d/10-evdev.conf %endif -%dir /etc/modprobe.d -%dir /var/lib/X11 +%dir %{_sysconfdir}/modprobe.d +%dir %{_localstatedir}/lib/X11 %endif -%dir /var/lib/xkb -%dir /var/lib/xkb/compiled -%dir /usr/%{_lib}/xorg -/usr/%{_lib}/xorg/protocol.txt +%dir %{_localstatedir}/lib/xkb +%dir %{_localstatedir}/lib/xkb/compiled +%dir %{_libdir}/xorg +%{_libdir}/xorg/protocol.txt %{_mandir}/man1/* -%{_mandir}/man7/* -%doc %{_datadir}/doc/xorg-docs/ %exclude %{_mandir}/man1/Xdmx.1* %exclude %{_mandir}/man1/Xephyr.1* %exclude %{_mandir}/man1/Xnest.1* -%exclude %{_mandir}/man7/Standards.7* -%exclude %{_mandir}/man7/Consortium.7* -%exclude %{_mandir}/man7/XProjectTeam.7* -%exclude %{_mandir}/man7/XOrgFoundation.7* -/var/lib/xkb/compiled/README.compiled +%{_localstatedir}/lib/xkb/compiled/README.compiled %ifnarch s390 s390x -/etc/modprobe.d/50-nvidia.conf -%verify(not mode) /usr/bin/Xorg -/usr/bin/X -/usr/bin/cvt -/usr/bin/gtf -/usr/%{_lib}/xorg/modules/ +%{_sysconfdir}/modprobe.d/50-nvidia.conf +%verify(not mode) %{_bindir}/Xorg +%{_bindir}/X +%{_bindir}/cvt +%{_bindir}/gtf +%{_libdir}/xorg/modules/ %{_mandir}/man4/* %{_mandir}/man5/* -/var/adm/fillup-templates/sysconfig.displaymanager-%name -/var/lib/X11/X +%{_localstatedir}/adm/fillup-templates/sysconfig.displaymanager-%{name} +%{_localstatedir}/lib/X11/X %endif -/usr/bin/Xvfb -/usr/bin/xorg-backtrace +%{_bindir}/Xvfb +%{_bindir}/xorg-backtrace %files extra %defattr(-,root,root) -/usr/bin/Xephyr -/usr/bin/Xnest -/usr/bin/Xdmx -/usr/bin/dmxaddinput -/usr/bin/dmxaddscreen -/usr/bin/dmxinfo -/usr/bin/dmxreconfig -/usr/bin/dmxresize -/usr/bin/dmxrminput -/usr/bin/dmxrmscreen -/usr/bin/dmxtodmx -/usr/bin/dmxwininfo -/usr/bin/vdltodmx -/usr/bin/xdmxconfig +%{_bindir}/Xephyr +%{_bindir}/Xnest +%{_bindir}/Xdmx +%{_bindir}/dmxaddinput +%{_bindir}/dmxaddscreen +%{_bindir}/dmxinfo +%{_bindir}/dmxreconfig +%{_bindir}/dmxresize +%{_bindir}/dmxrminput +%{_bindir}/dmxrmscreen +%{_bindir}/dmxtodmx +%{_bindir}/dmxwininfo +%{_bindir}/vdltodmx +%{_bindir}/xdmxconfig %{_mandir}/man1/Xdmx.1* %{_mandir}/man1/Xephyr.1* %{_mandir}/man1/Xnest.1* %files sdk %defattr(-,root,root) -/usr/include/xorg/ -/usr/%{_lib}/*.a +%{_includedir}/xorg/ +%{_libdir}/*.a %ifnarch s390 s390x -%exclude /usr/%{_lib}/libxf86config.la -/usr/%{_lib}/pkgconfig/*.pc -/usr/share/aclocal/*.m4 +%exclude %{_libdir}/libxf86config.la +%{_libdir}/pkgconfig/*.pc +%{_datadir}/aclocal/*.m4 %endif +%{_sysconfdir}/rpm/macros.xorg-server %if %vnc %files -n xorg-x11-Xvnc %defattr(-, root, root) -/etc/sysconfig/SuSEfirewall2.d/services/%{name} -/usr/bin/Xvnc +%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} +%{_bindir}/Xvnc %endif %changelog diff --git a/zap_warning_xserver.diff b/zap_warning_xserver.diff index 783243b..ead94b9 100644 --- a/zap_warning_xserver.diff +++ b/zap_warning_xserver.diff @@ -1,8 +1,8 @@ -Index: xorg-server-1.6.3.901/hw/xfree86/common/xf86Config.c -================================================================================ ---- xorg-server-1.7.99/hw/xfree86/common/xf86Config.c -+++ xorg-server-1.7.99/hw/xfree86/common/xf86Config.c -@@ -696,6 +696,7 @@ +Index: xorg-server-1.12.1/hw/xfree86/common/xf86Config.c +=================================================================== +--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Config.c ++++ xorg-server-1.12.1/hw/xfree86/common/xf86Config.c +@@ -685,6 +685,7 @@ typedef enum { FLAG_NOTRAPSIGNALS, FLAG_DONTVTSWITCH, FLAG_DONTZAP, @@ -10,16 +10,16 @@ Index: xorg-server-1.6.3.901/hw/xfree86/common/xf86Config.c FLAG_DONTZOOM, FLAG_DISABLEVIDMODE, FLAG_ALLOWNONLOCAL, -@@ -734,6 +735,8 @@ - {0}, FALSE }, - { FLAG_DONTZAP, "DontZap", OPTV_BOOLEAN, - {0}, FALSE }, -+ { FLAG_ZAPWARNING, "ZapWarning", OPTV_BOOLEAN, -+ {0}, FALSE }, - { FLAG_DONTZOOM, "DontZoom", OPTV_BOOLEAN, - {0}, FALSE }, - { FLAG_DISABLEVIDMODE, "DisableVidModeExtension", OPTV_BOOLEAN, -@@ -840,6 +843,7 @@ +@@ -721,6 +722,8 @@ static OptionInfoRec FlagOptions[] = { + {0}, FALSE}, + {FLAG_DONTZAP, "DontZap", OPTV_BOOLEAN, + {0}, FALSE}, ++ { FLAG_ZAPWARNING, "ZapWarning", OPTV_BOOLEAN, ++ {0}, FALSE }, + {FLAG_DONTZOOM, "DontZoom", OPTV_BOOLEAN, + {0}, FALSE}, + {FLAG_DISABLEVIDMODE, "DisableVidModeExtension", OPTV_BOOLEAN, +@@ -807,6 +810,7 @@ configServerFlags(XF86ConfFlagsPtr flags xf86GetOptValBool(FlagOptions, FLAG_NOTRAPSIGNALS, &xf86Info.notrapSignals); xf86GetOptValBool(FlagOptions, FLAG_DONTVTSWITCH, &xf86Info.dontVTSwitch); xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap); @@ -27,83 +27,61 @@ Index: xorg-server-1.6.3.901/hw/xfree86/common/xf86Config.c xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom); xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI); ---- xorg-server-1.7.99/hw/xfree86/common/xf86Events.c -+++ xorg-server-1.7.99/hw/xfree86/common/xf86Events.c -@@ -180,12 +180,26 @@ +Index: xorg-server-1.12.1/hw/xfree86/common/xf86Events.c +=================================================================== +--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Events.c ++++ xorg-server-1.12.1/hw/xfree86/common/xf86Events.c +@@ -180,12 +180,25 @@ xf86ProcessActionEvent(ActionEvent actio DebugF("ProcessActionEvent(%d,%x)\n", (int) action, arg); switch (action) { case ACTION_TERMINATE: -- if (!xf86Info.dontZap) { -+ if (xf86Info.dontZap) -+ break; +- if (!xf86Info.dontZap) { ++ if (xf86Info.dontZap) ++ break; + -+ if (xf86Info.ZapWarning) { -+ static struct timeval LastZap = { 0, 0}; -+ struct timeval NewZap; ++ if (xf86Info.ZapWarning) { ++ static struct timeval LastZap = { 0, 0}; ++ struct timeval NewZap; + -+ gettimeofday(&NewZap, NULL); ++ gettimeofday(&NewZap, NULL); + -+ if ((NewZap.tv_sec - LastZap.tv_sec) >= 2) { -+ xf86OSRingBell(30, 1000, 50); -+ LastZap = NewZap; -+ break; -+ } ++ if ((NewZap.tv_sec - LastZap.tv_sec) >= 2) { ++ xf86OSRingBell(30, 1000, 50); ++ LastZap = NewZap; ++ break; ++ } + } -+ #ifdef XFreeXDGA -- DGAShutdown(); -+ DGAShutdown(); +- DGAShutdown(); ++ DGAShutdown(); #endif -- GiveUp(0); -- } -+ GiveUp(0); - break; +- GiveUp(0); +- } ++ GiveUp(0); + break; case ACTION_NEXT_MODE: - if (!xf86Info.dontZoom) ---- xorg-server-1.7.99/hw/xfree86/common/xf86Globals.c -+++ xorg-server-1.7.99/hw/xfree86/common/xf86Globals.c -@@ -109,6 +109,7 @@ - #endif - .dontVTSwitch = FALSE, - .dontZap = FALSE, -+ .ZapWarning = TRUE, - .dontZoom = FALSE, - .notrapSignals = FALSE, - .caughtSignal = FALSE, ---- xorg-server-1.7.99/hw/xfree86/common/xf86Privstr.h -+++ xorg-server-1.7.99/hw/xfree86/common/xf86Privstr.h -@@ -67,6 +67,7 @@ - #endif - Bool dontVTSwitch; - Bool dontZap; -+ Bool ZapWarning; - Bool dontZoom; - Bool notrapSignals; /* don't exit cleanly - die at fault */ - Bool caughtSignal; ---- xorg-server-1.7.99/hw/xfree86/doc/man/Xorg.man -+++ xorg-server-1.7.99/hw/xfree86/doc/man/Xorg.man -@@ -438,7 +438,7 @@ - .B Ctrl+Alt+Backspace - Immediately kills the server -- no questions asked. It can be disabled by - setting the --.B DontZap -+.B DontZap/ZapWarning - __xconfigfile__(__filemansuffix__) file option to a TRUE value. - .PP - .RS 8 ---- xorg-server-1.7.99/hw/xfree86/doc/man/xorg.conf.man -+++ xorg-server-1.7.99/hw/xfree86/doc/man/xorg.conf.man -@@ -507,6 +507,13 @@ - When this option is enabled, the action has no effect. - Default: off. - .TP 7 -+.BI "Option \*qZapWarning\*q \*q" boolean \*q -+This warns the user audibly when the -+.B Ctrl+Alt+Backspace -+sequence is pressed for the first time but still terminates the __xservername__ -+server when this key-sequence is pressed again shortly after. -+Default: on. -+.TP 7 - .BI "Option \*qDontZoom\*q \*q" boolean \*q - This disallows the use of the - .B Ctrl+Alt+Keypad\-Plus + if (!xf86Info.dontZoom) +Index: xorg-server-1.12.1/hw/xfree86/common/xf86Globals.c +=================================================================== +--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Globals.c ++++ xorg-server-1.12.1/hw/xfree86/common/xf86Globals.c +@@ -104,6 +104,7 @@ xf86InfoRec xf86Info = { + .autoVTSwitch = TRUE, + .ShareVTs = FALSE, + .dontZap = FALSE, ++ .ZapWarning = TRUE, + .dontZoom = FALSE, + .notrapSignals = FALSE, + .caughtSignal = FALSE, +Index: xorg-server-1.12.1/hw/xfree86/common/xf86Privstr.h +=================================================================== +--- xorg-server-1.12.1.orig/hw/xfree86/common/xf86Privstr.h ++++ xorg-server-1.12.1/hw/xfree86/common/xf86Privstr.h +@@ -68,6 +68,7 @@ typedef struct { + Bool autoVTSwitch; + Bool ShareVTs; + Bool dontZap; ++ Bool ZapWarning; + Bool dontZoom; + Bool notrapSignals; /* don't exit cleanly - die at fault */ + Bool caughtSignal;