linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / qt-5 / 5.12 / qtbase.patch.d / 0003-qtbase-mkspecs.patch
blobd5d8e70b788f2a199deb03bcf0d6ad3c783b6f3f
1 From 8bdbddc2e5fef1553b1ba0297d3c03b38e9b947b Mon Sep 17 00:00:00 2001
2 From: Thomas Tuegel <ttuegel@mailbox.org>
3 Date: Wed, 18 Sep 2019 05:39:39 -0500
4 Subject: [PATCH 03/12] qtbase-mkspecs
6 ---
7 mkspecs/features/create_cmake.prf | 53 ++++--------
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, 39 insertions(+), 142 deletions(-)
20 diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
21 index 00da9bd33f..bd166fbfea 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 @@ -70,45 +70,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
72 -win32:!static:!staticlib {
73 - CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX])
74 - contains(CMAKE_DLL_DIR, "^\\.\\./.*") {
75 - CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/
76 - CMAKE_DLL_DIR_IS_ABSOLUTE = True
77 - }
78 -} else {
79 - CMAKE_DLL_DIR = $$CMAKE_LIB_DIR
80 - CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE
82 +CMAKE_PLUGIN_DIR = $$NIX_OUTPUT_PLUGIN/
83 +CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
85 +CMAKE_DLL_DIR = $$NIX_OUTPUT_OUT/lib/
86 +CMAKE_DLL_DIR_IS_ABSOLUTE = True
88 static|staticlib:CMAKE_STATIC_TYPE = true
90 @@ -188,7 +163,7 @@ contains(CONFIG, plugin) {
91 cmake_target_file
93 cmake_qt5_plugin_file.files = $$cmake_target_file.output
94 - cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
95 + cmake_qt5_plugin_file.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
96 INSTALLS += cmake_qt5_plugin_file
98 return()
99 @@ -333,7 +308,7 @@ exists($$cmake_macros_file.input) {
100 cmake_qt5_module_files.files += $$cmake_macros_file.output
103 -cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
104 +cmake_qt5_module_files.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
106 # We are generating cmake files. Most developers of Qt are not aware of cmake,
107 # so we require automatic tests to be available. The only module which should
108 diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
109 index c729892889..c60ef16e64 100644
110 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
111 +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
112 @@ -3,30 +3,6 @@ if (CMAKE_VERSION VERSION_LESS 3.1.0)
113 message(FATAL_ERROR \"Qt 5 $${CMAKE_MODULE_NAME} module requires at least CMake version 3.1.0\")
114 endif()
116 -!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
117 -!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
118 -set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
119 -!!ELSE
120 -get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
121 -# Use original install prefix when loaded through a
122 -# cross-prefix symbolic link such as /lib -> /usr/lib.
123 -get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)
124 -get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH)
125 -if(_realCurr STREQUAL _realOrig)
126 - get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE)
127 -else()
128 - get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
129 -endif()
130 -unset(_realOrig)
131 -unset(_realCurr)
132 -unset(_IMPORT_PREFIX)
133 -!!ENDIF
134 -!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
135 -get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
136 -!!ELSE
137 -set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
138 -!!ENDIF
140 !!IF !equals(TEMPLATE, aux)
141 # For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead.
142 set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.VERSION)")
143 @@ -52,11 +28,7 @@ endmacro()
144 macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
145 set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
147 -!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
148 - set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
149 -!!ELSE
150 set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
151 -!!ENDIF
152 _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
153 set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
154 \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
155 @@ -69,11 +41,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
158 !!IF !isEmpty(CMAKE_WINDOWS_BUILD)
159 -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
160 - set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
161 -!!ELSE
162 set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
163 -!!ENDIF
164 _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib})
165 if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
166 set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
167 @@ -89,24 +57,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
168 !!IF !no_module_headers
169 !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
170 set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
171 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework\"
172 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\"
173 + \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework\"
174 + \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\"
176 !!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
177 set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
178 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
179 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
181 -!!ELSE
182 - set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
183 -!!ENDIF
184 -!!ELSE
185 -!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
186 - 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}\")
187 -!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
188 - set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
189 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
190 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
191 + \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
192 + \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
194 !!ELSE
195 set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
196 @@ -122,7 +79,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
197 set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
198 !!ENDIF
199 !!ENDIF
200 -!!ENDIF
201 !!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS)
202 include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL)
203 !!ENDIF
204 @@ -272,25 +228,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
205 !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
206 !!IF isEmpty(CMAKE_DEBUG_TYPE)
207 !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
208 -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
209 - if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
210 -!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
211 if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
212 -!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
213 _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
214 !!ELSE // CMAKE_STATIC_WINDOWS_BUILD
215 if (EXISTS
216 -!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
217 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
218 -!!ELSE
219 \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
220 -!!ENDIF
221 AND EXISTS
222 -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
223 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
224 -!!ELSE
225 \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
226 -!!ENDIF
227 _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
228 !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
229 endif()
230 @@ -309,25 +253,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
231 !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
232 !!IF isEmpty(CMAKE_RELEASE_TYPE)
233 !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
234 -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
235 - if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
236 -!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
237 if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
238 -!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
239 _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
240 !!ELSE // CMAKE_STATIC_WINDOWS_BUILD
241 if (EXISTS
242 -!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
243 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
244 -!!ELSE
245 \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
246 -!!ENDIF
247 AND EXISTS
248 -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
249 - \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
250 -!!ELSE
251 \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
252 -!!ENDIF
253 _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
254 !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
255 endif()
256 @@ -346,11 +278,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
257 macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
258 set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
260 -!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
261 - set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
262 -!!ELSE
263 set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
264 -!!ENDIF
265 _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
266 set_target_properties(Qt5::${Plugin} PROPERTIES
267 \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
268 diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf
269 index 57cfec78b3..5cbd7c52ef 100644
270 --- a/mkspecs/features/qml_module.prf
271 +++ b/mkspecs/features/qml_module.prf
272 @@ -51,7 +51,7 @@ builtin_resources {
273 # Install rules
274 qmldir.base = $$qmldir_path
275 qmldir.files = $$qmldir_file
276 -qmldir.path = $$[QT_INSTALL_QML]/$$TARGETPATH
277 +qmldir.path = $$NIX_OUTPUT_QML/$$TARGETPATH
278 INSTALLS += qmldir
280 qmlfiles.base = $$_PRO_FILE_PWD_
281 diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
282 index ad8ecdf5f1..804634b22e 100644
283 --- a/mkspecs/features/qml_plugin.prf
284 +++ b/mkspecs/features/qml_plugin.prf
285 @@ -50,7 +50,7 @@ load(qt_build_paths)
287 DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
289 -target.path = $$[QT_INSTALL_QML]/$$TARGETPATH
290 +target.path = $$NIX_OUTPUT_QML/$$TARGETPATH
291 INSTALLS += target
293 # Some final setup
294 diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf
295 index 8354f30eea..62028fef8e 100644
296 --- a/mkspecs/features/qt_app.prf
297 +++ b/mkspecs/features/qt_app.prf
298 @@ -30,7 +30,7 @@ host_build:force_bootstrap {
299 target.path = $$[QT_HOST_BINS]
300 } else {
301 !build_pass:qtConfig(debug_and_release): CONFIG += release
302 - target.path = $$[QT_INSTALL_BINS]
303 + target.path = $$NIX_OUTPUT_BIN/bin
304 CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable
306 INSTALLS += target
307 diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf
308 index 3bb3823a8e..655b7b7db8 100644
309 --- a/mkspecs/features/qt_build_paths.prf
310 +++ b/mkspecs/features/qt_build_paths.prf
311 @@ -24,6 +24,6 @@ exists($$MODULE_BASE_INDIR/.git): \
312 !force_independent {
313 # If the module is not built independently, everything ends up in qtbase.
314 # This is the case in non-prefix builds, except for selected modules.
315 - MODULE_BASE_OUTDIR = $$[QT_HOST_PREFIX]
316 - MODULE_QMAKE_OUTDIR = $$[QT_HOST_PREFIX]
317 + MODULE_BASE_OUTDIR = $$NIX_OUTPUT_OUT
318 + MODULE_QMAKE_OUTDIR = $$NIX_OUTPUT_OUT
320 diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
321 index 3b74cd4dd5..6bfbbe6e2d 100644
322 --- a/mkspecs/features/qt_docs.prf
323 +++ b/mkspecs/features/qt_docs.prf
324 @@ -45,7 +45,7 @@ QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR
326 QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR)
327 !build_online_docs: \
328 - QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS])
329 + QDOC += -installdir $$shell_quote($$NIX_OUTPUT_DOC)
330 PREP_DOC_INDEXES =
331 DOC_INDEXES =
332 !isEmpty(QTREPOS) {
333 @@ -64,8 +64,8 @@ DOC_INDEXES =
334 DOC_INDEXES += -indexdir $$shell_quote($$qrep/doc)
335 } else {
336 prepare_docs: \
337 - PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
338 - DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
339 + PREP_DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC)
340 + DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC)
343 qtattributionsscanner.target = qtattributionsscanner
344 @@ -88,12 +88,12 @@ prepare_docs {
345 qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch)
347 inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR
348 - inst_html_docs.path = $$[QT_INSTALL_DOCS]
349 + inst_html_docs.path = $$NIX_OUTPUT_DOC
350 inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build
351 INSTALLS += inst_html_docs
353 inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
354 - inst_qch_docs.path = $$[QT_INSTALL_DOCS]
355 + inst_qch_docs.path = $$NIX_OUTPUT_DOC
356 inst_qch_docs.CONFIG += no_check_exist no_default_install no_build
357 INSTALLS += inst_qch_docs
359 diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf
360 index 43b58817fe..e635b8f67a 100644
361 --- a/mkspecs/features/qt_example_installs.prf
362 +++ b/mkspecs/features/qt_example_installs.prf
363 @@ -88,7 +88,7 @@ sourcefiles += \
364 $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
365 $$DBUS_ADAPTORS $$DBUS_INTERFACES
366 addInstallFiles(sources.files, $$sourcefiles)
367 -sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase
368 +sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase
369 INSTALLS += sources
371 check_examples {
372 diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
373 index 1903e509c8..ae7b585989 100644
374 --- a/mkspecs/features/qt_functions.prf
375 +++ b/mkspecs/features/qt_functions.prf
376 @@ -69,7 +69,7 @@ defineTest(qtHaveModule) {
377 defineTest(qtPrepareTool) {
378 cmd = $$eval(QT_TOOL.$${2}.binary)
379 isEmpty(cmd) {
380 - cmd = $$[QT_HOST_BINS]/$$2
381 + cmd = $$system("command -v $$2")
382 exists($${cmd}.pl) {
383 $${1}_EXE = $${cmd}.pl
384 cmd = perl -w $$system_path($${cmd}.pl)
385 diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
386 index 1ebca17366..b784441da0 100644
387 --- a/mkspecs/features/qt_installs.prf
388 +++ b/mkspecs/features/qt_installs.prf
389 @@ -12,16 +12,10 @@
390 #library
391 !qt_no_install_library {
392 win32 {
393 - host_build: \
394 - dlltarget.path = $$[QT_HOST_BINS]
395 - else: \
396 - dlltarget.path = $$[QT_INSTALL_BINS]
397 + dlltarget.path = $$NIX_OUTPUT_BIN/bin
398 INSTALLS += dlltarget
400 - host_build: \
401 - target.path = $$[QT_HOST_LIBS]
402 - else: \
403 - target.path = $$[QT_INSTALL_LIBS]
404 + target.path = $$NIX_OUTPUT_OUT/lib
405 !static: target.CONFIG = no_dll
406 INSTALLS += target
408 @@ -29,35 +23,35 @@
409 #headers
410 qt_install_headers {
411 gen_headers.files = $$SYNCQT.GENERATED_HEADER_FILES
412 - gen_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
413 + gen_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME
414 INSTALLS += gen_headers
416 targ_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.INJECTED_HEADER_FILES
417 - targ_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
418 + targ_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME
419 INSTALLS += targ_headers
421 private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.INJECTED_PRIVATE_HEADER_FILES
422 - private_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
423 + private_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
424 generated_privates: \
425 private_headers.CONFIG += no_check_exist
426 INSTALLS += private_headers
428 qpa_headers.files = $$SYNCQT.QPA_HEADER_FILES
429 - qpa_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
430 + qpa_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
431 INSTALLS += qpa_headers
434 #module
435 qt_install_module {
436 !isEmpty(MODULE_PRI) {
437 - pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
438 + pritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules
439 pritarget.files = $$MODULE_PRI
440 INSTALLS += pritarget
441 } else: isEmpty(MODULE_PRIVATE_PRI) {
442 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.")
444 !isEmpty(MODULE_PRIVATE_PRI) {
445 - privpritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
446 + privpritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules
447 privpritarget.files = $$MODULE_PRIVATE_PRI
448 INSTALLS += privpritarget
450 diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
451 index 40528a65e2..903f795284 100644
452 --- a/mkspecs/features/qt_plugin.prf
453 +++ b/mkspecs/features/qt_plugin.prf
454 @@ -88,7 +88,7 @@ CONFIG(static, static|shared)|prefix_build {
458 -target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
459 +target.path = $$NIX_OUTPUT_PLUGIN/$$PLUGIN_TYPE
460 INSTALLS += target
462 TARGET = $$qt5LibraryTarget($$TARGET)
464 2.23.GIT