diff options
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 | 217 |
1 files changed, 0 insertions, 217 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 deleted file mode 100644 index b80189f3..00000000 --- a/recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch +++ /dev/null | |||
@@ -1,217 +0,0 @@ | |||
1 | From 6e92a3eac477a534226f916018a6ba6996eff318 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/23] 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 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
14 | --- | ||
15 | configure | 14 ++++++++++++++ | ||
16 | mkspecs/features/qt_functions.prf | 5 ++++- | ||
17 | mkspecs/features/qt_tool.prf | 2 +- | ||
18 | qmake/property.cpp | 1 + | ||
19 | qtbase.pro | 12 +++++++++--- | ||
20 | src/corelib/global/qlibraryinfo.cpp | 3 ++- | ||
21 | src/corelib/global/qlibraryinfo.h | 1 + | ||
22 | tools/configure/configureapp.cpp | 8 ++++++++ | ||
23 | 8 files changed, 40 insertions(+), 6 deletions(-) | ||
24 | |||
25 | diff --git a/configure b/configure | ||
26 | index dacfd30..25980c0 100755 | ||
27 | --- a/configure | ||
28 | +++ b/configure | ||
29 | @@ -1046,6 +1046,7 @@ QT_HOST_PREFIX= | ||
30 | QT_HOST_BINS= | ||
31 | QT_HOST_LIBS= | ||
32 | QT_HOST_DATA= | ||
33 | +QT_EXTERNAL_HOST_BINS= | ||
34 | |||
35 | #flags for SQL drivers | ||
36 | QT_CFLAGS_PSQL= | ||
37 | @@ -1170,6 +1171,7 @@ while [ "$#" -gt 0 ]; do | ||
38 | -testsdir| \ | ||
39 | -hostdatadir| \ | ||
40 | -hostbindir| \ | ||
41 | + -external-hostbindir| \ | ||
42 | -hostlibdir| \ | ||
43 | -sysroot| \ | ||
44 | -depths| \ | ||
45 | @@ -1379,6 +1381,9 @@ while [ "$#" -gt 0 ]; do | ||
46 | hostlibdir) | ||
47 | QT_HOST_LIBS="$VAL" | ||
48 | ;; | ||
49 | + external-hostbindir) | ||
50 | + QT_EXTERNAL_HOST_BINS="$VAL" | ||
51 | + ;; | ||
52 | pkg-config) | ||
53 | if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then | ||
54 | CFG_PKGCONFIG="$VAL" | ||
55 | @@ -3248,6 +3253,11 @@ if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then | ||
56 | QMAKE_CONFIG="$QMAKE_CONFIG compile_examples" | ||
57 | fi | ||
58 | |||
59 | +# default is empty, don't call makeabs if it is empty | ||
60 | +if [ ! -z "$QT_EXTERNAL_HOST_BINS" ]; then | ||
61 | + QT_EXTERNAL_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_EXTERNAL_HOST_BINS"` | ||
62 | +fi | ||
63 | + | ||
64 | #------------------------------------------------------------------------------- | ||
65 | # help - interactive parts of the script _after_ this section please | ||
66 | #------------------------------------------------------------------------------- | ||
67 | @@ -3416,6 +3426,9 @@ Installation options: | ||
68 | -hostdatadir <dir> . Data used by qmake will be installed to <dir> | ||
69 | (default HOSTPREFIX) | ||
70 | |||
71 | + -external-hostbindir <dir> Use external host executables instead of building them | ||
72 | + (not used by defaut) | ||
73 | + | ||
74 | Configure options: | ||
75 | |||
76 | The defaults (*) are usually acceptable. A plus (+) denotes a default value | ||
77 | @@ -3931,6 +3944,7 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = { | ||
78 | "qt_hbinpath=$QT_HOST_BINS", | ||
79 | "qt_hlibpath=$QT_HOST_LIBS", | ||
80 | "qt_hdatpath=$QT_HOST_DATA", | ||
81 | + "qt_ebinpath=$QT_EXTERNAL_HOST_BINS", | ||
82 | "qt_targspec=$shortxspec", | ||
83 | "qt_hostspec=$shortspec", | ||
84 | #endif | ||
85 | diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf | ||
86 | index 2f2c94c..4e12d3d 100644 | ||
87 | --- a/mkspecs/features/qt_functions.prf | ||
88 | +++ b/mkspecs/features/qt_functions.prf | ||
89 | @@ -194,7 +194,10 @@ defineTest(qtAddRpathLink) { | ||
90 | defineTest(qtPrepareTool) { | ||
91 | $$1 = $$eval(QT_TOOL.$${2}.binary) | ||
92 | isEmpty($$1) { | ||
93 | - $$1 = $$[QT_HOST_BINS]/$$2 | ||
94 | + $$1 = $$[QT_EXTERNAL_HOST_BINS]/$$2 | ||
95 | + isEmpty($$[QT_EXTERNAL_HOST_BINS]) { | ||
96 | + $$1 = $$[QT_HOST_BINS]/$$2 | ||
97 | + } | ||
98 | exists($$eval($$1).pl) { | ||
99 | $$1 = perl -w $$eval($$1).pl | ||
100 | } else: contains(QMAKE_HOST.os, Windows) { | ||
101 | diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf | ||
102 | index 9a6b963..83ef3a0 100644 | ||
103 | --- a/mkspecs/features/qt_tool.prf | ||
104 | +++ b/mkspecs/features/qt_tool.prf | ||
105 | @@ -16,7 +16,7 @@ CONFIG += console | ||
106 | # If we are doing a prefix build, create a "module" pri which enables | ||
107 | # qtPrepareTool() to work with the non-installed build. | ||
108 | # Non-bootstrapped tools always need this because of the environment setup. | ||
109 | -!build_pass:if(!host_build|!force_bootstrap|force_independent) { | ||
110 | +!build_pass:if(!host_build|!force_bootstrap|force_independent):isEmpty($$[QT_EXTERNAL_HOST_BINS]) { | ||
111 | isEmpty(MODULE):MODULE = $$TARGET | ||
112 | |||
113 | !host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, ) | ||
114 | diff --git a/qmake/property.cpp b/qmake/property.cpp | ||
115 | index 4685440..93eb1d4 100644 | ||
116 | --- a/qmake/property.cpp | ||
117 | +++ b/qmake/property.cpp | ||
118 | @@ -75,6 +75,7 @@ static const struct { | ||
119 | { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true }, | ||
120 | { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true }, | ||
121 | { "QT_HOST_LIBS", QLibraryInfo::HostLibrariesPath, true }, | ||
122 | + { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true }, | ||
123 | { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true }, | ||
124 | { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true }, | ||
125 | }; | ||
126 | diff --git a/qtbase.pro b/qtbase.pro | ||
127 | index d6726b5..28ca7d5 100644 | ||
128 | --- a/qtbase.pro | ||
129 | +++ b/qtbase.pro | ||
130 | @@ -70,16 +70,22 @@ CONFIG -= qt | ||
131 | |||
132 | #qmake | ||
133 | qmake.path = $$[QT_HOST_BINS] | ||
134 | +qmake.files = $$OUT_PWD/bin/qmake | ||
135 | +!isEmpty($$[QT_EXTERNAL_HOST_BINS]) { | ||
136 | + qmake.files = $$[QT_EXTERNAL_HOST_BINS]/bin/qmake | ||
137 | +} | ||
138 | equals(QMAKE_HOST.os, Windows) { | ||
139 | - qmake.files = $$OUT_PWD/bin/qmake.exe | ||
140 | -} else { | ||
141 | - qmake.files = $$OUT_PWD/bin/qmake | ||
142 | + qmake.files = $${qmake.files}.exe | ||
143 | } | ||
144 | INSTALLS += qmake | ||
145 | |||
146 | #syncqt | ||
147 | syncqt.path = $$[QT_HOST_BINS] | ||
148 | syncqt.files = $$PWD/bin/syncqt.pl | ||
149 | +syncqt.files = $$PWD/bin/syncqt.pl | ||
150 | +!isEmpty($$[QT_EXTERNAL_HOST_BINS]) { | ||
151 | + syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/bin/syncqt.pl | ||
152 | +} | ||
153 | INSTALLS += syncqt | ||
154 | |||
155 | # If we are doing a prefix build, create a "module" pri which enables | ||
156 | diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp | ||
157 | index 8ca2102..9f5d444 100644 | ||
158 | --- a/src/corelib/global/qlibraryinfo.cpp | ||
159 | +++ b/src/corelib/global/qlibraryinfo.cpp | ||
160 | @@ -270,7 +270,7 @@ QLibraryInfo::isDebugBuild() | ||
161 | */ | ||
162 | |||
163 | static const struct { | ||
164 | - char key[19], value[13]; | ||
165 | + char key[21], value[13]; | ||
166 | } qtConfEntries[] = { | ||
167 | { "Prefix", "." }, | ||
168 | { "Documentation", "doc" }, // should be ${Data}/doc | ||
169 | @@ -296,6 +296,7 @@ static const struct { | ||
170 | { "HostBinaries", "bin" }, | ||
171 | { "HostLibraries", "lib" }, | ||
172 | { "HostData", "." }, | ||
173 | + { "ExternalHostBinaries", "" }, | ||
174 | { "TargetSpec", "" }, | ||
175 | { "HostSpec", "" }, | ||
176 | #endif | ||
177 | diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h | ||
178 | index b275e01..0e6baed 100644 | ||
179 | --- a/src/corelib/global/qlibraryinfo.h | ||
180 | +++ b/src/corelib/global/qlibraryinfo.h | ||
181 | @@ -84,6 +84,7 @@ public: | ||
182 | HostBinariesPath, | ||
183 | HostLibrariesPath, | ||
184 | HostDataPath, | ||
185 | + ExternalHostBinariesPath, | ||
186 | TargetSpecPath, | ||
187 | HostSpecPath, | ||
188 | LastHostPath = HostSpecPath, | ||
189 | diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp | ||
190 | index 5b62e8f..c752df3 100644 | ||
191 | --- a/tools/configure/configureapp.cpp | ||
192 | +++ b/tools/configure/configureapp.cpp | ||
193 | @@ -1162,6 +1162,13 @@ void Configure::parseCmdLine() | ||
194 | dictionary[ "QT_HOST_DATA" ] = configCmdLine.at(i); | ||
195 | } | ||
196 | |||
197 | + else if (configCmdLine.at(i) == "-external-hostbindir") { | ||
198 | + ++i; | ||
199 | + if (i == argCount) | ||
200 | + break; | ||
201 | + dictionary[ "QT_EXTERNAL_HOST_BINS" ] = configCmdLine.at(i); | ||
202 | + } | ||
203 | + | ||
204 | else if (configCmdLine.at(i) == "-make-tool") { | ||
205 | ++i; | ||
206 | if (i == argCount) | ||
207 | @@ -3715,6 +3722,7 @@ void Configure::generateQConfigCpp() | ||
208 | << " \"qt_hbinpath=" << formatPath(dictionary["QT_HOST_BINS"]) << "\"," << endl | ||
209 | << " \"qt_hlibpath=" << formatPath(dictionary["QT_HOST_LIBS"]) << "\"," << endl | ||
210 | << " \"qt_hdatpath=" << formatPath(dictionary["QT_HOST_DATA"]) << "\"," << endl | ||
211 | + << " \"qt_ebinpath=" << formatPath(dictionary["QT_EXTERNAL_HOST_BINS"]) << "\"," << endl | ||
212 | << " \"qt_targspec=" << targSpec << "\"," << endl | ||
213 | << " \"qt_hostspec=" << hostSpec << "\"," << endl | ||
214 | << "#endif" << endl | ||
215 | -- | ||
216 | 1.8.3.2 | ||
217 | |||