summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2011-02-16 20:30:28 +0000
committerDRC <dcommander@users.sourceforge.net>2011-02-16 20:30:28 +0000
commit3b9ecdfd9b191e3f3400e10d383b599129312263 (patch)
treeb7a338742eb5005e4c75d2cfc7a76e493b029288 /unix
parentf04cd0ec403cd0fa92f23248b717eaa3c4217515 (diff)
downloadtigervnc-3b9ecdfd9b191e3f3400e10d383b599129312263.tar.gz
tigervnc-3b9ecdfd9b191e3f3400e10d383b599129312263.zip
Add -dridir and -xkbcompdir parameters to Xvnc when it is built with the Xorg 7.4 code base
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4290 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix')
-rwxr-xr-xunix/build-xorg8
-rw-r--r--unix/xorg-7.4-patches/0001-Add-dridir-param.patch97
-rw-r--r--unix/xorg-7.4-patches/0001-Add-xkbcompdir-param.patch33
3 files changed, 134 insertions, 4 deletions
diff --git a/unix/build-xorg b/unix/build-xorg
index 93483e13..9707375e 100755
--- a/unix/build-xorg
+++ b/unix/build-xorg
@@ -74,11 +74,11 @@ init()
patch -p1 < $SRCDIR/unix/xserver15.patch
else
patch -p1 < $SRCDIR/unix/xserver18.patch
- for all in `find $SRCDIR/unix/xorg-7.5-patches/ -type f |grep '.*\.patch$'`; do
- echo Applying $all
- patch -p1 < $all
- done
fi
+ for all in `find $SRCDIR/unix/xorg-$XORG_VERSION-patches/ -type f |grep '.*\.patch$'`; do
+ echo Applying $all
+ patch -p1 < $all
+ done
popd
popd
diff --git a/unix/xorg-7.4-patches/0001-Add-dridir-param.patch b/unix/xorg-7.4-patches/0001-Add-dridir-param.patch
new file mode 100644
index 00000000..d36994c7
--- /dev/null
+++ b/unix/xorg-7.4-patches/0001-Add-dridir-param.patch
@@ -0,0 +1,97 @@
+*** a/glx/glxdri.c 2011-02-16 14:00:53.000000000 -0600
+--- b/glx/glxdri.c 2011-02-16 13:56:09.000000000 -0600
+***************
+*** 838,843 ****
+
+
+- static const char dri_driver_path[] = DRI_DRIVER_PATH;
+-
+ static Bool
+ glxDRIEnterVT (int index, int flags)
+--- 838,841 ----
+diff -r -C2 a/glx/glxdriswrast.c b/glx/glxdriswrast.c
+*** a/glx/glxdriswrast.c 2011-02-16 14:00:53.000000000 -0600
+--- b/glx/glxdriswrast.c 2011-02-16 13:56:29.000000000 -0600
+***************
+*** 448,453 ****
+ }
+
+- static const char dri_driver_path[] = DRI_DRIVER_PATH;
+-
+ static __GLXscreen *
+ __glXDRIscreenProbe(ScreenPtr pScreen)
+--- 448,451 ----
+diff -r -C2 a/glx/glxext.c b/glx/glxext.c
+*** a/glx/glxext.c 2011-02-16 14:00:54.000000000 -0600
+--- b/glx/glxext.c 2011-02-16 13:58:39.000000000 -0600
+***************
+*** 520,521 ****
+--- 520,548 ----
+ return retval;
+ }
++
++ char *dri_driver_path = DRI_DRIVER_PATH;
++
++ int GlxProcessArguments(int argc, char *argv[], int i)
++ {
++ if (strncmp(argv[i], "-dridir", 7) == 0) {
++ if (++i < argc) {
++ #if !defined(WIN32) && !defined(__CYGWIN__)
++ if (getuid() != geteuid()) {
++ LogMessage(X_WARNING, "-dridir is not available for setuid X servers\n");
++ return -1;
++ } else
++ #endif
++ {
++ if (strlen(argv[i]) < PATH_MAX) {
++ dri_driver_path = argv[i];
++ return 2;
++ } else {
++ LogMessage(X_ERROR, "-dridir pathname too long\n");
++ return -1;
++ }
++ }
++ }
++ }
++
++ return 0;
++ }
+diff -r -C2 a/glx/glxserver.h b/glx/glxserver.h
+*** a/glx/glxserver.h 2011-02-16 14:00:54.000000000 -0600
+--- b/glx/glxserver.h 2011-02-16 14:01:44.000000000 -0600
+***************
+*** 264,266 ****
+--- 264,269 ----
+ GLint alignment);
+
++ extern char *dri_driver_path;
++ extern int GlxProcessArguments(int argc, char *argv[], int i);
++
+ #endif /* !__GLX_server_h__ */
+Only in b/os: ._utils.c
+diff -r -C2 a/os/utils.c b/os/utils.c
+*** a/os/utils.c 2011-02-16 14:01:18.000000000 -0600
+--- b/os/utils.c 2011-02-16 14:04:11.000000000 -0600
+***************
+*** 159,162 ****
+--- 159,163 ----
+ _X_EXPORT Bool noGlxExtension = FALSE;
+ _X_EXPORT Bool noGlxVisualInit = FALSE;
++ extern int GlxProcessArguments(int argc, char *argv[], int i);
+ #endif
+ #ifdef SCREENSAVER
+***************
+*** 854,857 ****
+--- 855,866 ----
+ }
+ #endif
++ #ifdef GLXEXT
++ else if ((skip = GlxProcessArguments(argc,argv,i)) != 0) {
++ if (skip > 0)
++ i += skip - 1;
++ else
++ UseMsg();
++ }
++ #endif
+ #ifdef RLIMIT_DATA
+ else if ( strcmp( argv[i], "-ld") == 0)
diff --git a/unix/xorg-7.4-patches/0001-Add-xkbcompdir-param.patch b/unix/xorg-7.4-patches/0001-Add-xkbcompdir-param.patch
new file mode 100644
index 00000000..d9d47d45
--- /dev/null
+++ b/unix/xorg-7.4-patches/0001-Add-xkbcompdir-param.patch
@@ -0,0 +1,33 @@
+Only in b/xkb: ._xkbInit.c
+diff -r -C2 a/xkb/xkbInit.c b/xkb/xkbInit.c
+*** a/xkb/xkbInit.c 2011-02-16 14:07:03.000000000 -0600
+--- b/xkb/xkbInit.c 2011-02-16 14:08:08.000000000 -0600
+***************
+*** 875,879 ****
+--- 875,900 ----
+ }
+ return j;
++ } else if (strncmp(argv[i], "-xkbcompdir", 11)==0) {
++ if (++i < argc) {
++ #if !defined(WIN32) && !defined(__CYGWIN__)
++ if (getuid() != geteuid()) {
++ LogMessage(X_WARNING, "-xkbdir is not available for setuid X servers\n");
++ return -1;
++ } else
++ #endif
++ {
++ if (strlen(argv[i]) < PATH_MAX) {
++ XkbBinDirectory = argv[i];
++ return 2;
++ } else {
++ LogMessage(X_ERROR, "-xkbcompdir pathname too long\n");
++ return -1;
++ }
++ }
++ } else {
++ return -1;
++ }
+ }
++
+ if ((strcmp(argv[i], "-ardelay") == 0) ||
+ (strcmp (argv[i], "-ar1") == 0)) { /* -ardelay int */