85919d29e2
Issue #2424
180 lines
7.2 KiB
Diff
180 lines
7.2 KiB
Diff
qt5_tools.patch
|
|
|
|
From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
|
|
|
Support out-of-tree build of Qt host tools.
|
|
This patch should not be applied when running the Qt 'configure' script.
|
|
---
|
|
qtbase/mkspecs/features/qt.prf | 2 -
|
|
qtbase/mkspecs/features/qt_build_config.prf | 2 -
|
|
qtbase/mkspecs/features/qt_module.prf | 4 +
|
|
qtbase/mkspecs/features/qt_tool.prf | 94 ++++++++++++++-------------
|
|
qtbase/qmake/Makefile.unix | 2 -
|
|
5 files changed, 52 insertions(+), 52 deletions(-)
|
|
|
|
diff --git a/qtbase/mkspecs/features/qt.prf b/qtbase/mkspecs/features/qt.prf
|
|
index be08a2a..ea41489 100644
|
|
--- a/qtbase/mkspecs/features/qt.prf
|
|
+++ b/qtbase/mkspecs/features/qt.prf
|
|
@@ -151,7 +151,7 @@ for(ever) {
|
|
WINRT_MANIFEST.capabilities_device_default += $$MODULE_WINRT_CAPABILITIES_DEVICE
|
|
}
|
|
}
|
|
- !isEmpty(BAD_QT):error("Unknown module(s) in QT$$var_sfx: $$replace(BAD_QT, _private$, -private)")
|
|
+ !isEmpty(BAD_QT):debug("Unknown module(s) in QT$$var_sfx: $$replace(BAD_QT, _private$, -private)")
|
|
|
|
!isEmpty(var_sfx): break()
|
|
var_sfx = _PRIVATE
|
|
diff --git a/qtbase/mkspecs/features/qt_build_config.prf b/qtbase/mkspecs/features/qt_build_config.prf
|
|
index 1e2d5c2..4f7e611 100644
|
|
--- a/qtbase/mkspecs/features/qt_build_config.prf
|
|
+++ b/qtbase/mkspecs/features/qt_build_config.prf
|
|
@@ -12,7 +12,7 @@
|
|
!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
|
|
QMAKE_QT_MODULE = $$[QT_HOST_DATA/get]/mkspecs/qmodule.pri
|
|
!exists($$QMAKE_QT_MODULE)|!include($$QMAKE_QT_MODULE, "", true) {
|
|
- error("Cannot load qmodule.pri!")
|
|
+ debug(1, "Cannot load qmodule.pri!")
|
|
} else {
|
|
debug(1, "Loaded qmodule.pri from ($$QMAKE_QT_MODULE)")
|
|
}
|
|
diff --git a/qtbase/mkspecs/features/qt_module.prf b/qtbase/mkspecs/features/qt_module.prf
|
|
index 22e2dd5..7141d22 100644
|
|
--- a/qtbase/mkspecs/features/qt_module.prf
|
|
+++ b/qtbase/mkspecs/features/qt_module.prf
|
|
@@ -21,7 +21,7 @@ load(qt_build_config) # loads qmodule.pri if hasn't been loaded already
|
|
|
|
isEmpty(MODULE):MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
|
|
isEmpty(VERSION): VERSION = $$MODULE_VERSION
|
|
-isEmpty(VERSION): error("Module does not define version.")
|
|
+isEmpty(VERSION): debug(1, "Module does not define version.")
|
|
|
|
# Compile as shared/DLL or static according to the option given to configure
|
|
# unless overridden. Host builds are always static
|
|
@@ -82,7 +82,7 @@ QMAKE_DOCS_TARGETDIR = qt$${MODULE}
|
|
|
|
load(qt_common)
|
|
!no_module_headers: load(qt_module_headers)
|
|
-load(qt_module_pris)
|
|
+#load(qt_module_pris)
|
|
|
|
INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}_private.includes)
|
|
|
|
diff --git a/qtbase/mkspecs/features/qt_tool.prf b/qtbase/mkspecs/features/qt_tool.prf
|
|
index 839c3d6..6d88db7 100644
|
|
--- a/qtbase/mkspecs/features/qt_tool.prf
|
|
+++ b/qtbase/mkspecs/features/qt_tool.prf
|
|
@@ -17,52 +17,52 @@ DEFINES *= QT_USE_QSTRINGBUILDER
|
|
# If we are doing a prefix build, create a "module" pri which enables
|
|
# qtPrepareTool() to work with the non-installed build.
|
|
# Non-bootstrapped tools always need this because of the environment setup.
|
|
-!build_pass:if(!host_build|!force_bootstrap|force_independent) {
|
|
- isEmpty(MODULE):MODULE = $$TARGET
|
|
-
|
|
- !host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, _private)
|
|
-
|
|
- load(qt_build_paths)
|
|
-
|
|
- load(resolve_target)
|
|
-
|
|
- TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri
|
|
-
|
|
- vars = binary depends
|
|
- !isEmpty(QT_TOOL_ENV) {
|
|
- vars += envvars
|
|
- module_var_names =
|
|
- module_var_sets =
|
|
- for(var, QT_TOOL_ENV) {
|
|
- vars += env.$${var}.name env.$${var}.value
|
|
- module_var_names += QT_TOOL.$${MODULE}.env.$${var}
|
|
- module_var_sets += \
|
|
- "QT_TOOL.$${MODULE}.env.$${var}.name = $$val_escape($${var}.name)" \
|
|
- "QT_TOOL.$${MODULE}.env.$${var}.value = $$val_escape($${var}.value)"
|
|
- }
|
|
- module_envvars = \
|
|
- "QT_TOOL.$${MODULE}.envvars = $$module_var_names" \
|
|
- $$module_var_sets
|
|
- } else {
|
|
- module_envvars =
|
|
- }
|
|
- bin = $$system_path($$QMAKE_RESOLVED_TARGET)
|
|
- TOOL_PRI_CONT = \
|
|
- "QT_TOOL.$${MODULE}.binary = $$val_escape(bin)" \
|
|
- "QT_TOOL.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
|
|
- $$module_envvars
|
|
- write_file($$TOOL_PRI, TOOL_PRI_CONT)|error("Aborting.")
|
|
-
|
|
- # Then, inject the new tool into the current cache state
|
|
- !contains(QMAKE_INTERNAL_INCLUDED_FILES, $$TOOL_PRI) { # before the actual include()!
|
|
- added = $$TOOL_PRI
|
|
- cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added)
|
|
- unset(added)
|
|
- }
|
|
- include($$TOOL_PRI)
|
|
- for(var, vars): \
|
|
- cache(QT_TOOL.$${MODULE}.$$var, transient)
|
|
-
|
|
-}
|
|
+#!build_pass:if(!host_build|!force_bootstrap|force_independent) {
|
|
+# isEmpty(MODULE):MODULE = $$TARGET
|
|
+#
|
|
+# !host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, _private)
|
|
+#
|
|
+# load(qt_build_paths)
|
|
+#
|
|
+# load(resolve_target)
|
|
+#
|
|
+# TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri
|
|
+#
|
|
+# vars = binary depends
|
|
+# !isEmpty(QT_TOOL_ENV) {
|
|
+# vars += envvars
|
|
+# module_var_names =
|
|
+# module_var_sets =
|
|
+# for(var, QT_TOOL_ENV) {
|
|
+# vars += env.$${var}.name env.$${var}.value
|
|
+# module_var_names += QT_TOOL.$${MODULE}.env.$${var}
|
|
+# module_var_sets += \
|
|
+# "QT_TOOL.$${MODULE}.env.$${var}.name = $$val_escape($${var}.name)" \
|
|
+# "QT_TOOL.$${MODULE}.env.$${var}.value = $$val_escape($${var}.value)"
|
|
+# }
|
|
+# module_envvars = \
|
|
+# "QT_TOOL.$${MODULE}.envvars = $$module_var_names" \
|
|
+# $$module_var_sets
|
|
+# } else {
|
|
+# module_envvars =
|
|
+# }
|
|
+# bin = $$system_path($$QMAKE_RESOLVED_TARGET)
|
|
+# TOOL_PRI_CONT = \
|
|
+# "QT_TOOL.$${MODULE}.binary = $$val_escape(bin)" \
|
|
+# "QT_TOOL.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
|
|
+# $$module_envvars
|
|
+# write_file($$TOOL_PRI, TOOL_PRI_CONT)|error("Aborting.")
|
|
+#
|
|
+# # Then, inject the new tool into the current cache state
|
|
+# !contains(QMAKE_INTERNAL_INCLUDED_FILES, $$TOOL_PRI) { # before the actual include()!
|
|
+# added = $$TOOL_PRI
|
|
+# cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added)
|
|
+# unset(added)
|
|
+# }
|
|
+# include($$TOOL_PRI)
|
|
+# for(var, vars): \
|
|
+# cache(QT_TOOL.$${MODULE}.$$var, transient)
|
|
+#
|
|
+#}
|
|
# The variable is re-used by qtPrepareTool(), and we really don't want that.
|
|
unset(QT_TOOL_ENV)
|
|
diff --git a/qtbase/qmake/Makefile.unix b/qtbase/qmake/Makefile.unix
|
|
index 405bbf9..cf5fa02 100644
|
|
--- a/qtbase/qmake/Makefile.unix
|
|
+++ b/qtbase/qmake/Makefile.unix
|
|
@@ -229,7 +229,7 @@ qsettings.o: $(SOURCE_PATH)/src/corelib/io/qsettings.cpp
|
|
qsystemerror.o: $(SOURCE_PATH)/src/corelib/kernel/qsystemerror.cpp
|
|
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/kernel/qsystemerror.cpp
|
|
|
|
-qlibraryinfo.o: $(SOURCE_PATH)/src/corelib/global/qlibraryinfo.cpp $(BUILD_PATH)/src/corelib/global/qconfig.cpp
|
|
+qlibraryinfo.o: $(SOURCE_PATH)/src/corelib/global/qlibraryinfo.cpp
|
|
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qlibraryinfo.cpp
|
|
|
|
qnumeric.o: $(SOURCE_PATH)/src/corelib/global/qnumeric.cpp
|