pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/44364: keyboard can not be changed in kde4



The following reply was made to PR pkg/44364; it has been noted by GNATS.

From: Bernd Ernesti <pr201101%veego.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: markd%NetBSD.org@localhost
Subject: Re: pkg/44364: keyboard can not be changed in kde4
Date: Tue, 11 Jan 2011 22:05:58 +0100

 --+QahgC5+KEYLbs62
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Tue, Jan 11, 2011 at 10:55:13AM +0000, Mark Davies wrote:
 >  On Tuesday 11 January 2011 10:25:02 you wrote:
 >  >  * The first issue with xorg.xml may be related due too some code 
 >  in
 >  >    pkgsrc/x11/kdebase-workspace4 .. kcontrol/keyboard/xkb_rules.cpp
 >  >    findXkbRulesFile()
 >  > 
 >  >    XLIBDIR is defined in my build as:
 >  >    _KDE_build/config-workspace.h:#define XLIBDIR 
 >  "/usr/X11R7/lib/X11"
 >  > 
 >  >    I think the code in findXkbRulesFile does not work with this
 >  >    directory layout.
 >  
 >  I think you are right.  It does however work in the modular-x case 
 >  where XLIBDIR is /usr/pkg/lib/X11 and the xkb files are in 
 >  /usr/pkg/share/X11/xkb
 
 I see.
 
 The following diff could work but I have not tested it yet since replacing
 kdebase-workspace4 is a little complicated with all these packages installed.
 
 This is a diff -bu so you have to ident it poperly. I send a direct copy in
 case gnats has problems with the mail encoding.
 
 >  >  * The second issue with iso_639.xml is coming from:
 >  >    pkgsrc/x11/kdebase-workspace4 .. kcontrol/keyboard/iso_codes.h
 >  >     IsoCodes(const QString& isoCode, const QString&
 >  > isoCodesXmlDir="/usr/share/xml/iso-codes");
 >  
 >  Indeed thats just wrong.  I'll think about how to fix both.
 
 That is a little bit more complicated.
 I think that needs a configure check with 'pkg-config --variable=prefix 
iso-codes'
 to get the root directory for iso-codes.
 
 Bernd
 
 
 --+QahgC5+KEYLbs62
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="pr44364.txt"
 
 --- kcontrol/keyboard/xkb_rules.cpp.orig       2010-08-27 10:10:21.000000000 
+0200
 +++ kcontrol/keyboard/xkb_rules.cpp    2011-01-11 21:47:03.000000000 +0100
 @@ -138,12 +138,18 @@
  {
        QString rulesFile;
        QString rulesName = Rules::getRulesName();
 +      QString xkbRulesSubDir = "xkb/rules"
  
        if ( ! rulesName.isNull() ) {
                QString xkbParentDir;
  
                QString base(XLIBDIR);
                if( base.count('/') >= 3 ) {
 +                      // /usr/X11R7/lib/X11 with xkb/rules subdirectory below 
it
 +                      QDir xkbRulesDir(base + "/" + xkbRulesSubDir);
 +                      if( xkbRulesDir.exists() ) {
 +                              xkbParentDir = base.absolutePath();
 +                      } else {
                        // .../usr/lib/X11 -> /usr/share/X11/xkb vs 
.../usr/X11/lib -> /usr/X11/share/X11/xkb
                        QString delta = base.endsWith("X11") ? 
"/../../share/X11" : "/../share/X11";
                        QDir baseDir(base + delta);
 @@ -157,12 +163,13 @@
                                }
                        }
                }
 +              }
  
                if( xkbParentDir.isEmpty() ) {
                        xkbParentDir = "/usr/share/X11";
                }
  
 -              rulesFile = QString("%1/xkb/rules/%2.xml").arg(xkbParentDir, 
rulesName);
 +              rulesFile = QString("%1/%2/%3.xml").arg(xkbParentDir, 
xkbRulesSubDir, rulesName);
        }
  
        return rulesFile;
 
 --+QahgC5+KEYLbs62--
 


Home | Main Index | Thread Index | Old Index