linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / qt-5 / 5.14 / qtbase.patch.d / 0003-qtbase-mkspecs.patch
blobb704d0dc8722acf68d6dea637fdd1418bda70c04
1 From 1cb5581d7f20bf87ac8d67a7295447a78a1d9645 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
3 Date: Sat, 4 Apr 2020 00:25:52 +0200
4 Subject: [PATCH 03/10] qtbase-mkspecs
6 ---
7 mkspecs/features/create_cmake.prf | 51 +++---------
8 .../data/cmake/Qt5BasicConfig.cmake.in | 80 +------------------
9 mkspecs/features/qml_module.prf | 2 +-
10 mkspecs/features/qml_plugin.prf | 2 +-
11 mkspecs/features/qt_app.prf | 2 +-
12 mkspecs/features/qt_build_paths.prf | 4 +-
13 mkspecs/features/qt_docs.prf | 10 +--
14 mkspecs/features/qt_example_installs.prf | 2 +-
15 mkspecs/features/qt_functions.prf | 2 +-
16 mkspecs/features/qt_installs.prf | 22 ++---
17 mkspecs/features/qt_plugin.prf | 2 +-
18 11 files changed, 38 insertions(+), 141 deletions(-)
20 diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
21 index 0e71fd0015..ba071d9a70 100644
22 --- a/mkspecs/features/create_cmake.prf
23 +++ b/mkspecs/features/create_cmake.prf
24 @@ -21,7 +21,7 @@ load(cmake_functions)
25 # at cmake time whether package has been found via a symlink, and correct
26 # that to an absolute path. This is only done for installations to
27 # the /usr or / prefix.
28 -CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$[QT_INSTALL_LIBS])
29 +CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$NIX_OUTPUT_OUT/lib/)
30 contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND = $$CMAKE_INSTALL_LIBS_DIR
32 CMAKE_OUT_DIR = $$MODULE_BASE_OUTDIR/lib/cmake
33 @@ -77,45 +77,20 @@ split_incpath {
34 $$cmake_extra_source_includes.output
37 -CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX])
38 -contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
39 - CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/
40 - CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
42 +CMAKE_INCLUDE_DIR = $$NIX_OUTPUT_DEV/include/
43 +CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
45 -CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
46 -contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
47 - CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/
48 - CMAKE_LIB_DIR_IS_ABSOLUTE = True
49 -} else {
50 - CMAKE_RELATIVE_INSTALL_LIBS_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS])
51 - # We need to go up another two levels because the CMake files are
52 - # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
53 - CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../"
55 +CMAKE_BIN_DIR = $$NIX_OUTPUT_BIN/bin/
56 +CMAKE_BIN_DIR_IS_ABSOLUTE = True
58 -CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
59 -contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
60 - CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
61 - CMAKE_BIN_DIR_IS_ABSOLUTE = True
63 +CMAKE_LIB_DIR = $$NIX_OUTPUT_OUT/lib/
64 +CMAKE_LIB_DIR_IS_ABSOLUTE = True
66 -CMAKE_PLUGIN_DIR = $$cmakeRelativePath($$[QT_INSTALL_PLUGINS], $$[QT_INSTALL_PREFIX])
67 -contains(CMAKE_PLUGIN_DIR, "^\\.\\./.*") {
68 - CMAKE_PLUGIN_DIR = $$[QT_INSTALL_PLUGINS]/
69 - CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
71 +CMAKE_PLUGIN_DIR = $$NIX_OUTPUT_PLUGIN/
72 +CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
74 -win32:!static:!staticlib {
75 - CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX])
76 - contains(CMAKE_DLL_DIR, "^\\.\\./.*") {
77 - CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/
78 - CMAKE_DLL_DIR_IS_ABSOLUTE = True
79 - }
80 -} else {
81 - CMAKE_DLL_DIR = $$CMAKE_LIB_DIR
82 - CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE
84 +CMAKE_DLL_DIR = $$NIX_OUTPUT_OUT/lib/
85 +CMAKE_DLL_DIR_IS_ABSOLUTE = True
87 static|staticlib:CMAKE_STATIC_TYPE = true
89 @@ -258,7 +233,7 @@ contains(CONFIG, plugin) {
91 cmake_qt5_plugin_file.files = $$cmake_target_file.output
92 static|staticlib: cmake_qt5_plugin_file.files += $$cmake_qt5_plugin_import_file.output
93 - cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
94 + cmake_qt5_plugin_file.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
95 INSTALLS += cmake_qt5_plugin_file
97 return()
98 @@ -396,7 +371,7 @@ exists($$cmake_macros_file.input) {
99 cmake_qt5_module_files.files += $$cmake_macros_file.output
102 -cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
103 +cmake_qt5_module_files.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
105 # We are generating cmake files. Most developers of Qt are not aware of cmake,
106 # so we require automatic tests to be available. The only module which should
107 diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
108 index 1099a761ce..87679b7e68 100644
109 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
110 +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
111 @@ -3,30 +3,6 @@ if (CMAKE_VERSION VERSION_LESS 3.1.0)
112 message(FATAL_ERROR \"Qt 5 $${CMAKE_MODULE_NAME} module requires at least CMake version 3.1.0\")
113 endif()
115 -!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
116 -!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
117 -set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
118 -!!ELSE
119 -get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
120 -# Use original install prefix when loaded through a
121 -# cross-prefix symbolic link such as /lib -> /usr/lib.
122 -get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)
123 -get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH)
124 -if(_realCurr STREQUAL _realOrig)
125 - get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE)
126 -else()
127 - get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
128 -endif()
129 -unset(_realOrig)
130 -unset(_realCurr)
131 -unset(_IMPORT_PREFIX)
132 -!!ENDIF
133 -!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
134 -get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
135 -!!ELSE
136 -set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
137 -!!ENDIF
139 !!IF !equals(TEMPLATE, aux)
140 # For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead.
141 set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.VERSION)")
142 @@ -146,11 +122,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
143 IsDebugAndRelease)
144 set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
146 -!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
147 - set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
148 -!!ELSE
149 set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
150 -!!ENDIF
151 _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
152 set(_deps
153 ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}
154 @@ -210,11 +182,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
155 !!ENDIF
157 !!IF !isEmpty(CMAKE_WINDOWS_BUILD)
158 -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
159 - set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
160 -!!ELSE
161 set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
162 -!!ENDIF
163 _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib})
164 if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
165 set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
166 @@ -230,24 +198,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
167 !!IF !no_module_headers
168 !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
169 set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
170 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework\"
171 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\"
172 + \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework\"
173 + \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\"
175 !!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
176 set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
177 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
178 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
180 -!!ELSE
181 - set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
182 -!!ENDIF
183 -!!ELSE
184 -!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
185 - set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\")
186 -!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
187 - set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
188 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
189 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
190 + \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, .,0, 0)/Headers/$$VERSION/\"
191 + \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, .,0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
193 !!ELSE
194 set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
195 @@ -263,7 +220,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
196 set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
197 !!ENDIF
198 !!ENDIF
199 -!!ENDIF
200 !!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS)
201 include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL)
202 !!ENDIF
203 @@ -465,25 +421,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
204 !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
205 !!IF isEmpty(CMAKE_DEBUG_TYPE)
206 !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
207 -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
208 - if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
209 -!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
210 if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
211 -!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
212 _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
213 !!ELSE // CMAKE_STATIC_WINDOWS_BUILD
214 if (EXISTS
215 -!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
216 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
217 -!!ELSE
218 \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
219 -!!ENDIF
220 AND EXISTS
221 -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
222 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
223 -!!ELSE
224 \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
225 -!!ENDIF
226 _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
227 !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
228 endif()
229 @@ -502,25 +446,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
230 !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
231 !!IF isEmpty(CMAKE_RELEASE_TYPE)
232 !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
233 -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
234 - if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
235 -!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
236 if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
237 -!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
238 _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
239 !!ELSE // CMAKE_STATIC_WINDOWS_BUILD
240 if (EXISTS
241 -!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
242 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
243 -!!ELSE
244 \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
245 -!!ENDIF
246 AND EXISTS
247 -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
248 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
249 -!!ELSE
250 \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
251 -!!ENDIF
252 _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
253 !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
254 endif()
255 @@ -542,11 +474,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
256 IsDebugAndRelease)
257 set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
259 -!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
260 - set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
261 -!!ELSE
262 set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
263 -!!ENDIF
264 _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
265 set_target_properties(Qt5::${Plugin} PROPERTIES
266 \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
267 diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf
268 index c0b50416c9..cabe39b22e 100644
269 --- a/mkspecs/features/qml_module.prf
270 +++ b/mkspecs/features/qml_module.prf
271 @@ -51,7 +51,7 @@ builtin_resources {
272 # Install rules
273 qmldir.base = $$qmldir_path
274 qmldir.files = $$qmldir_file
275 -qmldir.path = $$[QT_INSTALL_QML]/$$TARGETPATH
276 +qmldir.path = $$NIX_OUTPUT_QML/$$TARGETPATH
278 qmlfiles.base = $$_PRO_FILE_PWD_
279 qmlfiles.files = $$fq_aux_qml_files
280 diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
281 index f1c5658b04..029595e721 100644
282 --- a/mkspecs/features/qml_plugin.prf
283 +++ b/mkspecs/features/qml_plugin.prf
284 @@ -50,7 +50,7 @@ load(qt_build_paths)
286 DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
288 -target.path = $$[QT_INSTALL_QML]/$$TARGETPATH
289 +target.path = $$NIX_OUTPUT_QML/$$TARGETPATH
290 INSTALLS += target
292 # Some final setup
293 diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf
294 index 8354f30eea..62028fef8e 100644
295 --- a/mkspecs/features/qt_app.prf
296 +++ b/mkspecs/features/qt_app.prf
297 @@ -30,7 +30,7 @@ host_build:force_bootstrap {
298 target.path = $$[QT_HOST_BINS]
299 } else {
300 !build_pass:qtConfig(debug_and_release): CONFIG += release
301 - target.path = $$[QT_INSTALL_BINS]
302 + target.path = $$NIX_OUTPUT_BIN/bin
303 CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable
305 INSTALLS += target
306 diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf
307 index 3bb3823a8e..655b7b7db8 100644
308 --- a/mkspecs/features/qt_build_paths.prf
309 +++ b/mkspecs/features/qt_build_paths.prf
310 @@ -24,6 +24,6 @@ exists($$MODULE_BASE_INDIR/.git): \
311 !force_independent {
312 # If the module is not built independently, everything ends up in qtbase.
313 # This is the case in non-prefix builds, except for selected modules.
314 - MODULE_BASE_OUTDIR = $$[QT_HOST_PREFIX]
315 - MODULE_QMAKE_OUTDIR = $$[QT_HOST_PREFIX]
316 + MODULE_BASE_OUTDIR = $$NIX_OUTPUT_OUT
317 + MODULE_QMAKE_OUTDIR = $$NIX_OUTPUT_OUT
319 diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
320 index 095bf15dac..4cc977bea5 100644
321 --- a/mkspecs/features/qt_docs.prf
322 +++ b/mkspecs/features/qt_docs.prf
323 @@ -65,7 +65,7 @@ QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR
325 QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR)
326 !build_online_docs: \
327 - QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS])
328 + QDOC += -installdir $$shell_quote($$NIX_OUTPUT_DOC)
329 PREP_DOC_INDEXES =
330 DOC_INDEXES =
331 !isEmpty(QTREPOS) {
332 @@ -84,8 +84,8 @@ DOC_INDEXES =
333 DOC_INDEXES += -indexdir $$shell_quote($$qrep/doc)
334 } else {
335 prepare_docs: \
336 - PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
337 - DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
338 + PREP_DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC)
339 + DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC)
342 qtattributionsscanner.target = qtattributionsscanner
343 @@ -108,12 +108,12 @@ prepare_docs {
344 qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch)
346 inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR
347 - inst_html_docs.path = $$[QT_INSTALL_DOCS]
348 + inst_html_docs.path = $$NIX_OUTPUT_DOC
349 inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build
350 INSTALLS += inst_html_docs
352 inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
353 - inst_qch_docs.path = $$[QT_INSTALL_DOCS]
354 + inst_qch_docs.path = $$NIX_OUTPUT_DOC
355 inst_qch_docs.CONFIG += no_check_exist no_default_install no_build
356 INSTALLS += inst_qch_docs
358 diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf
359 index 72b47bce27..d59e949e78 100644
360 --- a/mkspecs/features/qt_example_installs.prf
361 +++ b/mkspecs/features/qt_example_installs.prf
362 @@ -90,7 +90,7 @@ sourcefiles += \
363 $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
364 $$DBUS_ADAPTORS $$DBUS_INTERFACES
365 addInstallFiles(sources.files, $$sourcefiles)
366 -sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase
367 +sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase
368 INSTALLS += sources
370 check_examples {
371 diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
372 index 7777e615bd..abeb03a663 100644
373 --- a/mkspecs/features/qt_functions.prf
374 +++ b/mkspecs/features/qt_functions.prf
375 @@ -87,7 +87,7 @@ defineTest(qtHaveModule) {
376 defineTest(qtPrepareTool) {
377 cmd = $$eval(QT_TOOL.$${2}.binary)
378 isEmpty(cmd) {
379 - cmd = $$[QT_HOST_BINS]/$$2
380 + cmd = $$system("command -v $$2")
381 exists($${cmd}.pl) {
382 $${1}_EXE = $${cmd}.pl
383 cmd = perl -w $$system_path($${cmd}.pl)
384 diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
385 index 1ebca17366..a8f958eae8 100644
386 --- a/mkspecs/features/qt_installs.prf
387 +++ b/mkspecs/features/qt_installs.prf
388 @@ -12,16 +12,10 @@
389 #library
390 !qt_no_install_library {
391 win32 {
392 - host_build: \
393 - dlltarget.path = $$[QT_HOST_BINS]
394 - else: \
395 - dlltarget.path = $$[QT_INSTALL_BINS]
396 + dlltarget.path = $$NIX_OUTPUT_BIN/bin
397 INSTALLS += dlltarget
399 - host_build: \
400 - target.path = $$[QT_HOST_LIBS]
401 - else: \
402 - target.path = $$[QT_INSTALL_LIBS]
403 + target.path = $$NIX_OUTPUT_OUT/lib
404 !static: target.CONFIG = no_dll
405 INSTALLS += target
407 @@ -29,35 +23,35 @@
408 #headers
409 qt_install_headers {
410 gen_headers.files = $$SYNCQT.GENERATED_HEADER_FILES
411 - gen_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
412 + gen_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME
413 INSTALLS += gen_headers
415 targ_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.INJECTED_HEADER_FILES
416 - targ_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
417 + targ_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME
418 INSTALLS += targ_headers
420 private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.INJECTED_PRIVATE_HEADER_FILES
421 - private_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
422 + private_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
423 generated_privates: \
424 private_headers.CONFIG += no_check_exist
425 INSTALLS += private_headers
427 qpa_headers.files = $$SYNCQT.QPA_HEADER_FILES
428 - qpa_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
429 + qpa_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
430 INSTALLS += qpa_headers
433 #module
434 qt_install_module {
435 !isEmpty(MODULE_PRI) {
436 - pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
437 + pritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules
438 pritarget.files = $$MODULE_PRI
439 INSTALLS += pritarget
440 } else: isEmpty(MODULE_PRIVATE_PRI) {
441 warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects.")
443 !isEmpty(MODULE_PRIVATE_PRI) {
444 - privpritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
445 + privpritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules
446 privpritarget.files = $$MODULE_PRIVATE_PRI
447 INSTALLS += privpritarget
449 diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
450 index 573d717eea..024c624cb6 100644
451 --- a/mkspecs/features/qt_plugin.prf
452 +++ b/mkspecs/features/qt_plugin.prf
453 @@ -88,7 +88,7 @@ CONFIG(static, static|shared)|prefix_build {
457 -target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
458 +target.path = $$NIX_OUTPUT_PLUGIN/$$PLUGIN_TYPE
459 INSTALLS += target
461 qt_libinfix_plugins: TARGET = $$TARGET$$QT_LIBINFIX
463 2.25.1