summaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorlofi <lofi@FreeBSD.org>2004-08-12 21:16:20 +0000
committerlofi <lofi@FreeBSD.org>2004-08-12 21:16:20 +0000
commit662ff966c07b709fa233e5901fe066ceeee1b5a1 (patch)
tree590c417dc8f9f7ee7c2080a58db04e0eeb749c1f /x11
parent628c4b4d5f51bf3fa44e1b986dc0a0e73521816d (diff)
downloadFreeBSD-ports-662ff966c07b709fa233e5901fe066ceeee1b5a1.zip
FreeBSD-ports-662ff966c07b709fa233e5901fe066ceeee1b5a1.tar.gz
A couple of patches didn't make it from the kde-freebsd repo into ports.
Here they are... PORTREVISION needs to be bumped again (sorry). Pointy hat to: me
Diffstat (limited to 'x11')
-rw-r--r--x11/kde4-baseapps/Makefile2
-rw-r--r--x11/kde4-baseapps/files/patch-kxkb_kcmlayout.cpp83
-rw-r--r--x11/kde4-baseapps/files/patch-kxkb_kcmlayout.h25
-rw-r--r--x11/kde4-baseapps/files/patch-kxkb_kxkb.cpp23
-rw-r--r--x11/kde4-baseapps/files/patch-kxkb_rules.cpp85
-rw-r--r--x11/kde4-baseapps/files/patch-kxkb_rules.h33
-rw-r--r--x11/kde4-runtime/Makefile2
-rw-r--r--x11/kde4-runtime/files/patch-kxkb_kcmlayout.cpp83
-rw-r--r--x11/kde4-runtime/files/patch-kxkb_kcmlayout.h25
-rw-r--r--x11/kde4-runtime/files/patch-kxkb_kxkb.cpp23
-rw-r--r--x11/kde4-runtime/files/patch-kxkb_rules.cpp85
-rw-r--r--x11/kde4-runtime/files/patch-kxkb_rules.h33
-rw-r--r--x11/kde4-workspace/Makefile2
-rw-r--r--x11/kde4-workspace/files/patch-kxkb_kcmlayout.cpp83
-rw-r--r--x11/kde4-workspace/files/patch-kxkb_kcmlayout.h25
-rw-r--r--x11/kde4-workspace/files/patch-kxkb_kxkb.cpp23
-rw-r--r--x11/kde4-workspace/files/patch-kxkb_rules.cpp85
-rw-r--r--x11/kde4-workspace/files/patch-kxkb_rules.h33
-rw-r--r--x11/kdebase3/Makefile2
-rw-r--r--x11/kdebase3/files/patch-kxkb_kcmlayout.cpp83
-rw-r--r--x11/kdebase3/files/patch-kxkb_kcmlayout.h25
-rw-r--r--x11/kdebase3/files/patch-kxkb_kxkb.cpp23
-rw-r--r--x11/kdebase3/files/patch-kxkb_rules.cpp85
-rw-r--r--x11/kdebase3/files/patch-kxkb_rules.h33
-rw-r--r--x11/kdebase4-runtime/Makefile2
-rw-r--r--x11/kdebase4-runtime/files/patch-kxkb_kcmlayout.cpp83
-rw-r--r--x11/kdebase4-runtime/files/patch-kxkb_kcmlayout.h25
-rw-r--r--x11/kdebase4-runtime/files/patch-kxkb_kxkb.cpp23
-rw-r--r--x11/kdebase4-runtime/files/patch-kxkb_rules.cpp85
-rw-r--r--x11/kdebase4-runtime/files/patch-kxkb_rules.h33
-rw-r--r--x11/kdebase4-workspace/Makefile2
-rw-r--r--x11/kdebase4-workspace/files/patch-kxkb_kcmlayout.cpp83
-rw-r--r--x11/kdebase4-workspace/files/patch-kxkb_kcmlayout.h25
-rw-r--r--x11/kdebase4-workspace/files/patch-kxkb_kxkb.cpp23
-rw-r--r--x11/kdebase4-workspace/files/patch-kxkb_rules.cpp85
-rw-r--r--x11/kdebase4-workspace/files/patch-kxkb_rules.h33
-rw-r--r--x11/kdebase4/Makefile2
-rw-r--r--x11/kdebase4/files/patch-kxkb_kcmlayout.cpp83
-rw-r--r--x11/kdebase4/files/patch-kxkb_kcmlayout.h25
-rw-r--r--x11/kdebase4/files/patch-kxkb_kxkb.cpp23
-rw-r--r--x11/kdebase4/files/patch-kxkb_rules.cpp85
-rw-r--r--x11/kdebase4/files/patch-kxkb_rules.h33
-rw-r--r--x11/kdelibs3/Makefile2
-rw-r--r--x11/kdelibs3/files/patch-dcop_dcopserver.cpp185
-rw-r--r--x11/kdelibs4/Makefile2
-rw-r--r--x11/kdelibs4/files/patch-dcop_dcopserver.cpp185
46 files changed, 2122 insertions, 9 deletions
diff --git a/x11/kde4-baseapps/Makefile b/x11/kde4-baseapps/Makefile
index 7fa9328..21e13d7 100644
--- a/x11/kde4-baseapps/Makefile
+++ b/x11/kde4-baseapps/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kde4-baseapps/files/patch-kxkb_kcmlayout.cpp b/x11/kde4-baseapps/files/patch-kxkb_kcmlayout.cpp
new file mode 100644
index 0000000..750137b
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-kxkb_kcmlayout.cpp
@@ -0,0 +1,83 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.cpp,v
+retrieving revision 1.82.2.1
+retrieving revision 1.86
+diff -u -p -r1.82.2.1 -r1.86
+--- kxkb/kcmlayout.cpp 2004/05/19 12:09:58 1.82.2.1
++++ kxkb/kcmlayout.cpp 2004/06/28 14:19:03 1.86
+@@ -79,7 +79,8 @@ OptionListItem * OptionListItem::findChi
+ }
+
+ LayoutConfig::LayoutConfig(QWidget *parent, const char *name)
+- : KCModule(parent, name), m_rules(0)
++ : KCModule(parent, name),
++ m_rules(NULL)
+ {
+ QVBoxLayout *main = new QVBoxLayout(this, 0, KDialog::spacingHint());
+
+@@ -122,7 +124,7 @@ LayoutConfig::LayoutConfig(QWidget *pare
+ #endif
+
+ //Read rules - we _must_ read _before_ creating xkb-options comboboxes
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ makeOptionsTab();
+
+@@ -292,6 +294,8 @@ QWidget* LayoutConfig::makeOptionsTab()
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(changed()));
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(updateOptionsCommand()));
+
++ connect(widget->chkEnableOptions, SIGNAL(toggled(bool)), SLOT(changed()));
++
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(updateOptionsCommand()));
+
+@@ -405,10 +409,10 @@ void LayoutConfig::load()
+ bool use = config->readBoolEntry( "Use", false );
+
+ // find out which rule applies
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
++ //QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+
+ // update other files
+- ruleChanged(rule);
++ ruleChanged();
+
+ // find out about the model
+ QString model = config->readEntry("Model", "pc104");
+@@ -499,12 +506,12 @@ void LayoutConfig::load()
+ emit KCModule::changed( false );
+ }
+
+-void LayoutConfig::ruleChanged(const QString &rule)
++void LayoutConfig::ruleChanged()
+ {
+- if( rule == m_rule )
+- return;
++// if( rule == m_rule )
++// return;
+
+- m_rule = rule;
++// m_rule = rule;
+
+ QString model; //, layout;
+ if (m_rules)
+@@ -514,7 +521,7 @@ void LayoutConfig::ruleChanged(const QSt
+ }
+
+ delete m_rules;
+- m_rules = new KeyRules(rule);
++ m_rules = new KeyRules();
+
+ QStringList tmp;
+ widget->comboModel->clear();
+@@ -672,7 +680,7 @@ void LayoutConfig::save()
+ void LayoutConfig::defaults()
+ {
+ widget->chkEnable->setChecked(false);
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ widget->comboModel->setCurrentText("pc104");
+ //layoutCombo->setCurrentText("us");
diff --git a/x11/kde4-baseapps/files/patch-kxkb_kcmlayout.h b/x11/kde4-baseapps/files/patch-kxkb_kcmlayout.h
new file mode 100644
index 0000000..e2630a0
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-kxkb_kcmlayout.h
@@ -0,0 +1,25 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.h,v
+retrieving revision 1.22
+retrieving revision 1.23
+diff -u -p -r1.22 -r1.23
+--- kxkb/kcmlayout.h 2003/10/29 07:30:36 1.22
++++ kxkb/kcmlayout.h 2004/06/28 14:19:03 1.23
+@@ -54,7 +54,7 @@ protected slots:
+ void variantChanged();
+ void latinChanged();
+ void layoutSelChanged(QListViewItem *);
+- void ruleChanged(const QString &rule);
++ void ruleChanged();
+ void updateLayoutCommand();
+ void updateOptionsCommand();
+ void add();
+@@ -71,7 +71,7 @@ private:
+ QDict<OptionListItem> m_optionGroups;
+ QDict<char> m_variants;
+ QDict<char> m_includes;
+- QString m_rule;
++// QString m_rule;
+ KeyRules *m_rules;
+
+ QWidget* makeOptionsTab();
diff --git a/x11/kde4-baseapps/files/patch-kxkb_kxkb.cpp b/x11/kde4-baseapps/files/patch-kxkb_kxkb.cpp
new file mode 100644
index 0000000..bc011c1
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-kxkb_kxkb.cpp
@@ -0,0 +1,23 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kxkb.cpp,v
+retrieving revision 1.70
+retrieving revision 1.72
+diff -u -p -r1.70 -r1.72
+--- kxkb/kxkb.cpp 2003/10/30 18:58:11 1.70
++++ kxkb/kxkb.cpp 2004/06/28 14:19:03 1.72
+@@ -222,12 +222,12 @@ bool KXKBApp::settingsRead()
+ }
+ }
+
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+- m_rules = new KeyRules( rule );
++ m_rules = new KeyRules();
+ m_model = config->readEntry("Model", "pc104");
+ m_layout = config->readEntry("Layout", "");
+ m_defaultLayout = m_layout;
+
++
+ m_list = config->readListEntry("Additional");
+ if (!m_list.contains(m_layout))
+ {
+
diff --git a/x11/kde4-baseapps/files/patch-kxkb_rules.cpp b/x11/kde4-baseapps/files/patch-kxkb_rules.cpp
new file mode 100644
index 0000000..c764908
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-kxkb_rules.cpp
@@ -0,0 +1,85 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.cpp,v
+retrieving revision 1.37
+retrieving revision 1.38
+diff -u -p -r1.37 -r1.38
+--- kxkb/rules.cpp 2003/10/24 06:15:26 1.37
++++ kxkb/rules.cpp 2004/06/28 14:19:03 1.38
+@@ -16,11 +16,23 @@
+
+ #include "rules.h"
+
+-const QString X11_DIR( "/usr/X11R6/lib/X11/" );
++const char* X11DirList[2] = {"/usr/X11R6/lib/X11/", "/usr/local/X11R6/lib/X11/"};
++const char* rulesFileList[2] = {"xkb/rules/xfree86", "xkb/rules/xorg"};
+
+-KeyRules::KeyRules(QString rule):
++KeyRules::KeyRules():
+ m_layouts(90)
+ {
++ for(int ii=0; ii<2; ii++)
++ if( QDir(X11DirList[ii]).exists() ) {
++ X11_DIR = X11DirList[ii];
++ break;
++ }
++
++ if( X11_DIR.isEmpty() ) {
++ kdDebug() << "Cannot find X11 directory!" << endl;
++ return;
++ }
++
+ // ugly check for XFree 4.3 or older
+ if( QDir(X11_DIR + "xkb/symbols/pc").exists() ) {
+ m_xfree43 = true;
+@@ -29,8 +41,20 @@ KeyRules::KeyRules(QString rule):
+ m_xfree43 = false;
+ }
+
+- loadRules(X11_DIR + QString("xkb/rules/%1").arg(rule));
+- loadOldLayouts(X11_DIR + QString("xkb/rules/xfree86"));
++ QString rulesFile;
++ for(int ii=0; ii<2; ii++)
++ if( QFile(X11_DIR + QString(rulesFileList[ii])).exists() ) {
++ rulesFile = X11_DIR + rulesFileList[ii];
++ break;
++ }
++
++ if( rulesFile.isEmpty() ) {
++ kdDebug() << "Cannot find rules file in " << X11_DIR << endl;
++ return;
++ }
++
++ loadRules(rulesFile);
++ loadOldLayouts(rulesFile);
+ loadGroups(::locate("config", "kxkb_groups"));
+ }
+
+@@ -51,9 +75,7 @@ static struct {
+ { 0, 0 }
+ };
+
+- XkbRF_RulesPtr rules;
+-
+- rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
++ XkbRF_RulesPtr rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
+
+ if (rules == NULL) {
+ kdDebug() << "Unable to load rules" << endl;
+@@ -176,7 +198,7 @@ unsigned int KeyRules::getGroup(const QS
+ return it == m_initialGroups.end() ? 0 : it.data();
+ }
+
+-
++/*
+ QStringList KeyRules::rules(QString path)
+ {
+ QStringList result;
+@@ -193,7 +215,7 @@ QStringList KeyRules::rules(QString path
+
+ return result;
+ }
+-
++*/
+
+ /* pretty simple algorithm - reads the layout file and
+ tries to find "xkb_symbols"
diff --git a/x11/kde4-baseapps/files/patch-kxkb_rules.h b/x11/kde4-baseapps/files/patch-kxkb_rules.h
new file mode 100644
index 0000000..23d2432
--- /dev/null
+++ b/x11/kde4-baseapps/files/patch-kxkb_rules.h
@@ -0,0 +1,33 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.h,v
+retrieving revision 1.11
+retrieving revision 1.12
+diff -u -p -r1.11 -r1.12
+--- kxkb/rules.h 2003/08/24 04:02:38 1.11
++++ kxkb/rules.h 2004/06/28 14:19:03 1.12
+@@ -10,14 +10,14 @@ class KeyRules
+ {
+ public:
+
+- KeyRules(QString rule="xfree86");
++ KeyRules();
+
+ const QDict<char> &models() const { return m_models; };
+ const QDict<char> &layouts() const { return m_layouts; };
+ const QDict<char> &options() const { return m_options; };
+
+ void parseVariants(const QStringList& vars, QDict<char>& variants, bool chkVars=true);
+- static QStringList rules(QString path = QString::null);
++// static QStringList rules(QString path = QString::null);
+
+ QStringList getVariants(const QString& layout);
+ unsigned int getGroup(const QString& layout, const char* baseGr);
+@@ -42,6 +42,8 @@ private:
+ QStringList m_oldLayouts;
+ QStringList m_nonLatinLayouts;
+ bool m_xfree43;
++
++ QString X11_DIR; // pseudo-constant
+ };
+
+
diff --git a/x11/kde4-runtime/Makefile b/x11/kde4-runtime/Makefile
index 7fa9328..21e13d7 100644
--- a/x11/kde4-runtime/Makefile
+++ b/x11/kde4-runtime/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kde4-runtime/files/patch-kxkb_kcmlayout.cpp b/x11/kde4-runtime/files/patch-kxkb_kcmlayout.cpp
new file mode 100644
index 0000000..750137b
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-kxkb_kcmlayout.cpp
@@ -0,0 +1,83 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.cpp,v
+retrieving revision 1.82.2.1
+retrieving revision 1.86
+diff -u -p -r1.82.2.1 -r1.86
+--- kxkb/kcmlayout.cpp 2004/05/19 12:09:58 1.82.2.1
++++ kxkb/kcmlayout.cpp 2004/06/28 14:19:03 1.86
+@@ -79,7 +79,8 @@ OptionListItem * OptionListItem::findChi
+ }
+
+ LayoutConfig::LayoutConfig(QWidget *parent, const char *name)
+- : KCModule(parent, name), m_rules(0)
++ : KCModule(parent, name),
++ m_rules(NULL)
+ {
+ QVBoxLayout *main = new QVBoxLayout(this, 0, KDialog::spacingHint());
+
+@@ -122,7 +124,7 @@ LayoutConfig::LayoutConfig(QWidget *pare
+ #endif
+
+ //Read rules - we _must_ read _before_ creating xkb-options comboboxes
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ makeOptionsTab();
+
+@@ -292,6 +294,8 @@ QWidget* LayoutConfig::makeOptionsTab()
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(changed()));
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(updateOptionsCommand()));
+
++ connect(widget->chkEnableOptions, SIGNAL(toggled(bool)), SLOT(changed()));
++
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(updateOptionsCommand()));
+
+@@ -405,10 +409,10 @@ void LayoutConfig::load()
+ bool use = config->readBoolEntry( "Use", false );
+
+ // find out which rule applies
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
++ //QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+
+ // update other files
+- ruleChanged(rule);
++ ruleChanged();
+
+ // find out about the model
+ QString model = config->readEntry("Model", "pc104");
+@@ -499,12 +506,12 @@ void LayoutConfig::load()
+ emit KCModule::changed( false );
+ }
+
+-void LayoutConfig::ruleChanged(const QString &rule)
++void LayoutConfig::ruleChanged()
+ {
+- if( rule == m_rule )
+- return;
++// if( rule == m_rule )
++// return;
+
+- m_rule = rule;
++// m_rule = rule;
+
+ QString model; //, layout;
+ if (m_rules)
+@@ -514,7 +521,7 @@ void LayoutConfig::ruleChanged(const QSt
+ }
+
+ delete m_rules;
+- m_rules = new KeyRules(rule);
++ m_rules = new KeyRules();
+
+ QStringList tmp;
+ widget->comboModel->clear();
+@@ -672,7 +680,7 @@ void LayoutConfig::save()
+ void LayoutConfig::defaults()
+ {
+ widget->chkEnable->setChecked(false);
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ widget->comboModel->setCurrentText("pc104");
+ //layoutCombo->setCurrentText("us");
diff --git a/x11/kde4-runtime/files/patch-kxkb_kcmlayout.h b/x11/kde4-runtime/files/patch-kxkb_kcmlayout.h
new file mode 100644
index 0000000..e2630a0
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-kxkb_kcmlayout.h
@@ -0,0 +1,25 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.h,v
+retrieving revision 1.22
+retrieving revision 1.23
+diff -u -p -r1.22 -r1.23
+--- kxkb/kcmlayout.h 2003/10/29 07:30:36 1.22
++++ kxkb/kcmlayout.h 2004/06/28 14:19:03 1.23
+@@ -54,7 +54,7 @@ protected slots:
+ void variantChanged();
+ void latinChanged();
+ void layoutSelChanged(QListViewItem *);
+- void ruleChanged(const QString &rule);
++ void ruleChanged();
+ void updateLayoutCommand();
+ void updateOptionsCommand();
+ void add();
+@@ -71,7 +71,7 @@ private:
+ QDict<OptionListItem> m_optionGroups;
+ QDict<char> m_variants;
+ QDict<char> m_includes;
+- QString m_rule;
++// QString m_rule;
+ KeyRules *m_rules;
+
+ QWidget* makeOptionsTab();
diff --git a/x11/kde4-runtime/files/patch-kxkb_kxkb.cpp b/x11/kde4-runtime/files/patch-kxkb_kxkb.cpp
new file mode 100644
index 0000000..bc011c1
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-kxkb_kxkb.cpp
@@ -0,0 +1,23 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kxkb.cpp,v
+retrieving revision 1.70
+retrieving revision 1.72
+diff -u -p -r1.70 -r1.72
+--- kxkb/kxkb.cpp 2003/10/30 18:58:11 1.70
++++ kxkb/kxkb.cpp 2004/06/28 14:19:03 1.72
+@@ -222,12 +222,12 @@ bool KXKBApp::settingsRead()
+ }
+ }
+
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+- m_rules = new KeyRules( rule );
++ m_rules = new KeyRules();
+ m_model = config->readEntry("Model", "pc104");
+ m_layout = config->readEntry("Layout", "");
+ m_defaultLayout = m_layout;
+
++
+ m_list = config->readListEntry("Additional");
+ if (!m_list.contains(m_layout))
+ {
+
diff --git a/x11/kde4-runtime/files/patch-kxkb_rules.cpp b/x11/kde4-runtime/files/patch-kxkb_rules.cpp
new file mode 100644
index 0000000..c764908
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-kxkb_rules.cpp
@@ -0,0 +1,85 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.cpp,v
+retrieving revision 1.37
+retrieving revision 1.38
+diff -u -p -r1.37 -r1.38
+--- kxkb/rules.cpp 2003/10/24 06:15:26 1.37
++++ kxkb/rules.cpp 2004/06/28 14:19:03 1.38
+@@ -16,11 +16,23 @@
+
+ #include "rules.h"
+
+-const QString X11_DIR( "/usr/X11R6/lib/X11/" );
++const char* X11DirList[2] = {"/usr/X11R6/lib/X11/", "/usr/local/X11R6/lib/X11/"};
++const char* rulesFileList[2] = {"xkb/rules/xfree86", "xkb/rules/xorg"};
+
+-KeyRules::KeyRules(QString rule):
++KeyRules::KeyRules():
+ m_layouts(90)
+ {
++ for(int ii=0; ii<2; ii++)
++ if( QDir(X11DirList[ii]).exists() ) {
++ X11_DIR = X11DirList[ii];
++ break;
++ }
++
++ if( X11_DIR.isEmpty() ) {
++ kdDebug() << "Cannot find X11 directory!" << endl;
++ return;
++ }
++
+ // ugly check for XFree 4.3 or older
+ if( QDir(X11_DIR + "xkb/symbols/pc").exists() ) {
+ m_xfree43 = true;
+@@ -29,8 +41,20 @@ KeyRules::KeyRules(QString rule):
+ m_xfree43 = false;
+ }
+
+- loadRules(X11_DIR + QString("xkb/rules/%1").arg(rule));
+- loadOldLayouts(X11_DIR + QString("xkb/rules/xfree86"));
++ QString rulesFile;
++ for(int ii=0; ii<2; ii++)
++ if( QFile(X11_DIR + QString(rulesFileList[ii])).exists() ) {
++ rulesFile = X11_DIR + rulesFileList[ii];
++ break;
++ }
++
++ if( rulesFile.isEmpty() ) {
++ kdDebug() << "Cannot find rules file in " << X11_DIR << endl;
++ return;
++ }
++
++ loadRules(rulesFile);
++ loadOldLayouts(rulesFile);
+ loadGroups(::locate("config", "kxkb_groups"));
+ }
+
+@@ -51,9 +75,7 @@ static struct {
+ { 0, 0 }
+ };
+
+- XkbRF_RulesPtr rules;
+-
+- rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
++ XkbRF_RulesPtr rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
+
+ if (rules == NULL) {
+ kdDebug() << "Unable to load rules" << endl;
+@@ -176,7 +198,7 @@ unsigned int KeyRules::getGroup(const QS
+ return it == m_initialGroups.end() ? 0 : it.data();
+ }
+
+-
++/*
+ QStringList KeyRules::rules(QString path)
+ {
+ QStringList result;
+@@ -193,7 +215,7 @@ QStringList KeyRules::rules(QString path
+
+ return result;
+ }
+-
++*/
+
+ /* pretty simple algorithm - reads the layout file and
+ tries to find "xkb_symbols"
diff --git a/x11/kde4-runtime/files/patch-kxkb_rules.h b/x11/kde4-runtime/files/patch-kxkb_rules.h
new file mode 100644
index 0000000..23d2432
--- /dev/null
+++ b/x11/kde4-runtime/files/patch-kxkb_rules.h
@@ -0,0 +1,33 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.h,v
+retrieving revision 1.11
+retrieving revision 1.12
+diff -u -p -r1.11 -r1.12
+--- kxkb/rules.h 2003/08/24 04:02:38 1.11
++++ kxkb/rules.h 2004/06/28 14:19:03 1.12
+@@ -10,14 +10,14 @@ class KeyRules
+ {
+ public:
+
+- KeyRules(QString rule="xfree86");
++ KeyRules();
+
+ const QDict<char> &models() const { return m_models; };
+ const QDict<char> &layouts() const { return m_layouts; };
+ const QDict<char> &options() const { return m_options; };
+
+ void parseVariants(const QStringList& vars, QDict<char>& variants, bool chkVars=true);
+- static QStringList rules(QString path = QString::null);
++// static QStringList rules(QString path = QString::null);
+
+ QStringList getVariants(const QString& layout);
+ unsigned int getGroup(const QString& layout, const char* baseGr);
+@@ -42,6 +42,8 @@ private:
+ QStringList m_oldLayouts;
+ QStringList m_nonLatinLayouts;
+ bool m_xfree43;
++
++ QString X11_DIR; // pseudo-constant
+ };
+
+
diff --git a/x11/kde4-workspace/Makefile b/x11/kde4-workspace/Makefile
index 7fa9328..21e13d7 100644
--- a/x11/kde4-workspace/Makefile
+++ b/x11/kde4-workspace/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kde4-workspace/files/patch-kxkb_kcmlayout.cpp b/x11/kde4-workspace/files/patch-kxkb_kcmlayout.cpp
new file mode 100644
index 0000000..750137b
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-kxkb_kcmlayout.cpp
@@ -0,0 +1,83 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.cpp,v
+retrieving revision 1.82.2.1
+retrieving revision 1.86
+diff -u -p -r1.82.2.1 -r1.86
+--- kxkb/kcmlayout.cpp 2004/05/19 12:09:58 1.82.2.1
++++ kxkb/kcmlayout.cpp 2004/06/28 14:19:03 1.86
+@@ -79,7 +79,8 @@ OptionListItem * OptionListItem::findChi
+ }
+
+ LayoutConfig::LayoutConfig(QWidget *parent, const char *name)
+- : KCModule(parent, name), m_rules(0)
++ : KCModule(parent, name),
++ m_rules(NULL)
+ {
+ QVBoxLayout *main = new QVBoxLayout(this, 0, KDialog::spacingHint());
+
+@@ -122,7 +124,7 @@ LayoutConfig::LayoutConfig(QWidget *pare
+ #endif
+
+ //Read rules - we _must_ read _before_ creating xkb-options comboboxes
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ makeOptionsTab();
+
+@@ -292,6 +294,8 @@ QWidget* LayoutConfig::makeOptionsTab()
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(changed()));
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(updateOptionsCommand()));
+
++ connect(widget->chkEnableOptions, SIGNAL(toggled(bool)), SLOT(changed()));
++
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(updateOptionsCommand()));
+
+@@ -405,10 +409,10 @@ void LayoutConfig::load()
+ bool use = config->readBoolEntry( "Use", false );
+
+ // find out which rule applies
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
++ //QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+
+ // update other files
+- ruleChanged(rule);
++ ruleChanged();
+
+ // find out about the model
+ QString model = config->readEntry("Model", "pc104");
+@@ -499,12 +506,12 @@ void LayoutConfig::load()
+ emit KCModule::changed( false );
+ }
+
+-void LayoutConfig::ruleChanged(const QString &rule)
++void LayoutConfig::ruleChanged()
+ {
+- if( rule == m_rule )
+- return;
++// if( rule == m_rule )
++// return;
+
+- m_rule = rule;
++// m_rule = rule;
+
+ QString model; //, layout;
+ if (m_rules)
+@@ -514,7 +521,7 @@ void LayoutConfig::ruleChanged(const QSt
+ }
+
+ delete m_rules;
+- m_rules = new KeyRules(rule);
++ m_rules = new KeyRules();
+
+ QStringList tmp;
+ widget->comboModel->clear();
+@@ -672,7 +680,7 @@ void LayoutConfig::save()
+ void LayoutConfig::defaults()
+ {
+ widget->chkEnable->setChecked(false);
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ widget->comboModel->setCurrentText("pc104");
+ //layoutCombo->setCurrentText("us");
diff --git a/x11/kde4-workspace/files/patch-kxkb_kcmlayout.h b/x11/kde4-workspace/files/patch-kxkb_kcmlayout.h
new file mode 100644
index 0000000..e2630a0
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-kxkb_kcmlayout.h
@@ -0,0 +1,25 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.h,v
+retrieving revision 1.22
+retrieving revision 1.23
+diff -u -p -r1.22 -r1.23
+--- kxkb/kcmlayout.h 2003/10/29 07:30:36 1.22
++++ kxkb/kcmlayout.h 2004/06/28 14:19:03 1.23
+@@ -54,7 +54,7 @@ protected slots:
+ void variantChanged();
+ void latinChanged();
+ void layoutSelChanged(QListViewItem *);
+- void ruleChanged(const QString &rule);
++ void ruleChanged();
+ void updateLayoutCommand();
+ void updateOptionsCommand();
+ void add();
+@@ -71,7 +71,7 @@ private:
+ QDict<OptionListItem> m_optionGroups;
+ QDict<char> m_variants;
+ QDict<char> m_includes;
+- QString m_rule;
++// QString m_rule;
+ KeyRules *m_rules;
+
+ QWidget* makeOptionsTab();
diff --git a/x11/kde4-workspace/files/patch-kxkb_kxkb.cpp b/x11/kde4-workspace/files/patch-kxkb_kxkb.cpp
new file mode 100644
index 0000000..bc011c1
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-kxkb_kxkb.cpp
@@ -0,0 +1,23 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kxkb.cpp,v
+retrieving revision 1.70
+retrieving revision 1.72
+diff -u -p -r1.70 -r1.72
+--- kxkb/kxkb.cpp 2003/10/30 18:58:11 1.70
++++ kxkb/kxkb.cpp 2004/06/28 14:19:03 1.72
+@@ -222,12 +222,12 @@ bool KXKBApp::settingsRead()
+ }
+ }
+
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+- m_rules = new KeyRules( rule );
++ m_rules = new KeyRules();
+ m_model = config->readEntry("Model", "pc104");
+ m_layout = config->readEntry("Layout", "");
+ m_defaultLayout = m_layout;
+
++
+ m_list = config->readListEntry("Additional");
+ if (!m_list.contains(m_layout))
+ {
+
diff --git a/x11/kde4-workspace/files/patch-kxkb_rules.cpp b/x11/kde4-workspace/files/patch-kxkb_rules.cpp
new file mode 100644
index 0000000..c764908
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-kxkb_rules.cpp
@@ -0,0 +1,85 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.cpp,v
+retrieving revision 1.37
+retrieving revision 1.38
+diff -u -p -r1.37 -r1.38
+--- kxkb/rules.cpp 2003/10/24 06:15:26 1.37
++++ kxkb/rules.cpp 2004/06/28 14:19:03 1.38
+@@ -16,11 +16,23 @@
+
+ #include "rules.h"
+
+-const QString X11_DIR( "/usr/X11R6/lib/X11/" );
++const char* X11DirList[2] = {"/usr/X11R6/lib/X11/", "/usr/local/X11R6/lib/X11/"};
++const char* rulesFileList[2] = {"xkb/rules/xfree86", "xkb/rules/xorg"};
+
+-KeyRules::KeyRules(QString rule):
++KeyRules::KeyRules():
+ m_layouts(90)
+ {
++ for(int ii=0; ii<2; ii++)
++ if( QDir(X11DirList[ii]).exists() ) {
++ X11_DIR = X11DirList[ii];
++ break;
++ }
++
++ if( X11_DIR.isEmpty() ) {
++ kdDebug() << "Cannot find X11 directory!" << endl;
++ return;
++ }
++
+ // ugly check for XFree 4.3 or older
+ if( QDir(X11_DIR + "xkb/symbols/pc").exists() ) {
+ m_xfree43 = true;
+@@ -29,8 +41,20 @@ KeyRules::KeyRules(QString rule):
+ m_xfree43 = false;
+ }
+
+- loadRules(X11_DIR + QString("xkb/rules/%1").arg(rule));
+- loadOldLayouts(X11_DIR + QString("xkb/rules/xfree86"));
++ QString rulesFile;
++ for(int ii=0; ii<2; ii++)
++ if( QFile(X11_DIR + QString(rulesFileList[ii])).exists() ) {
++ rulesFile = X11_DIR + rulesFileList[ii];
++ break;
++ }
++
++ if( rulesFile.isEmpty() ) {
++ kdDebug() << "Cannot find rules file in " << X11_DIR << endl;
++ return;
++ }
++
++ loadRules(rulesFile);
++ loadOldLayouts(rulesFile);
+ loadGroups(::locate("config", "kxkb_groups"));
+ }
+
+@@ -51,9 +75,7 @@ static struct {
+ { 0, 0 }
+ };
+
+- XkbRF_RulesPtr rules;
+-
+- rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
++ XkbRF_RulesPtr rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
+
+ if (rules == NULL) {
+ kdDebug() << "Unable to load rules" << endl;
+@@ -176,7 +198,7 @@ unsigned int KeyRules::getGroup(const QS
+ return it == m_initialGroups.end() ? 0 : it.data();
+ }
+
+-
++/*
+ QStringList KeyRules::rules(QString path)
+ {
+ QStringList result;
+@@ -193,7 +215,7 @@ QStringList KeyRules::rules(QString path
+
+ return result;
+ }
+-
++*/
+
+ /* pretty simple algorithm - reads the layout file and
+ tries to find "xkb_symbols"
diff --git a/x11/kde4-workspace/files/patch-kxkb_rules.h b/x11/kde4-workspace/files/patch-kxkb_rules.h
new file mode 100644
index 0000000..23d2432
--- /dev/null
+++ b/x11/kde4-workspace/files/patch-kxkb_rules.h
@@ -0,0 +1,33 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.h,v
+retrieving revision 1.11
+retrieving revision 1.12
+diff -u -p -r1.11 -r1.12
+--- kxkb/rules.h 2003/08/24 04:02:38 1.11
++++ kxkb/rules.h 2004/06/28 14:19:03 1.12
+@@ -10,14 +10,14 @@ class KeyRules
+ {
+ public:
+
+- KeyRules(QString rule="xfree86");
++ KeyRules();
+
+ const QDict<char> &models() const { return m_models; };
+ const QDict<char> &layouts() const { return m_layouts; };
+ const QDict<char> &options() const { return m_options; };
+
+ void parseVariants(const QStringList& vars, QDict<char>& variants, bool chkVars=true);
+- static QStringList rules(QString path = QString::null);
++// static QStringList rules(QString path = QString::null);
+
+ QStringList getVariants(const QString& layout);
+ unsigned int getGroup(const QString& layout, const char* baseGr);
+@@ -42,6 +42,8 @@ private:
+ QStringList m_oldLayouts;
+ QStringList m_nonLatinLayouts;
+ bool m_xfree43;
++
++ QString X11_DIR; // pseudo-constant
+ };
+
+
diff --git a/x11/kdebase3/Makefile b/x11/kdebase3/Makefile
index 7fa9328..21e13d7 100644
--- a/x11/kdebase3/Makefile
+++ b/x11/kdebase3/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kdebase3/files/patch-kxkb_kcmlayout.cpp b/x11/kdebase3/files/patch-kxkb_kcmlayout.cpp
new file mode 100644
index 0000000..750137b
--- /dev/null
+++ b/x11/kdebase3/files/patch-kxkb_kcmlayout.cpp
@@ -0,0 +1,83 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.cpp,v
+retrieving revision 1.82.2.1
+retrieving revision 1.86
+diff -u -p -r1.82.2.1 -r1.86
+--- kxkb/kcmlayout.cpp 2004/05/19 12:09:58 1.82.2.1
++++ kxkb/kcmlayout.cpp 2004/06/28 14:19:03 1.86
+@@ -79,7 +79,8 @@ OptionListItem * OptionListItem::findChi
+ }
+
+ LayoutConfig::LayoutConfig(QWidget *parent, const char *name)
+- : KCModule(parent, name), m_rules(0)
++ : KCModule(parent, name),
++ m_rules(NULL)
+ {
+ QVBoxLayout *main = new QVBoxLayout(this, 0, KDialog::spacingHint());
+
+@@ -122,7 +124,7 @@ LayoutConfig::LayoutConfig(QWidget *pare
+ #endif
+
+ //Read rules - we _must_ read _before_ creating xkb-options comboboxes
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ makeOptionsTab();
+
+@@ -292,6 +294,8 @@ QWidget* LayoutConfig::makeOptionsTab()
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(changed()));
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(updateOptionsCommand()));
+
++ connect(widget->chkEnableOptions, SIGNAL(toggled(bool)), SLOT(changed()));
++
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(updateOptionsCommand()));
+
+@@ -405,10 +409,10 @@ void LayoutConfig::load()
+ bool use = config->readBoolEntry( "Use", false );
+
+ // find out which rule applies
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
++ //QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+
+ // update other files
+- ruleChanged(rule);
++ ruleChanged();
+
+ // find out about the model
+ QString model = config->readEntry("Model", "pc104");
+@@ -499,12 +506,12 @@ void LayoutConfig::load()
+ emit KCModule::changed( false );
+ }
+
+-void LayoutConfig::ruleChanged(const QString &rule)
++void LayoutConfig::ruleChanged()
+ {
+- if( rule == m_rule )
+- return;
++// if( rule == m_rule )
++// return;
+
+- m_rule = rule;
++// m_rule = rule;
+
+ QString model; //, layout;
+ if (m_rules)
+@@ -514,7 +521,7 @@ void LayoutConfig::ruleChanged(const QSt
+ }
+
+ delete m_rules;
+- m_rules = new KeyRules(rule);
++ m_rules = new KeyRules();
+
+ QStringList tmp;
+ widget->comboModel->clear();
+@@ -672,7 +680,7 @@ void LayoutConfig::save()
+ void LayoutConfig::defaults()
+ {
+ widget->chkEnable->setChecked(false);
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ widget->comboModel->setCurrentText("pc104");
+ //layoutCombo->setCurrentText("us");
diff --git a/x11/kdebase3/files/patch-kxkb_kcmlayout.h b/x11/kdebase3/files/patch-kxkb_kcmlayout.h
new file mode 100644
index 0000000..e2630a0
--- /dev/null
+++ b/x11/kdebase3/files/patch-kxkb_kcmlayout.h
@@ -0,0 +1,25 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.h,v
+retrieving revision 1.22
+retrieving revision 1.23
+diff -u -p -r1.22 -r1.23
+--- kxkb/kcmlayout.h 2003/10/29 07:30:36 1.22
++++ kxkb/kcmlayout.h 2004/06/28 14:19:03 1.23
+@@ -54,7 +54,7 @@ protected slots:
+ void variantChanged();
+ void latinChanged();
+ void layoutSelChanged(QListViewItem *);
+- void ruleChanged(const QString &rule);
++ void ruleChanged();
+ void updateLayoutCommand();
+ void updateOptionsCommand();
+ void add();
+@@ -71,7 +71,7 @@ private:
+ QDict<OptionListItem> m_optionGroups;
+ QDict<char> m_variants;
+ QDict<char> m_includes;
+- QString m_rule;
++// QString m_rule;
+ KeyRules *m_rules;
+
+ QWidget* makeOptionsTab();
diff --git a/x11/kdebase3/files/patch-kxkb_kxkb.cpp b/x11/kdebase3/files/patch-kxkb_kxkb.cpp
new file mode 100644
index 0000000..bc011c1
--- /dev/null
+++ b/x11/kdebase3/files/patch-kxkb_kxkb.cpp
@@ -0,0 +1,23 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kxkb.cpp,v
+retrieving revision 1.70
+retrieving revision 1.72
+diff -u -p -r1.70 -r1.72
+--- kxkb/kxkb.cpp 2003/10/30 18:58:11 1.70
++++ kxkb/kxkb.cpp 2004/06/28 14:19:03 1.72
+@@ -222,12 +222,12 @@ bool KXKBApp::settingsRead()
+ }
+ }
+
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+- m_rules = new KeyRules( rule );
++ m_rules = new KeyRules();
+ m_model = config->readEntry("Model", "pc104");
+ m_layout = config->readEntry("Layout", "");
+ m_defaultLayout = m_layout;
+
++
+ m_list = config->readListEntry("Additional");
+ if (!m_list.contains(m_layout))
+ {
+
diff --git a/x11/kdebase3/files/patch-kxkb_rules.cpp b/x11/kdebase3/files/patch-kxkb_rules.cpp
new file mode 100644
index 0000000..c764908
--- /dev/null
+++ b/x11/kdebase3/files/patch-kxkb_rules.cpp
@@ -0,0 +1,85 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.cpp,v
+retrieving revision 1.37
+retrieving revision 1.38
+diff -u -p -r1.37 -r1.38
+--- kxkb/rules.cpp 2003/10/24 06:15:26 1.37
++++ kxkb/rules.cpp 2004/06/28 14:19:03 1.38
+@@ -16,11 +16,23 @@
+
+ #include "rules.h"
+
+-const QString X11_DIR( "/usr/X11R6/lib/X11/" );
++const char* X11DirList[2] = {"/usr/X11R6/lib/X11/", "/usr/local/X11R6/lib/X11/"};
++const char* rulesFileList[2] = {"xkb/rules/xfree86", "xkb/rules/xorg"};
+
+-KeyRules::KeyRules(QString rule):
++KeyRules::KeyRules():
+ m_layouts(90)
+ {
++ for(int ii=0; ii<2; ii++)
++ if( QDir(X11DirList[ii]).exists() ) {
++ X11_DIR = X11DirList[ii];
++ break;
++ }
++
++ if( X11_DIR.isEmpty() ) {
++ kdDebug() << "Cannot find X11 directory!" << endl;
++ return;
++ }
++
+ // ugly check for XFree 4.3 or older
+ if( QDir(X11_DIR + "xkb/symbols/pc").exists() ) {
+ m_xfree43 = true;
+@@ -29,8 +41,20 @@ KeyRules::KeyRules(QString rule):
+ m_xfree43 = false;
+ }
+
+- loadRules(X11_DIR + QString("xkb/rules/%1").arg(rule));
+- loadOldLayouts(X11_DIR + QString("xkb/rules/xfree86"));
++ QString rulesFile;
++ for(int ii=0; ii<2; ii++)
++ if( QFile(X11_DIR + QString(rulesFileList[ii])).exists() ) {
++ rulesFile = X11_DIR + rulesFileList[ii];
++ break;
++ }
++
++ if( rulesFile.isEmpty() ) {
++ kdDebug() << "Cannot find rules file in " << X11_DIR << endl;
++ return;
++ }
++
++ loadRules(rulesFile);
++ loadOldLayouts(rulesFile);
+ loadGroups(::locate("config", "kxkb_groups"));
+ }
+
+@@ -51,9 +75,7 @@ static struct {
+ { 0, 0 }
+ };
+
+- XkbRF_RulesPtr rules;
+-
+- rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
++ XkbRF_RulesPtr rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
+
+ if (rules == NULL) {
+ kdDebug() << "Unable to load rules" << endl;
+@@ -176,7 +198,7 @@ unsigned int KeyRules::getGroup(const QS
+ return it == m_initialGroups.end() ? 0 : it.data();
+ }
+
+-
++/*
+ QStringList KeyRules::rules(QString path)
+ {
+ QStringList result;
+@@ -193,7 +215,7 @@ QStringList KeyRules::rules(QString path
+
+ return result;
+ }
+-
++*/
+
+ /* pretty simple algorithm - reads the layout file and
+ tries to find "xkb_symbols"
diff --git a/x11/kdebase3/files/patch-kxkb_rules.h b/x11/kdebase3/files/patch-kxkb_rules.h
new file mode 100644
index 0000000..23d2432
--- /dev/null
+++ b/x11/kdebase3/files/patch-kxkb_rules.h
@@ -0,0 +1,33 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.h,v
+retrieving revision 1.11
+retrieving revision 1.12
+diff -u -p -r1.11 -r1.12
+--- kxkb/rules.h 2003/08/24 04:02:38 1.11
++++ kxkb/rules.h 2004/06/28 14:19:03 1.12
+@@ -10,14 +10,14 @@ class KeyRules
+ {
+ public:
+
+- KeyRules(QString rule="xfree86");
++ KeyRules();
+
+ const QDict<char> &models() const { return m_models; };
+ const QDict<char> &layouts() const { return m_layouts; };
+ const QDict<char> &options() const { return m_options; };
+
+ void parseVariants(const QStringList& vars, QDict<char>& variants, bool chkVars=true);
+- static QStringList rules(QString path = QString::null);
++// static QStringList rules(QString path = QString::null);
+
+ QStringList getVariants(const QString& layout);
+ unsigned int getGroup(const QString& layout, const char* baseGr);
+@@ -42,6 +42,8 @@ private:
+ QStringList m_oldLayouts;
+ QStringList m_nonLatinLayouts;
+ bool m_xfree43;
++
++ QString X11_DIR; // pseudo-constant
+ };
+
+
diff --git a/x11/kdebase4-runtime/Makefile b/x11/kdebase4-runtime/Makefile
index 7fa9328..21e13d7 100644
--- a/x11/kdebase4-runtime/Makefile
+++ b/x11/kdebase4-runtime/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kdebase4-runtime/files/patch-kxkb_kcmlayout.cpp b/x11/kdebase4-runtime/files/patch-kxkb_kcmlayout.cpp
new file mode 100644
index 0000000..750137b
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-kxkb_kcmlayout.cpp
@@ -0,0 +1,83 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.cpp,v
+retrieving revision 1.82.2.1
+retrieving revision 1.86
+diff -u -p -r1.82.2.1 -r1.86
+--- kxkb/kcmlayout.cpp 2004/05/19 12:09:58 1.82.2.1
++++ kxkb/kcmlayout.cpp 2004/06/28 14:19:03 1.86
+@@ -79,7 +79,8 @@ OptionListItem * OptionListItem::findChi
+ }
+
+ LayoutConfig::LayoutConfig(QWidget *parent, const char *name)
+- : KCModule(parent, name), m_rules(0)
++ : KCModule(parent, name),
++ m_rules(NULL)
+ {
+ QVBoxLayout *main = new QVBoxLayout(this, 0, KDialog::spacingHint());
+
+@@ -122,7 +124,7 @@ LayoutConfig::LayoutConfig(QWidget *pare
+ #endif
+
+ //Read rules - we _must_ read _before_ creating xkb-options comboboxes
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ makeOptionsTab();
+
+@@ -292,6 +294,8 @@ QWidget* LayoutConfig::makeOptionsTab()
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(changed()));
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(updateOptionsCommand()));
+
++ connect(widget->chkEnableOptions, SIGNAL(toggled(bool)), SLOT(changed()));
++
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(updateOptionsCommand()));
+
+@@ -405,10 +409,10 @@ void LayoutConfig::load()
+ bool use = config->readBoolEntry( "Use", false );
+
+ // find out which rule applies
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
++ //QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+
+ // update other files
+- ruleChanged(rule);
++ ruleChanged();
+
+ // find out about the model
+ QString model = config->readEntry("Model", "pc104");
+@@ -499,12 +506,12 @@ void LayoutConfig::load()
+ emit KCModule::changed( false );
+ }
+
+-void LayoutConfig::ruleChanged(const QString &rule)
++void LayoutConfig::ruleChanged()
+ {
+- if( rule == m_rule )
+- return;
++// if( rule == m_rule )
++// return;
+
+- m_rule = rule;
++// m_rule = rule;
+
+ QString model; //, layout;
+ if (m_rules)
+@@ -514,7 +521,7 @@ void LayoutConfig::ruleChanged(const QSt
+ }
+
+ delete m_rules;
+- m_rules = new KeyRules(rule);
++ m_rules = new KeyRules();
+
+ QStringList tmp;
+ widget->comboModel->clear();
+@@ -672,7 +680,7 @@ void LayoutConfig::save()
+ void LayoutConfig::defaults()
+ {
+ widget->chkEnable->setChecked(false);
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ widget->comboModel->setCurrentText("pc104");
+ //layoutCombo->setCurrentText("us");
diff --git a/x11/kdebase4-runtime/files/patch-kxkb_kcmlayout.h b/x11/kdebase4-runtime/files/patch-kxkb_kcmlayout.h
new file mode 100644
index 0000000..e2630a0
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-kxkb_kcmlayout.h
@@ -0,0 +1,25 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.h,v
+retrieving revision 1.22
+retrieving revision 1.23
+diff -u -p -r1.22 -r1.23
+--- kxkb/kcmlayout.h 2003/10/29 07:30:36 1.22
++++ kxkb/kcmlayout.h 2004/06/28 14:19:03 1.23
+@@ -54,7 +54,7 @@ protected slots:
+ void variantChanged();
+ void latinChanged();
+ void layoutSelChanged(QListViewItem *);
+- void ruleChanged(const QString &rule);
++ void ruleChanged();
+ void updateLayoutCommand();
+ void updateOptionsCommand();
+ void add();
+@@ -71,7 +71,7 @@ private:
+ QDict<OptionListItem> m_optionGroups;
+ QDict<char> m_variants;
+ QDict<char> m_includes;
+- QString m_rule;
++// QString m_rule;
+ KeyRules *m_rules;
+
+ QWidget* makeOptionsTab();
diff --git a/x11/kdebase4-runtime/files/patch-kxkb_kxkb.cpp b/x11/kdebase4-runtime/files/patch-kxkb_kxkb.cpp
new file mode 100644
index 0000000..bc011c1
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-kxkb_kxkb.cpp
@@ -0,0 +1,23 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kxkb.cpp,v
+retrieving revision 1.70
+retrieving revision 1.72
+diff -u -p -r1.70 -r1.72
+--- kxkb/kxkb.cpp 2003/10/30 18:58:11 1.70
++++ kxkb/kxkb.cpp 2004/06/28 14:19:03 1.72
+@@ -222,12 +222,12 @@ bool KXKBApp::settingsRead()
+ }
+ }
+
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+- m_rules = new KeyRules( rule );
++ m_rules = new KeyRules();
+ m_model = config->readEntry("Model", "pc104");
+ m_layout = config->readEntry("Layout", "");
+ m_defaultLayout = m_layout;
+
++
+ m_list = config->readListEntry("Additional");
+ if (!m_list.contains(m_layout))
+ {
+
diff --git a/x11/kdebase4-runtime/files/patch-kxkb_rules.cpp b/x11/kdebase4-runtime/files/patch-kxkb_rules.cpp
new file mode 100644
index 0000000..c764908
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-kxkb_rules.cpp
@@ -0,0 +1,85 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.cpp,v
+retrieving revision 1.37
+retrieving revision 1.38
+diff -u -p -r1.37 -r1.38
+--- kxkb/rules.cpp 2003/10/24 06:15:26 1.37
++++ kxkb/rules.cpp 2004/06/28 14:19:03 1.38
+@@ -16,11 +16,23 @@
+
+ #include "rules.h"
+
+-const QString X11_DIR( "/usr/X11R6/lib/X11/" );
++const char* X11DirList[2] = {"/usr/X11R6/lib/X11/", "/usr/local/X11R6/lib/X11/"};
++const char* rulesFileList[2] = {"xkb/rules/xfree86", "xkb/rules/xorg"};
+
+-KeyRules::KeyRules(QString rule):
++KeyRules::KeyRules():
+ m_layouts(90)
+ {
++ for(int ii=0; ii<2; ii++)
++ if( QDir(X11DirList[ii]).exists() ) {
++ X11_DIR = X11DirList[ii];
++ break;
++ }
++
++ if( X11_DIR.isEmpty() ) {
++ kdDebug() << "Cannot find X11 directory!" << endl;
++ return;
++ }
++
+ // ugly check for XFree 4.3 or older
+ if( QDir(X11_DIR + "xkb/symbols/pc").exists() ) {
+ m_xfree43 = true;
+@@ -29,8 +41,20 @@ KeyRules::KeyRules(QString rule):
+ m_xfree43 = false;
+ }
+
+- loadRules(X11_DIR + QString("xkb/rules/%1").arg(rule));
+- loadOldLayouts(X11_DIR + QString("xkb/rules/xfree86"));
++ QString rulesFile;
++ for(int ii=0; ii<2; ii++)
++ if( QFile(X11_DIR + QString(rulesFileList[ii])).exists() ) {
++ rulesFile = X11_DIR + rulesFileList[ii];
++ break;
++ }
++
++ if( rulesFile.isEmpty() ) {
++ kdDebug() << "Cannot find rules file in " << X11_DIR << endl;
++ return;
++ }
++
++ loadRules(rulesFile);
++ loadOldLayouts(rulesFile);
+ loadGroups(::locate("config", "kxkb_groups"));
+ }
+
+@@ -51,9 +75,7 @@ static struct {
+ { 0, 0 }
+ };
+
+- XkbRF_RulesPtr rules;
+-
+- rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
++ XkbRF_RulesPtr rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
+
+ if (rules == NULL) {
+ kdDebug() << "Unable to load rules" << endl;
+@@ -176,7 +198,7 @@ unsigned int KeyRules::getGroup(const QS
+ return it == m_initialGroups.end() ? 0 : it.data();
+ }
+
+-
++/*
+ QStringList KeyRules::rules(QString path)
+ {
+ QStringList result;
+@@ -193,7 +215,7 @@ QStringList KeyRules::rules(QString path
+
+ return result;
+ }
+-
++*/
+
+ /* pretty simple algorithm - reads the layout file and
+ tries to find "xkb_symbols"
diff --git a/x11/kdebase4-runtime/files/patch-kxkb_rules.h b/x11/kdebase4-runtime/files/patch-kxkb_rules.h
new file mode 100644
index 0000000..23d2432
--- /dev/null
+++ b/x11/kdebase4-runtime/files/patch-kxkb_rules.h
@@ -0,0 +1,33 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.h,v
+retrieving revision 1.11
+retrieving revision 1.12
+diff -u -p -r1.11 -r1.12
+--- kxkb/rules.h 2003/08/24 04:02:38 1.11
++++ kxkb/rules.h 2004/06/28 14:19:03 1.12
+@@ -10,14 +10,14 @@ class KeyRules
+ {
+ public:
+
+- KeyRules(QString rule="xfree86");
++ KeyRules();
+
+ const QDict<char> &models() const { return m_models; };
+ const QDict<char> &layouts() const { return m_layouts; };
+ const QDict<char> &options() const { return m_options; };
+
+ void parseVariants(const QStringList& vars, QDict<char>& variants, bool chkVars=true);
+- static QStringList rules(QString path = QString::null);
++// static QStringList rules(QString path = QString::null);
+
+ QStringList getVariants(const QString& layout);
+ unsigned int getGroup(const QString& layout, const char* baseGr);
+@@ -42,6 +42,8 @@ private:
+ QStringList m_oldLayouts;
+ QStringList m_nonLatinLayouts;
+ bool m_xfree43;
++
++ QString X11_DIR; // pseudo-constant
+ };
+
+
diff --git a/x11/kdebase4-workspace/Makefile b/x11/kdebase4-workspace/Makefile
index 7fa9328..21e13d7 100644
--- a/x11/kdebase4-workspace/Makefile
+++ b/x11/kdebase4-workspace/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kdebase4-workspace/files/patch-kxkb_kcmlayout.cpp b/x11/kdebase4-workspace/files/patch-kxkb_kcmlayout.cpp
new file mode 100644
index 0000000..750137b
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-kxkb_kcmlayout.cpp
@@ -0,0 +1,83 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.cpp,v
+retrieving revision 1.82.2.1
+retrieving revision 1.86
+diff -u -p -r1.82.2.1 -r1.86
+--- kxkb/kcmlayout.cpp 2004/05/19 12:09:58 1.82.2.1
++++ kxkb/kcmlayout.cpp 2004/06/28 14:19:03 1.86
+@@ -79,7 +79,8 @@ OptionListItem * OptionListItem::findChi
+ }
+
+ LayoutConfig::LayoutConfig(QWidget *parent, const char *name)
+- : KCModule(parent, name), m_rules(0)
++ : KCModule(parent, name),
++ m_rules(NULL)
+ {
+ QVBoxLayout *main = new QVBoxLayout(this, 0, KDialog::spacingHint());
+
+@@ -122,7 +124,7 @@ LayoutConfig::LayoutConfig(QWidget *pare
+ #endif
+
+ //Read rules - we _must_ read _before_ creating xkb-options comboboxes
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ makeOptionsTab();
+
+@@ -292,6 +294,8 @@ QWidget* LayoutConfig::makeOptionsTab()
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(changed()));
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(updateOptionsCommand()));
+
++ connect(widget->chkEnableOptions, SIGNAL(toggled(bool)), SLOT(changed()));
++
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(updateOptionsCommand()));
+
+@@ -405,10 +409,10 @@ void LayoutConfig::load()
+ bool use = config->readBoolEntry( "Use", false );
+
+ // find out which rule applies
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
++ //QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+
+ // update other files
+- ruleChanged(rule);
++ ruleChanged();
+
+ // find out about the model
+ QString model = config->readEntry("Model", "pc104");
+@@ -499,12 +506,12 @@ void LayoutConfig::load()
+ emit KCModule::changed( false );
+ }
+
+-void LayoutConfig::ruleChanged(const QString &rule)
++void LayoutConfig::ruleChanged()
+ {
+- if( rule == m_rule )
+- return;
++// if( rule == m_rule )
++// return;
+
+- m_rule = rule;
++// m_rule = rule;
+
+ QString model; //, layout;
+ if (m_rules)
+@@ -514,7 +521,7 @@ void LayoutConfig::ruleChanged(const QSt
+ }
+
+ delete m_rules;
+- m_rules = new KeyRules(rule);
++ m_rules = new KeyRules();
+
+ QStringList tmp;
+ widget->comboModel->clear();
+@@ -672,7 +680,7 @@ void LayoutConfig::save()
+ void LayoutConfig::defaults()
+ {
+ widget->chkEnable->setChecked(false);
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ widget->comboModel->setCurrentText("pc104");
+ //layoutCombo->setCurrentText("us");
diff --git a/x11/kdebase4-workspace/files/patch-kxkb_kcmlayout.h b/x11/kdebase4-workspace/files/patch-kxkb_kcmlayout.h
new file mode 100644
index 0000000..e2630a0
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-kxkb_kcmlayout.h
@@ -0,0 +1,25 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.h,v
+retrieving revision 1.22
+retrieving revision 1.23
+diff -u -p -r1.22 -r1.23
+--- kxkb/kcmlayout.h 2003/10/29 07:30:36 1.22
++++ kxkb/kcmlayout.h 2004/06/28 14:19:03 1.23
+@@ -54,7 +54,7 @@ protected slots:
+ void variantChanged();
+ void latinChanged();
+ void layoutSelChanged(QListViewItem *);
+- void ruleChanged(const QString &rule);
++ void ruleChanged();
+ void updateLayoutCommand();
+ void updateOptionsCommand();
+ void add();
+@@ -71,7 +71,7 @@ private:
+ QDict<OptionListItem> m_optionGroups;
+ QDict<char> m_variants;
+ QDict<char> m_includes;
+- QString m_rule;
++// QString m_rule;
+ KeyRules *m_rules;
+
+ QWidget* makeOptionsTab();
diff --git a/x11/kdebase4-workspace/files/patch-kxkb_kxkb.cpp b/x11/kdebase4-workspace/files/patch-kxkb_kxkb.cpp
new file mode 100644
index 0000000..bc011c1
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-kxkb_kxkb.cpp
@@ -0,0 +1,23 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kxkb.cpp,v
+retrieving revision 1.70
+retrieving revision 1.72
+diff -u -p -r1.70 -r1.72
+--- kxkb/kxkb.cpp 2003/10/30 18:58:11 1.70
++++ kxkb/kxkb.cpp 2004/06/28 14:19:03 1.72
+@@ -222,12 +222,12 @@ bool KXKBApp::settingsRead()
+ }
+ }
+
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+- m_rules = new KeyRules( rule );
++ m_rules = new KeyRules();
+ m_model = config->readEntry("Model", "pc104");
+ m_layout = config->readEntry("Layout", "");
+ m_defaultLayout = m_layout;
+
++
+ m_list = config->readListEntry("Additional");
+ if (!m_list.contains(m_layout))
+ {
+
diff --git a/x11/kdebase4-workspace/files/patch-kxkb_rules.cpp b/x11/kdebase4-workspace/files/patch-kxkb_rules.cpp
new file mode 100644
index 0000000..c764908
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-kxkb_rules.cpp
@@ -0,0 +1,85 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.cpp,v
+retrieving revision 1.37
+retrieving revision 1.38
+diff -u -p -r1.37 -r1.38
+--- kxkb/rules.cpp 2003/10/24 06:15:26 1.37
++++ kxkb/rules.cpp 2004/06/28 14:19:03 1.38
+@@ -16,11 +16,23 @@
+
+ #include "rules.h"
+
+-const QString X11_DIR( "/usr/X11R6/lib/X11/" );
++const char* X11DirList[2] = {"/usr/X11R6/lib/X11/", "/usr/local/X11R6/lib/X11/"};
++const char* rulesFileList[2] = {"xkb/rules/xfree86", "xkb/rules/xorg"};
+
+-KeyRules::KeyRules(QString rule):
++KeyRules::KeyRules():
+ m_layouts(90)
+ {
++ for(int ii=0; ii<2; ii++)
++ if( QDir(X11DirList[ii]).exists() ) {
++ X11_DIR = X11DirList[ii];
++ break;
++ }
++
++ if( X11_DIR.isEmpty() ) {
++ kdDebug() << "Cannot find X11 directory!" << endl;
++ return;
++ }
++
+ // ugly check for XFree 4.3 or older
+ if( QDir(X11_DIR + "xkb/symbols/pc").exists() ) {
+ m_xfree43 = true;
+@@ -29,8 +41,20 @@ KeyRules::KeyRules(QString rule):
+ m_xfree43 = false;
+ }
+
+- loadRules(X11_DIR + QString("xkb/rules/%1").arg(rule));
+- loadOldLayouts(X11_DIR + QString("xkb/rules/xfree86"));
++ QString rulesFile;
++ for(int ii=0; ii<2; ii++)
++ if( QFile(X11_DIR + QString(rulesFileList[ii])).exists() ) {
++ rulesFile = X11_DIR + rulesFileList[ii];
++ break;
++ }
++
++ if( rulesFile.isEmpty() ) {
++ kdDebug() << "Cannot find rules file in " << X11_DIR << endl;
++ return;
++ }
++
++ loadRules(rulesFile);
++ loadOldLayouts(rulesFile);
+ loadGroups(::locate("config", "kxkb_groups"));
+ }
+
+@@ -51,9 +75,7 @@ static struct {
+ { 0, 0 }
+ };
+
+- XkbRF_RulesPtr rules;
+-
+- rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
++ XkbRF_RulesPtr rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
+
+ if (rules == NULL) {
+ kdDebug() << "Unable to load rules" << endl;
+@@ -176,7 +198,7 @@ unsigned int KeyRules::getGroup(const QS
+ return it == m_initialGroups.end() ? 0 : it.data();
+ }
+
+-
++/*
+ QStringList KeyRules::rules(QString path)
+ {
+ QStringList result;
+@@ -193,7 +215,7 @@ QStringList KeyRules::rules(QString path
+
+ return result;
+ }
+-
++*/
+
+ /* pretty simple algorithm - reads the layout file and
+ tries to find "xkb_symbols"
diff --git a/x11/kdebase4-workspace/files/patch-kxkb_rules.h b/x11/kdebase4-workspace/files/patch-kxkb_rules.h
new file mode 100644
index 0000000..23d2432
--- /dev/null
+++ b/x11/kdebase4-workspace/files/patch-kxkb_rules.h
@@ -0,0 +1,33 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.h,v
+retrieving revision 1.11
+retrieving revision 1.12
+diff -u -p -r1.11 -r1.12
+--- kxkb/rules.h 2003/08/24 04:02:38 1.11
++++ kxkb/rules.h 2004/06/28 14:19:03 1.12
+@@ -10,14 +10,14 @@ class KeyRules
+ {
+ public:
+
+- KeyRules(QString rule="xfree86");
++ KeyRules();
+
+ const QDict<char> &models() const { return m_models; };
+ const QDict<char> &layouts() const { return m_layouts; };
+ const QDict<char> &options() const { return m_options; };
+
+ void parseVariants(const QStringList& vars, QDict<char>& variants, bool chkVars=true);
+- static QStringList rules(QString path = QString::null);
++// static QStringList rules(QString path = QString::null);
+
+ QStringList getVariants(const QString& layout);
+ unsigned int getGroup(const QString& layout, const char* baseGr);
+@@ -42,6 +42,8 @@ private:
+ QStringList m_oldLayouts;
+ QStringList m_nonLatinLayouts;
+ bool m_xfree43;
++
++ QString X11_DIR; // pseudo-constant
+ };
+
+
diff --git a/x11/kdebase4/Makefile b/x11/kdebase4/Makefile
index 7fa9328..21e13d7 100644
--- a/x11/kdebase4/Makefile
+++ b/x11/kdebase4/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kdebase4/files/patch-kxkb_kcmlayout.cpp b/x11/kdebase4/files/patch-kxkb_kcmlayout.cpp
new file mode 100644
index 0000000..750137b
--- /dev/null
+++ b/x11/kdebase4/files/patch-kxkb_kcmlayout.cpp
@@ -0,0 +1,83 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.cpp,v
+retrieving revision 1.82.2.1
+retrieving revision 1.86
+diff -u -p -r1.82.2.1 -r1.86
+--- kxkb/kcmlayout.cpp 2004/05/19 12:09:58 1.82.2.1
++++ kxkb/kcmlayout.cpp 2004/06/28 14:19:03 1.86
+@@ -79,7 +79,8 @@ OptionListItem * OptionListItem::findChi
+ }
+
+ LayoutConfig::LayoutConfig(QWidget *parent, const char *name)
+- : KCModule(parent, name), m_rules(0)
++ : KCModule(parent, name),
++ m_rules(NULL)
+ {
+ QVBoxLayout *main = new QVBoxLayout(this, 0, KDialog::spacingHint());
+
+@@ -122,7 +124,7 @@ LayoutConfig::LayoutConfig(QWidget *pare
+ #endif
+
+ //Read rules - we _must_ read _before_ creating xkb-options comboboxes
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ makeOptionsTab();
+
+@@ -292,6 +294,8 @@ QWidget* LayoutConfig::makeOptionsTab()
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(changed()));
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(updateOptionsCommand()));
+
++ connect(widget->chkEnableOptions, SIGNAL(toggled(bool)), SLOT(changed()));
++
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(updateOptionsCommand()));
+
+@@ -405,10 +409,10 @@ void LayoutConfig::load()
+ bool use = config->readBoolEntry( "Use", false );
+
+ // find out which rule applies
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
++ //QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+
+ // update other files
+- ruleChanged(rule);
++ ruleChanged();
+
+ // find out about the model
+ QString model = config->readEntry("Model", "pc104");
+@@ -499,12 +506,12 @@ void LayoutConfig::load()
+ emit KCModule::changed( false );
+ }
+
+-void LayoutConfig::ruleChanged(const QString &rule)
++void LayoutConfig::ruleChanged()
+ {
+- if( rule == m_rule )
+- return;
++// if( rule == m_rule )
++// return;
+
+- m_rule = rule;
++// m_rule = rule;
+
+ QString model; //, layout;
+ if (m_rules)
+@@ -514,7 +521,7 @@ void LayoutConfig::ruleChanged(const QSt
+ }
+
+ delete m_rules;
+- m_rules = new KeyRules(rule);
++ m_rules = new KeyRules();
+
+ QStringList tmp;
+ widget->comboModel->clear();
+@@ -672,7 +680,7 @@ void LayoutConfig::save()
+ void LayoutConfig::defaults()
+ {
+ widget->chkEnable->setChecked(false);
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ widget->comboModel->setCurrentText("pc104");
+ //layoutCombo->setCurrentText("us");
diff --git a/x11/kdebase4/files/patch-kxkb_kcmlayout.h b/x11/kdebase4/files/patch-kxkb_kcmlayout.h
new file mode 100644
index 0000000..e2630a0
--- /dev/null
+++ b/x11/kdebase4/files/patch-kxkb_kcmlayout.h
@@ -0,0 +1,25 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.h,v
+retrieving revision 1.22
+retrieving revision 1.23
+diff -u -p -r1.22 -r1.23
+--- kxkb/kcmlayout.h 2003/10/29 07:30:36 1.22
++++ kxkb/kcmlayout.h 2004/06/28 14:19:03 1.23
+@@ -54,7 +54,7 @@ protected slots:
+ void variantChanged();
+ void latinChanged();
+ void layoutSelChanged(QListViewItem *);
+- void ruleChanged(const QString &rule);
++ void ruleChanged();
+ void updateLayoutCommand();
+ void updateOptionsCommand();
+ void add();
+@@ -71,7 +71,7 @@ private:
+ QDict<OptionListItem> m_optionGroups;
+ QDict<char> m_variants;
+ QDict<char> m_includes;
+- QString m_rule;
++// QString m_rule;
+ KeyRules *m_rules;
+
+ QWidget* makeOptionsTab();
diff --git a/x11/kdebase4/files/patch-kxkb_kxkb.cpp b/x11/kdebase4/files/patch-kxkb_kxkb.cpp
new file mode 100644
index 0000000..bc011c1
--- /dev/null
+++ b/x11/kdebase4/files/patch-kxkb_kxkb.cpp
@@ -0,0 +1,23 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kxkb.cpp,v
+retrieving revision 1.70
+retrieving revision 1.72
+diff -u -p -r1.70 -r1.72
+--- kxkb/kxkb.cpp 2003/10/30 18:58:11 1.70
++++ kxkb/kxkb.cpp 2004/06/28 14:19:03 1.72
+@@ -222,12 +222,12 @@ bool KXKBApp::settingsRead()
+ }
+ }
+
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+- m_rules = new KeyRules( rule );
++ m_rules = new KeyRules();
+ m_model = config->readEntry("Model", "pc104");
+ m_layout = config->readEntry("Layout", "");
+ m_defaultLayout = m_layout;
+
++
+ m_list = config->readListEntry("Additional");
+ if (!m_list.contains(m_layout))
+ {
+
diff --git a/x11/kdebase4/files/patch-kxkb_rules.cpp b/x11/kdebase4/files/patch-kxkb_rules.cpp
new file mode 100644
index 0000000..c764908
--- /dev/null
+++ b/x11/kdebase4/files/patch-kxkb_rules.cpp
@@ -0,0 +1,85 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.cpp,v
+retrieving revision 1.37
+retrieving revision 1.38
+diff -u -p -r1.37 -r1.38
+--- kxkb/rules.cpp 2003/10/24 06:15:26 1.37
++++ kxkb/rules.cpp 2004/06/28 14:19:03 1.38
+@@ -16,11 +16,23 @@
+
+ #include "rules.h"
+
+-const QString X11_DIR( "/usr/X11R6/lib/X11/" );
++const char* X11DirList[2] = {"/usr/X11R6/lib/X11/", "/usr/local/X11R6/lib/X11/"};
++const char* rulesFileList[2] = {"xkb/rules/xfree86", "xkb/rules/xorg"};
+
+-KeyRules::KeyRules(QString rule):
++KeyRules::KeyRules():
+ m_layouts(90)
+ {
++ for(int ii=0; ii<2; ii++)
++ if( QDir(X11DirList[ii]).exists() ) {
++ X11_DIR = X11DirList[ii];
++ break;
++ }
++
++ if( X11_DIR.isEmpty() ) {
++ kdDebug() << "Cannot find X11 directory!" << endl;
++ return;
++ }
++
+ // ugly check for XFree 4.3 or older
+ if( QDir(X11_DIR + "xkb/symbols/pc").exists() ) {
+ m_xfree43 = true;
+@@ -29,8 +41,20 @@ KeyRules::KeyRules(QString rule):
+ m_xfree43 = false;
+ }
+
+- loadRules(X11_DIR + QString("xkb/rules/%1").arg(rule));
+- loadOldLayouts(X11_DIR + QString("xkb/rules/xfree86"));
++ QString rulesFile;
++ for(int ii=0; ii<2; ii++)
++ if( QFile(X11_DIR + QString(rulesFileList[ii])).exists() ) {
++ rulesFile = X11_DIR + rulesFileList[ii];
++ break;
++ }
++
++ if( rulesFile.isEmpty() ) {
++ kdDebug() << "Cannot find rules file in " << X11_DIR << endl;
++ return;
++ }
++
++ loadRules(rulesFile);
++ loadOldLayouts(rulesFile);
+ loadGroups(::locate("config", "kxkb_groups"));
+ }
+
+@@ -51,9 +75,7 @@ static struct {
+ { 0, 0 }
+ };
+
+- XkbRF_RulesPtr rules;
+-
+- rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
++ XkbRF_RulesPtr rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
+
+ if (rules == NULL) {
+ kdDebug() << "Unable to load rules" << endl;
+@@ -176,7 +198,7 @@ unsigned int KeyRules::getGroup(const QS
+ return it == m_initialGroups.end() ? 0 : it.data();
+ }
+
+-
++/*
+ QStringList KeyRules::rules(QString path)
+ {
+ QStringList result;
+@@ -193,7 +215,7 @@ QStringList KeyRules::rules(QString path
+
+ return result;
+ }
+-
++*/
+
+ /* pretty simple algorithm - reads the layout file and
+ tries to find "xkb_symbols"
diff --git a/x11/kdebase4/files/patch-kxkb_rules.h b/x11/kdebase4/files/patch-kxkb_rules.h
new file mode 100644
index 0000000..23d2432
--- /dev/null
+++ b/x11/kdebase4/files/patch-kxkb_rules.h
@@ -0,0 +1,33 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.h,v
+retrieving revision 1.11
+retrieving revision 1.12
+diff -u -p -r1.11 -r1.12
+--- kxkb/rules.h 2003/08/24 04:02:38 1.11
++++ kxkb/rules.h 2004/06/28 14:19:03 1.12
+@@ -10,14 +10,14 @@ class KeyRules
+ {
+ public:
+
+- KeyRules(QString rule="xfree86");
++ KeyRules();
+
+ const QDict<char> &models() const { return m_models; };
+ const QDict<char> &layouts() const { return m_layouts; };
+ const QDict<char> &options() const { return m_options; };
+
+ void parseVariants(const QStringList& vars, QDict<char>& variants, bool chkVars=true);
+- static QStringList rules(QString path = QString::null);
++// static QStringList rules(QString path = QString::null);
+
+ QStringList getVariants(const QString& layout);
+ unsigned int getGroup(const QString& layout, const char* baseGr);
+@@ -42,6 +42,8 @@ private:
+ QStringList m_oldLayouts;
+ QStringList m_nonLatinLayouts;
+ bool m_xfree43;
++
++ QString X11_DIR; // pseudo-constant
+ };
+
+
diff --git a/x11/kdelibs3/Makefile b/x11/kdelibs3/Makefile
index 62626a5..6f5816b 100644
--- a/x11/kdelibs3/Makefile
+++ b/x11/kdelibs3/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdelibs
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kdelibs3/files/patch-dcop_dcopserver.cpp b/x11/kdelibs3/files/patch-dcop_dcopserver.cpp
new file mode 100644
index 0000000..2099d87
--- /dev/null
+++ b/x11/kdelibs3/files/patch-dcop_dcopserver.cpp
@@ -0,0 +1,185 @@
+Index: dcopserver.cpp
+===================================================================
+RCS file: /home/kde/kdelibs/dcop/dcopserver.cpp,v
+retrieving revision 1.160.2.3
+diff -u -p -r1.160.2.3 dcopserver.cpp
+--- dcop/dcopserver.cpp 30 Apr 2004 15:00:08 -0000 1.160.2.3
++++ dcop/dcopserver.cpp 26 Jul 2004 09:03:06 -0000
+@@ -443,35 +443,78 @@ write_iceauth (FILE *addfp, IceAuthDataE
+ fprintf (addfp, "\n");
+ }
+
++#ifndef HAVE_MKSTEMPS
++#include <string.h>
++#include <strings.h>
+
+-#ifndef HAVE_MKSTEMP
+-static char *unique_filename (const char *path, const char *prefix)
+-#else
+-static char *unique_filename (const char *path, const char *prefix, int *pFd)
+-#endif
++/* this is based on code taken from the GNU libc, distributed under the LGPL license */
++
++/* Generate a unique temporary file name from TEMPLATE.
++
++ TEMPLATE has the form:
++
++ <path>/ccXXXXXX<suffix>
++
++ SUFFIX_LEN tells us how long <suffix> is (it can be zero length).
++
++ The last six characters of TEMPLATE before <suffix> must be "XXXXXX";
++ they are replaced with a string that makes the filename unique.
++
++ Returns a file descriptor open on the file for reading and writing. */
++
++int mkstemps (char* _template, int suffix_len)
+ {
+-#ifndef HAVE_MKSTEMP
+-#ifndef X_NOT_POSIX
+- return ((char *) tempnam (path, prefix));
+-#else
+- char tempFile[PATH_MAX];
+- char *tmp;
++ static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
++ char *XXXXXX;
++ int len;
++ int count;
++ int value;
++
++ len = strlen (_template);
++
++ if ((int) len < 6 + suffix_len || strncmp (&_template[len - 6 - suffix_len], "XXXXXX", 6))
++ return -1;
++
++ XXXXXX = &_template[len - 6 - suffix_len];
++
++ value = rand();
++ for (count = 0; count < 256; ++count)
++ {
++ int v = value;
++ int fd;
++
++ /* Fill in the random bits. */
++ XXXXXX[0] = letters[v % 62];
++ v /= 62;
++ XXXXXX[1] = letters[v % 62];
++ v /= 62;
++ XXXXXX[2] = letters[v % 62];
++ v /= 62;
++ XXXXXX[3] = letters[v % 62];
++ v /= 62;
++ XXXXXX[4] = letters[v % 62];
++ v /= 62;
++ XXXXXX[5] = letters[v % 62];
++
++ fd = open (_template, O_RDWR|O_CREAT|O_EXCL, 0600);
++ if (fd >= 0)
++ /* The file does not exist. */
++ return fd;
++
++ /* This is a random value. It is only necessary that the next
++ TMP_MAX values generated by adding 7777 to VALUE are different
++ with (module 2^32). */
++ value += 7777;
++ }
++ /* We return the null string if we can't find a unique file name. */
++ _template[0] = '\0';
++ return -1;
++}
+
+- snprintf (tempFile, PATH_MAX, "%s/%sXXXXXX", path, prefix);
+- tmp = (char *) mktemp (tempFile);
+- if (tmp)
+- {
+- char *ptr = (char *) malloc (strlen (tmp) + 1);
+- if (ptr != NULL)
+- {
+- strcpy (ptr, tmp);
+- }
+- return (ptr);
+- }
+- else
+- return (NULL);
+ #endif
+-#else
++
++static char *unique_filename (const char *path, const char *prefix, int *pFd)
++{
+ char tempFile[PATH_MAX];
+ char *ptr;
+
+@@ -480,43 +523,10 @@ static char *unique_filename (const char
+ if (ptr != NULL)
+ {
+ strcpy(ptr, tempFile);
+- *pFd = mkstemp(ptr);
++ *pFd = mkstemps(ptr, 0);
+ }
+ return ptr;
+-#endif
+-}
+-
+-#if 0
+-Status SetAuthentication_local (int count, IceListenObj *listenObjs)
+-{
+- int i;
+- for (i = 0; i < count; i ++) {
+- char *prot = IceGetListenConnectionString(listenObjs[i]);
+- if (!prot) continue;
+- char *host = strchr(prot, '/');
+- char *sock = 0;
+- if (host) {
+- *host=0;
+- host++;
+- sock = strchr(host, ':');
+- if (sock) {
+- *sock = 0;
+- sock++;
+- }
+- }
+-#ifndef NDEBUG
+- qDebug("DCOPServer: SetAProc_loc: conn %d, prot=%s, file=%s",
+- (unsigned)i, prot, sock);
+-#endif
+- if (sock && !strcmp(prot, "local")) {
+- chmod(sock, 0700);
+- }
+- IceSetHostBasedAuthProc (listenObjs[i], HostBasedAuthProc);
+- free(prot);
+- }
+- return 1;
+ }
+-#endif
+
+ #define MAGIC_COOKIE_LEN 16
+
+@@ -529,28 +539,19 @@ SetAuthentication (int count, IceListenO
+ int original_umask;
+ int i;
+ QCString command;
+-#ifdef HAVE_MKSTEMP
+ int fd;
+-#endif
+
+ original_umask = umask (0077); /* disallow non-owner access */
+
+ path = getenv ("DCOP_SAVE_DIR");
+ if (!path)
+ path = "/tmp";
+-#ifndef HAVE_MKSTEMP
+- if ((addAuthFile = unique_filename (path, "dcop")) == NULL)
+- goto bad;
+
+- if (!(addfp = fopen (addAuthFile, "w")))
+- goto bad;
+-#else
+ if ((addAuthFile = unique_filename (path, "dcop", &fd)) == NULL)
+ goto bad;
+
+ if (!(addfp = fdopen(fd, "wb")))
+ goto bad;
+-#endif
+
+ if ((*_authDataEntries = static_cast<IceAuthDataEntry *>(malloc (count * 2 * sizeof (IceAuthDataEntry)))) == NULL)
+ goto bad;
diff --git a/x11/kdelibs4/Makefile b/x11/kdelibs4/Makefile
index 62626a5..6f5816b 100644
--- a/x11/kdelibs4/Makefile
+++ b/x11/kdelibs4/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdelibs
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kdelibs4/files/patch-dcop_dcopserver.cpp b/x11/kdelibs4/files/patch-dcop_dcopserver.cpp
new file mode 100644
index 0000000..2099d87
--- /dev/null
+++ b/x11/kdelibs4/files/patch-dcop_dcopserver.cpp
@@ -0,0 +1,185 @@
+Index: dcopserver.cpp
+===================================================================
+RCS file: /home/kde/kdelibs/dcop/dcopserver.cpp,v
+retrieving revision 1.160.2.3
+diff -u -p -r1.160.2.3 dcopserver.cpp
+--- dcop/dcopserver.cpp 30 Apr 2004 15:00:08 -0000 1.160.2.3
++++ dcop/dcopserver.cpp 26 Jul 2004 09:03:06 -0000
+@@ -443,35 +443,78 @@ write_iceauth (FILE *addfp, IceAuthDataE
+ fprintf (addfp, "\n");
+ }
+
++#ifndef HAVE_MKSTEMPS
++#include <string.h>
++#include <strings.h>
+
+-#ifndef HAVE_MKSTEMP
+-static char *unique_filename (const char *path, const char *prefix)
+-#else
+-static char *unique_filename (const char *path, const char *prefix, int *pFd)
+-#endif
++/* this is based on code taken from the GNU libc, distributed under the LGPL license */
++
++/* Generate a unique temporary file name from TEMPLATE.
++
++ TEMPLATE has the form:
++
++ <path>/ccXXXXXX<suffix>
++
++ SUFFIX_LEN tells us how long <suffix> is (it can be zero length).
++
++ The last six characters of TEMPLATE before <suffix> must be "XXXXXX";
++ they are replaced with a string that makes the filename unique.
++
++ Returns a file descriptor open on the file for reading and writing. */
++
++int mkstemps (char* _template, int suffix_len)
+ {
+-#ifndef HAVE_MKSTEMP
+-#ifndef X_NOT_POSIX
+- return ((char *) tempnam (path, prefix));
+-#else
+- char tempFile[PATH_MAX];
+- char *tmp;
++ static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
++ char *XXXXXX;
++ int len;
++ int count;
++ int value;
++
++ len = strlen (_template);
++
++ if ((int) len < 6 + suffix_len || strncmp (&_template[len - 6 - suffix_len], "XXXXXX", 6))
++ return -1;
++
++ XXXXXX = &_template[len - 6 - suffix_len];
++
++ value = rand();
++ for (count = 0; count < 256; ++count)
++ {
++ int v = value;
++ int fd;
++
++ /* Fill in the random bits. */
++ XXXXXX[0] = letters[v % 62];
++ v /= 62;
++ XXXXXX[1] = letters[v % 62];
++ v /= 62;
++ XXXXXX[2] = letters[v % 62];
++ v /= 62;
++ XXXXXX[3] = letters[v % 62];
++ v /= 62;
++ XXXXXX[4] = letters[v % 62];
++ v /= 62;
++ XXXXXX[5] = letters[v % 62];
++
++ fd = open (_template, O_RDWR|O_CREAT|O_EXCL, 0600);
++ if (fd >= 0)
++ /* The file does not exist. */
++ return fd;
++
++ /* This is a random value. It is only necessary that the next
++ TMP_MAX values generated by adding 7777 to VALUE are different
++ with (module 2^32). */
++ value += 7777;
++ }
++ /* We return the null string if we can't find a unique file name. */
++ _template[0] = '\0';
++ return -1;
++}
+
+- snprintf (tempFile, PATH_MAX, "%s/%sXXXXXX", path, prefix);
+- tmp = (char *) mktemp (tempFile);
+- if (tmp)
+- {
+- char *ptr = (char *) malloc (strlen (tmp) + 1);
+- if (ptr != NULL)
+- {
+- strcpy (ptr, tmp);
+- }
+- return (ptr);
+- }
+- else
+- return (NULL);
+ #endif
+-#else
++
++static char *unique_filename (const char *path, const char *prefix, int *pFd)
++{
+ char tempFile[PATH_MAX];
+ char *ptr;
+
+@@ -480,43 +523,10 @@ static char *unique_filename (const char
+ if (ptr != NULL)
+ {
+ strcpy(ptr, tempFile);
+- *pFd = mkstemp(ptr);
++ *pFd = mkstemps(ptr, 0);
+ }
+ return ptr;
+-#endif
+-}
+-
+-#if 0
+-Status SetAuthentication_local (int count, IceListenObj *listenObjs)
+-{
+- int i;
+- for (i = 0; i < count; i ++) {
+- char *prot = IceGetListenConnectionString(listenObjs[i]);
+- if (!prot) continue;
+- char *host = strchr(prot, '/');
+- char *sock = 0;
+- if (host) {
+- *host=0;
+- host++;
+- sock = strchr(host, ':');
+- if (sock) {
+- *sock = 0;
+- sock++;
+- }
+- }
+-#ifndef NDEBUG
+- qDebug("DCOPServer: SetAProc_loc: conn %d, prot=%s, file=%s",
+- (unsigned)i, prot, sock);
+-#endif
+- if (sock && !strcmp(prot, "local")) {
+- chmod(sock, 0700);
+- }
+- IceSetHostBasedAuthProc (listenObjs[i], HostBasedAuthProc);
+- free(prot);
+- }
+- return 1;
+ }
+-#endif
+
+ #define MAGIC_COOKIE_LEN 16
+
+@@ -529,28 +539,19 @@ SetAuthentication (int count, IceListenO
+ int original_umask;
+ int i;
+ QCString command;
+-#ifdef HAVE_MKSTEMP
+ int fd;
+-#endif
+
+ original_umask = umask (0077); /* disallow non-owner access */
+
+ path = getenv ("DCOP_SAVE_DIR");
+ if (!path)
+ path = "/tmp";
+-#ifndef HAVE_MKSTEMP
+- if ((addAuthFile = unique_filename (path, "dcop")) == NULL)
+- goto bad;
+
+- if (!(addfp = fopen (addAuthFile, "w")))
+- goto bad;
+-#else
+ if ((addAuthFile = unique_filename (path, "dcop", &fd)) == NULL)
+ goto bad;
+
+ if (!(addfp = fdopen(fd, "wb")))
+ goto bad;
+-#endif
+
+ if ((*_authDataEntries = static_cast<IceAuthDataEntry *>(malloc (count * 2 * sizeof (IceAuthDataEntry)))) == NULL)
+ goto bad;
OpenPOWER on IntegriCloud