[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#56771] [PATCH 02/33] gnu: qtbase: Honor CMAKE_PREFIX_PATH.
From: |
Maxim Cournoyer |
Subject: |
[bug#56771] [PATCH 02/33] gnu: qtbase: Honor CMAKE_PREFIX_PATH. |
Date: |
Mon, 25 Jul 2022 19:07:32 -0400 |
* gnu/packages/qt.scm (qtbase)[phases]{honor-CMAKE_PREFIX_PATH}: New phase.
---
gnu/packages/qt.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index fd26264892..c2e509fcdf 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -618,6 +618,27 @@ (define-public qtbase
"-DFEATURE_mips_dspr2=OFF")))
((#:phases phases)
#~(modify-phases #$phases
+ (add-after 'unpack 'honor-CMAKE_PREFIX_PATH
+ (lambda _
+ ;; The configuration files for other Qt packages are searched
+ ;; through a call to "find_package" in Qt5Config.cmake, which
+ ;; disables the use of CMAKE_PREFIX_PATH via the parameter
+ ;; "NO_DEFAULT_PATH". Re-enable it so that the different
+ ;; components can be installed in different places.
+ (substitute* (find-files "." "\\.cmake(\\.in)?$")
+ (("\\bNO_DEFAULT_PATH\\b") ""))
+ ;; Because Qt goes against the grain of CMake and set
+ ;; NO_DEFAULT_PATH, it needs to invent yet another variable
+ ;; to do what CMAKE_PREFIX_PATH could have done:
+ ;; QT_ADDITIONAL_PACKAGES_PREFIX_PATH. Since we patch out
+ ;; the NO_DEFAULT_PATH, we can set the default value of
+ ;; QT_ADDITIONAL_PACKAGES_PREFIX_PATH to that of
+ ;; CMAKE_PREFIX_PATH to ensure tools such as
+ ;; 'qmlimportscanner' from qtdeclarative work out of the
+ ;; box.
+ (substitute* "cmake/QtConfig.cmake.in"
+ (("(set\\(QT_ADDITIONAL_PACKAGES_PREFIX_PATH )\"\"" _ head)
+ (string-append head "\"$ENV{CMAKE_PREFIX_PATH}\"")))))
(delete 'patch-bin-sh)
(delete 'patch-xdg-open)
(add-after 'patch-paths 'patch-more-paths
--
2.36.1
- [bug#56771] [PATCH 00/33] *** Update Jami to 20220725, core Qt packages along the way, Maxim Cournoyer, 2022/07/25
- [bug#56771] [PATCH 01/33] gnu: qtbase: Patch /bin/pwd in executable scripts., Maxim Cournoyer, 2022/07/25
- [bug#56771] [PATCH 02/33] gnu: qtbase: Honor CMAKE_PREFIX_PATH.,
Maxim Cournoyer <=
- [bug#56771] [PATCH 03/33] gnu: qtbase: Enable test suite., Maxim Cournoyer, 2022/07/25
- [bug#56771] [PATCH 07/33] gnu: qpwgraph: Migrate to Qt 6 and add libxkbcommon input., Maxim Cournoyer, 2022/07/25
- [bug#56771] [PATCH 05/33] gnu: qtsvg-5: Fix indentation., Maxim Cournoyer, 2022/07/25
- [bug#56771] [PATCH 17/33] gnu: Add qtwebsockets, version 6.3.1., Maxim Cournoyer, 2022/07/25
- [bug#56771] [PATCH 14/33] gnu: qtquickcontrols2: Rename to qtquickcontrols2-5., Maxim Cournoyer, 2022/07/25
- [bug#56771] [PATCH 26/33] gnu: Add qtnetworkauth, version 6.3.1., Maxim Cournoyer, 2022/07/25
- [bug#56771] [PATCH 06/33] gnu: Add qtsvg, version 6.3.1., Maxim Cournoyer, 2022/07/25
- [bug#56771] [PATCH 09/33] gnu: qtmultimedia: Rename to qtmultimedia-5., Maxim Cournoyer, 2022/07/25
- [bug#56771] [PATCH 13/33] gnu: qtquickcontrols: Rename to qtquickcontrols-5., Maxim Cournoyer, 2022/07/25
- [bug#56771] [PATCH 08/33] gnu: Add qtshadertools., Maxim Cournoyer, 2022/07/25