This commit is contained in:
Rex Dieter 2013-11-01 16:04:21 -05:00
parent 7fbafb9ec9
commit 4f1050a7c3
10 changed files with 62 additions and 517 deletions

3
.gitignore vendored
View File

@ -1,2 +1 @@
/kdelibs-4.10.5.tar.xz
/kdelibs-4.11.2.tar.xz
/kdelibs-4.11.3.tar.xz

View File

@ -1,98 +0,0 @@
From c0af4b9506e4bacd4e70342d5668ccb9c8a7203c Mon Sep 17 00:00:00 2001
From: David Faure <faure@kde.org>
Date: Sun, 29 Sep 2013 11:57:32 +0200
Subject: [PATCH 02/12] Improve error handling when writing to the kdeinit4
socket.
Loop on EINTR, and print out an error message on failure.
---
kinit/klauncher.cpp | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/kinit/klauncher.cpp b/kinit/klauncher.cpp
index 0e055f5..6c71e99 100644
--- a/kinit/klauncher.cpp
+++ b/kinit/klauncher.cpp
@@ -38,6 +38,7 @@
#endif
#include <QtCore/QFile>
+#include <qplatformdefs.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -171,6 +172,22 @@ IdleSlave::age(time_t now) const
static KLauncher* g_klauncher_self;
+
+// From qcore_unix_p.h. We could also port to QLocalSocket :)
+#define K_EINTR_LOOP(var, cmd) \
+ do { \
+ var = cmd; \
+ } while (var == -1 && errno == EINTR)
+
+ssize_t kde_safe_write(int fd, const void *buf, size_t count)
+{
+ ssize_t ret = 0;
+ K_EINTR_LOOP(ret, QT_WRITE(fd, buf, count));
+ if (ret < 0)
+ qWarning() << "write failed:" << strerror(errno);
+ return ret;
+}
+
#ifndef USE_KPROCESS_FOR_KIOSLAVES
KLauncher::KLauncher(int _kdeinitSocket)
: QObject(0),
@@ -232,7 +249,7 @@ KLauncher::KLauncher()
klauncher_header request_header;
request_header.cmd = LAUNCHER_OK;
request_header.arg_length = 0;
- write(kdeinitSocket, &request_header, sizeof(request_header));
+ kde_safe_write(kdeinitSocket, &request_header, sizeof(request_header));
#endif
}
@@ -270,8 +287,8 @@ void KLauncher::setLaunchEnv(const QString &name, const QString &value)
requestData.append(name.toLocal8Bit()).append('\0').append(value.toLocal8Bit()).append('\0');
request_header.cmd = LAUNCHER_SETENV;
request_header.arg_length = requestData.size();
- write(kdeinitSocket, &request_header, sizeof(request_header));
- write(kdeinitSocket, requestData.data(), request_header.arg_length);
+ kde_safe_write(kdeinitSocket, &request_header, sizeof(request_header));
+ kde_safe_write(kdeinitSocket, requestData.data(), request_header.arg_length);
#else
Q_UNUSED(name);
Q_UNUSED(value);
@@ -694,8 +711,8 @@ KLauncher::requestStart(KLaunchRequest *request)
<< "cmd=" << commandToString(request_header.cmd);
#endif
- write(kdeinitSocket, &request_header, sizeof(request_header));
- write(kdeinitSocket, requestData.data(), requestData.length());
+ kde_safe_write(kdeinitSocket, &request_header, sizeof(request_header));
+ kde_safe_write(kdeinitSocket, requestData.data(), requestData.length());
// Wait for pid to return.
lastRequest = request;
@@ -1161,7 +1178,7 @@ KLauncher::requestSlave(const QString &protocol,
klauncher_header request_header;
request_header.cmd = LAUNCHER_DEBUG_WAIT;
request_header.arg_length = 0;
- write(kdeinitSocket, &request_header, sizeof(request_header));
+ kde_safe_write(kdeinitSocket, &request_header, sizeof(request_header));
#else
name = QString::fromLatin1("gdb");
#endif
@@ -1343,7 +1360,7 @@ void KLauncher::terminate_kdeinit()
klauncher_header request_header;
request_header.cmd = LAUNCHER_TERMINATE_KDEINIT;
request_header.arg_length = 0;
- write(kdeinitSocket, &request_header, sizeof(request_header));
+ kde_safe_write(kdeinitSocket, &request_header, sizeof(request_header));
#endif
}
--
1.8.3.1

