[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/35: gnu: qtbase: Honor CMAKE_PREFIX_PATH.
From: |
guix-commits |
Subject: |
02/35: gnu: qtbase: Honor CMAKE_PREFIX_PATH. |
Date: |
Mon, 1 Aug 2022 00:12:11 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit d48c98cd129b86ae7d9307c3bb8d3db99bed24e7
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sun Jul 17 18:52:17 2022 -0400
gnu: qtbase: Honor CMAKE_PREFIX_PATH.
* 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 @@ developers using C++ or QML, a CSS & JavaScript like
language.")
"-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
- branch master updated (ab59155c5a -> 3a656ea836), guix-commits, 2022/08/01
- 02/35: gnu: qtbase: Honor CMAKE_PREFIX_PATH.,
guix-commits <=
- 03/35: gnu: qtbase: Enable test suite., guix-commits, 2022/08/01
- 25/35: gnu: Add qttools, version 6.3.1., guix-commits, 2022/08/01
- 27/35: gnu: Add qtnetworkauth, version 6.3.1., guix-commits, 2022/08/01
- 31/35: gnu: libjami: Enable test agent., guix-commits, 2022/08/01
- 09/35: gnu: Add qtshadertools., guix-commits, 2022/08/01
- 05/35: gnu: qtsvg: Rename variable to qtsvg-5., guix-commits, 2022/08/01
- 11/35: gnu: Add qtmultimedia, version 6.3.1., guix-commits, 2022/08/01
- 16/35: gnu: qtquickcontrols2: Define as obsoleted by qtdeclarative., guix-commits, 2022/08/01
- 24/35: gnu: qttools: Rename to qttools-5., guix-commits, 2022/08/01
- 26/35: gnu: qtnetworkauth: Rename to qtnetworkauth-5., guix-commits, 2022/08/01