| 1 | Search the "extra libs" in GUIX_KF5INIT_LIB_PATH (which basically is a |
| 2 | collection of all /lib directories). We can not hard-code the full path to the |
| 3 | libsKF5Plasam, since adding palse-workspace |
| 4 | |
| 5 | Adopted from NixOS |
| 6 | pkgs/development/libraries/kde-frameworks/kinit/kdeinit-extra_libs.patch |
| 7 | |
| 8 | =================================================================== |
| 9 | --- kinit-5.32.0/src/kdeinit/kinit-5.32.0/src/kdeinit/.orig |
| 10 | +++ kinit-5.32.0/src/kdeinit/kinit.cpp |
| 11 | @@ -96,11 +96,9 @@ |
| 12 | "libKF5Parts.5.dylib", |
| 13 | "libKF5Plasma.5.dylib" |
| 14 | #else |
| 15 | - "libKF5KIOCore.so.5", |
| 16 | - "libKF5Parts.so.5", |
| 17 | -//#ifdef __KDE_HAVE_GCC_VISIBILITY // Removed for KF5, we'll see. |
| 18 | - "libKF5Plasma.so.5" |
| 19 | -//#endif |
| 20 | + "GUIX_PKGS_KF5_KIO/lib/libKF5KIOCore.so.5", |
| 21 | + "GUIX_PKGS_KF5_PARTS/lib/libKF5Parts.so.5", |
| 22 | + "GUIX_PKGS_KF5_PLASMA/lib/libKF5Plasma.so.5" |
| 23 | #endif |
| 24 | }; |
| 25 | #endif |
| 26 | @@ -1533,20 +1531,6 @@ static int initXconnection() |
| 27 | } |
| 28 | #endif |
| 29 | |
| 30 | -#ifndef Q_OS_OSX |
| 31 | -// Find a shared lib in the lib dir, e.g. libkio.so. |
| 32 | -// Completely unrelated to plugins. |
| 33 | -static QString findSharedLib(const QString &lib) |
| 34 | -{ |
| 35 | - QString path = QFile::decodeName(CMAKE_INSTALL_PREFIX "/" LIB_INSTALL_DIR "/") + lib; |
| 36 | - if (QFile::exists(path)) { |
| 37 | - return path; |
| 38 | - } |
| 39 | - // We could also look in LD_LIBRARY_PATH, but really, who installs the main libs in different prefixes? |
| 40 | - return QString(); |
| 41 | -} |
| 42 | -#endif |
| 43 | - |
| 44 | extern "C" { |
| 45 | |
| 46 | static void secondary_child_handler(int) |
| 47 | @@ -1689,7 +1693,7 @@ |
| 48 | if (!d.suicide && qEnvironmentVariableIsEmpty("KDE_IS_PRELINKED")) { |
| 49 | const int extrasCount = sizeof(extra_libs) / sizeof(extra_libs[0]); |
| 50 | for (int i = 0; i < extrasCount; i++) { |
| 51 | - const QString extra = findSharedLib(QString::fromLatin1(extra_libs[i])); |
| 52 | + const QString extra = QString::fromLatin1(extra_libs[i]); |
| 53 | if (!extra.isEmpty()) { |
| 54 | QLibrary l(extra); |
| 55 | l.setLoadHints(QLibrary::ExportExternalSymbolsHint); |