unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob bf87f5011e32116b9a4b58c581daf0f7e620d7b4 1498 bytes (raw)
name: gnu/packages/patches/kinit-kdeinit-libpath.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
Search libraries in KDEINIT5_LIBRARY_PATH.

Based on an idea by NixOs
pkgs/development/libraries/kde-frameworks/kinit/kinit-libpath.patch

===================================================================
diff --git a/src/kdeinit/kinit.cpp b/src/kdeinit/kinit.cpp
--- a/src/kdeinit/kinit.cpp
+++ b/src/kdeinit/kinit.cpp
@@ -614,15 +614,12 @@ static pid_t launch(int argc, const char *_name, const char *args,
                 //     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 "/" KDE_INSTALL_LIBDIR "/");
-                QString orig_libpath = libpath;
-                libpath = install_lib_dir + libpath;
-                l.setFileName(libpath);
-                if (!l.load()) {
-                    libpath = orig_libpath;
-                    l.setFileName(libpath);
-                    l.load();
+                QByteArrayList profiles = qgetenv("KDEINIT5_LIBRARY_PATH").split(':');
+                for (const QByteArray &profile: profiles) {
+                    if (!profile.isEmpty()) {
+                        l.setFileName(QFile::decodeName(profile) + QStringLiteral("/") + libpath);
+                        if (l.load()) break;
+                    }
                 }
             } else {
                 l.load();
-- 
2.33.0


debug log:

solving bf87f5011e ...
found bf87f5011e in https://yhetil.org/guix-patches/20211015093015.5834-7-mail@brendan.scot/
found 6382e8804b in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 6382e8804ba9a97ff99be82e364dd27827c271ae	gnu/packages/patches/kinit-kdeinit-libpath.patch

applying [1/1] https://yhetil.org/guix-patches/20211015093015.5834-7-mail@brendan.scot/
diff --git a/gnu/packages/patches/kinit-kdeinit-libpath.patch b/gnu/packages/patches/kinit-kdeinit-libpath.patch
index 6382e8804b..bf87f5011e 100644

1:50: trailing whitespace.
-- 
Checking patch gnu/packages/patches/kinit-kdeinit-libpath.patch...
1:52: new blank line at EOF.
+
Applied patch gnu/packages/patches/kinit-kdeinit-libpath.patch cleanly.
warning: 2 lines add whitespace errors.

index at:
100644 bf87f5011e32116b9a4b58c581daf0f7e620d7b4	gnu/packages/patches/kinit-kdeinit-libpath.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).