summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch
diff options
context:
space:
mode:
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.patch106
1 files changed, 51 insertions, 55 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
index 0b98683e..b80189f3 100644
--- a/recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch
+++ b/recipes-qt/qt5/qtbase-git/0003-Add-external-hostbindir-option.patch
@@ -1,7 +1,7 @@
1From c9bf00e21ae398575adf4411e67b35cdf44920e5 Mon Sep 17 00:00:00 2001 1From 6e92a3eac477a534226f916018a6ba6996eff318 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com> 2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 6 Apr 2013 13:15:07 +0200 3Date: Sat, 6 Apr 2013 13:15:07 +0200
4Subject: [PATCH 03/15] Add -external-hostbindir option 4Subject: [PATCH 03/23] Add -external-hostbindir option
5 5
6* when cross-compiling it's sometimes useful to use existing tools from machine 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 7 (or in OpenEmbedded built with separate native recipe) when building for target
@@ -12,40 +12,39 @@ Upstream-Status: Pending
12 12
13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> 13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
14--- 14---
15 configure | 15 ++++++++++++++- 15 configure | 14 ++++++++++++++
16 mkspecs/features/qt_functions.prf | 5 ++++- 16 mkspecs/features/qt_functions.prf | 5 ++++-
17 mkspecs/features/qt_tool.prf | 2 +- 17 mkspecs/features/qt_tool.prf | 2 +-
18 qmake/property.cpp | 1 + 18 qmake/property.cpp | 1 +
19 qtbase.pro | 15 +++++++++++---- 19 qtbase.pro | 12 +++++++++---
20 src/corelib/global/qlibraryinfo.cpp | 3 ++- 20 src/corelib/global/qlibraryinfo.cpp | 3 ++-
21 src/corelib/global/qlibraryinfo.h | 1 + 21 src/corelib/global/qlibraryinfo.h | 1 +
22 tools/configure/configureapp.cpp | 8 ++++++++ 22 tools/configure/configureapp.cpp | 8 ++++++++
23 8 files changed, 42 insertions(+), 8 deletions(-) 23 8 files changed, 40 insertions(+), 6 deletions(-)
24 24
25diff --git a/configure b/configure 25diff --git a/configure b/configure
26index 7dea731..65f4d26 100755 26index dacfd30..25980c0 100755
27--- a/configure 27--- a/configure
28+++ b/configure 28+++ b/configure
29@@ -1034,6 +1034,7 @@ CFG_GCC_SYSROOT="yes" 29@@ -1046,6 +1046,7 @@ QT_HOST_PREFIX=
30 QT_HOST_PREFIX=
31 QT_HOST_BINS= 30 QT_HOST_BINS=
31 QT_HOST_LIBS=
32 QT_HOST_DATA= 32 QT_HOST_DATA=
33+QT_EXTERNAL_HOST_BINS= 33+QT_EXTERNAL_HOST_BINS=
34 34
35 #flags for SQL drivers 35 #flags for SQL drivers
36 QT_CFLAGS_PSQL= 36 QT_CFLAGS_PSQL=
37@@ -1141,7 +1142,7 @@ while [ "$#" -gt 0 ]; do 37@@ -1170,6 +1171,7 @@ while [ "$#" -gt 0 ]; do
38 VAL=no 38 -testsdir| \
39 ;; 39 -hostdatadir| \
40 #Qt style options that pass an argument 40 -hostbindir| \
41- -prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-skip|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig|-android-sdk|-android-ndk|-android-ndk-platform|-android-ndk-host|-android-arch|-android-toolchain-version) 41+ -external-hostbindir| \
42+ -prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-skip|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig|-android-sdk|-android-ndk|-android-ndk-platform|-android-ndk-host|-android-arch|-android-toolchain-version|-external-hostbindir) 42 -hostlibdir| \
43 VAR=`echo $1 | sed "s,^-\(.*\),\1,"` 43 -sysroot| \
44 shift 44 -depths| \
45 VAL="$1" 45@@ -1379,6 +1381,9 @@ while [ "$#" -gt 0 ]; do
46@@ -1326,6 +1327,9 @@ while [ "$#" -gt 0 ]; do 46 hostlibdir)
47 hostbindir) 47 QT_HOST_LIBS="$VAL"
48 QT_HOST_BINS="$VAL"
49 ;; 48 ;;
50+ external-hostbindir) 49+ external-hostbindir)
51+ QT_EXTERNAL_HOST_BINS="$VAL" 50+ QT_EXTERNAL_HOST_BINS="$VAL"
@@ -53,8 +52,8 @@ index 7dea731..65f4d26 100755
53 pkg-config) 52 pkg-config)
54 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then 53 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
55 CFG_PKGCONFIG="$VAL" 54 CFG_PKGCONFIG="$VAL"
56@@ -3180,6 +3184,11 @@ else 55@@ -3248,6 +3253,11 @@ if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then
57 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"` 56 QMAKE_CONFIG="$QMAKE_CONFIG compile_examples"
58 fi 57 fi
59 58
60+# default is empty, don't call makeabs if it is empty 59+# default is empty, don't call makeabs if it is empty
@@ -65,7 +64,7 @@ index 7dea731..65f4d26 100755
65 #------------------------------------------------------------------------------- 64 #-------------------------------------------------------------------------------
66 # help - interactive parts of the script _after_ this section please 65 # help - interactive parts of the script _after_ this section please
67 #------------------------------------------------------------------------------- 66 #-------------------------------------------------------------------------------
68@@ -3346,6 +3355,9 @@ Installation options: 67@@ -3416,6 +3426,9 @@ Installation options:
69 -hostdatadir <dir> . Data used by qmake will be installed to <dir> 68 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
70 (default HOSTPREFIX) 69 (default HOSTPREFIX)
71 70
@@ -75,32 +74,32 @@ index 7dea731..65f4d26 100755
75 Configure options: 74 Configure options:
76 75
77 The defaults (*) are usually acceptable. A plus (+) denotes a default value 76 The defaults (*) are usually acceptable. A plus (+) denotes a default value
78@@ -3855,6 +3867,7 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = { 77@@ -3931,6 +3944,7 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = {
79 "qt_hpfxpath=$QT_HOST_PREFIX",
80 "qt_hbinpath=$QT_HOST_BINS", 78 "qt_hbinpath=$QT_HOST_BINS",
79 "qt_hlibpath=$QT_HOST_LIBS",
81 "qt_hdatpath=$QT_HOST_DATA", 80 "qt_hdatpath=$QT_HOST_DATA",
82+ "qt_ebinpath=$QT_EXTERNAL_HOST_BINS", 81+ "qt_ebinpath=$QT_EXTERNAL_HOST_BINS",
83 "qt_targspec=$shortxspec", 82 "qt_targspec=$shortxspec",
84 "qt_hostspec=$shortspec", 83 "qt_hostspec=$shortspec",
85 #endif 84 #endif
86diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf 85diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
87index 8cd2473..876f657 100644 86index 2f2c94c..4e12d3d 100644
88--- a/mkspecs/features/qt_functions.prf 87--- a/mkspecs/features/qt_functions.prf
89+++ b/mkspecs/features/qt_functions.prf 88+++ b/mkspecs/features/qt_functions.prf
90@@ -193,7 +193,10 @@ defineTest(qtAddRpathLink) { 89@@ -194,7 +194,10 @@ defineTest(qtAddRpathLink) {
91 defineTest(qtPrepareTool) { 90 defineTest(qtPrepareTool) {
92 $$1 = $$eval(QT_TOOL.$${2}.command) 91 $$1 = $$eval(QT_TOOL.$${2}.binary)
93 isEmpty($$1) { 92 isEmpty($$1) {
94- $$1 = $$[QT_HOST_BINS]/$$2 93- $$1 = $$[QT_HOST_BINS]/$$2
95+ $$1 = $$[QT_EXTERNAL_HOST_BINS]/$$2 94+ $$1 = $$[QT_EXTERNAL_HOST_BINS]/$$2
96+ isEmpty($$[QT_EXTERNAL_HOST_BINS]) { 95+ isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
97+ $$1 = $$[QT_HOST_BINS]/$$2 96+ $$1 = $$[QT_HOST_BINS]/$$2
98+ } 97+ }
99 contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) { 98 exists($$eval($$1).pl) {
100 exists($$eval($$1).bat) { 99 $$1 = perl -w $$eval($$1).pl
101 $$1 = $$eval($$1).bat 100 } else: contains(QMAKE_HOST.os, Windows) {
102diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf 101diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
103index 0a58880..c110ea5 100644 102index 9a6b963..83ef3a0 100644
104--- a/mkspecs/features/qt_tool.prf 103--- a/mkspecs/features/qt_tool.prf
105+++ b/mkspecs/features/qt_tool.prf 104+++ b/mkspecs/features/qt_tool.prf
106@@ -16,7 +16,7 @@ CONFIG += console 105@@ -16,7 +16,7 @@ CONFIG += console
@@ -111,24 +110,24 @@ index 0a58880..c110ea5 100644
111+!build_pass:if(!host_build|!force_bootstrap|force_independent):isEmpty($$[QT_EXTERNAL_HOST_BINS]) { 110+!build_pass:if(!host_build|!force_bootstrap|force_independent):isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
112 isEmpty(MODULE):MODULE = $$TARGET 111 isEmpty(MODULE):MODULE = $$TARGET
113 112
114 MODULE_DEPENDS = $$replace(QT, -private$, ) 113 !host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, )
115diff --git a/qmake/property.cpp b/qmake/property.cpp 114diff --git a/qmake/property.cpp b/qmake/property.cpp
116index c4fbcd6..c1b7a9f 100644 115index 4685440..93eb1d4 100644
117--- a/qmake/property.cpp 116--- a/qmake/property.cpp
118+++ b/qmake/property.cpp 117+++ b/qmake/property.cpp
119@@ -74,6 +74,7 @@ static const struct { 118@@ -75,6 +75,7 @@ static const struct {
120 { "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true },
121 { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true }, 119 { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true },
122 { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true }, 120 { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true },
121 { "QT_HOST_LIBS", QLibraryInfo::HostLibrariesPath, true },
123+ { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true }, 122+ { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true },
124 { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true }, 123 { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true },
125 { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true }, 124 { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true },
126 }; 125 };
127diff --git a/qtbase.pro b/qtbase.pro 126diff --git a/qtbase.pro b/qtbase.pro
128index 4c41cff..997ea6d 100644 127index d6726b5..28ca7d5 100644
129--- a/qtbase.pro 128--- a/qtbase.pro
130+++ b/qtbase.pro 129+++ b/qtbase.pro
131@@ -68,17 +68,24 @@ CONFIG -= qt 130@@ -70,16 +70,22 @@ CONFIG -= qt
132 131
133 #qmake 132 #qmake
134 qmake.path = $$[QT_HOST_BINS] 133 qmake.path = $$[QT_HOST_BINS]
@@ -146,19 +145,16 @@ index 4c41cff..997ea6d 100644
146 145
147 #syncqt 146 #syncqt
148 syncqt.path = $$[QT_HOST_BINS] 147 syncqt.path = $$[QT_HOST_BINS]
149 syncqt.files = $$PWD/bin/syncqt 148 syncqt.files = $$PWD/bin/syncqt.pl
150-equals(QMAKE_HOST.os, Windows):syncqt.files += $$PWD/bin/syncqt.bat 149+syncqt.files = $$PWD/bin/syncqt.pl
151+!isEmpty($$[QT_EXTERNAL_HOST_BINS]) { 150+!isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
152+ syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/bin/syncqt 151+ syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/bin/syncqt.pl
153+}
154+equals(QMAKE_HOST.os, Windows) {
155+ syncqt.files = $${syncqt.files}.bat
156+} 152+}
157 INSTALLS += syncqt 153 INSTALLS += syncqt
158 154
159 # If we are doing a prefix build, create a "module" pri which enables 155 # If we are doing a prefix build, create a "module" pri which enables
160diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp 156diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
161index 6b40731..139a60f 100644 157index 8ca2102..9f5d444 100644
162--- a/src/corelib/global/qlibraryinfo.cpp 158--- a/src/corelib/global/qlibraryinfo.cpp
163+++ b/src/corelib/global/qlibraryinfo.cpp 159+++ b/src/corelib/global/qlibraryinfo.cpp
164@@ -270,7 +270,7 @@ QLibraryInfo::isDebugBuild() 160@@ -270,7 +270,7 @@ QLibraryInfo::isDebugBuild()
@@ -170,31 +166,31 @@ index 6b40731..139a60f 100644
170 } qtConfEntries[] = { 166 } qtConfEntries[] = {
171 { "Prefix", "." }, 167 { "Prefix", "." },
172 { "Documentation", "doc" }, // should be ${Data}/doc 168 { "Documentation", "doc" }, // should be ${Data}/doc
173@@ -295,6 +295,7 @@ static const struct { 169@@ -296,6 +296,7 @@ static const struct {
174 { "HostPrefix", "" },
175 { "HostBinaries", "bin" }, 170 { "HostBinaries", "bin" },
171 { "HostLibraries", "lib" },
176 { "HostData", "." }, 172 { "HostData", "." },
177+ { "ExternalHostBinaries", "" }, 173+ { "ExternalHostBinaries", "" },
178 { "TargetSpec", "" }, 174 { "TargetSpec", "" },
179 { "HostSpec", "" }, 175 { "HostSpec", "" },
180 #endif 176 #endif
181diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h 177diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
182index 1a00a14..7e4829c 100644 178index b275e01..0e6baed 100644
183--- a/src/corelib/global/qlibraryinfo.h 179--- a/src/corelib/global/qlibraryinfo.h
184+++ b/src/corelib/global/qlibraryinfo.h 180+++ b/src/corelib/global/qlibraryinfo.h
185@@ -83,6 +83,7 @@ public: 181@@ -84,6 +84,7 @@ public:
186 HostPrefixPath,
187 HostBinariesPath, 182 HostBinariesPath,
183 HostLibrariesPath,
188 HostDataPath, 184 HostDataPath,
189+ ExternalHostBinariesPath, 185+ ExternalHostBinariesPath,
190 TargetSpecPath, 186 TargetSpecPath,
191 HostSpecPath, 187 HostSpecPath,
192 LastHostPath = HostSpecPath, 188 LastHostPath = HostSpecPath,
193diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp 189diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
194index a18aac3..57409b1 100644 190index 5b62e8f..c752df3 100644
195--- a/tools/configure/configureapp.cpp 191--- a/tools/configure/configureapp.cpp
196+++ b/tools/configure/configureapp.cpp 192+++ b/tools/configure/configureapp.cpp
197@@ -1173,6 +1173,13 @@ void Configure::parseCmdLine() 193@@ -1162,6 +1162,13 @@ void Configure::parseCmdLine()
198 dictionary[ "QT_HOST_DATA" ] = configCmdLine.at(i); 194 dictionary[ "QT_HOST_DATA" ] = configCmdLine.at(i);
199 } 195 }
200 196
@@ -208,14 +204,14 @@ index a18aac3..57409b1 100644
208 else if (configCmdLine.at(i) == "-make-tool") { 204 else if (configCmdLine.at(i) == "-make-tool") {
209 ++i; 205 ++i;
210 if (i == argCount) 206 if (i == argCount)
211@@ -3775,6 +3782,7 @@ void Configure::generateQConfigCpp() 207@@ -3715,6 +3722,7 @@ void Configure::generateQConfigCpp()
212 << " \"qt_hpfxpath=" << formatPath(dictionary["QT_HOST_PREFIX"]) << "\"," << endl
213 << " \"qt_hbinpath=" << formatPath(dictionary["QT_HOST_BINS"]) << "\"," << endl 208 << " \"qt_hbinpath=" << formatPath(dictionary["QT_HOST_BINS"]) << "\"," << endl
209 << " \"qt_hlibpath=" << formatPath(dictionary["QT_HOST_LIBS"]) << "\"," << endl
214 << " \"qt_hdatpath=" << formatPath(dictionary["QT_HOST_DATA"]) << "\"," << endl 210 << " \"qt_hdatpath=" << formatPath(dictionary["QT_HOST_DATA"]) << "\"," << endl
215+ << " \"qt_ebinpath=" << formatPath(dictionary["QT_EXTERNAL_HOST_BINS"]) << "\"," << endl 211+ << " \"qt_ebinpath=" << formatPath(dictionary["QT_EXTERNAL_HOST_BINS"]) << "\"," << endl
216 << " \"qt_targspec=" << targSpec << "\"," << endl 212 << " \"qt_targspec=" << targSpec << "\"," << endl
217 << " \"qt_hostspec=" << hostSpec << "\"," << endl 213 << " \"qt_hostspec=" << hostSpec << "\"," << endl
218 << "#endif" << endl 214 << "#endif" << endl
219-- 215--
2201.8.2.1 2161.8.3.2
221 217