diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2014-06-04 17:12:58 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-06-10 12:11:52 +0200 |
commit | b4e270f9e2e5c632f0958af1a5131efb45bcd799 (patch) | |
tree | 9c0fe3a4f0fda7c9de63b55e8d8549c55d166410 /recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch | |
parent | 06c25e6a6b9ff6f36f91412b2f8e10e8cd39bf3b (diff) | |
download | meta-qt5-b4e270f9e2e5c632f0958af1a5131efb45bcd799.tar.gz |
qtbase: Refresh patches to match with stable* branches on github.com/meta-qt5
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch')
-rw-r--r-- | recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch | 296 |
1 files changed, 296 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch b/recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch new file mode 100644 index 00000000..44d17ca6 --- /dev/null +++ b/recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch | |||
@@ -0,0 +1,296 @@ | |||
1 | From b45d963702c139ea4f5b5ce572d046511a878d81 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Sat, 6 Apr 2013 13:15:07 +0200 | ||
4 | Subject: [PATCH 03/12] Add -external-hostbindir option | ||
5 | |||
6 | * when cross-compiling it's sometimes useful to use existing tools from machine | ||
7 | (or in OpenEmbedded built with separate native recipe) when building for target | ||
8 | |||
9 | * this way we can skip bootstraping tools we already have | ||
10 | |||
11 | * qt_functions: temporary remove isEmpty check | ||
12 | * now we assume that every build will provide QT_EXTERNAL_HOST_BINS value | ||
13 | * isEmpty works correctly only with qmake variables (e.g. $$FOO - | ||
14 | isEmpty(FOO)), but doesn't work with system properties like $$[FOO]. | ||
15 | |||
16 | * cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to determine path to host binaries | ||
17 | |||
18 | Upstream-Status: Pending | ||
19 | is a lot better for upstreaming (and it was already sort of approved by | ||
20 | Oswald) but in 5.2.0 I've noticed that he added something similar for | ||
21 | android builds | ||
22 | |||
23 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
24 | Signed-off-by: Simon Busch <morphis@gravedo.de> | ||
25 | --- | ||
26 | configure | 15 +++++++++++++++ | ||
27 | mkspecs/features/qt_functions.prf | 2 +- | ||
28 | mkspecs/features/qt_tool.prf | 3 +-- | ||
29 | qmake/property.cpp | 1 + | ||
30 | qtbase.pro | 12 +++++++++--- | ||
31 | src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++--- | ||
32 | src/corelib/global/qlibraryinfo.cpp | 3 ++- | ||
33 | src/corelib/global/qlibraryinfo.h | 1 + | ||
34 | src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++-- | ||
35 | src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +- | ||
36 | tools/configure/configureapp.cpp | 8 ++++++++ | ||
37 | 11 files changed, 44 insertions(+), 13 deletions(-) | ||
38 | |||
39 | diff --git a/configure b/configure | ||
40 | index 4eae0d3..48d5119 100755 | ||
41 | --- a/configure | ||
42 | +++ b/configure | ||
43 | @@ -777,6 +777,7 @@ QT_HOST_BINS= | ||
44 | QT_HOST_LIBS= | ||
45 | QT_HOST_DATA= | ||
46 | QT_EXT_PREFIX= | ||
47 | +QT_EXTERNAL_HOST_BINS= | ||
48 | |||
49 | #flags for SQL drivers | ||
50 | QT_CFLAGS_PSQL= | ||
51 | @@ -896,6 +897,7 @@ while [ "$#" -gt 0 ]; do | ||
52 | -testsdir| \ | ||
53 | -hostdatadir| \ | ||
54 | -hostbindir| \ | ||
55 | + -external-hostbindir| \ | ||
56 | -hostlibdir| \ | ||
57 | -extprefix| \ | ||
58 | -sysroot| \ | ||
59 | @@ -1110,6 +1112,9 @@ while [ "$#" -gt 0 ]; do | ||
60 | extprefix) | ||
61 | QT_EXT_PREFIX="$VAL" | ||
62 | ;; | ||
63 | + external-hostbindir) | ||
64 | + QT_EXTERNAL_HOST_BINS="$VAL" | ||
65 | + ;; | ||
66 | pkg-config) | ||
67 | if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then | ||
68 | CFG_PKGCONFIG="$VAL" | ||
69 | @@ -2248,6 +2253,10 @@ Installation options: | ||
70 | -hostdatadir <dir> . Data used by qmake will be installed to <dir> | ||
71 | (default HOSTPREFIX) | ||
72 | |||
73 | + -external-hostbindir <dir> Use external host executables instead of building them | ||
74 | + (not used by defaut) | ||
75 | + | ||
76 | + | ||
77 | Configure options: | ||
78 | |||
79 | The defaults (*) are usually acceptable. A plus (+) denotes a default value | ||
80 | @@ -2915,6 +2924,11 @@ fi | ||
81 | # command line and environment validation | ||
82 | #------------------------------------------------------------------------------- | ||
83 | |||
84 | +# default is empty, don't call makeabs if it is empty | ||
85 | +if [ ! -z "$QT_EXTERNAL_HOST_BINS" ]; then | ||
86 | + QT_EXTERNAL_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_EXTERNAL_HOST_BINS"` | ||
87 | +fi | ||
88 | + | ||
89 | # update QT_CONFIG to show our current predefined configuration | ||
90 | CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h | ||
91 | case "$CFG_QCONFIG" in | ||
92 | @@ -3595,6 +3609,7 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = { | ||
93 | "qt_hbinpath=$QT_HOST_BINS", | ||
94 | "qt_hlibpath=$QT_HOST_LIBS", | ||
95 | "qt_hdatpath=$QT_HOST_DATA", | ||
96 | + "qt_ebinpath=$QT_EXTERNAL_HOST_BINS", | ||
97 | "qt_targspec=$shortxspec", | ||
98 | "qt_hostspec=$shortspec", | ||
99 | #endif | ||
100 | diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf | ||
101 | index d41fe3b..050a4a7 100644 | ||
102 | --- a/mkspecs/features/qt_functions.prf | ||
103 | +++ b/mkspecs/features/qt_functions.prf | ||
104 | @@ -193,7 +193,7 @@ defineTest(qtAddRpathLink) { | ||
105 | defineTest(qtPrepareTool) { | ||
106 | cmd = $$eval(QT_TOOL.$${2}.binary) | ||
107 | isEmpty(cmd) { | ||
108 | - cmd = $$[QT_HOST_BINS]/$$2 | ||
109 | + cmd = $$[QT_EXTERNAL_HOST_BINS]/$$2 | ||
110 | exists($${cmd}.pl) { | ||
111 | cmd = perl -w $$system_path($${cmd}.pl) | ||
112 | } else: contains(QMAKE_HOST.os, Windows) { | ||
113 | diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf | ||
114 | index 1d3e88c..bd44754 100644 | ||
115 | --- a/mkspecs/features/qt_tool.prf | ||
116 | +++ b/mkspecs/features/qt_tool.prf | ||
117 | @@ -15,8 +15,7 @@ CONFIG += console | ||
118 | |||
119 | # If we are doing a prefix build, create a "module" pri which enables | ||
120 | # qtPrepareTool() to work with the non-installed build. | ||
121 | -# Non-bootstrapped tools always need this because of the environment setup. | ||
122 | -!build_pass:if(!host_build|!force_bootstrap|force_independent) { | ||
123 | +!build_pass:if(!host_build|!force_bootstrap|force_independent):!exists($$[QT_EXTERNAL_HOST_BINS]) { | ||
124 | isEmpty(MODULE):MODULE = $$TARGET | ||
125 | |||
126 | !host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, _private) | ||
127 | diff --git a/qmake/property.cpp b/qmake/property.cpp | ||
128 | index e50485c..71291ad 100644 | ||
129 | --- a/qmake/property.cpp | ||
130 | +++ b/qmake/property.cpp | ||
131 | @@ -75,6 +75,7 @@ static const struct { | ||
132 | { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true }, | ||
133 | { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true }, | ||
134 | { "QT_HOST_LIBS", QLibraryInfo::HostLibrariesPath, true }, | ||
135 | + { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true }, | ||
136 | { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true }, | ||
137 | { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true }, | ||
138 | }; | ||
139 | diff --git a/qtbase.pro b/qtbase.pro | ||
140 | index d6861cf..92e6a83 100644 | ||
141 | --- a/qtbase.pro | ||
142 | +++ b/qtbase.pro | ||
143 | @@ -71,16 +71,22 @@ CONFIG -= qt | ||
144 | |||
145 | #qmake | ||
146 | qmake.path = $$[QT_HOST_BINS] | ||
147 | +qmake.files = $$OUT_PWD/bin/qmake | ||
148 | +!isEmpty($$[QT_EXTERNAL_HOST_BINS]) { | ||
149 | + qmake.files = $$[QT_EXTERNAL_HOST_BINS]/bin/qmake | ||
150 | +} | ||
151 | equals(QMAKE_HOST.os, Windows) { | ||
152 | - qmake.files = $$OUT_PWD/bin/qmake.exe | ||
153 | -} else { | ||
154 | - qmake.files = $$OUT_PWD/bin/qmake | ||
155 | + qmake.files = $${qmake.files}.exe | ||
156 | } | ||
157 | INSTALLS += qmake | ||
158 | |||
159 | #syncqt | ||
160 | syncqt.path = $$[QT_HOST_BINS] | ||
161 | syncqt.files = $$PWD/bin/syncqt.pl | ||
162 | +syncqt.files = $$PWD/bin/syncqt.pl | ||
163 | +!isEmpty($$[QT_EXTERNAL_HOST_BINS]) { | ||
164 | + syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/bin/syncqt.pl | ||
165 | +} | ||
166 | INSTALLS += syncqt | ||
167 | |||
168 | # If we are doing a prefix build, create a "module" pri which enables | ||
169 | diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in | ||
170 | index 9bda70e..6e3605a 100644 | ||
171 | --- a/src/corelib/Qt5CoreConfigExtras.cmake.in | ||
172 | +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in | ||
173 | @@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qmake) | ||
174 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
175 | set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") | ||
176 | !!ELSE | ||
177 | - set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") | ||
178 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qmake$$CMAKE_BIN_SUFFIX\") | ||
179 | !!ENDIF | ||
180 | _qt5_Core_check_file_exists(${imported_location}) | ||
181 | |||
182 | @@ -20,7 +20,7 @@ if (NOT TARGET Qt5::moc) | ||
183 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
184 | set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") | ||
185 | !!ELSE | ||
186 | - set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") | ||
187 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/moc$$CMAKE_BIN_SUFFIX\") | ||
188 | !!ENDIF | ||
189 | _qt5_Core_check_file_exists(${imported_location}) | ||
190 | |||
191 | @@ -37,7 +37,7 @@ if (NOT TARGET Qt5::rcc) | ||
192 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
193 | set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") | ||
194 | !!ELSE | ||
195 | - set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") | ||
196 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/rcc$$CMAKE_BIN_SUFFIX\") | ||
197 | !!ENDIF | ||
198 | _qt5_Core_check_file_exists(${imported_location}) | ||
199 | |||
200 | diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp | ||
201 | index 80e0f30..89e13cf 100644 | ||
202 | --- a/src/corelib/global/qlibraryinfo.cpp | ||
203 | +++ b/src/corelib/global/qlibraryinfo.cpp | ||
204 | @@ -336,7 +336,7 @@ QLibraryInfo::isDebugBuild() | ||
205 | */ | ||
206 | |||
207 | static const struct { | ||
208 | - char key[19], value[13]; | ||
209 | + char key[21], value[13]; | ||
210 | } qtConfEntries[] = { | ||
211 | { "Prefix", "." }, | ||
212 | { "Documentation", "doc" }, // should be ${Data}/doc | ||
213 | @@ -362,6 +362,7 @@ static const struct { | ||
214 | { "HostBinaries", "bin" }, | ||
215 | { "HostLibraries", "lib" }, | ||
216 | { "HostData", "." }, | ||
217 | + { "ExternalHostBinaries", "" }, | ||
218 | { "TargetSpec", "" }, | ||
219 | { "HostSpec", "" }, | ||
220 | #endif | ||
221 | diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h | ||
222 | index 0b573c2..b5535ee 100644 | ||
223 | --- a/src/corelib/global/qlibraryinfo.h | ||
224 | +++ b/src/corelib/global/qlibraryinfo.h | ||
225 | @@ -88,6 +88,7 @@ public: | ||
226 | HostBinariesPath, | ||
227 | HostLibrariesPath, | ||
228 | HostDataPath, | ||
229 | + ExternalHostBinariesPath, | ||
230 | TargetSpecPath, | ||
231 | HostSpecPath, | ||
232 | LastHostPath = HostSpecPath, | ||
233 | diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in | ||
234 | index 1d94715..301af8f 100644 | ||
235 | --- a/src/dbus/Qt5DBusConfigExtras.cmake.in | ||
236 | +++ b/src/dbus/Qt5DBusConfigExtras.cmake.in | ||
237 | @@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml) | ||
238 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
239 | set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") | ||
240 | !!ELSE | ||
241 | - set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") | ||
242 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") | ||
243 | !!ENDIF | ||
244 | _qt5_DBus_check_file_exists(${imported_location}) | ||
245 | |||
246 | @@ -20,7 +20,7 @@ if (NOT TARGET Qt5::qdbusxml2cpp) | ||
247 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
248 | set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") | ||
249 | !!ELSE | ||
250 | - set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") | ||
251 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") | ||
252 | !!ENDIF | ||
253 | _qt5_DBus_check_file_exists(${imported_location}) | ||
254 | |||
255 | diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in | ||
256 | index 99d87e2..5621dc0 100644 | ||
257 | --- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in | ||
258 | +++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in | ||
259 | @@ -5,7 +5,7 @@ if (NOT TARGET Qt5::uic) | ||
260 | !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) | ||
261 | set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") | ||
262 | !!ELSE | ||
263 | - set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") | ||
264 | + set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/uic$$CMAKE_BIN_SUFFIX\") | ||
265 | !!ENDIF | ||
266 | _qt5_Widgets_check_file_exists(${imported_location}) | ||
267 | |||
268 | diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp | ||
269 | index b756509..7e61845 100644 | ||
270 | --- a/tools/configure/configureapp.cpp | ||
271 | +++ b/tools/configure/configureapp.cpp | ||
272 | @@ -1213,6 +1213,13 @@ void Configure::parseCmdLine() | ||
273 | dictionary[ "QT_EXT_PREFIX" ] = configCmdLine.at(i); | ||
274 | } | ||
275 | |||
276 | + else if (configCmdLine.at(i) == "-external-hostbindir") { | ||
277 | + ++i; | ||
278 | + if (i == argCount) | ||
279 | + break; | ||
280 | + dictionary[ "QT_EXTERNAL_HOST_BINS" ] = configCmdLine.at(i); | ||
281 | + } | ||
282 | + | ||
283 | else if (configCmdLine.at(i) == "-make-tool") { | ||
284 | ++i; | ||
285 | if (i == argCount) | ||
286 | @@ -3983,6 +3990,7 @@ void Configure::generateQConfigCpp() | ||
287 | << " \"qt_hbinpath=" << formatPath(dictionary["QT_HOST_BINS"]) << "\"," << endl | ||
288 | << " \"qt_hlibpath=" << formatPath(dictionary["QT_HOST_LIBS"]) << "\"," << endl | ||
289 | << " \"qt_hdatpath=" << formatPath(dictionary["QT_HOST_DATA"]) << "\"," << endl | ||
290 | + << " \"qt_ebinpath=" << formatPath(dictionary["QT_EXTERNAL_HOST_BINS"]) << "\"," << endl | ||
291 | << " \"qt_targspec=" << targSpec << "\"," << endl | ||
292 | << " \"qt_hostspec=" << hostSpec << "\"," << endl | ||
293 | << "#endif" << endl | ||
294 | -- | ||
295 | 2.0.0 | ||
296 | |||