3
0
Fork 0
forked from mirrors/nixpkgs

kinit: don't use obsolete macros in library paths patch

This commit is contained in:
Thomas Tuegel 2017-04-25 06:06:05 -05:00
parent 9f00e2be18
commit 18f95ce5d9
No known key found for this signature in database
GPG key ID: 22CBF5249D4B4D59

View file

@ -1,8 +1,8 @@
Index: kinit-5.24.0/src/kdeinit/kinit.cpp
Index: kinit-5.32.0/src/kdeinit/kinit.cpp
===================================================================
--- kinit-5.24.0.orig/src/kdeinit/kinit.cpp
+++ kinit-5.24.0/src/kdeinit/kinit.cpp
@@ -672,19 +672,16 @@ static pid_t launch(int argc, const char
--- kinit-5.32.0.orig/src/kdeinit/kinit.cpp
+++ kinit-5.32.0/src/kdeinit/kinit.cpp
@@ -623,19 +623,15 @@ static pid_t launch(int argc, const char
if (!libpath.isEmpty()) {
if (libpath_relative) {
@ -23,10 +23,9 @@ Index: kinit-5.24.0/src/kdeinit/kinit.cpp
+ 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) {
+ for (const QByteArray &profile: profiles) {
+ if (!profile.isEmpty()) {
+ l.setFileName(QFile::decodeName(profile) + libdir + libpath);
+ l.setFileName(QFile::decodeName(profile) + QStringLiteral("/lib/") + libpath);
+ if (l.load()) break;
+ }
}