diff --git a/kdelibs-4.0.80-kstandarddirs.patch b/kdelibs-4.0.83-kstandarddirs.patch similarity index 70% rename from kdelibs-4.0.80-kstandarddirs.patch rename to kdelibs-4.0.83-kstandarddirs.patch index 0bc236e..e53c134 100644 --- a/kdelibs-4.0.80-kstandarddirs.patch +++ b/kdelibs-4.0.83-kstandarddirs.patch @@ -1,7 +1,7 @@ -diff -ur kdelibs-4.0.80/kdecore/kernel/kstandarddirs.cpp kdelibs-4.0.80-kstandarddirs/kdecore/kernel/kstandarddirs.cpp ---- kdelibs-4.0.80/kdecore/kernel/kstandarddirs.cpp 2008-05-21 13:08:57.000000000 +0200 -+++ kdelibs-4.0.80-kstandarddirs/kdecore/kernel/kstandarddirs.cpp 2008-05-30 18:07:29.000000000 +0200 -@@ -77,9 +77,12 @@ +diff -up kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp.kstandarddirs kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp +--- kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp.kstandarddirs 2008-06-19 14:23:20.000000000 +0200 ++++ kdelibs-4.0.83/kdecore/kernel/kstandarddirs.cpp 2008-06-19 15:44:23.000000000 +0200 +@@ -75,9 +75,12 @@ public: bool checkRestrictions : 1; QMap restrictions; QStringList xdgdata_prefixes; @@ -14,33 +14,35 @@ diff -ur kdelibs-4.0.80/kdecore/kernel/kstandarddirs.cpp kdelibs-4.0.80-kstandar // Directory dictionaries QMap absolutes; -@@ -954,10 +957,62 @@ +@@ -952,12 +955,63 @@ QStringList KStandardDirs::resourceDirs( restrictionActive = true; d->dataRestrictionActive = false; // Reset } + const QStringList *prefixList = 0; -+ QString home; ++ QString home; + if (strncmp(type, "xdgdata-", 8) == 0) -+ { ++ { + prefixList = &(d->xdgdata_prefixes); -+ home=d->localXdgdatahome; -+ } -+ else if (strncmp(type, "xdgconf-", 8) == 0) -+ { ++ home=d->localXdgdatahome; ++ } ++ else if (strncmp(type, "xdgconf-", 8) == 0) ++ { + prefixList = &(d->xdgconf_prefixes); -+ home=d->localXdgconfhome; -+ } -+ else -+ { ++ home=d->localXdgconfhome; ++ } ++ else ++ { + prefixList = &d->prefixes; -+ home=d->localKdehome; -+ } ++ home=d->localKdehome; ++ } QStringList dirs; dirs = d->relatives.value(type); + QString installdir = installPath( type ); + QString installprefix = installPath("kdedir"); -+ if(!home.isNull()) -+ { ++ if(!home.isNull()) ++ { + for (QStringList::ConstIterator it = dirs.begin(); + it != dirs.end(); ++it) + { @@ -54,12 +56,11 @@ diff -ur kdelibs-4.0.80/kdecore/kernel/kstandarddirs.cpp kdelibs-4.0.80-kstandar + candidates.append(path); + } + -+ } -+ ++ } ++ + // make sure we find the path where it's installed + // for non-config files, we want the installed path _first_, so /usr/share/kde4 takes precedence over /usr/share + if (strcmp("config", type)) { -+ QString installdir = installPath( type ); + if (!installdir.isEmpty()) { + bool ok = true; + foreach (const QString &s, candidates) { @@ -77,7 +78,7 @@ diff -ur kdelibs-4.0.80/kdecore/kernel/kstandarddirs.cpp kdelibs-4.0.80-kstandar if (!dirs.isEmpty()) { bool local = true; -@@ -983,13 +1038,6 @@ +@@ -983,13 +1037,6 @@ QStringList KStandardDirs::resourceDirs( } } @@ -91,20 +92,22 @@ diff -ur kdelibs-4.0.80/kdecore/kernel/kstandarddirs.cpp kdelibs-4.0.80-kstandar for (QStringList::ConstIterator pit = prefixList->begin(); pit != prefixList->end(); -@@ -1007,22 +1055,30 @@ - if ((local || testdir.exists()) && !candidates.contains(path)) - candidates.append(path); +@@ -1009,6 +1056,10 @@ QStringList KStandardDirs::resourceDirs( + if ((local || testdir.exists()) && !candidates.contains(path)) + candidates.append(path); + } ++ // UGLY HACK - forward porting Chris CHeney's HACK - Rex Dieter ++ if ( local && (!strcmp("config", type))) ++ candidates.append("/etc/kde/"); ++ // + local = false; } -+ // UGLY HACK - forward porting Chris CHeney's HACK - Rex Dieter -+ if ( local && (!strcmp("config", type))) -+ candidates.append("/etc/kde/"); -+ // - local = false; - } + else +@@ -1021,17 +1072,21 @@ QStringList KStandardDirs::resourceDirs( + } } - // make sure we find the path where it's installed -- QString installdir = installPath( type ); +- // make sure we find the path where it's installed - if (!installdir.isEmpty()) { - bool ok = true; - foreach (const QString &s, candidates) { @@ -131,7 +134,7 @@ diff -ur kdelibs-4.0.80/kdecore/kernel/kstandarddirs.cpp kdelibs-4.0.80-kstandar } dirs = d->absolutes.value(type); -@@ -1487,6 +1543,7 @@ +@@ -1500,6 +1555,7 @@ void KStandardDirs::addKDEDefaults() { localKdeDir = KShell::tildeExpand(localKdeDir); addPrefix(localKdeDir); @@ -139,7 +142,7 @@ diff -ur kdelibs-4.0.80/kdecore/kernel/kstandarddirs.cpp kdelibs-4.0.80-kstandar } #ifdef Q_WS_MACX -@@ -1545,6 +1602,7 @@ +@@ -1558,6 +1614,7 @@ void KStandardDirs::addKDEDefaults() localXdgDir = KShell::tildeExpand(localXdgDir); addXdgConfigPrefix(localXdgDir); @@ -147,7 +150,7 @@ diff -ur kdelibs-4.0.80/kdecore/kernel/kstandarddirs.cpp kdelibs-4.0.80-kstandar for (QStringList::ConstIterator it = xdgdirList.begin(); it != xdgdirList.end(); ++it) -@@ -1593,6 +1651,7 @@ +@@ -1606,6 +1663,7 @@ void KStandardDirs::addKDEDefaults() localXdgDir = KShell::tildeExpand(localXdgDir); addXdgDataPrefix(localXdgDir); diff --git a/kdelibs.spec b/kdelibs.spec index 32cd52f..dbefb13 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -77,7 +77,7 @@ Patch14: kdelibs-4.0.3-libexecdir.patch # patch by Sergey Saukh: http://bugs.kde.org/show_bug.cgi?id=155707#c46 Patch15: kdelibs-4.0.82-proxy.patch # forward port kstandarddirs hack to search /etc/kde -Patch18: kdelibs-4.0.80-kstandarddirs.patch +Patch18: kdelibs-4.0.83-kstandarddirs.patch # upstream patches