diff options
Diffstat (limited to 'pkgs/development/libraries/kde-frameworks-5.7/kinit/kinit-libpath.patch')
-rw-r--r-- | pkgs/development/libraries/kde-frameworks-5.7/kinit/kinit-libpath.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/development/libraries/kde-frameworks-5.7/kinit/kinit-libpath.patch b/pkgs/development/libraries/kde-frameworks-5.7/kinit/kinit-libpath.patch new file mode 100644 index 00000000000..a6ccb2085d3 --- /dev/null +++ b/pkgs/development/libraries/kde-frameworks-5.7/kinit/kinit-libpath.patch @@ -0,0 +1,30 @@ +diff --git a/src/kdeinit/kinit.cpp b/src/kdeinit/kinit.cpp +index 3c3c913..f510620 100644 +--- a/src/kdeinit/kinit.cpp ++++ b/src/kdeinit/kinit.cpp +@@ -652,15 +652,17 @@ static pid_t launch(int argc, const char *_name, const char *args, + if (!libpath.isEmpty()) { + if (!l.load()) { + if (libpath_relative) { +- // NB: Because Qt makes the actual dlopen() call, the +- // RUNPATH of kdeinit is *not* respected - see +- // https://sourceware.org/bugzilla/show_bug.cgi?id=13945 +- // - so we try hacking it in ourselves +- QString install_lib_dir = QFile::decodeName( +- CMAKE_INSTALL_PREFIX "/" LIB_INSTALL_DIR "/"); +- libpath = install_lib_dir + libpath; +- l.setFileName(libpath); ++ // Use QT_PLUGIN_PATH to find shared library directories ++ // For KF5, the plugin path is /lib/plugins, so the kdeinit5 ++ // shared libraries should be in /lib/plugins/../ ++ const QRegExp pathSepRegExp(QString::fromLatin1("[:\b]")); ++ const QString up = QString::fromLocal8Bit("/../"); ++ const QStringList paths = QString::fromLocal8Bit(qgetenv("QT_PLUGIN_PATH")).split(pathSepRegExp, QString::KeepEmptyParts); ++ Q_FOREACH (const QString &path, paths) { ++ l.setFileName(path + up + libpath); + l.load(); ++ if (l.isLoaded()) break; ++ } + } + } + if (!l.isLoaded()) { |