diff options
Diffstat (limited to 'kde-base/kdelibs/files')
-rw-r--r-- | kde-base/kdelibs/files/kdelibs-4.3.80-kdeui_util_kkeyserver_mac.patch | 46 | ||||
-rw-r--r-- | kde-base/kdelibs/files/kdelibs-4.3.80-module-suffix.patch | 105 |
2 files changed, 151 insertions, 0 deletions
diff --git a/kde-base/kdelibs/files/kdelibs-4.3.80-kdeui_util_kkeyserver_mac.patch b/kde-base/kdelibs/files/kdelibs-4.3.80-kdeui_util_kkeyserver_mac.patch new file mode 100644 index 000000000000..22e6279e63a9 --- /dev/null +++ b/kde-base/kdelibs/files/kdelibs-4.3.80-kdeui_util_kkeyserver_mac.patch @@ -0,0 +1,46 @@ +diff -purN kdelibs-4.3.80.orig/kdeui/util/kkeyserver_mac.cpp kdelibs-4.3.80/kdeui/util/kkeyserver_mac.cpp +--- kdelibs-4.3.80.orig/kdeui/util/kkeyserver_mac.cpp 2009-12-14 17:05:26.284881642 -0500 ++++ kdelibs-4.3.80/kdeui/util/kkeyserver_mac.cpp 2009-12-14 17:11:23.393094384 -0500 +@@ -68,7 +68,7 @@ namespace KKeyServer { + #ifdef QT_MAC_USE_COCOA + static TISInputSourceRef lastLayout = 0; + #else +- static KeyboardLayoutRef lastLayout = NULL; ++ static TISInputSourceRef lastLayout = NULL; + #endif + + void updateScancodes() { +@@ -125,16 +125,27 @@ namespace KKeyServer { + #endif + lastLayout = layout; + scancodes.clear(); +- void *kchr; +- if (KLGetKeyboardLayoutProperty(layout, kKLKCHRData, const_cast<const void**>(&kchr)) != noErr) { ++ UCKeyboardLayout *uchr = (UCKeyboardLayout *)TISGetInputSourceProperty(layout, kTISPropertyUnicodeKeyLayoutData); ++ if (uchr == NULL) { + kWarning() << "Couldn't load active keyboard layout"; + } else { + for (int i = 0; i < 128; i++) { + UInt32 tmpState = 0; +- UInt32 chr = KeyTranslate(kchr, i, &tmpState); +- if (chr && chr != kFunctionKeyCharCode) { +- scancodes.insert(chr, i); +- } ++ UInt32 deadKeyState = 0; ++ UInt32 flags = 0; ++ UniCharCount maxStringLength = 255; ++ UniCharCount actualStringLength = 0; ++ UniChar unicodeString[maxStringLength]; ++ ++ UCKeyTranslate(uchr, i, kUCKeyActionDown, ++ flags, LMGetKbdType(), ++ 1, &deadKeyState, maxStringLength, &actualStringLength, unicodeString); ++ fprintf(stderr, "Got key: %s\n", unicodeString); ++ fflush(stderr); ++ //UInt32 chr = KeyTranslate(kchr, i, &tmpState); ++ //if (chr && chr != kFunctionKeyCharCode) { ++ // scancodes.insert(chr, i); ++ //} + } + } + } diff --git a/kde-base/kdelibs/files/kdelibs-4.3.80-module-suffix.patch b/kde-base/kdelibs/files/kdelibs-4.3.80-module-suffix.patch new file mode 100644 index 000000000000..395cacbfee50 --- /dev/null +++ b/kde-base/kdelibs/files/kdelibs-4.3.80-module-suffix.patch @@ -0,0 +1,105 @@ +diff -purN kdelibs-4.3.80.orig/config.h.cmake kdelibs-4.3.80/config.h.cmake +--- kdelibs-4.3.80.orig/config.h.cmake 2009-10-26 05:15:52.000000000 -0400 ++++ kdelibs-4.3.80/config.h.cmake 2009-12-14 16:56:15.667194286 -0500 +@@ -12,6 +12,7 @@ + #define kde_socklen_t socklen_t + + #define KDELIBSUFF "${KDELIBSUFF}" ++#define KDE_MODULE_SUFFIX "${CMAKE_SHARED_MODULE_SUFFIX}" + + /****************************/ + +diff -purN kdelibs-4.3.80.orig/kdecore/util/klibloader.cpp kdelibs-4.3.80/kdecore/util/klibloader.cpp +--- kdelibs-4.3.80.orig/kdecore/util/klibloader.cpp 2008-05-21 07:09:15.000000000 -0400 ++++ kdelibs-4.3.80/kdecore/util/klibloader.cpp 2009-12-14 16:56:15.668194094 -0500 +@@ -57,7 +57,7 @@ KLibLoader::~KLibLoader() + { + } + +-extern QString makeLibName( const QString &libname ); ++extern QString makeLibName( const QString &libname, const QString &type ); + + extern QString findLibrary(const QString &name, const KComponentData &cData); + +diff -purN kdelibs-4.3.80.orig/kdecore/util/klibrary.cpp kdelibs-4.3.80/kdecore/util/klibrary.cpp +--- kdelibs-4.3.80.orig/kdecore/util/klibrary.cpp 2009-10-02 10:55:11.000000000 -0400 ++++ kdelibs-4.3.80/kdecore/util/klibrary.cpp 2009-12-14 16:57:24.317056608 -0500 +@@ -27,7 +27,7 @@ + #include <kpluginfactory.h> + #include <kdebug.h> + +-extern QString makeLibName( const QString &libname ); ++extern QString makeLibName( const QString &libname, const QString &type ); + extern QString findLibraryInternal(const QString &name, const KComponentData &cData); + + int kLibraryDebugArea() { +diff -purN kdelibs-4.3.80.orig/kdecore/util/kpluginloader.cpp kdelibs-4.3.80/kdecore/util/kpluginloader.cpp +--- kdelibs-4.3.80.orig/kdecore/util/kpluginloader.cpp 2009-10-15 12:35:55.000000000 -0400 ++++ kdelibs-4.3.80/kdecore/util/kpluginloader.cpp 2009-12-14 16:57:58.533877037 -0500 +@@ -27,6 +27,8 @@ + #include "klibrary.h" + #include <kdebug.h> + ++#include <config.h> ++ + #include <QtCore/QLibrary> + #include <QtCore/QDir> + #include <QtCore/QFileInfo> +@@ -54,25 +56,37 @@ protected: + KLibrary *lib; + }; + +-inline QString makeLibName( const QString &libname ) ++inline QString makeLibName( const QString &libname, const QString &type ) + { + #if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) + if (!libname.endsWith(".dll")) + return libname + ".dll"; + return libname; +-#else ++#else // Q_OS_WIN + int pos = libname.lastIndexOf('/'); + if (pos < 0) + pos = 0; + if (libname.indexOf('.', pos) < 0) { +- const char* const extList[] = { ".so", ".dylib", ".bundle", ".sl" }; ++#ifdef Q_OS_MAC ++ // Libraries are always .dylib ++ if (type.compare("lib") == 0) { ++ return libname + ".dylib"; ++ } ++ // Modules mostly go .bundle but we'll use CMake smartness ++ else { ++ return libname + KDE_MODULE_SUFFIX; ++ } ++#else // Q_OS_MAC ++ // Prefer the value specified by cmake for the target, fall back to standard ++ const char* const extList[] = { KDE_MODULE_SUFFIX, ".so", ".sl" }; + for (uint i = 0; i < sizeof(extList) / sizeof(*extList); ++i) { + if (QLibrary::isLibrary(libname + extList[i])) + return libname + extList[i]; + } ++#endif // Q_OS_MAC + } + return libname; +-#endif ++#endif // Q_OS_WIN + } + + #ifdef Q_OS_WIN +@@ -81,12 +95,13 @@ extern QString fixLibPrefix(const QStrin + + QString findLibraryInternal(const QString &name, const KComponentData &cData) + { +- // Convert name to a valid platform libname +- QString libname = makeLibName(name); + QFileInfo fileinfo(name); + bool hasPrefix = fileinfo.fileName().startsWith("lib"); + bool kdeinit = fileinfo.fileName().startsWith("libkdeinit4_"); + ++ // Convert name to a valid platform libname depending on requested type. ++ QString libname = makeLibName(name, kdeinit ? "lib" : "module"); ++ + if (hasPrefix && !kdeinit) + kDebug(kLibraryDebugArea()) << "plugins should not have a 'lib' prefix:" << libname; + #ifdef Q_CC_MSVC |