aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-04-02 13:53:28 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-04-02 21:30:36 -0400
commitf83bdd7e0028381e61b95d34119fba52d8b5bb7c (patch)
tree3f11b27edde0288fc57b88165f975ec85a85602d
parent4a8f265b17addc5f63589e3f2d7e3ec0037807d1 (diff)
downloadguix-f83bdd7e0028381e61b95d34119fba52d8b5bb7c.tar.gz
guix-f83bdd7e0028381e61b95d34119fba52d8b5bb7c.zip
gnu: qt-creator: Patch file names of demangling libraries.
* gnu/packages/qt.scm (qt-creator) [phases] {patch-perfparser}: New phase. Change-Id: I65f84158af05ae866680b21e2e9b8e24a2b71bc2
-rw-r--r--gnu/packages/qt.scm26
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 5866d33394..75622588a5 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -5164,6 +5164,32 @@ including @i{fix-its} for automatic refactoring.")
#$output "/lib/qtcreator"))
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-perfparser
+ ;; XXX: The 'patch-perfparser' phase is also used by the 'hotspot'
+ ;; package; keep its copy in sync.
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; perfparser attempts to dynamically load the demangle
+ ;; libraries; use their absolute file name to avoid having to
+ ;; set LD_LIBRARY_PATH.
+ (let ((librustc_demangle.so
+ (with-exception-handler (lambda (ex)
+ (if (search-error? ex)
+ #f
+ (raise-exception ex)))
+ (lambda ()
+ (search-input-file inputs "lib/librustc_demangle.so"))
+ #:unwind? #t)))
+ (substitute* "3rdparty/perfparser/app/demangler.cpp"
+ (("loadDemangleLib\\(QStringLiteral\\(\"rustc_demangle\")"
+ all)
+ (if librustc_demangle.so
+ (format #f "loadDemangleLib(QStringLiteral(~s)"
+ librustc_demangle.so)
+ all)) ;no rustc_demangle; leave unchanged
+ (("loadDemangleLib\\(QStringLiteral\\(\"d_demangle\")")
+ (format #f "loadDemangleLib(QStringLiteral(~s)"
+ (search-input-file inputs
+ "lib/libd_demangle.so")))))))
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
(substitute* '("src/libs/utils/commandline.cpp"