From 59ff9d008816a7d04cdd50d0db371ae1223e3329 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 9 Mar 2024 16:49:55 -0500 Subject: gnu: qttools-5: Patch path to qmake for the lprodump command. This previously would lead to this cryptic error: "WARNING: Could not find qmake spec 'default'", which turned out to be caused by lprodump erroneously attempting to run 'qmake' from its own prefix (qmake is from the qtbase package, not qttools). * gnu/packages/qt.scm (qttools-5) [phases] : New phase. Change-Id: I6e9a2d35fec987451fd1e30b84a82023dbfd3316 --- gnu/packages/qt.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 761d12e31f..72c36513e9 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -2171,7 +2171,18 @@ (define-public qttools-5 "1bkx2sc5hyldarc7w76ymv7dlcna3ib9r2kp67jdqcf856bnrx36")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg-5) - ((#:tests? _ #f) #f))) ; TODO: Enable the tests + ((#:tests? _ #f) #f) ; TODO: Enable the tests + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (add-after 'unpack 'patch-qmake + (lambda* (#:key inputs #:allow-other-keys) + ;; Adjust the default location of the 'qmake' command known to + ;; the 'lprodump' command, which would otherwise look for it + ;; in its own bindir. + (substitute* "src/linguist/lprodump/main.cpp" + (("app.applicationDirPath\\() \\+ QLatin1String\\(\"/qmake\")") + (format #f "QLatin1String(~s)" + (search-input-file inputs "bin/qmake")))))))))) (native-inputs (list perl qtdeclarative-5 vulkan-headers)) (inputs (list mesa qtbase-5)) (synopsis "Qt Tools and Designer modules") -- cgit v1.2.3