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