mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
3eb9b19d3b
Now that we keep only one version of Frameworks in Nixpkgs, it is not necessary to version the directory which stores the Nix expressions.
35 lines
1.7 KiB
Diff
35 lines
1.7 KiB
Diff
Index: kinit-5.21.0/src/kdeinit/kinit.cpp
|
|
===================================================================
|
|
--- kinit-5.21.0.orig/src/kdeinit/kinit.cpp
|
|
+++ kinit-5.21.0/src/kdeinit/kinit.cpp
|
|
@@ -657,19 +657,16 @@ static pid_t launch(int argc, const char
|
|
|
|
if (!libpath.isEmpty()) {
|
|
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 "/");
|
|
- QString orig_libpath = libpath;
|
|
- libpath = install_lib_dir + libpath;
|
|
- l.setFileName(libpath);
|
|
- if (!l.load()) {
|
|
- libpath = orig_libpath;
|
|
- l.setFileName(libpath);
|
|
- l.load();
|
|
+ // Try to load the library relative to the active profiles.
|
|
+ QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' ');
|
|
+ // Reverse the profile list.
|
|
+ std::reverse(profiles.begin(), profiles.end());
|
|
+ const QString libdir = QString::fromLatin1("/lib/");
|
|
+ Q_FOREACH (const QByteArray &profile, profiles) {
|
|
+ if (!profile.isEmpty()) {
|
|
+ l.setFileName(QFile::decodeName(profile) + libdir + libpath);
|
|
+ if (l.load()) break;
|
|
+ }
|
|
}
|
|
} else {
|
|
l.load();
|