View File

@ -1,39 +0,0 @@
From 61c81131867af964496780cbc0adda4bfc55c7cf Mon Sep 17 00:00:00 2001
From: Luigi Toscano <luigi.toscano@tiscali.it>
Date: Mon, 14 Oct 2013 19:36:20 +0200
Subject: [PATCH 10/12] Enable translation functions for js/QScriptEngine
scripts
REVIEW: 113218
---
kross/qts/main.cpp | 1 +
kross/qts/script.cpp | 1 +
2 files changed, 2 insertions(+)
diff --git a/kross/qts/main.cpp b/kross/qts/main.cpp
index 041c306..f40c044 100644
--- a/kross/qts/main.cpp
+++ b/kross/qts/main.cpp
@@ -83,6 +83,7 @@ int main(int argc, char **argv)
app = new KApplication( /* GUIenabled */ true );
QScriptEngine* engine = new QScriptEngine();
+ engine->installTranslatorFunctions();
QScriptValue global = engine->globalObject();
//qDebug()<<"QLibraryInfo::PluginsPath="<<QLibraryInfo::location(QLibraryInfo::PluginsPath);
diff --git a/kross/qts/script.cpp b/kross/qts/script.cpp
index 41d46b2..1cee907 100644
--- a/kross/qts/script.cpp
+++ b/kross/qts/script.cpp
@@ -48,6 +48,7 @@ namespace Kross {
delete m_engine;
m_engine = new QScriptEngine();
+ m_engine->installTranslatorFunctions();
// load the Kross QScriptExtensionPlugin plugin that provides
// us a bridge between Kross and QtScript. See here plugin.h
--
1.8.3.1

View File

@ -1,141 +0,0 @@
From f723e2e7d36b597c5262bf63dde380d89ec6bfcb Mon Sep 17 00:00:00 2001
From: David Faure <faure@kde.org>
Date: Fri, 18 Oct 2013 09:44:17 +0200
Subject: [PATCH 12/12] Fix association-with-derived-mimetype again.
871cccc8a88a made it impossible to re-order file type associations.
7f42bf253009 fixed that, but changed the value of KService::mimeTypes(), which
broke okular. This new fix works the same way, but only inside kbuildsycoca
when it processes the mimetypes. The value of KService::mimeTypes() is now
restored to be exactly what's in the desktop file.
CCBUG: 321706
FIXED-IN: 4.11.3
---
kdecore/services/kservice.cpp | 45 +++++++++---------------------------------
kdecore/tests/kservicetest.cpp | 7 ++++---
kded/kbuildservicefactory.cpp | 11 ++++++++++-
3 files changed, 23 insertions(+), 40 deletions(-)
diff --git a/kdecore/services/kservice.cpp b/kdecore/services/kservice.cpp
index d7945bf..8e81929 100644
--- a/kdecore/services/kservice.cpp
+++ b/kdecore/services/kservice.cpp
@@ -227,44 +227,17 @@ void KServicePrivate::init( const KDesktopFile *config, KService* q )
<< "has an empty mimetype!";
continue;
}
-
- // The following searches through the list for duplicate, inherited mimetypes
- // For example, if application/rtf and text/plain are both listed application/rtf is removed
- // since it is inherited from text/plain
- // This is a reworked fix for revision 871cccc8a88a600c8f850a020d44bfc5f5858caa
- bool shouldAdd = true;
- KMimeType::Ptr mimeType1 = KMimeTypeRepository::self()->findMimeTypeByName(st);
- if (mimeType1) {
- foreach(const QString mime2, lstServiceTypes) {
- // Don't compare the mimetype with itself
- if (st == mime2) {
- continue;
- }
-
- // is checks for inheritance and aliases, so this should suffice
- if (mimeType1->is(mime2)) {
- shouldAdd = false;
- break;
- }
+ int initialPreference = m_initialPreference;
+ if ( st_it.hasNext() ) {
+ // TODO better syntax - separate group with mimetype=number entries?
+ bool isNumber;
+ const int val = st_it.peekNext().toInt(&isNumber);
+ if (isNumber) {
+ initialPreference = val;
+ st_it.next();
}
}
-
- // Only add unique mimetypes
- if (shouldAdd) {
- int initialPreference = m_initialPreference;
- if (st_it.hasNext()) {
- // TODO better syntax - separate group with mimetype=number entries?
- bool isNumber;
- const int val = st_it.peekNext().toInt(&isNumber);
- if (isNumber) {
- initialPreference = val;
- st_it.next();
- }
- }
- m_serviceTypes.push_back(KService::ServiceTypeAndPreference(initialPreference, st));
- } else {
- //kDebug(servicesDebugArea())<<"Not adding"<<st<<"from"<<entryPath;
- }
+ m_serviceTypes.push_back(KService::ServiceTypeAndPreference(initialPreference, st));
}
if (entryMap.contains(QLatin1String("Actions"))) {
diff --git a/kdecore/tests/kservicetest.cpp b/kdecore/tests/kservicetest.cpp
index 0dba8d9..7371475 100644
--- a/kdecore/tests/kservicetest.cpp
+++ b/kdecore/tests/kservicetest.cpp
@@ -91,7 +91,7 @@ void KServiceTest::initTestCase()
group.writeEntry("X-KDE-Library", "fakepart");
group.writeEntry("X-KDE-Protocols", "http,ftp");
group.writeEntry("X-KDE-ServiceTypes", "KParts/ReadOnlyPart,Browser/View,KParts/ReadWritePart");
- group.writeEntry("MimeType", "text/plain;");
+ group.writeEntry("MimeType", "text/plain;text/html;");
}
// faketextplugin: a ktexteditor plugin
@@ -168,6 +168,7 @@ void KServiceTest::testProperty()
KService::Ptr fakePart = KService::serviceByDesktopPath("fakepart.desktop");
QVERIFY(fakePart); // see initTestCase; it should be found.
QVERIFY(fakePart->propertyNames().contains("X-KDE-Protocols"));
+ QCOMPARE(fakePart->mimeTypes(), QStringList() << "text/plain" << "text/html"); // okular relies on subclasses being kept here
const QStringList protocols = fakePart->property("X-KDE-Protocols").toStringList();
QCOMPARE(protocols, QStringList() << "http" << "ftp");
}
@@ -356,7 +357,7 @@ void KServiceTest::testHasServiceType1() // with services constructed with a ful
KService fakepart( fakepartPath );
QVERIFY( fakepart.hasServiceType( "KParts/ReadOnlyPart" ) );
QVERIFY( fakepart.hasServiceType( "KParts/ReadWritePart" ) );
- QCOMPARE(fakepart.mimeTypes(), QStringList() << "text/plain");
+ QCOMPARE(fakepart.mimeTypes(), QStringList() << "text/plain" << "text/html");
QString faketextPluginPath = KStandardDirs::locate( "services", "faketextplugin.desktop" );
QVERIFY( !faketextPluginPath.isEmpty() );
@@ -371,7 +372,7 @@ void KServiceTest::testHasServiceType2() // with services coming from ksycoca
QVERIFY( !fakepart.isNull() );
QVERIFY( fakepart->hasServiceType( "KParts/ReadOnlyPart" ) );
QVERIFY( fakepart->hasServiceType( "KParts/ReadWritePart" ) );
- QCOMPARE(fakepart->mimeTypes(), QStringList() << "text/plain");
+ QCOMPARE(fakepart->mimeTypes(), QStringList() << "text/plain" << "text/html");
KService::Ptr faketextPlugin = KService::serviceByDesktopPath( "faketextplugin.desktop" );
QVERIFY( !faketextPlugin.isNull() );
diff --git a/kded/kbuildservicefactory.cpp b/kded/kbuildservicefactory.cpp
index 5fb091b..b4564bd 100644
--- a/kded/kbuildservicefactory.cpp
+++ b/kded/kbuildservicefactory.cpp
@@ -267,7 +267,16 @@ void KBuildServiceFactory::populateServiceTypes()
continue;
}
} else {
- m_offerHash.addServiceOffer(mime->name(), offer); // mime->name so that we resolve aliases
+ bool shouldAdd = true;
+ foreach (const QString &otherType, service->serviceTypes()) {
+ if (stName != otherType && mime->is(otherType)) {
+ shouldAdd = false;
+ }
+ }
+ if (shouldAdd) {
+ //kDebug(7021) << "Adding service" << service->entryPath() << "to" << mime->name();
+ m_offerHash.addServiceOffer(mime->name(), offer); // mime->name so that we resolve aliases
+ }
}
}
}
--
1.8.3.1

