X Strike Force X.Org X11 SVN commit: r1348 - in branches/modular/app/xbase-clients/debian: . patches
Author: dnusinow
Date: 2006-02-26 23:16:17 -0500 (Sun, 26 Feb 2006)
New Revision: 1348
Added:
branches/modular/app/xbase-clients/debian/patches/10_debian_add_xkbpath_env_variable.diff
Modified:
branches/modular/app/xbase-clients/debian/changelog
branches/modular/app/xbase-clients/debian/patches/series
Log:
* Port patches from trunk
+ debian/916_add_XKBPATH_env_variable.diff
Modified: branches/modular/app/xbase-clients/debian/changelog
===================================================================
--- branches/modular/app/xbase-clients/debian/changelog 2006-02-27 04:08:14 UTC (rev 1347)
+++ branches/modular/app/xbase-clients/debian/changelog 2006-02-27 04:16:17 UTC (rev 1348)
@@ -12,8 +12,9 @@
+ general/025e_xvinfo_manpage_typo.diff
+ general/099r_xlsfonts_do_not_spew_usage_on_connection_error.diff
+ debian/902_debian_startx_manpage.diff
+ + debian/916_add_XKBPATH_env_variable.diff
- -- David Nusinow <dnusinow@debian.org> Sun, 26 Feb 2006 22:49:01 -0500
+ -- David Nusinow <dnusinow@debian.org> Sun, 26 Feb 2006 23:15:33 -0500
xbase-clients (1:1.0.1-1) experimental; urgency=low
Added: branches/modular/app/xbase-clients/debian/patches/10_debian_add_xkbpath_env_variable.diff
===================================================================
--- branches/modular/app/xbase-clients/debian/patches/10_debian_add_xkbpath_env_variable.diff 2006-02-27 04:08:14 UTC (rev 1347)
+++ branches/modular/app/xbase-clients/debian/patches/10_debian_add_xkbpath_env_variable.diff 2006-02-27 04:16:17 UTC (rev 1348)
@@ -0,0 +1,88 @@
+$Id$
+
+As explained in #324768, this patch modifies setxkbmap and xkbcomp
+programs so that they look for XKB data files in $XKBPATH if this
+environment variable is set. This allows installing both xlibs and
+xkeyboard-config at the same time, so that xkeyboard-config can
+install its files under /etc/X11/xkb-data until all packages depending
+on xlibs are fixed. This patch by Denis Barbier.
+
+This patch will not be submitted upstream.
+
+Index: setxkbmap-X11R7.0-1.0.1/setxkbmap.c
+===================================================================
+--- setxkbmap-X11R7.0-1.0.1/setxkbmap.c
++++ setxkbmap-X11R7.0-1.0.1/setxkbmap.c
+@@ -318,9 +318,13 @@
+ int i;
+ Bool ok;
+ unsigned present;
++char *xkbpath;
+
+ ok= True;
+ addToList(&szInclPath,&numInclPath,&inclPath,".");
++ xkbpath= (char *)getenv("XKBPATH");
++ if (xkbpath!=NULL)
++ addToList(&szInclPath,&numInclPath,&inclPath,xkbpath);
+ addToList(&szInclPath,&numInclPath,&inclPath,DFLT_XKB_CONFIG_ROOT);
+ for (i=1;(i<argc)&&ok;i++) {
+ if (argv[i][0]!='-') {
+Index: xkbcomp-X11R7.0-1.0.1/xkbpath.c
+===================================================================
+--- xkbcomp-X11R7.0-1.0.1/xkbpath.c
++++ xkbcomp-X11R7.0-1.0.1/xkbpath.c
+@@ -131,9 +131,14 @@
+ void
+ XkbAddDefaultDirectoriesToPath(void)
+ {
++char *xkbpath;
++
+ if (noDefaultPath)
+ return;
+ XkbAddDirectoryToPath(".");
++ xkbpath= (char *)getenv("XKBPATH");
++ if (xkbpath!=NULL)
++ XkbAddDirectoryToPath(xkbpath);
+ XkbAddDirectoryToPath(DFLT_XKB_CONFIG_ROOT);
+ }
+
+Index: xkbevd-X11R7.0-1.0.1/xkbevd.c
+===================================================================
+--- xkbevd-X11R7.0-1.0.1/xkbevd.c
++++ xkbevd-X11R7.0-1.0.1/xkbevd.c
+@@ -471,20 +471,28 @@
+ else {
+ file= fopen(cfgFileName,"r");
+ if (file==NULL) { /* no personal config, try for a system one */
++ char *xkbpath;
+ if (cfgFileName!=buf) { /* user specified a file. bail */
+ uError("Can't open config file \"%s\n",cfgFileName);
+ uAction("Exiting\n");
+ exit(1);
+ }
+- sprintf(buf,DFLT_SYS_XKBEVD_CONFIG,DFLT_XKB_CONFIG_ROOT);
+- file= fopen(cfgFileName,"r");
++ xkbpath= (char *)getenv("XKBPATH");
++ if (xkbpath!=NULL) {
++ sprintf(buf,DFLT_SYS_XKBEVD_CONFIG,xkbpath);
++ file= fopen(cfgFileName,"r");
++ }
+ if (file==NULL) {
+- if (verbose) {
+- uError("Couldn't find a config file anywhere\n");
+- uAction("Exiting\n");
+- exit(1);
++ sprintf(buf,DFLT_SYS_XKBEVD_CONFIG,DFLT_XKB_CONFIG_ROOT);
++ file= fopen(cfgFileName,"r");
++ if (file==NULL) {
++ if (verbose) {
++ uError("Couldn't find a config file anywhere\n");
++ uAction("Exiting\n");
++ exit(1);
++ }
++ exit(0);
+ }
+- exit(0);
+ }
+ }
+ }
Modified: branches/modular/app/xbase-clients/debian/patches/series
===================================================================
--- branches/modular/app/xbase-clients/debian/patches/series 2006-02-27 04:08:14 UTC (rev 1347)
+++ branches/modular/app/xbase-clients/debian/patches/series 2006-02-27 04:16:17 UTC (rev 1348)
@@ -7,3 +7,4 @@
07_xvinfo_manpage_typo.diff
08_xlsfonts_do_not_spew_usage_on_connection_error.diff -p0
09_debian_startx_manpage.diff -p0
+10_debian_add_xkbpath_env_variable.diff -p0
Reply to: