gnu: kinit: Use KDEINIT5_LIBRARY_PATH to search for dynlibs.

Using LIBRARY_PATH was introduced in
16b8aff85b, but is wrong since
this variable is used by the compiler (gcc) at link time.

* gnu/packages/patches/kinit-kdeinit-libpath.patch: Change
  LIBRARY_PATH to KDEINIT5_LIBRARY_PATH.
* gnu/packages/kde-frameworks.scm (kinit)[native-search-paths]:
  New field.
This commit is contained in:
Hartmut Goebel 2019-01-09 15:54:55 +01:00
parent 5a26f879c3
commit 46b082f97f
No known key found for this signature in database
GPG Key ID: 634A8DFFD3F631DF
2 changed files with 5 additions and 1 deletions

View File

@ -2556,6 +2556,10 @@ in applications using the KDE Frameworks.")
(("GUIX_PKGS_KF5_PARTS") (assoc-ref inputs "kparts"))
(("GUIX_PKGS_KF5_PLASMA") (assoc-ref inputs "plasma-framework")))
#t)))))
(native-search-paths
(list (search-path-specification
(variable "KDEINIT5_LIBRARY_PATH")
(files '("lib/")))))
(native-inputs
`(("extra-cmake-modules" ,extra-cmake-modules)
("pkg-config" ,pkg-config)))

View File

@ -23,7 +23,7 @@ pkgs/development/libraries/kde-frameworks/kinit/kinit-libpath.patch
- l.load();
- }
+ // Try to load the library relative to the active profiles.
+ QByteArrayList profiles = qgetenv("LIBRARY_PATH").split(':');
+ QByteArrayList profiles = qgetenv("KDEINIT5_LIBRARY_PATH").split(':');
+ for (const QByteArray &profile: profiles) {
+ if (!profile.isEmpty()) {
+ l.setFileName(QFile::decodeName(profile) + QStringLiteral("/") + libpath);