View File

@ -1,84 +0,0 @@
From 8bfcace7efc0feea8899f70dfc15c3050c90ea99 Mon Sep 17 00:00:00 2001
From: David Faure <faure@kde.org>
Date: Sat, 19 Oct 2013 10:15:35 +0200
Subject: [PATCH 15/15] Improve fix for association with derived mimetypes
(f723e2e7d36)
If a desktop file was mentionning two aliases, they would both get
removed, due to is() returning true for aliases as well.
CCBUG: 321706
---
kded/kbuildservicefactory.cpp | 7 ++++++-
kded/tests/kmimeassociationstest.cpp | 14 ++++++++++----
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/kded/kbuildservicefactory.cpp b/kded/kbuildservicefactory.cpp
index b4564bd..7a2a2fc 100644
--- a/kded/kbuildservicefactory.cpp
+++ b/kded/kbuildservicefactory.cpp
@@ -269,8 +269,13 @@ void KBuildServiceFactory::populateServiceTypes()
} else {
bool shouldAdd = true;
foreach (const QString &otherType, service->serviceTypes()) {
+ // Skip derived types if the base class is listed (#321706)
if (stName != otherType && mime->is(otherType)) {
- shouldAdd = false;
+ // But don't skip aliases (they got resolved into mime->name() already, but don't let two aliases cancel out)
+ if (KMimeTypeRepository::self()->canonicalName(otherType) != mime->name()) {
+ //kDebug() << "Skipping" << mime->name() << "because of" << otherType << "(canonical" << KMimeTypeRepository::self()->canonicalName(otherType) << ") while parsing" << service->entryPath();
+ shouldAdd = false;
+ }
}
}
if (shouldAdd) {
diff --git a/kded/tests/kmimeassociationstest.cpp b/kded/tests/kmimeassociationstest.cpp
index a07637f..342a8fd 100644
--- a/kded/tests/kmimeassociationstest.cpp
+++ b/kded/tests/kmimeassociationstest.cpp
@@ -140,10 +140,12 @@ private Q_SLOTS:
// This interacted badly with mimeapps.list listing another app for text/plain, but the
// lookup found this app first, due to c-src. The fix: ignoring derived mimetypes when
// the base mimetype is already listed.
+ //
+ // Also include aliases (msword), to check they don't cancel each other out.
fakeCSrcApplication = m_localApps + "fakecsrcapplication.desktop";
if (!QFile::exists(fakeCSrcApplication)) {
mustUpdateKSycoca = true;
- writeAppDesktopFile(fakeCSrcApplication, QStringList() << "text/plain" << "text/c-src", 8);
+ writeAppDesktopFile(fakeCSrcApplication, QStringList() << "text/plain" << "text/c-src" << "application/vnd.ms-word" << "application/msword", 8);
}
fakeJpegApplication = m_localApps + "fakejpegapplication.desktop";
@@ -200,6 +202,7 @@ private Q_SLOTS:
preferredApps["text/plain"] << "faketextapplication.desktop" << "kde4-kwrite.desktop";
preferredApps["text/x-csrc"] << "faketextapplication.desktop" << "kde4-kwrite.desktop";
preferredApps["text/html"] << "fakehtmlapplication.desktop";
+ preferredApps["application/msword"] << "fakecsrcapplication.desktop";
removedApps["image/jpeg"] << "firefox.desktop";
removedApps["text/html"] << "kde4-dolphin.desktop" << "kde4-kwrite.desktop";
@@ -231,14 +234,17 @@ private Q_SLOTS:
for (ExpectedResultsMap::const_iterator it = preferredApps.constBegin(),
end = preferredApps.constEnd() ; it != end ; ++it) {
const QString mime = it.key();
- // Derived mimetypes are handled outside KMimeAssociations
- if (mime == QLatin1String("text/x-csrc"))
+ // The data for derived types and aliases isn't for this test (which only looks at mimeapps.list)
+ if (mime == QLatin1String("text/x-csrc") || mime == QLatin1String("application/msword"))
continue;
const QList<KServiceOffer> offers = offerHash.offersFor(mime);
Q_FOREACH(const QString& service, it.value()) {
KService::Ptr serv = KService::serviceByStorageId(service);
if (serv && !offersContains(offers, serv)) {
- kDebug() << serv.data() << serv->entryPath() << "does not have" << mime;
+ kDebug() << "expected offer" << serv->entryPath() << "not in offers for" << mime << ":";
+ Q_FOREACH(const KServiceOffer& offer, offers) {
+ kDebug() << offer.service()->storageId();
+ }
QFAIL("offer does not have servicetype");
}
}
--
1.8.3.1

View File

@ -0,0 +1,54 @@
diff -up kdelibs-4.11.3/kdecore/kernel/kstandarddirs.cpp.libexecdir kdelibs-4.11.3/kdecore/kernel/kstandarddirs.cpp
--- kdelibs-4.11.3/kdecore/kernel/kstandarddirs.cpp.libexecdir 2013-06-28 12:03:40.883340083 -0500
+++ kdelibs-4.11.3/kdecore/kernel/kstandarddirs.cpp 2013-11-01 15:44:00.780783690 -0500
@@ -1871,7 +1871,7 @@ void KStandardDirs::addKDEDefaults()
addResourceType(types_string + types_indices[index], 0, types_string + types_indices[index+1], true);
index+=2;
}
- addResourceType("exe", "lib", "kde4/libexec", true );
+ addResourceType("exe", 0, "libexec/kde4", true );
addResourceDir("home", QDir::homePath(), false);
diff -up kdelibs-4.11.3/kdecore/kernel/kstandarddirs_unix.cpp.libexecdir kdelibs-4.11.3/kdecore/kernel/kstandarddirs_unix.cpp
--- kdelibs-4.11.3/kdecore/kernel/kstandarddirs_unix.cpp.libexecdir 2013-06-28 12:03:40.884340190 -0500
+++ kdelibs-4.11.3/kdecore/kernel/kstandarddirs_unix.cpp 2013-11-01 15:44:00.782783770 -0500
@@ -63,7 +63,7 @@ QString KStandardDirs::installPath(const
if (strcmp("lib", type) == 0)
return QFile::decodeName(LIB_INSTALL_DIR "/");
if (strcmp("libexec", type) == 0)
- return QFile::decodeName(KDEDIR "/lib" KDELIBSUFF "/kde4/libexec/");
+ return QFile::decodeName(LIBEXEC_INSTALL_DIR "/");
if (strcmp("locale", type) == 0)
return QFile::decodeName(LOCALE_INSTALL_DIR "/");
break;
diff -up kdelibs-4.11.3/kdecore/tests/kstandarddirstest.cpp.libexecdir kdelibs-4.11.3/kdecore/tests/kstandarddirstest.cpp
--- kdelibs-4.11.3/kdecore/tests/kstandarddirstest.cpp.libexecdir 2013-11-01 10:45:56.409145508 -0500
+++ kdelibs-4.11.3/kdecore/tests/kstandarddirstest.cpp 2013-11-01 15:50:20.473658147 -0500
@@ -96,8 +96,9 @@ void KStandarddirsTest::testFindResource
#define KIOSLAVE "bin/kioslave.exe"
#else
#define EXT ""
-#define KIOSLAVE "kde4/libexec/kioslave"
+#define KIOSLAVE "libexec/kde4/kioslave"
#endif
+
const QString bin = KGlobal::dirs()->findResource( "exe", "kioslave" EXT );
QVERIFY( !bin.isEmpty() );
QVERIFY( bin.endsWith( KIOSLAVE ) );
@@ -248,11 +249,13 @@ void KStandarddirsTest::testFindExe()
// findExe with a result in libexec
const QString lnusertemp = KGlobal::dirs()->findExe( "lnusertemp" );
QVERIFY( !lnusertemp.isEmpty() );
- QVERIFY( lnusertemp.endsWith( "lib" KDELIBSUFF "/kde4/libexec/lnusertemp" EXT, PATH_SENSITIVITY ) );
+ QVERIFY( lnusertemp.endsWith( "lib" KDELIBSUFF "/kde4/libexec/lnusertemp" EXT, PATH_SENSITIVITY )
+ || lnusertemp.endsWith( "libexec/kde4/lnusertemp" EXT, PATH_SENSITIVITY ) );
// locate("exe") with a result in libexec
const QString locateExeResult = KGlobal::dirs()->locate("exe", "lnusertemp");
- QVERIFY(locateExeResult.endsWith("lib" KDELIBSUFF "/kde4/libexec/lnusertemp" EXT, PATH_SENSITIVITY));
+ QVERIFY(locateExeResult.endsWith("lib" KDELIBSUFF "/kde4/libexec/lnusertemp" EXT, PATH_SENSITIVITY)
+ || locateExeResult.endsWith(" /libexec/kde4/lnusertemp" EXT, PATH_SENSITIVITY) );
// findExe with relative path
const QString pwd = QDir::currentPath();

View File

@ -1,49 +0,0 @@
diff -up kdelibs-4.9.97/kdecore/kernel/kstandarddirs.cpp.libexecdir kdelibs-4.9.97/kdecore/kernel/kstandarddirs.cpp
--- kdelibs-4.9.97/kdecore/kernel/kstandarddirs.cpp.libexecdir 2012-12-17 08:14:17.000000000 -0600
+++ kdelibs-4.9.97/kdecore/kernel/kstandarddirs.cpp 2013-01-03 14:56:38.768459213 -0600
@@ -1871,7 +1871,7 @@ void KStandardDirs::addKDEDefaults()
addResourceType(types_string + types_indices[index], 0, types_string + types_indices[index+1], true);
index+=2;
}
- addResourceType("exe", "lib", "kde4/libexec", true );
+ addResourceType("exe", 0, "libexec/kde4", true );
addResourceDir("home", QDir::homePath(), false);
diff -up kdelibs-4.9.97/kdecore/kernel/kstandarddirs_unix.cpp.libexecdir kdelibs-4.9.97/kdecore/kernel/kstandarddirs_unix.cpp
--- kdelibs-4.9.97/kdecore/kernel/kstandarddirs_unix.cpp.libexecdir 2012-12-17 08:14:16.000000000 -0600
+++ kdelibs-4.9.97/kdecore/kernel/kstandarddirs_unix.cpp 2013-01-03 14:56:38.768459213 -0600
@@ -63,7 +63,7 @@ QString KStandardDirs::installPath(const
if (strcmp("lib", type) == 0)
return QFile::decodeName(LIB_INSTALL_DIR "/");
if (strcmp("libexec", type) == 0)
- return QFile::decodeName(KDEDIR "/lib" KDELIBSUFF "/kde4/libexec/");
+ return QFile::decodeName(LIBEXEC_INSTALL_DIR "/");
if (strcmp("locale", type) == 0)
return QFile::decodeName(LOCALE_INSTALL_DIR "/");
break;
diff -up kdelibs-4.9.97/kdecore/tests/kstandarddirstest.cpp.libexecdir kdelibs-4.9.97/kdecore/tests/kstandarddirstest.cpp
--- kdelibs-4.9.97/kdecore/tests/kstandarddirstest.cpp.libexecdir 2012-12-17 08:14:17.000000000 -0600
+++ kdelibs-4.9.97/kdecore/tests/kstandarddirstest.cpp 2013-01-03 14:56:38.769459202 -0600
@@ -96,8 +96,9 @@ void KStandarddirsTest::testFindResource
#define KIOSLAVE "bin/kioslave.exe"
#else
#define EXT ""
-#define KIOSLAVE "kde4/libexec/kioslave"
+#define KIOSLAVE "libexec/kde4/kioslave"
#endif
+
const QString bin = KGlobal::dirs()->findResource( "exe", "kioslave" EXT );
QVERIFY( !bin.isEmpty() );
QVERIFY( bin.endsWith( KIOSLAVE ) );
@@ -231,7 +232,8 @@ void KStandarddirsTest::testFindExe()
// findExe with a result in libexec
const QString lnusertemp = KGlobal::dirs()->findExe( "lnusertemp" );
QVERIFY( !lnusertemp.isEmpty() );
- QVERIFY( lnusertemp.endsWith( "lib" KDELIBSUFF "/kde4/libexec/lnusertemp" EXT, PATH_SENSITIVITY ) );
+ QVERIFY( lnusertemp.endsWith( "lib" KDELIBSUFF "/kde4/libexec/lnusertemp" EXT, PATH_SENSITIVITY )
+ || lnusertemp.endsWith( "libexec/kde4/lnusertemp" EXT, PATH_SENSITIVITY ) );
#endif
#ifndef Q_OS_MAC // kdeinit4 is a bundle on Mac, so the below doesn't work
diff -up kdelibs-4.9.97/kio/tests/krununittest.cpp.libexecdir kdelibs-4.9.97/kio/tests/krununittest.cpp

View File

@ -1,83 +0,0 @@
diff --git a/cmake/modules/FindUDev.cmake b/cmake/modules/FindUDev.cmake
index 4c8390d..1c05dd0 100644
--- a/cmake/modules/FindUDev.cmake
+++ b/cmake/modules/FindUDev.cmake
@@ -4,14 +4,32 @@
# UDEV_FOUND - system has UDev
# UDEV_INCLUDE_DIR - the libudev include directory
# UDEV_LIBS - The libudev libraries
+# UDEV_HAVE_GET_SYSATTR_LIST_ENTRY - TRUE if the udev library has the function
+# udev_device_get_sysattr_list_entry(), added in version 167 of libudev
# Copyright (c) 2010, Rafael Fernández López, <ereslibre@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-find_path(UDEV_INCLUDE_DIR libudev.h)
-find_library(UDEV_LIBS udev)
+find_package(PkgConfig)
+if(PKG_CONFIG_FOUND)
+ pkg_check_modules(PC_LIBUDEV libudev)
+endif()
+
+find_path(UDEV_INCLUDE_DIR libudev.h
+ HINTS ${PC_LIBUDEV_INCLUDEDIR} ${PC_LIBUDEV_INCLUDE_DIRS})
+find_library(UDEV_LIBS udev
+ HINTS ${PC_LIBUDEV_LIBDIR} ${PC_LIBUDEV_LIBRARY_DIRS})
+
+if(UDEV_INCLUDE_DIR AND UDEV_LIBS)
+ include(CheckFunctionExists)
+ include(CMakePushCheckState)
+ cmake_push_check_state()
+ set(CMAKE_REQUIRED_LIBRARIES ${UDEV_LIBS} )
+ check_function_exists(udev_device_get_sysattr_list_entry UDEV_HAVE_GET_SYSATTR_LIST_ENTRY )
+ cmake_pop_check_state()
+endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(UDev DEFAULT_MSG UDEV_INCLUDE_DIR UDEV_LIBS)
diff --git a/solid/solid/backends/shared/udevqt.h b/solid/solid/backends/shared/udevqt.h
index 228687e..9611658 100644
--- a/solid/solid/backends/shared/udevqt.h
+++ b/solid/solid/backends/shared/udevqt.h
@@ -49,7 +49,9 @@ class Device
QString primaryDeviceFile() const;
QStringList alternateDeviceSymlinks() const;
QStringList deviceProperties() const;
+#ifdef UDEV_HAVE_GET_SYSATTR_LIST_ENTRY
QStringList sysfsProperties() const;
+#endif
Device parent() const;
// ### should this really be a QVariant? as far as udev knows, everything is a string...
diff --git a/solid/solid/backends/shared/udevqtdevice.cpp b/solid/solid/backends/shared/udevqtdevice.cpp
index d18b616..4721b7a 100644
--- a/solid/solid/backends/shared/udevqtdevice.cpp
+++ b/solid/solid/backends/shared/udevqtdevice.cpp
@@ -197,6 +197,7 @@ QStringList Device::deviceProperties() const
return listFromListEntry(udev_device_get_properties_list_entry(d->udev));
}
+#ifdef UDEV_HAVE_GET_SYSATTR_LIST_ENTRY
QStringList Device::sysfsProperties() const
{
if (!d)
@@ -204,6 +205,7 @@ QStringList Device::sysfsProperties() const
return listFromListEntry(udev_device_get_sysattr_list_entry(d->udev));
}
+#endif
Device Device::parent() const
{
diff --git a/solid/solid/config-solid.h.cmake b/solid/solid/config-solid.h.cmake
index 84c3b5c..5d4b68d 100644
--- a/solid/solid/config-solid.h.cmake
+++ b/solid/solid/config-solid.h.cmake
@@ -19,4 +19,5 @@
*/
#cmakedefine UDEV_FOUND
+#cmakedefine01 UDEV_HAVE_GET_SYSATTR_LIST_ENTRY
#cmakedefine HUPNP_FOUND

View File

@ -36,8 +36,8 @@
%global _changelog_trimtime %(date +%s -d "1 year ago")
Summary: KDE Libraries
Version: 4.11.2
Release: 3%{?dist}
Version: 4.11.3
Release: 1%{?dist}
Name: kdelibs
Epoch: 6
@ -100,7 +100,7 @@ Patch9: kdelibs-4.10.0-branding.patch
Patch12: kdelibs-4.10.0-xdg-menu.patch
# patch KStandardDirs to use %{_libexecdir}/kde4 instead of %{_libdir}/kde4/libexec
Patch14: kdelibs-4.9.97-libexecdir.patch
Patch14: kdelibs-4.11.3-libexecdir.patch
# kstandarddirs changes: search /etc/kde, find %{_kde4_libexecdir}
Patch18: kdelibs-4.10.0-kstandarddirs.patch
@ -137,12 +137,6 @@ Patch49: kdelibs-solid_qt_no_debug_output.patch
# https://git.reviewboard.kde.org/r/102439/
Patch50: kdelibs-4.7.0-knewstuff2_gpg2.patch
# an improvement on
# https://projects.kde.org/projects/kde/kdelibs/repository/revisions/a8d3d3321522d35c2852abb02a475c6b43be5cfe
# committed:
# http://commits.kde.org/kdelibs/587137e39fdcf9b9815eff3fd2fc234d378f8d93
Patch51: kdelibs-UDEV_HAVE_GET_SYSATTR_LIST_ENTRY.patch
# Toggle solid upnp support at runtime via env var SOLID_UPNP=1 (disabled by default)
Patch52: kdelibs-4.10.0-SOLID_UPNP.patch
@ -171,11 +165,6 @@ Patch092: return-application-icons-properly.patch
# revert disabling of packagekit
Patch093: turn-the-packagekit-support-feature-off-by-default.patch
Patch102: 0002-Improve-error-handling-when-writing-to-the-kdeinit4-.patch
Patch110: 0010-Enable-translation-functions-for-js-QScriptEngine-sc.patch
Patch112: 0012-Fix-association-with-derived-mimetype-again.patch
Patch115: 0015-Improve-fix-for-association-with-derived-mimetypes-f.patch
## security fix
# rhel patches
@ -356,7 +345,6 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
# upstreamable patches
%patch50 -p1 -b .knewstuff2_gpg2
%patch51 -p1 -b .UDEV_HAVE_GET_SYSATTR_LIST_ENTRY
%patch52 -p1 -b .SOLID_UPNP
%patch53 -p1 -b .kjs-s390
%patch54 -p1 -b .kjs-locale
@ -369,11 +357,6 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
%patch092 -p1 -R -b .return-application-icons-properly
%patch093 -p1 -R -b .turn-the-packagekit-support-feature-off-by-default
%patch102 -p1 -b .0002
%patch110 -p1 -b .0010
%patch112 -p1 -b .0012
%patch115 -p1 -b .0015
# security fixes
# rhel patches
@ -622,6 +605,9 @@ gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
%changelog
* Fri Nov 01 2013 Rex Dieter <rdieter@fedoraproject.org> - 6:4.11.3-1
- 4.11.3
* Sat Oct 19 2013 Rex Dieter <rdieter@fedoraproject.org> - 6:4.11.2-3
- followup upstream mimetypes fix

View File

@ -1 +1 @@
640f133e2d06143a0d2742a8761bffce kdelibs-4.11.2.tar.xz
766f3ed50e07794c298c3597e70d0817 kdelibs-4.11.3.tar.xz