[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: gnu: qtserialport: Use the store paths for dynamically loaded lib
From: |
Hartmut Goebel |
Subject: |
02/02: gnu: qtserialport: Use the store paths for dynamically loaded libs. |
Date: |
Sun, 18 Feb 2018 12:39:48 -0500 (EST) |
htgoebel pushed a commit to branch master
in repository guix.
commit 042f7c2636a3595e2af970025854edcfd8860329
Author: Hartmut Goebel <address@hidden>
Date: Wed Nov 1 16:31:03 2017 +0100
gnu: qtserialport: Use the store paths for dynamically loaded libs.
Transfer the applicable NixOS patches for qtserialport as of 2018-01-19:
- src/serialport/qtudev_p.h: Transferred: Use hard-coded path to libudev.
* gnu/packages/qt.scm(qtserialport)[#:phases]<patch-dlopen-paths>:
New phase.
---
gnu/packages/qt.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 361bcf6..4cf1ed5 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -999,6 +999,19 @@ compositor libraries.")))
(inputs
`(("qtbase" ,qtbase)
("eudev" ,eudev)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments qtsvg)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'patch-dlopen-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/serialport/qtudev_p.h"
+ ;; Use the absolute paths for dynamically loaded libs,
+ ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
+ ;; typically is not set in guix.
+
(("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)"
_ a b)
+ (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
+ #t))))))
(synopsis "Qt Serial Port module")
(description "The Qt Serial Port module provides the library for
interacting with serial ports from within Qt.")))