mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-09 07:13:03 +00:00
75d2a7dc4d
First, closure size is reduced by including the static libraries in $out instead of trying to move them to $dev. The Qt build system cannot handle libraries being split between different prefixes. Previously, the static libraries were moved into $dev and the shared libraries were symlinked from $out to $dev to fool the build system. However, this causes $dev to be retained at runtime. Instead, we now keep the static libraries in $out. Fortunately, the static libraries are not very large anyway. Second, we build with QT_NO_DEBUG defined unless debugging is enabled. This causes some assertions to be removed; when assertions are included, they pull paths from $dev into the runtime closure by using the __FILE__ macro. We also now patch qtbase to remove even more assertions when QT_NO_DEBUG is defined.
796 lines
37 KiB
Diff
796 lines
37 KiB
Diff
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
|
|
index 11fb52a0b1..614fdbb046 100644
|
|
--- a/mkspecs/features/create_cmake.prf
|
|
+++ b/mkspecs/features/create_cmake.prf
|
|
@@ -21,7 +21,7 @@ load(cmake_functions)
|
|
# at cmake time whether package has been found via a symlink, and correct
|
|
# that to an absolute path. This is only done for installations to
|
|
# the /usr or / prefix.
|
|
-CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$[QT_INSTALL_LIBS])
|
|
+CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$NIX_OUTPUT_OUT/lib/)
|
|
contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND = $$CMAKE_INSTALL_LIBS_DIR
|
|
|
|
CMAKE_OUT_DIR = $$MODULE_BASE_OUTDIR/lib/cmake
|
|
@@ -47,47 +47,22 @@ split_incpath {
|
|
$$cmake_extra_source_includes.output
|
|
}
|
|
|
|
-CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX])
|
|
-contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
|
|
- CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/
|
|
- CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
|
|
-}
|
|
+CMAKE_INCLUDE_DIR = $$NIX_OUTPUT_DEV/include/
|
|
+CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
|
|
|
|
!exists($$first(QT.$${MODULE}_private.includes)): CMAKE_NO_PRIVATE_INCLUDES = true
|
|
|
|
-CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
|
|
-contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
|
|
- CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/
|
|
- CMAKE_LIB_DIR_IS_ABSOLUTE = True
|
|
-} else {
|
|
- CMAKE_RELATIVE_INSTALL_LIBS_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS])
|
|
- # We need to go up another two levels because the CMake files are
|
|
- # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
|
|
- CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../"
|
|
-}
|
|
+CMAKE_LIB_DIR = $$NIX_OUTPUT_OUT/lib/
|
|
+CMAKE_LIB_DIR_IS_ABSOLUTE = True
|
|
|
|
-CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
|
|
-contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
|
|
- CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
|
|
- CMAKE_BIN_DIR_IS_ABSOLUTE = True
|
|
-}
|
|
+CMAKE_BIN_DIR = $$NIX_OUTPUT_BIN/bin/
|
|
+CMAKE_BIN_DIR_IS_ABSOLUTE = True
|
|
|
|
-CMAKE_PLUGIN_DIR = $$cmakeRelativePath($$[QT_INSTALL_PLUGINS], $$[QT_INSTALL_PREFIX])
|
|
-contains(CMAKE_PLUGIN_DIR, "^\\.\\./.*") {
|
|
- CMAKE_PLUGIN_DIR = $$[QT_INSTALL_PLUGINS]/
|
|
- CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
|
|
-}
|
|
+CMAKE_PLUGIN_DIR = $$NIX_OUTPUT_PLUGIN/
|
|
+CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
|
|
|
|
-win32:!wince:!static:!staticlib {
|
|
- CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX])
|
|
- contains(CMAKE_DLL_DIR, "^\\.\\./.*") {
|
|
- CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/
|
|
- CMAKE_DLL_DIR_IS_ABSOLUTE = True
|
|
- }
|
|
-} else {
|
|
- CMAKE_DLL_DIR = $$CMAKE_LIB_DIR
|
|
- CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
-}
|
|
+CMAKE_DLL_DIR = $$NIX_OUTPUT_OUT/lib/
|
|
+CMAKE_DLL_DIR_IS_ABSOLUTE = True
|
|
|
|
static|staticlib:CMAKE_STATIC_TYPE = true
|
|
|
|
@@ -167,7 +142,7 @@ contains(CONFIG, plugin) {
|
|
cmake_target_file
|
|
|
|
cmake_qt5_plugin_file.files = $$cmake_target_file.output
|
|
- cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
|
|
+ cmake_qt5_plugin_file.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
|
|
INSTALLS += cmake_qt5_plugin_file
|
|
|
|
return()
|
|
@@ -314,7 +289,7 @@ exists($$cmake_macros_file.input) {
|
|
cmake_qt5_module_files.files += $$cmake_macros_file.output
|
|
}
|
|
|
|
-cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
|
|
+cmake_qt5_module_files.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
|
|
|
|
# We are generating cmake files. Most developers of Qt are not aware of cmake,
|
|
# so we require automatic tests to be available. The only module which should
|
|
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
|
index d2358cae4b..61d8cc0471 100644
|
|
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
|
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
|
@@ -9,30 +9,6 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0)
|
|
endif()
|
|
!!ENDIF
|
|
|
|
-!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
|
|
-!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
|
|
-!!ELSE
|
|
-get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
|
|
-# Use original install prefix when loaded through a
|
|
-# cross-prefix symbolic link such as /lib -> /usr/lib.
|
|
-get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)
|
|
-get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH)
|
|
-if(_realCurr STREQUAL _realOrig)
|
|
- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE)
|
|
-else()
|
|
- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
|
|
-endif()
|
|
-unset(_realOrig)
|
|
-unset(_realCurr)
|
|
-unset(_IMPORT_PREFIX)
|
|
-!!ENDIF
|
|
-!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
-get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
|
|
-!!ELSE
|
|
-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
|
|
-!!ENDIF
|
|
-
|
|
!!IF !equals(TEMPLATE, aux)
|
|
# For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead.
|
|
set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.MAJOR_VERSION).$$eval(QT.$${MODULE}.MINOR_VERSION).$$eval(QT.$${MODULE}.PATCH_VERSION)")
|
|
@@ -58,11 +34,7 @@ endmacro()
|
|
macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
|
|
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
|
|
|
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
-!!ELSE
|
|
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
-!!ENDIF
|
|
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
|
|
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
|
|
\"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
|
|
@@ -75,11 +47,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
|
|
)
|
|
|
|
!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
|
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
|
-!!ELSE
|
|
set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
|
-!!ENDIF
|
|
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib})
|
|
if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
|
|
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
|
|
@@ -95,24 +63,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
|
!!IF !no_module_headers
|
|
!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
|
|
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework\"
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\"
|
|
+ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework\"
|
|
+ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Headers\"
|
|
)
|
|
!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
|
|
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
|
|
- )
|
|
-!!ELSE
|
|
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
|
-!!ENDIF
|
|
-!!ELSE
|
|
-!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
|
|
- 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}\")
|
|
-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
|
|
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
|
|
+ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
|
|
+ \"$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
|
|
)
|
|
!!ELSE
|
|
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
|
@@ -128,7 +85,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
|
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
|
!!ENDIF
|
|
!!ENDIF
|
|
-!!ENDIF
|
|
!!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS)
|
|
include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL)
|
|
!!ENDIF
|
|
@@ -254,25 +210,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
|
!!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
|
|
!!IF isEmpty(CMAKE_DEBUG_TYPE)
|
|
!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
|
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
_populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" )
|
|
!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
|
|
if (EXISTS
|
|
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
|
|
-!!ELSE
|
|
\"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
|
|
-!!ENDIF
|
|
AND EXISTS
|
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
-!!ELSE
|
|
\"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
-!!ENDIF
|
|
_populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
|
|
!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
|
|
endif()
|
|
@@ -291,25 +235,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
|
!!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
|
|
!!IF isEmpty(CMAKE_RELEASE_TYPE)
|
|
!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
|
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
|
|
_populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" )
|
|
!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
|
|
if (EXISTS
|
|
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
|
|
-!!ELSE
|
|
\"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
|
|
-!!ENDIF
|
|
AND EXISTS
|
|
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
-!!ELSE
|
|
\"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
-!!ENDIF
|
|
_populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
|
|
!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
|
|
endif()
|
|
@@ -328,11 +260,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
|
macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
|
|
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
|
|
|
-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
|
-!!ELSE
|
|
set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
|
|
-!!ENDIF
|
|
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
|
|
set_target_properties(Qt5::${Plugin} PROPERTIES
|
|
\"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
|
|
diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf
|
|
index 47ebe78400..25aa2b93e7 100644
|
|
--- a/mkspecs/features/qml_module.prf
|
|
+++ b/mkspecs/features/qml_module.prf
|
|
@@ -17,10 +17,7 @@ fq_qml_files = $$_PRO_FILE_PWD_/qmldir
|
|
|
|
for(qmlf, QML_FILES): fq_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_)
|
|
|
|
-qml1_target: \
|
|
- instbase = $$[QT_INSTALL_IMPORTS]
|
|
-else: \
|
|
- instbase = $$[QT_INSTALL_QML]
|
|
+instbase = $$NIX_OUTPUT_QML
|
|
|
|
# Install rules
|
|
qmldir.base = $$_PRO_FILE_PWD_
|
|
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
|
|
index ebec1db8da..62ace84a6c 100644
|
|
--- a/mkspecs/features/qml_plugin.prf
|
|
+++ b/mkspecs/features/qml_plugin.prf
|
|
@@ -46,13 +46,8 @@ exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE
|
|
|
|
load(qt_build_paths)
|
|
|
|
-qml1_target {
|
|
- DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH
|
|
- instbase = $$[QT_INSTALL_IMPORTS]
|
|
-} else {
|
|
- DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
|
|
- instbase = $$[QT_INSTALL_QML]
|
|
-}
|
|
+DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
|
|
+instbase = $$NIX_OUTPUT_QML
|
|
|
|
target.path = $$instbase/$$TARGETPATH
|
|
INSTALLS += target
|
|
diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf
|
|
index 46aca50cc2..4f4e634724 100644
|
|
--- a/mkspecs/features/qt_app.prf
|
|
+++ b/mkspecs/features/qt_app.prf
|
|
@@ -29,7 +29,7 @@ host_build:force_bootstrap {
|
|
target.path = $$[QT_HOST_BINS]
|
|
} else {
|
|
!build_pass:contains(QT_CONFIG, debug_and_release): CONFIG += release
|
|
- target.path = $$[QT_INSTALL_BINS]
|
|
+ target.path = $$NIX_OUTPUT_BIN/bin
|
|
CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable
|
|
}
|
|
INSTALLS += target
|
|
diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf
|
|
index 1848f00e90..2af93675c5 100644
|
|
--- a/mkspecs/features/qt_build_paths.prf
|
|
+++ b/mkspecs/features/qt_build_paths.prf
|
|
@@ -23,6 +23,6 @@ exists($$MODULE_BASE_INDIR/.git): \
|
|
!force_independent {
|
|
# If the module is not built independently, everything ends up in qtbase.
|
|
# This is the case in non-prefix builds, except for selected modules.
|
|
- MODULE_BASE_OUTDIR = $$[QT_HOST_PREFIX]
|
|
- MODULE_QMAKE_OUTDIR = $$[QT_HOST_PREFIX]
|
|
+ MODULE_BASE_OUTDIR = $$NIX_OUTPUT_OUT
|
|
+ MODULE_QMAKE_OUTDIR = $$NIX_OUTPUT_OUT
|
|
}
|
|
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
|
|
index 08b3f3e5af..5ffeafd9d8 100644
|
|
--- a/mkspecs/features/qt_common.prf
|
|
+++ b/mkspecs/features/qt_common.prf
|
|
@@ -30,8 +30,8 @@ contains(TEMPLATE, .*lib) {
|
|
qqt_libdir = \$\$\$\$[QT_HOST_LIBS]
|
|
qt_libdir = $$[QT_HOST_LIBS]
|
|
} else {
|
|
- qqt_libdir = \$\$\$\$[QT_INSTALL_LIBS]
|
|
- qt_libdir = $$[QT_INSTALL_LIBS]
|
|
+ qqt_libdir = \$\$\$\$NIX_OUTPUT_OUT/lib
|
|
+ qt_libdir = $$NIX_OUTPUT_OUT/lib
|
|
}
|
|
contains(QMAKE_DEFAULT_LIBDIRS, $$qt_libdir) {
|
|
lib_replace.match = "[^ ']*$$rplbase/lib"
|
|
diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
|
|
index 183d0c9502..17982b04ec 100644
|
|
--- a/mkspecs/features/qt_docs.prf
|
|
+++ b/mkspecs/features/qt_docs.prf
|
|
@@ -41,7 +41,7 @@ QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR
|
|
|
|
QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR)
|
|
!build_online_docs: \
|
|
- QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS])
|
|
+ QDOC += -installdir $$shell_quote($$NIX_OUTPUT_DOC)
|
|
PREP_DOC_INDEXES =
|
|
DOC_INDEXES =
|
|
!isEmpty(QTREPOS) {
|
|
@@ -60,8 +60,8 @@ DOC_INDEXES =
|
|
DOC_INDEXES += -indexdir $$shell_quote($$qrep/doc)
|
|
} else {
|
|
prepare_docs: \
|
|
- PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
|
|
- DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
|
|
+ PREP_DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC)
|
|
+ DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC)
|
|
}
|
|
doc_command = $$QDOC $$QMAKE_DOCS
|
|
prepare_docs {
|
|
@@ -75,12 +75,12 @@ prepare_docs {
|
|
qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch)
|
|
|
|
inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR
|
|
- inst_html_docs.path = $$[QT_INSTALL_DOCS]
|
|
+ inst_html_docs.path = $$NIX_OUTPUT_DOC
|
|
inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build
|
|
INSTALLS += inst_html_docs
|
|
|
|
inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
|
|
- inst_qch_docs.path = $$[QT_INSTALL_DOCS]
|
|
+ inst_qch_docs.path = $$NIX_OUTPUT_DOC
|
|
inst_qch_docs.CONFIG += no_check_exist no_default_install no_build
|
|
INSTALLS += inst_qch_docs
|
|
|
|
diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf
|
|
index 4c68cfd72f..f422f18266 100644
|
|
--- a/mkspecs/features/qt_example_installs.prf
|
|
+++ b/mkspecs/features/qt_example_installs.prf
|
|
@@ -70,7 +70,7 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples)
|
|
$$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
|
|
$$DBUS_ADAPTORS $$DBUS_INTERFACES
|
|
addInstallFiles(sources.files, $$sourcefiles)
|
|
- sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase
|
|
+ sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase
|
|
INSTALLS += sources
|
|
|
|
check_examples {
|
|
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
|
|
index 4a1d265a8b..d346424b5b 100644
|
|
--- a/mkspecs/features/qt_functions.prf
|
|
+++ b/mkspecs/features/qt_functions.prf
|
|
@@ -70,7 +70,7 @@ defineTest(qtHaveModule) {
|
|
defineTest(qtPrepareTool) {
|
|
cmd = $$eval(QT_TOOL.$${2}.binary)
|
|
isEmpty(cmd) {
|
|
- cmd = $$[QT_HOST_BINS]/$$2
|
|
+ cmd = $$system("command -v $$2")
|
|
exists($${cmd}.pl) {
|
|
cmd = perl -w $$system_path($${cmd}.pl)
|
|
} else: contains(QMAKE_HOST.os, Windows) {
|
|
diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
|
|
index 3a5dbb6274..24f321bd82 100644
|
|
--- a/mkspecs/features/qt_installs.prf
|
|
+++ b/mkspecs/features/qt_installs.prf
|
|
@@ -12,16 +12,10 @@
|
|
#library
|
|
!qt_no_install_library {
|
|
win32 {
|
|
- host_build: \
|
|
- dlltarget.path = $$[QT_HOST_BINS]
|
|
- else: \
|
|
- dlltarget.path = $$[QT_INSTALL_BINS]
|
|
+ dlltarget.path = $$NIX_OUTPUT_BIN/bin
|
|
INSTALLS += dlltarget
|
|
}
|
|
- host_build: \
|
|
- target.path = $$[QT_HOST_LIBS]
|
|
- else: \
|
|
- target.path = $$[QT_INSTALL_LIBS]
|
|
+ target.path = $$NIX_OUTPUT_OUT/lib
|
|
!static: target.CONFIG = no_dll
|
|
INSTALLS += target
|
|
}
|
|
@@ -29,33 +23,33 @@
|
|
#headers
|
|
qt_install_headers {
|
|
class_headers.files = $$SYNCQT.HEADER_CLASSES
|
|
- class_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
|
|
+ class_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME
|
|
INSTALLS += class_headers
|
|
|
|
targ_headers.files = $$SYNCQT.HEADER_FILES
|
|
- targ_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
|
|
+ targ_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME
|
|
INSTALLS += targ_headers
|
|
|
|
private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES
|
|
- private_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
|
|
+ private_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
|
|
INSTALLS += private_headers
|
|
|
|
qpa_headers.files = $$SYNCQT.QPA_HEADER_FILES
|
|
- qpa_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
|
|
+ qpa_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
|
|
INSTALLS += qpa_headers
|
|
}
|
|
|
|
#module
|
|
qt_install_module {
|
|
!isEmpty(MODULE_PRI) {
|
|
- pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
|
+ pritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules
|
|
pritarget.files = $$MODULE_PRI
|
|
INSTALLS += pritarget
|
|
} else: isEmpty(MODULE_PRIVATE_PRI) {
|
|
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.")
|
|
}
|
|
!isEmpty(MODULE_PRIVATE_PRI) {
|
|
- privpritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
|
+ privpritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules
|
|
privpritarget.files = $$MODULE_PRIVATE_PRI
|
|
INSTALLS += privpritarget
|
|
}
|
|
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
|
|
index 3cf6c7349c..83e68025a5 100644
|
|
--- a/mkspecs/features/qt_plugin.prf
|
|
+++ b/mkspecs/features/qt_plugin.prf
|
|
@@ -82,7 +82,7 @@ CONFIG(static, static|shared)|prefix_build {
|
|
}
|
|
}
|
|
|
|
-target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
|
|
+target.path = $$NIX_OUTPUT_PLUGIN/$$PLUGIN_TYPE
|
|
INSTALLS += target
|
|
|
|
TARGET = $$qt5LibraryTarget($$TARGET)
|
|
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
|
|
index 91a4eb619a..08b533e69c 100644
|
|
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
|
|
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
|
|
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::qmake)
|
|
add_executable(Qt5::qmake IMPORTED)
|
|
|
|
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
|
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
|
|
!!ELSE
|
|
set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
|
|
!!ENDIF
|
|
@@ -18,7 +18,7 @@ if (NOT TARGET Qt5::moc)
|
|
add_executable(Qt5::moc IMPORTED)
|
|
|
|
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
|
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
|
|
!!ELSE
|
|
set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
|
|
!!ENDIF
|
|
@@ -35,7 +35,7 @@ if (NOT TARGET Qt5::rcc)
|
|
add_executable(Qt5::rcc IMPORTED)
|
|
|
|
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
|
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
|
|
!!ELSE
|
|
set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
|
|
!!ENDIF
|
|
@@ -131,7 +131,7 @@ if (NOT TARGET Qt5::WinMain)
|
|
!!IF !isEmpty(CMAKE_RELEASE_TYPE)
|
|
set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
|
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
|
|
!!ELSE
|
|
set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
|
|
!!ENDIF
|
|
@@ -145,7 +145,7 @@ if (NOT TARGET Qt5::WinMain)
|
|
set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
|
|
|
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
|
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
|
|
!!ELSE
|
|
set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
|
|
!!ENDIF
|
|
diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in b/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
|
|
index c357237d0e..6f0c75de3c 100644
|
|
--- a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
|
|
+++ b/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
|
|
@@ -1,6 +1,6 @@
|
|
|
|
!!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE)
|
|
-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
|
|
+set(_qt5_corelib_extra_includes \"$$NIX_OUTPUT_DEV/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
|
|
!!ELSE
|
|
set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
|
|
!!ENDIF
|
|
diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in b/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
|
|
index 706304cf34..546420f6ad 100644
|
|
--- a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
|
|
+++ b/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
|
|
@@ -1,6 +1,6 @@
|
|
|
|
!!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE)
|
|
-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
|
|
+set(_qt5_corelib_extra_includes \"$$NIX_OUTPUT_DEV/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
|
|
!!ELSE
|
|
set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
|
|
!!ENDIF
|
|
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
|
|
index bd3c12ce97..a796775970 100644
|
|
--- a/src/corelib/kernel/qcoreapplication.cpp
|
|
+++ b/src/corelib/kernel/qcoreapplication.cpp
|
|
@@ -2533,6 +2533,15 @@ QStringList QCoreApplication::libraryPaths()
|
|
QStringList *app_libpaths = new QStringList;
|
|
coreappdata()->app_libpaths.reset(app_libpaths);
|
|
|
|
+ // Add library paths derived from PATH
|
|
+ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
|
|
+ const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX);
|
|
+ for (const QString &path: paths) {
|
|
+ if (!path.isEmpty()) {
|
|
+ app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir));
|
|
+ }
|
|
+ }
|
|
+
|
|
const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH");
|
|
if (!libPathEnv.isEmpty()) {
|
|
QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts);
|
|
diff --git a/src/corelib/tools/qtimezoneprivate_tz.cpp b/src/corelib/tools/qtimezoneprivate_tz.cpp
|
|
index c13c9a5223..6936851511 100644
|
|
--- a/src/corelib/tools/qtimezoneprivate_tz.cpp
|
|
+++ b/src/corelib/tools/qtimezoneprivate_tz.cpp
|
|
@@ -64,7 +64,11 @@ typedef QHash<QByteArray, QTzTimeZone> QTzTimeZoneHash;
|
|
// Parse zone.tab table, assume lists all installed zones, if not will need to read directories
|
|
static QTzTimeZoneHash loadTzTimeZones()
|
|
{
|
|
- QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab");
|
|
+ // Try TZDIR first, in case we're running on NixOS.
|
|
+ QString path = QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/zone.tab");
|
|
+ // Fallback to traditional paths in case we are not on NixOS.
|
|
+ if (!QFile::exists(path))
|
|
+ path = QStringLiteral("/usr/share/zoneinfo/zone.tab");
|
|
if (!QFile::exists(path))
|
|
path = QStringLiteral("/usr/lib/zoneinfo/zone.tab");
|
|
|
|
@@ -636,12 +640,16 @@ void QTzTimeZonePrivate::init(const QByteArray &ianaId)
|
|
if (!tzif.open(QIODevice::ReadOnly))
|
|
return;
|
|
} else {
|
|
- // Open named tz, try modern path first, if fails try legacy path
|
|
- tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId));
|
|
+ // Try TZDIR first, in case we're running on NixOS
|
|
+ tzif.setFileName(QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/") + QString::fromLocal8Bit(ianaId));
|
|
if (!tzif.open(QIODevice::ReadOnly)) {
|
|
- tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId));
|
|
- if (!tzif.open(QIODevice::ReadOnly))
|
|
- return;
|
|
+ // Open named tz, try modern path first, if fails try legacy path
|
|
+ tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId));
|
|
+ if (!tzif.open(QIODevice::ReadOnly)) {
|
|
+ tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId));
|
|
+ if (!tzif.open(QIODevice::ReadOnly))
|
|
+ return;
|
|
+ }
|
|
}
|
|
}
|
|
|
|
diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in
|
|
index 1d947159e2..b36865fc48 100644
|
|
--- a/src/dbus/Qt5DBusConfigExtras.cmake.in
|
|
+++ b/src/dbus/Qt5DBusConfigExtras.cmake.in
|
|
@@ -2,11 +2,7 @@
|
|
if (NOT TARGET Qt5::qdbuscpp2xml)
|
|
add_executable(Qt5::qdbuscpp2xml IMPORTED)
|
|
|
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
|
|
-!!ELSE
|
|
- set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
|
|
-!!ENDIF
|
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/bin/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
|
|
_qt5_DBus_check_file_exists(${imported_location})
|
|
|
|
set_target_properties(Qt5::qdbuscpp2xml PROPERTIES
|
|
@@ -17,11 +13,7 @@ endif()
|
|
if (NOT TARGET Qt5::qdbusxml2cpp)
|
|
add_executable(Qt5::qdbusxml2cpp IMPORTED)
|
|
|
|
-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
|
|
-!!ELSE
|
|
- set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
|
|
-!!ENDIF
|
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/bin/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
|
|
_qt5_DBus_check_file_exists(${imported_location})
|
|
|
|
set_target_properties(Qt5::qdbusxml2cpp PROPERTIES
|
|
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
|
|
index 07869efd7d..fb4183bada 100644
|
|
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
|
|
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
|
|
@@ -2,7 +2,7 @@
|
|
!!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
|
|
|
|
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
|
|
-set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\")
|
|
+set(Qt5Gui_EGL_INCLUDE_DIRS \"$$NIX_OUTPUT_DEV/$$CMAKE_INCLUDE_DIR/QtANGLE\")
|
|
!!ELSE
|
|
set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\")
|
|
!!ENDIF
|
|
@@ -17,13 +17,13 @@ macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATIO
|
|
set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
|
|
|
|
!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
+ set(imported_location \"$$NIX_OUTPUT_OUT/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
!!ELSE
|
|
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
|
|
!!ENDIF
|
|
|
|
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
|
- set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
|
+ set(imported_implib \"$$NIX_OUTPUT_OUT/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
|
!!ELSE
|
|
set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
|
|
!!ENDIF
|
|
diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp
|
|
index 584f0b0f0e..24d80063f2 100644
|
|
--- a/src/network/kernel/qdnslookup_unix.cpp
|
|
+++ b/src/network/kernel/qdnslookup_unix.cpp
|
|
@@ -83,7 +83,7 @@ static bool resolveLibraryInternal()
|
|
if (!lib.load())
|
|
#endif
|
|
{
|
|
- lib.setFileName(QLatin1String("resolv"));
|
|
+ lib.setFileName(QLatin1String(NIXPKGS_LIBRESOLV));
|
|
if (!lib.load())
|
|
return false;
|
|
}
|
|
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
|
|
index dabf1913cc..53bb867e07 100644
|
|
--- a/src/network/kernel/qhostinfo_unix.cpp
|
|
+++ b/src/network/kernel/qhostinfo_unix.cpp
|
|
@@ -94,7 +94,7 @@ static bool resolveLibraryInternal()
|
|
if (!lib.load())
|
|
#endif
|
|
{
|
|
- lib.setFileName(QLatin1String("resolv"));
|
|
+ lib.setFileName(QLatin1String(NIXPKGS_LIBRESOLV));
|
|
if (!lib.load())
|
|
return false;
|
|
}
|
|
diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
|
|
index 68caaeb6dc..fef4a81474 100644
|
|
--- a/src/network/ssl/qsslcontext_openssl.cpp
|
|
+++ b/src/network/ssl/qsslcontext_openssl.cpp
|
|
@@ -340,7 +340,7 @@ init_context:
|
|
|
|
const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves();
|
|
if (!qcurves.isEmpty()) {
|
|
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
|
|
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC)
|
|
// Set the curves to be used
|
|
if (q_SSLeay() >= 0x10002000L) {
|
|
// SSL_CTX_ctrl wants a non-const pointer as last argument,
|
|
@@ -354,7 +354,7 @@ init_context:
|
|
return sslContext;
|
|
}
|
|
} else
|
|
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
|
|
+#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC)
|
|
{
|
|
// specific curves requested, but not possible to set -> error
|
|
sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2"));
|
|
diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
|
|
index 338c7ca3be..dd52114bac 100644
|
|
--- a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
|
|
+++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp
|
|
@@ -251,12 +251,9 @@ void TableGenerator::initPossibleLocations()
|
|
// the QTCOMPOSE environment variable
|
|
if (qEnvironmentVariableIsSet("QTCOMPOSE"))
|
|
m_possibleLocations.append(QString::fromLocal8Bit(qgetenv("QTCOMPOSE")));
|
|
- m_possibleLocations.append(QStringLiteral("/usr/share/X11/locale"));
|
|
- m_possibleLocations.append(QStringLiteral("/usr/local/share/X11/locale"));
|
|
- m_possibleLocations.append(QStringLiteral("/usr/lib/X11/locale"));
|
|
- m_possibleLocations.append(QStringLiteral("/usr/local/lib/X11/locale"));
|
|
m_possibleLocations.append(QStringLiteral(X11_PREFIX "/share/X11/locale"));
|
|
m_possibleLocations.append(QStringLiteral(X11_PREFIX "/lib/X11/locale"));
|
|
+ m_possibleLocations.append(QLatin1String(NIXPKGS_QTCOMPOSE));
|
|
}
|
|
|
|
QString TableGenerator::findComposeFile()
|
|
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
|
index c2b7a562a9..4fa5f6d6a5 100644
|
|
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
|
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
|
@@ -570,7 +570,14 @@ void (*QGLXContext::getProcAddress(const QByteArray &procName)) ()
|
|
#ifndef QT_NO_LIBRARY
|
|
extern const QString qt_gl_library_name();
|
|
// QLibrary lib(qt_gl_library_name());
|
|
+ // Check system library paths first
|
|
QLibrary lib(QLatin1String("GL"));
|
|
+#ifdef NIXPKGS_MESA_GL
|
|
+ if (!lib.load()) {
|
|
+ // Fallback to Mesa driver
|
|
+ lib.setFileName(QLatin1String(NIXPKGS_MESA_GL));
|
|
+ }
|
|
+#endif // NIXPKGS_MESA_GL
|
|
glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
|
|
#endif
|
|
}
|
|
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
|
|
index 4646ced954..ff3111f393 100644
|
|
--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
|
|
+++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
|
|
@@ -303,10 +303,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen)
|
|
#if defined(XCB_USE_XLIB) && !defined(QT_NO_LIBRARY)
|
|
static bool function_ptrs_not_initialized = true;
|
|
if (function_ptrs_not_initialized) {
|
|
- QLibrary xcursorLib(QLatin1String("Xcursor"), 1);
|
|
+ QLibrary xcursorLib(QLatin1String(NIXPKGS_LIBXCURSOR), 1);
|
|
bool xcursorFound = xcursorLib.load();
|
|
if (!xcursorFound) { // try without the version number
|
|
- xcursorLib.setFileName(QLatin1String("Xcursor"));
|
|
+ xcursorLib.setFileName(QLatin1String(NIXPKGS_LIBXCURSOR));
|
|
xcursorFound = xcursorLib.load();
|
|
}
|
|
if (xcursorFound) {
|
|
diff --git a/src/testlib/qtestassert.h b/src/testlib/qtestassert.h
|
|
index ca3e02ca06..28dd73d772 100644
|
|
--- a/src/testlib/qtestassert.h
|
|
+++ b/src/testlib/qtestassert.h
|
|
@@ -38,10 +38,13 @@
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
-
|
|
-#define QTEST_ASSERT(cond) do { if (!(cond)) qt_assert(#cond,__FILE__,__LINE__); } while (0)
|
|
-
|
|
-#define QTEST_ASSERT_X(cond, where, what) do { if (!(cond)) qt_assert_x(where, what,__FILE__,__LINE__); } while (0)
|
|
+#if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
|
|
+#define QTEST_ASSERT(cond) do { } while ((false) && (cond))
|
|
+#define QTEST_ASSERT_X(cond, where, what) do { } while ((false) && (cond))
|
|
+#else
|
|
+#define QTEST_ASSERT(cond) do { if (!(cond)) qt_assert(#cond,__FILE__,__LINE__); } while (false)
|
|
+#define QTEST_ASSERT_X(cond, where, what) do { if (!(cond)) qt_assert_x(where, what,__FILE__,__LINE__); } while (false)
|
|
+#endif
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
|
|
index 99d87e2e46..a4eab2aa72 100644
|
|
--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in
|
|
+++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
|
|
@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic)
|
|
add_executable(Qt5::uic IMPORTED)
|
|
|
|
!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
|
|
- set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
|
|
+ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
|
|
!!ELSE
|
|
set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
|
|
!!ENDIF
|