summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-04-03 14:13:27 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2013-04-26 00:04:56 +0200
commitfe65aed3393cf32efe6158c615e72aea407a4bc6 (patch)
treea51b0d621ad910b499a1ea5d84e349c8cbf3e4b7 /recipes-qt/qt5/qtbase
parent97738e9d62b613ea46cf8c5edb6accdff0d0b19a (diff)
downloadmeta-qt5-fe65aed3393cf32efe6158c615e72aea407a4bc6.tar.gz
qtbase: improve internal build system to support OE way of building qt
* add linux-oe-g++ mkspec directly with patch * add functions to read and eval OE_QMAKE functions from mkspec and also export them with QMakeVar to be available also for config.tests * add external-host-bindir parameter to skip building native tools even when we're in fact cross-compiling (because we have them from qtbase-native build already). * use separated ${B} and ${S} and clean ${B} when reconfiguring stalled qmake cache can be used when configure is reexecuted cleaning ${B} prevents that and provide cleaner separation * OE_QMAKE_AR cqs is added by Makefile, having it here too was causing issues * isEmpty(QT_EXTERNAL_HOST_BINS) doesn't work, so lets use exist() even when it allows to incorrectly set wrong directory and build native tools again (instead of skipping them) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtbase')
-rw-r--r--recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch303
-rw-r--r--recipes-qt/qt5/qtbase/0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch46
-rw-r--r--recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch46
-rw-r--r--recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch219
-rw-r--r--recipes-qt/qt5/qtbase/0004-configure-eval-QMAKE_CXX.patch35
-rw-r--r--recipes-qt/qt5/qtbase/0004-qmake-is-already-built-in-qtbase-native.patch (renamed from recipes-qt/qt5/qtbase/0002-qmake-is-already-built-in-qt5-tools-native.patch)19
-rw-r--r--recipes-qt/qt5/qtbase/0005-Allow-building-a-separate-qmake-for-the-target.patch (renamed from recipes-qt/qt5/qtbase/0003-Allow-building-a-separate-qmake-for-the-target.patch)15
-rw-r--r--recipes-qt/qt5/qtbase/0006-qt_functions-temporary-remove-isEmpty-check.patch46
-rw-r--r--recipes-qt/qt5/qtbase/qmake.conf39
9 files changed, 632 insertions, 136 deletions
diff --git a/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
new file mode 100644
index 00000000..2d9d539b
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
@@ -0,0 +1,303 @@
1From f5d5c9778031fbb807753c67133ddda35f9a0e30 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Mon, 15 Apr 2013 04:29:32 +0200
4Subject: [PATCH 1/6] Add linux-oe-g++ platform
5
6* This qmake.conf unlike other platforms reads most variables from
7 shell environment, because it's easier for qt recipes to export
8 *FLAGS or CC specific for given recipe
9
10* configure: add getQEvalMakeConf and getXQEvalMakeConf
11 Allow expansion of $(...) references from qmake.conf to generate
12 qmake environment from shell environment as exported by qmake5_base
13
14* OE_QMAKE_CXX in order to allow compiler version check to succeed
15 which allows WebKit to be enabled.
16
17* Other variables in order to let config.tests to use our -platform
18 settings
19
20* Add setBootstrapEvalVariable to bootstrap qmake with our environment
21 too, this allows us to use -platform linux-oe-g++ also for native
22 recipe
23
24* disable gdb_dwarf_index
25 * qmake is trying to call native gdb and we don't depend on gdb-native
26 (or even provide gdb-native)
27 * fixes errors like this:
28 /bin/sh: gdb: command not found
29 /bin/sh: line 0: test: -gt: unary operator expected
30 which are not fatal, but still misleading in do_configure output
31
32Upstream-Status: Pending
33
34Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
35---
36 configure | 54 ++++++++++++++++---
37 mkspecs/linux-oe-g++/qmake.conf | 39 ++++++++++++++
38 mkspecs/linux-oe-g++/qplatformdefs.h | 100 +++++++++++++++++++++++++++++++++++
39 3 files changed, 186 insertions(+), 7 deletions(-)
40 create mode 100644 mkspecs/linux-oe-g++/qmake.conf
41 create mode 100644 mkspecs/linux-oe-g++/qplatformdefs.h
42
43diff --git a/configure b/configure
44index 89246c8..0ab8eee 100755
45--- a/configure
46+++ b/configure
47@@ -216,6 +216,16 @@ getQMakeConf()
48 getQMakeConf3 "$1" "$specvals"
49 }
50
51+# OE qmake.conf is reading some variables from shell env
52+# read them from qmake.conf, replace qmake () syntax with shell and eval
53+getQEvalMakeConf()
54+{
55+ VAL=`getQMakeConf "$1" | sed -n 's/$[(]\([0-9a-zA-Z_]*\)[)]/$\1/pg'`
56+ EVAL=`eval "echo ${VAL}"`
57+# echo "Running getQEvalMakeConf: var='$1', val='`getQMakeConf \"$1\"`, val-sed='$VAL', eval='$EVAL'" >&2
58+ eval "echo ${VAL}"
59+}
60+
61 getXQMakeConf()
62 {
63 if [ -z "$xspecvals" ]; then
64@@ -224,6 +234,16 @@ getXQMakeConf()
65 getQMakeConf3 "$1" "$xspecvals"
66 }
67
68+# OE qmake.conf is reading some variables from shell env
69+# read them from qmake.conf, replace qmake () syntax with shell and eval
70+getXQEvalMakeConf()
71+{
72+ VAL=`getXQMakeConf "$1" | sed -n 's/$[(]\([0-9a-zA-Z_]*\)[)]/$\1/pg'`
73+ EVAL=`eval "echo ${VAL}"`
74+# echo "Running getXQEvalMakeConf: var='$1', val='`getXQMakeConf \"$1\"`, val-sed='$VAL', eval='$EVAL'" >&2
75+ eval "echo ${VAL}"
76+}
77+
78 compilerSupportsFlag()
79 {
80 cat >conftest.cpp <<EOF
81@@ -707,6 +727,18 @@ fi
82 # initalize variables
83 #-------------------------------------------------------------------------------
84
85+# Export all OE variables for qmake.conf from shell env to QMakeVars
86+OE_VARIABLES="AR CC CFLAGS COMPILER CXX CXXFLAGS LDFLAGS LINK QT_CONFIG STRIP"
87+for varname in $OE_VARIABLES; do
88+ qmakevarname="${varname}"
89+ cmd=`echo \
90+'if [ -n "\$OE_QMAKE_'${varname}'" ]; then
91+ QMakeVar set OE_QMAKE_'${qmakevarname}' "\$OE_QMAKE_'${varname}'"
92+# echo "Exporting OE_QMAKE_'${qmakevarname}' value=\"\$OE_QMAKE_'${varname}'\"" >&2
93+fi'`
94+ eval "$cmd"
95+done
96+
97 SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
98 for varname in $SYSTEM_VARIABLES; do
99 qmakevarname="${varname}"
100@@ -2623,7 +2655,7 @@ else
101 CFG_FRAMEWORK=no
102 fi
103
104-QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
105+QMAKE_CONF_COMPILER=`getXQEvalMakeConf QMAKE_CXX`
106
107 TEST_COMPILER=$QMAKE_CONF_COMPILER
108 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
109@@ -2632,7 +2664,7 @@ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
110 exit 1
111 fi
112 fi
113-TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
114+TEST_COMPILER_CXXFLAGS=`getXQEvalMakeConf QMAKE_CXXFLAGS`
115
116 GCC_MACHINE_DUMP=
117 case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
118@@ -3587,6 +3619,14 @@ setBootstrapVariable()
119 getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
120 }
121
122+# OE qmake.conf is reading some variables from shell env
123+# read them from qmake.conf, replace qmake () syntax with shell and eval
124+setBootstrapEvalVariable()
125+{
126+ getQEvalMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
127+}
128+
129+
130 # build qmake
131 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
132 echo "Creating qmake. Please wait..."
133@@ -3625,11 +3665,11 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
134 fi
135
136 [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
137- setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
138- setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
139- setBootstrapVariable QMAKE_CFLAGS
140- setBootstrapVariable QMAKE_CXXFLAGS
141- setBootstrapVariable QMAKE_LFLAGS
142+ setBootstrapEvalVariable QMAKE_CC CC "$CC_TRANSFORM"
143+ setBootstrapEvalVariable QMAKE_CXX CXX "$CC_TRANSFORM"
144+ setBootstrapEvalVariable QMAKE_CFLAGS
145+ setBootstrapEvalVariable QMAKE_CXXFLAGS
146+ setBootstrapEvalVariable QMAKE_LFLAGS
147
148 if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
149 EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
150diff --git a/mkspecs/linux-oe-g++/qmake.conf b/mkspecs/linux-oe-g++/qmake.conf
151new file mode 100644
152index 0000000..42966fe
153--- /dev/null
154+++ b/mkspecs/linux-oe-g++/qmake.conf
155@@ -0,0 +1,39 @@
156+#
157+# qmake configuration for linux-g++ with modifications for building with OpenEmbedded
158+#
159+
160+MAKEFILE_GENERATOR = UNIX
161+CONFIG += incremental
162+QMAKE_INCREMENTAL_STYLE = sublib
163+
164+include(../common/linux.conf)
165+
166+# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar and strip
167+QMAKE_AR = $(OE_QMAKE_AR) cqs
168+QMAKE_STRIP = $(OE_QMAKE_STRIP)
169+
170+include(../common/gcc-base-unix.conf)
171+
172+# *FLAGS from gcc-base.conf
173+QMAKE_CFLAGS += $(OE_QMAKE_CFLAGS)
174+QMAKE_CXXFLAGS += $(OE_QMAKE_CXXFLAGS)
175+QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS)
176+
177+include(../common/g++-unix.conf)
178+
179+# tc settings from g++-base.conf
180+QMAKE_COMPILER = $(OE_QMAKE_COMPILER)
181+QMAKE_CC = $(OE_QMAKE_CC)
182+QMAKE_CXX = $(OE_QMAKE_CXX)
183+
184+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $(OE_QMAKE_CFLAGS)
185+
186+QMAKE_LINK = $(OE_QMAKE_LINK)
187+QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK)
188+QMAKE_LINK_C = $(OE_QMAKE_LINK)
189+QMAKE_LINK_C_SHLIB = $(OE_QMAKE_LINK)
190+
191+# for the SDK
192+isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $(OE_QMAKE_QT_CONFIG)
193+
194+load(qt_config)
195diff --git a/mkspecs/linux-oe-g++/qplatformdefs.h b/mkspecs/linux-oe-g++/qplatformdefs.h
196new file mode 100644
197index 0000000..dd12003
198--- /dev/null
199+++ b/mkspecs/linux-oe-g++/qplatformdefs.h
200@@ -0,0 +1,100 @@
201+/****************************************************************************
202+**
203+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
204+** Contact: http://www.qt-project.org/legal
205+**
206+** This file is part of the qmake spec of the Qt Toolkit.
207+**
208+** $QT_BEGIN_LICENSE:LGPL$
209+** Commercial License Usage
210+** Licensees holding valid commercial Qt licenses may use this file in
211+** accordance with the commercial license agreement provided with the
212+** Software or, alternatively, in accordance with the terms contained in
213+** a written agreement between you and Digia. For licensing terms and
214+** conditions see http://qt.digia.com/licensing. For further information
215+** use the contact form at http://qt.digia.com/contact-us.
216+**
217+** GNU Lesser General Public License Usage
218+** Alternatively, this file may be used under the terms of the GNU Lesser
219+** General Public License version 2.1 as published by the Free Software
220+** Foundation and appearing in the file LICENSE.LGPL included in the
221+** packaging of this file. Please review the following information to
222+** ensure the GNU Lesser General Public License version 2.1 requirements
223+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
224+**
225+** In addition, as a special exception, Digia gives you certain additional
226+** rights. These rights are described in the Digia Qt LGPL Exception
227+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
228+**
229+** GNU General Public License Usage
230+** Alternatively, this file may be used under the terms of the GNU
231+** General Public License version 3.0 as published by the Free Software
232+** Foundation and appearing in the file LICENSE.GPL included in the
233+** packaging of this file. Please review the following information to
234+** ensure the GNU General Public License version 3.0 requirements will be
235+** met: http://www.gnu.org/copyleft/gpl.html.
236+**
237+**
238+** $QT_END_LICENSE$
239+**
240+****************************************************************************/
241+
242+#ifndef QPLATFORMDEFS_H
243+#define QPLATFORMDEFS_H
244+
245+// Get Qt defines/settings
246+
247+#include "qglobal.h"
248+
249+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
250+
251+// 1) need to reset default environment if _BSD_SOURCE is defined
252+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
253+// 3) it seems older glibc need this to include the X/Open stuff
254+#ifndef _GNU_SOURCE
255+# define _GNU_SOURCE
256+#endif
257+
258+#include <unistd.h>
259+
260+
261+// We are hot - unistd.h should have turned on the specific APIs we requested
262+
263+#include <features.h>
264+#include <pthread.h>
265+#include <dirent.h>
266+#include <fcntl.h>
267+#include <grp.h>
268+#include <pwd.h>
269+#include <signal.h>
270+
271+#include <sys/types.h>
272+#include <sys/ioctl.h>
273+#include <sys/ipc.h>
274+#include <sys/time.h>
275+#include <sys/shm.h>
276+#include <sys/socket.h>
277+#include <sys/stat.h>
278+#include <sys/wait.h>
279+#include <netinet/in.h>
280+#ifndef QT_NO_IPV6IFNAME
281+#include <net/if.h>
282+#endif
283+
284+#define QT_USE_XOPEN_LFS_EXTENSIONS
285+#include "../common/posix/qplatformdefs.h"
286+
287+#undef QT_SOCKLEN_T
288+
289+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
290+#define QT_SOCKLEN_T socklen_t
291+#else
292+#define QT_SOCKLEN_T int
293+#endif
294+
295+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
296+#define QT_SNPRINTF ::snprintf
297+#define QT_VSNPRINTF ::vsnprintf
298+#endif
299+
300+#endif // QPLATFORMDEFS_H
301--
3021.8.2.1
303
diff --git a/recipes-qt/qt5/qtbase/0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch b/recipes-qt/qt5/qtbase/0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
deleted file mode 100644
index 857d5e84..00000000
--- a/recipes-qt/qt5/qtbase/0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 2af433da710aff74445cb5148d369427bdd501de Mon Sep 17 00:00:00 2001
2From: Holger Freyther <zecke@selfish.org>
3Date: Wed, 26 Sep 2012 17:22:30 +0200
4Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the
5 environment
6
7Allow to set a qt.conf from the outside using the environment. This allows
8to inject new prefixes and other paths into qmake. This is needed when using
9the same qmake binary to build qt/x11 and qt/embedded
10
11Upstream-Status: Pending
12
13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
14---
15 src/corelib/global/qlibraryinfo.cpp | 8 ++++++++
16 1 file changed, 8 insertions(+)
17
18diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
19index 747fd87..c9f8170 100644
20--- a/src/corelib/global/qlibraryinfo.cpp
21+++ b/src/corelib/global/qlibraryinfo.cpp
22@@ -140,6 +140,10 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
23 {
24 QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
25 #ifdef QT_BOOTSTRAPPED
26+ if (!QFile::exists(qtconfig)) {
27+ QByteArray config = getenv("QT_CONF_PATH");
28+ qtconfig = QFile::decodeName(config);
29+ }
30 if(!QFile::exists(qtconfig))
31 qtconfig = qt_libraryInfoFile();
32 #else
33@@ -164,6 +168,10 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
34 }
35 }
36 #endif
37+ if (!QFile::exists(qtconfig)) {
38+ QByteArray config = getenv("QT_CONF_PATH");
39+ qtconfig = QFile::decodeName(config);
40+ }
41 if (QFile::exists(qtconfig))
42 return new QSettings(qtconfig, QSettings::IniFormat);
43 return 0; //no luck
44--
451.8.1.5
46
diff --git a/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch b/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
new file mode 100644
index 00000000..f2a6efca
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
@@ -0,0 +1,46 @@
1From 29812cee9589dedd10a94b66ed5279549ed62f36 Mon Sep 17 00:00:00 2001
2From: Holger Freyther <zecke@selfish.org>
3Date: Wed, 26 Sep 2012 17:22:30 +0200
4Subject: [PATCH 2/6] qlibraryinfo: allow to set qt.conf from the outside using
5 the environment
6
7Allow to set a qt.conf from the outside using the environment. This allows
8to inject new prefixes and other paths into qmake. This is needed when using
9the same qmake binary to build qt/x11 and qt/embedded
10
11Upstream-Status: Pending
12
13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
14---
15 src/corelib/global/qlibraryinfo.cpp | 7 ++++++-
16 1 file changed, 6 insertions(+), 1 deletion(-)
17
18diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
19index a8dc086..c16dfcb 100644
20--- a/src/corelib/global/qlibraryinfo.cpp
21+++ b/src/corelib/global/qlibraryinfo.cpp
22@@ -138,7 +138,10 @@ QLibrarySettings::QLibrarySettings()
23
24 QSettings *QLibraryInfoPrivate::findConfiguration()
25 {
26- QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
27+ QByteArray config = getenv("QT_CONF_PATH");
28+ QString qtconfig = QFile::decodeName(config);
29+ if(!QFile::exists(qtconfig))
30+ qtconfig = QStringLiteral(":/qt/etc/qt.conf");
31 #ifdef QT_BOOTSTRAPPED
32 if(!QFile::exists(qtconfig))
33 qtconfig = qt_libraryInfoFile();
34@@ -165,7 +168,9 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
35 }
36 #endif
37 if (QFile::exists(qtconfig))
38+ printf("Using qt.conf from: %s\n", qtconfig.toLatin1().data());
39 return new QSettings(qtconfig, QSettings::IniFormat);
40+ printf("qt.conf wasn't found!!\n");
41 return 0; //no luck
42 }
43
44--
451.8.2.1
46
diff --git a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
new file mode 100644
index 00000000..ba4badca
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
@@ -0,0 +1,219 @@
1From 72d8aaf00e3d722b56b66bd5fa1f1f3d3e8a8552 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 3/6] 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
11Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
12---
13 configure | 15 ++++++++++++++-
14 mkspecs/features/qt_functions.prf | 5 ++++-
15 mkspecs/features/qt_tool.prf | 2 +-
16 qmake/property.cpp | 1 +
17 qtbase.pro | 15 +++++++++++----
18 src/corelib/global/qlibraryinfo.cpp | 3 ++-
19 src/corelib/global/qlibraryinfo.h | 1 +
20 tools/configure/configureapp.cpp | 8 ++++++++
21 8 files changed, 42 insertions(+), 8 deletions(-)
22
23diff --git a/configure b/configure
24index 0ab8eee..50f1ef2 100755
25--- a/configure
26+++ b/configure
27@@ -928,6 +928,7 @@ CFG_GCC_SYSROOT="yes"
28 QT_HOST_PREFIX=
29 QT_HOST_BINS=
30 QT_HOST_DATA=
31+QT_EXTERNAL_HOST_BINS=
32
33 #flags for SQL drivers
34 QT_CFLAGS_PSQL=
35@@ -1026,7 +1027,7 @@ while [ "$#" -gt 0 ]; do
36 VAL=no
37 ;;
38 #Qt style options that pass an argument
39- -prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig)
40+ -prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig|-external-hostbindir)
41 VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
42 shift
43 VAL="$1"
44@@ -1223,6 +1224,9 @@ while [ "$#" -gt 0 ]; do
45 hostbindir)
46 QT_HOST_BINS="$VAL"
47 ;;
48+ external-hostbindir)
49+ QT_EXTERNAL_HOST_BINS="$VAL"
50+ ;;
51 pkg-config)
52 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
53 CFG_PKGCONFIG="$VAL"
54@@ -2921,6 +2925,11 @@ else
55 QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
56 fi
57
58+# default is empty, don't call makeabs if it is empty
59+if [ ! -z "$QT_EXTERNAL_HOST_BINS" ]; then
60+ QT_EXTERNAL_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_EXTERNAL_HOST_BINS"`
61+fi
62+
63 #-------------------------------------------------------------------------------
64 # help - interactive parts of the script _after_ this section please
65 #-------------------------------------------------------------------------------
66@@ -3087,6 +3096,9 @@ Installation options:
67 -hostdatadir <dir> . Data used by qmake will be installed to <dir>
68 (default HOSTPREFIX)
69
70+ -external-hostbindir <dir> Use external host executables instead of building them
71+ (not used by defaut)
72+
73 Configure options:
74
75 The defaults (*) are usually acceptable. A plus (+) denotes a default value
76@@ -3558,6 +3570,7 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = {
77 "qt_hpfxpath=$QT_HOST_PREFIX",
78 "qt_hbinpath=$QT_HOST_BINS",
79 "qt_hdatpath=$QT_HOST_DATA",
80+ "qt_ebinpath=$QT_EXTERNAL_HOST_BINS",
81 "qt_targspec=$shortxspec",
82 "qt_hostspec=$shortspec",
83 #endif
84diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
85index 389f241..e249960 100644
86--- a/mkspecs/features/qt_functions.prf
87+++ b/mkspecs/features/qt_functions.prf
88@@ -194,7 +194,10 @@ defineTest(qtAddModules) {
89 defineTest(qtPrepareTool) {
90 $$1 = $$eval(QT_TOOL.$${2}.command)
91 isEmpty($$1) {
92- $$1 = $$[QT_HOST_BINS/get]/$$2
93+ $$1 = $$[QT_EXTERNAL_HOST_BINS]/$$2
94+ isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
95+ $$1 = $$[QT_HOST_BINS/get]/$$2
96+ }
97 contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) {
98 exists($$eval($$1).bat) {
99 $$1 = $$eval($$1).bat
100diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
101index 16db6c7..5518933 100644
102--- a/mkspecs/features/qt_tool.prf
103+++ b/mkspecs/features/qt_tool.prf
104@@ -31,7 +31,7 @@ load(qt_targets)
105
106 # If we are doing a prefix build, create a "module" pri which enables
107 # qtPrepareTool() to work with the non-installed build.
108-!build_pass:!exists($$[QT_INSTALL_PREFIX]/.qmake.cache) {
109+!build_pass:!exists($$[QT_INSTALL_PREFIX]/.qmake.cache):isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
110
111 isEmpty(MODULE):MODULE = $$TARGET
112
113diff --git a/qmake/property.cpp b/qmake/property.cpp
114index bbd4734..dca0c58 100644
115--- a/qmake/property.cpp
116+++ b/qmake/property.cpp
117@@ -74,6 +74,7 @@ static const struct {
118 { "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true },
119 { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true },
120 { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true },
121+ { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true },
122 { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true },
123 { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true },
124 };
125diff --git a/qtbase.pro b/qtbase.pro
126index e66d9fb..a6ae763 100644
127--- a/qtbase.pro
128+++ b/qtbase.pro
129@@ -68,17 +68,24 @@ CONFIG -= qt
130
131 #qmake
132 qmake.path = $$[QT_HOST_BINS]
133+qmake.files = $$OUT_PWD/bin/qmake
134+!isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
135+ qmake.files = $$[QT_EXTERNAL_HOST_BINS]/bin/qmake
136+}
137 equals(QMAKE_HOST.os, Windows) {
138- qmake.files = $$OUT_PWD/bin/qmake.exe
139-} else {
140- qmake.files = $$OUT_PWD/bin/qmake
141+ qmake.files = $${qmake.files}.exe
142 }
143 INSTALLS += qmake
144
145 #syncqt
146 syncqt.path = $$[QT_HOST_BINS]
147 syncqt.files = $$PWD/bin/syncqt
148-equals(QMAKE_HOST.os, Windows):syncqt.files += $$PWD/bin/syncqt.bat
149+!isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
150+ syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/bin/syncqt
151+}
152+equals(QMAKE_HOST.os, Windows) {
153+ syncqt.files = $${syncqt.files}.bat
154+}
155 INSTALLS += syncqt
156
157 #mkspecs
158diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
159index c16dfcb..56a269f 100644
160--- a/src/corelib/global/qlibraryinfo.cpp
161+++ b/src/corelib/global/qlibraryinfo.cpp
162@@ -272,7 +272,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@@ -293,6 +293,7 @@ static const struct {
172 { "HostPrefix", "" },
173 { "HostBinaries", "bin" },
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 a574b4b..1535d20 100644
181--- a/src/corelib/global/qlibraryinfo.h
182+++ b/src/corelib/global/qlibraryinfo.h
183@@ -85,6 +85,7 @@ public:
184 HostPrefixPath,
185 HostBinariesPath,
186 HostDataPath,
187+ ExternalHostBinariesPath,
188 TargetSpecPath,
189 HostSpecPath,
190 LastHostPath = HostSpecPath,
191diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
192index 126643e..0e01ab5 100644
193--- a/tools/configure/configureapp.cpp
194+++ b/tools/configure/configureapp.cpp
195@@ -1143,6 +1143,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@@ -3627,6 +3634,7 @@ void Configure::generateQConfigCpp()
210 << " \"qt_hpfxpath=" << formatPath(dictionary["QT_HOST_PREFIX"]) << "\"," << endl
211 << " \"qt_hbinpath=" << formatPath(dictionary["QT_HOST_BINS"]) << "\"," << 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.2.1
219
diff --git a/recipes-qt/qt5/qtbase/0004-configure-eval-QMAKE_CXX.patch b/recipes-qt/qt5/qtbase/0004-configure-eval-QMAKE_CXX.patch
deleted file mode 100644
index 06fa4862..00000000
--- a/recipes-qt/qt5/qtbase/0004-configure-eval-QMAKE_CXX.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From bc6f13a50ad1c69e728062375d979796977d2b73 Mon Sep 17 00:00:00 2001
2From: Paul Eggleton <paul.eggleton@linux.intel.com>
3Date: Wed, 26 Sep 2012 20:47:08 +0200
4Subject: [PATCH] configure: eval QMAKE_CXX
5
6Allow expansion of $(...) references in QMAKE_CXX (currently its value
7is $(OE_QMAKE_CXX)) in order to allow compiler version check to succeed
8which allows WebKit to be enabled.
9
10Upstream-Status: Pending
11
12Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
14---
15 configure | 4 +++-
16 1 file changed, 3 insertions(+), 1 deletion(-)
17
18diff --git a/configure b/configure
19index e23ea22..d83cf74 100755
20--- a/configure
21+++ b/configure
22@@ -2623,7 +2623,9 @@ else
23 CFG_FRAMEWORK=no
24 fi
25
26-QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
27+QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX | sed -n 's/$[(]\([0-9a-zA-Z_]*\)[)]/$\1/pg'`
28+QMAKE_CONF_COMPILER=`eval "echo $QMAKE_CONF_COMPILER"`
29+
30
31 TEST_COMPILER=$QMAKE_CONF_COMPILER
32 if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
33--
341.8.1.5
35
diff --git a/recipes-qt/qt5/qtbase/0002-qmake-is-already-built-in-qt5-tools-native.patch b/recipes-qt/qt5/qtbase/0004-qmake-is-already-built-in-qtbase-native.patch
index 0c1f63c6..91709741 100644
--- a/recipes-qt/qt5/qtbase/0002-qmake-is-already-built-in-qt5-tools-native.patch
+++ b/recipes-qt/qt5/qtbase/0004-qmake-is-already-built-in-qtbase-native.patch
@@ -1,29 +1,30 @@
1From aab01049543f4508f1dc92fb62b980d1d0c3bcc0 Mon Sep 17 00:00:00 2001 1From 956195c897287787b545e570ee976d1d2917eca8 Mon Sep 17 00:00:00 2001
2From: Michael Krelin <hacker@klever.net> 2From: Michael Krelin <hacker@klever.net>
3Date: Mon, 29 Oct 2012 20:07:49 -0700 3Date: Mon, 29 Oct 2012 20:07:49 -0700
4Subject: [PATCH] qmake is already built in qt5-tools-native 4Subject: [PATCH 4/6] qmake is already built in qtbase-native
5 5
6Ported from OE by: Yu Ke <ke.yu@intel.com> 6Ported from OE by: Yu Ke <ke.yu@intel.com>
7Upstream-Status: Inappropriate [configuration] 7Upstream-Status: Inappropriate [configuration]
8 8
9Signed-off-by: Mikko Levonmaa <mikko.levonmaa@gmail.com> 9Signed-off-by: Mikko Levonmaa <mikko.levonmaa@gmail.com>
10Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
10--- 11---
11 configure | 2 +- 12 configure | 2 +-
12 1 files changed, 1 insertions(+), 1 deletions(-) 13 1 file changed, 1 insertion(+), 1 deletion(-)
13 14
14diff --git a/configure b/configure 15diff --git a/configure b/configure
15index c3e61d6..5e43a19 100755 16index 50f1ef2..8710c28 100755
16--- a/configure 17--- a/configure
17+++ b/configure 18+++ b/configure
18@@ -3594,7 +3594,7 @@ setBootstrapVariable() 19@@ -3641,7 +3641,7 @@ setBootstrapEvalVariable()
19 } 20
20 21
21 # build qmake 22 # build qmake
22-if true; then ###[ '!' -f "$outpath/bin/qmake" ]; 23-if true; then ###[ '!' -f "$outpath/bin/qmake" ];
23+if false; then ###[ '!' -f "$outpath/bin/qmake" ]; 24+if false; then ###[ '!' -f "$outpath/bin/qmake" ];
24 echo "Creating qmake. Please wait..." 25 echo "Creating qmake. Please wait..."
25 26
26 #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured 27 mkdir -p "$outpath/qmake" || exit
27-- 28--
281.7.4.1 291.8.2.1
29 30
diff --git a/recipes-qt/qt5/qtbase/0003-Allow-building-a-separate-qmake-for-the-target.patch b/recipes-qt/qt5/qtbase/0005-Allow-building-a-separate-qmake-for-the-target.patch
index 781d6e54..4d163443 100644
--- a/recipes-qt/qt5/qtbase/0003-Allow-building-a-separate-qmake-for-the-target.patch
+++ b/recipes-qt/qt5/qtbase/0005-Allow-building-a-separate-qmake-for-the-target.patch
@@ -1,28 +1,29 @@
1From a2a01e1fd975e8e616b580423c3bf30db9c11b6d Mon Sep 17 00:00:00 2001 1From d33f33aed6744b5c4c561e6c6527d784481604f5 Mon Sep 17 00:00:00 2001
2From: Paul Eggleton <paul.eggleton@linux.intel.com> 2From: Paul Eggleton <paul.eggleton@linux.intel.com>
3Date: Mon, 29 Oct 2012 20:26:36 -0700 3Date: Mon, 29 Oct 2012 20:26:36 -0700
4Subject: [PATCH] Allow building a separate qmake for the target 4Subject: [PATCH 5/6] Allow building a separate qmake for the target
5 5
6Upstream-Status: Inappropriate [config] 6Upstream-Status: Inappropriate [config]
7 7
8Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> 8Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
9Signed-off-by: Mikko Levonmaa <mikko.levonmaa@gmail.com> 9Signed-off-by: Mikko Levonmaa <mikko.levonmaa@gmail.com>
10Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
10--- 11---
11 qmake/qmake.pro | 1 + 12 qmake/qmake.pro | 1 +
12 1 files changed, 1 insertions(+), 0 deletions(-) 13 1 file changed, 1 insertion(+)
13 14
14diff --git a/qmake/qmake.pro b/qmake/qmake.pro 15diff --git a/qmake/qmake.pro b/qmake/qmake.pro
15index 0d92ac2..07fa80e 100644 16index 0d92ac2..9be0e9b 100644
16--- a/qmake/qmake.pro 17--- a/qmake/qmake.pro
17+++ b/qmake/qmake.pro 18+++ b/qmake/qmake.pro
18@@ -9,6 +9,7 @@ CONFIG -= qt shared app_bundle uic 19@@ -9,6 +9,7 @@ CONFIG -= qt shared app_bundle uic
19 DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED \ 20 DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED \
20 PROEVALUATOR_FULL PROEVALUATOR_DEBUG 21 PROEVALUATOR_FULL PROEVALUATOR_DEBUG
21 DESTDIR = ../bin/ 22 DESTDIR = ../bin/
22+TARGET = qmake2 23+TARGET = qmake
23 24
24 OBJECTS_DIR = . 25 OBJECTS_DIR = .
25 MOC_DIR = . 26 MOC_DIR = .
26-- 27--
271.7.4.1 281.8.2.1
28 29
diff --git a/recipes-qt/qt5/qtbase/0006-qt_functions-temporary-remove-isEmpty-check.patch b/recipes-qt/qt5/qtbase/0006-qt_functions-temporary-remove-isEmpty-check.patch
new file mode 100644
index 00000000..d1cacd3e
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0006-qt_functions-temporary-remove-isEmpty-check.patch
@@ -0,0 +1,46 @@
1From 5856e25a0653313b8f80a5a92a7817fe8eb39dc8 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Wed, 17 Apr 2013 18:06:25 +0200
4Subject: [PATCH 6/6] qt_functions: temporary remove isEmpty check
5
6* now we assume that every build will provide QT_EXTERNAL_HOST_BINS value
7
8Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
9---
10 mkspecs/features/qt_functions.prf | 6 +++++-
11 mkspecs/features/qt_tool.prf | 2 +-
12 2 files changed, 6 insertions(+), 2 deletions(-)
13
14diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
15index e249960..105ba4c 100644
16--- a/mkspecs/features/qt_functions.prf
17+++ b/mkspecs/features/qt_functions.prf
18@@ -195,7 +195,11 @@ defineTest(qtPrepareTool) {
19 $$1 = $$eval(QT_TOOL.$${2}.command)
20 isEmpty($$1) {
21 $$1 = $$[QT_EXTERNAL_HOST_BINS]/$$2
22- isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
23+ # for some reason isEmpty does not work here, FIXME before submitting upstream
24+ # DEBUG 1: mkspecs/features/qt_functions.prf:198: calling built-in isEmpty(/OE/oe-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/qt5)
25+ # DEBUG 1: mkspecs/features/qt_functions.prf:198: test function returned true
26+ # DEBUG 1: mkspecs/features/qt_functions.prf:198: taking 'then' branch
27+ !exists($$[QT_EXTERNAL_HOST_BINS]/$$2) {
28 $$1 = $$[QT_HOST_BINS/get]/$$2
29 }
30 contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) {
31diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
32index 5518933..b0e4f28 100644
33--- a/mkspecs/features/qt_tool.prf
34+++ b/mkspecs/features/qt_tool.prf
35@@ -31,7 +31,7 @@ load(qt_targets)
36
37 # If we are doing a prefix build, create a "module" pri which enables
38 # qtPrepareTool() to work with the non-installed build.
39-!build_pass:!exists($$[QT_INSTALL_PREFIX]/.qmake.cache):isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
40+!build_pass:!exists($$[QT_INSTALL_PREFIX]/.qmake.cache):!exists($$[QT_EXTERNAL_HOST_BINS]) {
41
42 isEmpty(MODULE):MODULE = $$TARGET
43
44--
451.8.2.1
46
diff --git a/recipes-qt/qt5/qtbase/qmake.conf b/recipes-qt/qt5/qtbase/qmake.conf
deleted file mode 100644
index 42966fe5..00000000
--- a/recipes-qt/qt5/qtbase/qmake.conf
+++ /dev/null
@@ -1,39 +0,0 @@
1#
2# qmake configuration for linux-g++ with modifications for building with OpenEmbedded
3#
4
5MAKEFILE_GENERATOR = UNIX
6CONFIG += incremental
7QMAKE_INCREMENTAL_STYLE = sublib
8
9include(../common/linux.conf)
10
11# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar and strip
12QMAKE_AR = $(OE_QMAKE_AR) cqs
13QMAKE_STRIP = $(OE_QMAKE_STRIP)
14
15include(../common/gcc-base-unix.conf)
16
17# *FLAGS from gcc-base.conf
18QMAKE_CFLAGS += $(OE_QMAKE_CFLAGS)
19QMAKE_CXXFLAGS += $(OE_QMAKE_CXXFLAGS)
20QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS)
21
22include(../common/g++-unix.conf)
23
24# tc settings from g++-base.conf
25QMAKE_COMPILER = $(OE_QMAKE_COMPILER)
26QMAKE_CC = $(OE_QMAKE_CC)
27QMAKE_CXX = $(OE_QMAKE_CXX)
28
29QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $(OE_QMAKE_CFLAGS)
30
31QMAKE_LINK = $(OE_QMAKE_LINK)
32QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK)
33QMAKE_LINK_C = $(OE_QMAKE_LINK)
34QMAKE_LINK_C_SHLIB = $(OE_QMAKE_LINK)
35
36# for the SDK
37isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $(OE_QMAKE_QT_CONFIG)
38
39load(qt_config)