qt5-git: bump revision in git recipes to latest stable branch

* there are important fixes in qtbase bootstrapping
* create also own directory for patches, easier for many versions to coexist for now

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Martin Jansa 2013-04-03 13:08:50 +02:00
parent 42ab168449
commit 6fb40c8d03
17 changed files with 710 additions and 35 deletions

View File

@ -1,18 +1,21 @@
# Copyright (C) 2012 O.S. Systems Software LTDA.
# Copyright (C) 2013 Martin Jansa <martin.jansa@gmail.com>
# each module needs to define valid SRCREV
SRC_URI += " \
git://qt.gitorious.org/qt/${QT_MODULE}.git;protocol=git;branch=stable \
git://qt.gitorious.org/qt/${QT_MODULE}.git;branch=stable \
"
S = "${WORKDIR}/git"
PV = "5.0.0+git${SRCPV}"
PV = "5.0.2+git${SRCPV}"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/${BPN}-git:"
DEFAULT_PREFERENCE = "-1"
LICENSE = "GFDL-1.3 & LGPLv2.1 | GPLv3"
LIC_FILES_CHKSUM ?= "file://LICENSE.LGPL;md5=02356821480f1d3d534b21e0343265b5 \
LIC_FILES_CHKSUM ?= "file://LICENSE.LGPL;md5=4193e7f1d47a858f6b7c0f1ee66161de \
file://LICENSE.GPL;md5=d32239bcb673463ab874e80d47fae504 \
file://LGPL_EXCEPTION.txt;md5=0145c4d1b6f96a661c2c139dfb268fb6 \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e"

View File

@ -0,0 +1,303 @@
From 21001bb1c68fdc22ee243c562549f7b3a8a8ed84 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Mon, 15 Apr 2013 04:29:32 +0200
Subject: [PATCH 1/6] Add linux-oe-g++ platform
* This qmake.conf unlike other platforms reads most variables from
shell environment, because it's easier for qt recipes to export
*FLAGS or CC specific for given recipe
* configure: add getQEvalMakeConf and getXQEvalMakeConf
Allow expansion of $(...) references from qmake.conf to generate
qmake environment from shell environment as exported by qmake5_base
* OE_QMAKE_CXX in order to allow compiler version check to succeed
which allows WebKit to be enabled.
* Other variables in order to let config.tests to use our -platform
settings
* Add setBootstrapEvalVariable to bootstrap qmake with our environment
too, this allows us to use -platform linux-oe-g++ also for native
recipe
* disable gdb_dwarf_index
* qmake is trying to call native gdb and we don't depend on gdb-native
(or even provide gdb-native)
* fixes errors like this:
/bin/sh: gdb: command not found
/bin/sh: line 0: test: -gt: unary operator expected
which are not fatal, but still misleading in do_configure output
Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
configure | 54 ++++++++++++++++---
mkspecs/linux-oe-g++/qmake.conf | 39 ++++++++++++++
mkspecs/linux-oe-g++/qplatformdefs.h | 100 +++++++++++++++++++++++++++++++++++
3 files changed, 186 insertions(+), 7 deletions(-)
create mode 100644 mkspecs/linux-oe-g++/qmake.conf
create mode 100644 mkspecs/linux-oe-g++/qplatformdefs.h
diff --git a/configure b/configure
index 55a643a..666576f 100755
--- a/configure
+++ b/configure
@@ -284,6 +284,16 @@ getQMakeConf()
getSingleQMakeVariable "$1" "$specvals"
}
+# OE qmake.conf is reading some variables from shell env
+# read them from qmake.conf, replace qmake () syntax with shell and eval
+getQEvalMakeConf()
+{
+ VAL=`getQMakeConf "$1" | sed -n 's/$[(]\([0-9a-zA-Z_]*\)[)]/$\1/pg'`
+ EVAL=`eval "echo ${VAL}"`
+# echo "Running getQEvalMakeConf: var='$1', val='`getQMakeConf \"$1\"`, val-sed='$VAL', eval='$EVAL'" >&2
+ eval "echo ${VAL}"
+}
+
getXQMakeConf()
{
if [ -z "$xspecvals" ]; then
@@ -293,6 +303,16 @@ getXQMakeConf()
getSingleQMakeVariable "$1" "$xspecvals"
}
+# OE qmake.conf is reading some variables from shell env
+# read them from qmake.conf, replace qmake () syntax with shell and eval
+getXQEvalMakeConf()
+{
+ VAL=`getXQMakeConf "$1" | sed -n 's/$[(]\([0-9a-zA-Z_]*\)[)]/$\1/pg'`
+ EVAL=`eval "echo ${VAL}"`
+# echo "Running getXQEvalMakeConf: var='$1', val='`getXQMakeConf \"$1\"`, val-sed='$VAL', eval='$EVAL'" >&2
+ eval "echo ${VAL}"
+}
+
compilerSupportsFlag()
{
cat >conftest.cpp <<EOF
@@ -807,6 +827,18 @@ fi
# initalize variables
#-------------------------------------------------------------------------------
+# Export all OE variables for qmake.conf from shell env to QMakeVars
+OE_VARIABLES="AR CC CFLAGS COMPILER CXX CXXFLAGS LDFLAGS LINK QT_CONFIG STRIP"
+for varname in $OE_VARIABLES; do
+ qmakevarname="${varname}"
+ cmd=`echo \
+'if [ -n "\$OE_QMAKE_'${varname}'" ]; then
+ QMakeVar set OE_QMAKE_'${qmakevarname}' "\$OE_QMAKE_'${varname}'"
+# echo "Exporting OE_QMAKE_'${qmakevarname}' value=\"\$OE_QMAKE_'${varname}'\"" >&2
+fi'`
+ eval "$cmd"
+done
+
SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
for varname in $SYSTEM_VARIABLES; do
qmakevarname="${varname}"
@@ -2847,7 +2879,7 @@ if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_QGTKSTYLE" = "auto" ]; then
CFG_QGTKSTYLE=no
fi
-QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
+QMAKE_CONF_COMPILER=`getXQEvalMakeConf QMAKE_CXX`
TEST_COMPILER=$QMAKE_CONF_COMPILER
@@ -2882,7 +2914,7 @@ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
exit 1
fi
fi
-TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
+TEST_COMPILER_CXXFLAGS=`getXQEvalMakeConf QMAKE_CXXFLAGS`
GCC_MACHINE_DUMP=
case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
@@ -3884,6 +3916,14 @@ setBootstrapVariable()
getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
}
+# OE qmake.conf is reading some variables from shell env
+# read them from qmake.conf, replace qmake () syntax with shell and eval
+setBootstrapEvalVariable()
+{
+ getQEvalMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
+}
+
+
# build qmake
if true; then ###[ '!' -f "$outpath/bin/qmake" ];
echo "Creating qmake..."
@@ -3922,11 +3962,11 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
fi
[ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
- setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
- setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
- setBootstrapVariable QMAKE_CFLAGS
- setBootstrapVariable QMAKE_CXXFLAGS
- setBootstrapVariable QMAKE_LFLAGS
+ setBootstrapEvalVariable QMAKE_CC CC "$CC_TRANSFORM"
+ setBootstrapEvalVariable QMAKE_CXX CXX "$CC_TRANSFORM"
+ setBootstrapEvalVariable QMAKE_CFLAGS
+ setBootstrapEvalVariable QMAKE_CXXFLAGS
+ setBootstrapEvalVariable QMAKE_LFLAGS
if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
setBootstrapVariable QMAKE_CFLAGS_RELEASE
diff --git a/mkspecs/linux-oe-g++/qmake.conf b/mkspecs/linux-oe-g++/qmake.conf
new file mode 100644
index 0000000..42966fe
--- /dev/null
+++ b/mkspecs/linux-oe-g++/qmake.conf
@@ -0,0 +1,39 @@
+#
+# qmake configuration for linux-g++ with modifications for building with OpenEmbedded
+#
+
+MAKEFILE_GENERATOR = UNIX
+CONFIG += incremental
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/linux.conf)
+
+# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar and strip
+QMAKE_AR = $(OE_QMAKE_AR) cqs
+QMAKE_STRIP = $(OE_QMAKE_STRIP)
+
+include(../common/gcc-base-unix.conf)
+
+# *FLAGS from gcc-base.conf
+QMAKE_CFLAGS += $(OE_QMAKE_CFLAGS)
+QMAKE_CXXFLAGS += $(OE_QMAKE_CXXFLAGS)
+QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS)
+
+include(../common/g++-unix.conf)
+
+# tc settings from g++-base.conf
+QMAKE_COMPILER = $(OE_QMAKE_COMPILER)
+QMAKE_CC = $(OE_QMAKE_CC)
+QMAKE_CXX = $(OE_QMAKE_CXX)
+
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $(OE_QMAKE_CFLAGS)
+
+QMAKE_LINK = $(OE_QMAKE_LINK)
+QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK)
+QMAKE_LINK_C = $(OE_QMAKE_LINK)
+QMAKE_LINK_C_SHLIB = $(OE_QMAKE_LINK)
+
+# for the SDK
+isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $(OE_QMAKE_QT_CONFIG)
+
+load(qt_config)
diff --git a/mkspecs/linux-oe-g++/qplatformdefs.h b/mkspecs/linux-oe-g++/qplatformdefs.h
new file mode 100644
index 0000000..dd12003
--- /dev/null
+++ b/mkspecs/linux-oe-g++/qplatformdefs.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#include <features.h>
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../common/posix/qplatformdefs.h"
+
+#undef QT_SOCKLEN_T
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+#endif // QPLATFORMDEFS_H
--
1.8.2.1

View File

@ -0,0 +1,46 @@
From 80cdde4c31e6e5f534ca5e218b9b5cc5fd079b9a Mon Sep 17 00:00:00 2001
From: Holger Freyther <zecke@selfish.org>
Date: Wed, 26 Sep 2012 17:22:30 +0200
Subject: [PATCH 2/6] qlibraryinfo: allow to set qt.conf from the outside using
the environment
Allow to set a qt.conf from the outside using the environment. This allows
to inject new prefixes and other paths into qmake. This is needed when using
the same qmake binary to build qt/x11 and qt/embedded
Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
src/corelib/global/qlibraryinfo.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 5fb9640..acd11f5 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -138,7 +138,10 @@ QLibrarySettings::QLibrarySettings()
QSettings *QLibraryInfoPrivate::findConfiguration()
{
- QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
+ QByteArray config = getenv("QT_CONF_PATH");
+ QString qtconfig = QFile::decodeName(config);
+ if(!QFile::exists(qtconfig))
+ qtconfig = QStringLiteral(":/qt/etc/qt.conf");
#ifdef QT_BOOTSTRAPPED
if(!QFile::exists(qtconfig))
qtconfig = qt_libraryInfoFile();
@@ -165,7 +168,9 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
}
#endif
if (QFile::exists(qtconfig))
+ printf("Using qt.conf from: %s\n", qtconfig.toLatin1().data());
return new QSettings(qtconfig, QSettings::IniFormat);
+ printf("qt.conf wasn't found!!\n");
return 0; //no luck
}
--
1.8.2.1

View File

@ -0,0 +1,219 @@
From e8fe1934151a47fd3ec86fb0054e137237fa69b7 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 6 Apr 2013 13:15:07 +0200
Subject: [PATCH 3/6] Add -external-hostbindir option
* when cross-compiling it's sometimes useful to use existing tools from machine
(or in OpenEmbedded built with separate native recipe) when building for target
* this way we can skip bootstraping tools we already have
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
configure | 15 ++++++++++++++-
mkspecs/features/qt_functions.prf | 5 ++++-
mkspecs/features/qt_tool.prf | 2 +-
qmake/property.cpp | 1 +
qtbase.pro | 15 +++++++++++----
src/corelib/global/qlibraryinfo.cpp | 3 ++-
src/corelib/global/qlibraryinfo.h | 1 +
tools/configure/configureapp.cpp | 8 ++++++++
8 files changed, 42 insertions(+), 8 deletions(-)
diff --git a/configure b/configure
index 666576f..93dbfab 100755
--- a/configure
+++ b/configure
@@ -1034,6 +1034,7 @@ CFG_GCC_SYSROOT="yes"
QT_HOST_PREFIX=
QT_HOST_BINS=
QT_HOST_DATA=
+QT_EXTERNAL_HOST_BINS=
#flags for SQL drivers
QT_CFLAGS_PSQL=
@@ -1141,7 +1142,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style options that pass an argument
- -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)
+ -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)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
shift
VAL="$1"
@@ -1326,6 +1327,9 @@ while [ "$#" -gt 0 ]; do
hostbindir)
QT_HOST_BINS="$VAL"
;;
+ external-hostbindir)
+ QT_EXTERNAL_HOST_BINS="$VAL"
+ ;;
pkg-config)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_PKGCONFIG="$VAL"
@@ -3180,6 +3184,11 @@ else
QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
fi
+# default is empty, don't call makeabs if it is empty
+if [ ! -z "$QT_EXTERNAL_HOST_BINS" ]; then
+ QT_EXTERNAL_HOST_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_EXTERNAL_HOST_BINS"`
+fi
+
#-------------------------------------------------------------------------------
# help - interactive parts of the script _after_ this section please
#-------------------------------------------------------------------------------
@@ -3346,6 +3355,9 @@ Installation options:
-hostdatadir <dir> . Data used by qmake will be installed to <dir>
(default HOSTPREFIX)
+ -external-hostbindir <dir> Use external host executables instead of building them
+ (not used by defaut)
+
Configure options:
The defaults (*) are usually acceptable. A plus (+) denotes a default value
@@ -3855,6 +3867,7 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = {
"qt_hpfxpath=$QT_HOST_PREFIX",
"qt_hbinpath=$QT_HOST_BINS",
"qt_hdatpath=$QT_HOST_DATA",
+ "qt_ebinpath=$QT_EXTERNAL_HOST_BINS",
"qt_targspec=$shortxspec",
"qt_hostspec=$shortspec",
#endif
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 8cd2473..876f657 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -193,7 +193,10 @@ defineTest(qtAddRpathLink) {
defineTest(qtPrepareTool) {
$$1 = $$eval(QT_TOOL.$${2}.command)
isEmpty($$1) {
- $$1 = $$[QT_HOST_BINS]/$$2
+ $$1 = $$[QT_EXTERNAL_HOST_BINS]/$$2
+ isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
+ $$1 = $$[QT_HOST_BINS]/$$2
+ }
contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) {
exists($$eval($$1).bat) {
$$1 = $$eval($$1).bat
diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
index 46d031f..5758604 100644
--- a/mkspecs/features/qt_tool.prf
+++ b/mkspecs/features/qt_tool.prf
@@ -37,7 +37,7 @@ load(qt_common)
# If we are doing a prefix build, create a "module" pri which enables
# qtPrepareTool() to work with the non-installed build.
# Non-bootstrapped tools always need this because of the environment setup.
-!build_pass:if(!host_build|!force_bootstrap|force_independent) {
+!build_pass:if(!host_build|!force_bootstrap|force_independent):isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
isEmpty(MODULE):MODULE = $$TARGET
MODULE_DEPENDS = $$replace(QT, -private$, )
diff --git a/qmake/property.cpp b/qmake/property.cpp
index c4fbcd6..c1b7a9f 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -74,6 +74,7 @@ static const struct {
{ "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true },
{ "QT_HOST_DATA", QLibraryInfo::HostDataPath, true },
{ "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true },
+ { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true },
{ "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true },
{ "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true },
};
diff --git a/qtbase.pro b/qtbase.pro
index 4c41cff..997ea6d 100644
--- a/qtbase.pro
+++ b/qtbase.pro
@@ -68,17 +68,24 @@ CONFIG -= qt
#qmake
qmake.path = $$[QT_HOST_BINS]
+qmake.files = $$OUT_PWD/bin/qmake
+!isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
+ qmake.files = $$[QT_EXTERNAL_HOST_BINS]/bin/qmake
+}
equals(QMAKE_HOST.os, Windows) {
- qmake.files = $$OUT_PWD/bin/qmake.exe
-} else {
- qmake.files = $$OUT_PWD/bin/qmake
+ qmake.files = $${qmake.files}.exe
}
INSTALLS += qmake
#syncqt
syncqt.path = $$[QT_HOST_BINS]
syncqt.files = $$PWD/bin/syncqt
-equals(QMAKE_HOST.os, Windows):syncqt.files += $$PWD/bin/syncqt.bat
+!isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
+ syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/bin/syncqt
+}
+equals(QMAKE_HOST.os, Windows) {
+ syncqt.files = $${syncqt.files}.bat
+}
INSTALLS += syncqt
# If we are doing a prefix build, create a "module" pri which enables
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index acd11f5..bba0861 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -272,7 +272,7 @@ QLibraryInfo::isDebugBuild()
*/
static const struct {
- char key[19], value[13];
+ char key[21], value[13];
} qtConfEntries[] = {
{ "Prefix", "." },
{ "Documentation", "doc" }, // should be ${Data}/doc
@@ -297,6 +297,7 @@ static const struct {
{ "HostPrefix", "" },
{ "HostBinaries", "bin" },
{ "HostData", "." },
+ { "ExternalHostBinaries", "" },
{ "TargetSpec", "" },
{ "HostSpec", "" },
#endif
diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
index 1a00a14..7e4829c 100644
--- a/src/corelib/global/qlibraryinfo.h
+++ b/src/corelib/global/qlibraryinfo.h
@@ -83,6 +83,7 @@ public:
HostPrefixPath,
HostBinariesPath,
HostDataPath,
+ ExternalHostBinariesPath,
TargetSpecPath,
HostSpecPath,
LastHostPath = HostSpecPath,
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index dc11c0d..6d79631 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1167,6 +1167,13 @@ void Configure::parseCmdLine()
dictionary[ "QT_HOST_DATA" ] = configCmdLine.at(i);
}
+ else if (configCmdLine.at(i) == "-external-hostbindir") {
+ ++i;
+ if (i == argCount)
+ break;
+ dictionary[ "QT_EXTERNAL_HOST_BINS" ] = configCmdLine.at(i);
+ }
+
else if (configCmdLine.at(i) == "-make-tool") {
++i;
if (i == argCount)
@@ -3763,6 +3770,7 @@ void Configure::generateQConfigCpp()
<< " \"qt_hpfxpath=" << formatPath(dictionary["QT_HOST_PREFIX"]) << "\"," << endl
<< " \"qt_hbinpath=" << formatPath(dictionary["QT_HOST_BINS"]) << "\"," << endl
<< " \"qt_hdatpath=" << formatPath(dictionary["QT_HOST_DATA"]) << "\"," << endl
+ << " \"qt_ebinpath=" << formatPath(dictionary["QT_EXTERNAL_HOST_BINS"]) << "\"," << endl
<< " \"qt_targspec=" << targSpec << "\"," << endl
<< " \"qt_hostspec=" << hostSpec << "\"," << endl
<< "#endif" << endl
--
1.8.2.1

View File

@ -0,0 +1,30 @@
From 915a980742cd072df6faa386daf3f937f5b5b215 Mon Sep 17 00:00:00 2001
From: Michael Krelin <hacker@klever.net>
Date: Mon, 29 Oct 2012 20:07:49 -0700
Subject: [PATCH 4/6] qmake is already built in qtbase-native
Ported from OE by: Yu Ke <ke.yu@intel.com>
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Mikko Levonmaa <mikko.levonmaa@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 93dbfab..dd5e646 100755
--- a/configure
+++ b/configure
@@ -3938,7 +3938,7 @@ setBootstrapEvalVariable()
# build qmake
-if true; then ###[ '!' -f "$outpath/bin/qmake" ];
+if false; then ###[ '!' -f "$outpath/bin/qmake" ];
echo "Creating qmake..."
mkdir -p "$outpath/qmake" || exit
--
1.8.2.1

View File

@ -0,0 +1,29 @@
From f1246cedac44bfacb5a475d4ed247a3ac00c67d0 Mon Sep 17 00:00:00 2001
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Mon, 29 Oct 2012 20:26:36 -0700
Subject: [PATCH 5/6] Allow building a separate qmake for the target
Upstream-Status: Inappropriate [config]
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Mikko Levonmaa <mikko.levonmaa@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
qmake/qmake.pro | 1 +
1 file changed, 1 insertion(+)
diff --git a/qmake/qmake.pro b/qmake/qmake.pro
index 0d92ac2..9be0e9b 100644
--- a/qmake/qmake.pro
+++ b/qmake/qmake.pro
@@ -9,6 +9,7 @@ CONFIG -= qt shared app_bundle uic
DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED \
PROEVALUATOR_FULL PROEVALUATOR_DEBUG
DESTDIR = ../bin/
+TARGET = qmake
OBJECTS_DIR = .
MOC_DIR = .
--
1.8.2.1

View File

@ -0,0 +1,47 @@
From 6d1c296d6df2c5efd8aec3272e7eacae1c093885 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 17 Apr 2013 18:06:25 +0200
Subject: [PATCH 6/6] qt_functions: temporary remove isEmpty check
* now we assume that every build will provide QT_EXTERNAL_HOST_BINS value
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
mkspecs/features/qt_functions.prf | 6 +++++-
mkspecs/features/qt_tool.prf | 3 +--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 876f657..0e094a8 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -194,7 +194,11 @@ defineTest(qtPrepareTool) {
$$1 = $$eval(QT_TOOL.$${2}.command)
isEmpty($$1) {
$$1 = $$[QT_EXTERNAL_HOST_BINS]/$$2
- isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
+ # for some reason isEmpty does not work here, FIXME before submitting upstream
+ # DEBUG 1: mkspecs/features/qt_functions.prf:198: calling built-in isEmpty(/OE/oe-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/qt5)
+ # DEBUG 1: mkspecs/features/qt_functions.prf:198: test function returned true
+ # DEBUG 1: mkspecs/features/qt_functions.prf:198: taking 'then' branch
+ !exists($$[QT_EXTERNAL_HOST_BINS]/$$2) {
$$1 = $$[QT_HOST_BINS]/$$2
}
contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) {
diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
index 5758604..37b50d4 100644
--- a/mkspecs/features/qt_tool.prf
+++ b/mkspecs/features/qt_tool.prf
@@ -36,8 +36,7 @@ load(qt_common)
# If we are doing a prefix build, create a "module" pri which enables
# qtPrepareTool() to work with the non-installed build.
-# Non-bootstrapped tools always need this because of the environment setup.
-!build_pass:if(!host_build|!force_bootstrap|force_independent):isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
+!build_pass:if(!host_build|!force_bootstrap|force_independent):!exists($$[QT_EXTERNAL_HOST_BINS]) {
isEmpty(MODULE):MODULE = $$TARGET
MODULE_DEPENDS = $$replace(QT, -private$, )
--
1.8.2.1

View File

@ -1,8 +0,0 @@
require ${PN}.inc
require qt5-5.0.0+git.inc
PR = "${INC_PR}.0"
DEFAULT_PREFERENCE = "-1"
SRCREV = "234163adb3ceb9a6f2fac04a276724bf8495ca8e"

View File

@ -0,0 +1,6 @@
require ${PN}.inc
require qt5-5.0.2+git.inc
PR = "${INC_PR}.0"
SRCREV = "8e127d9df868952d41c8aa622b6d4ead8139a835"

View File

@ -1,6 +0,0 @@
require ${PN}.inc
require qt5-5.0.0+git.inc
PR = "${INC_PR}.0"
SRCREV = "234163adb3ceb9a6f2fac04a276724bf8495ca8e"

View File

@ -0,0 +1,6 @@
require ${PN}.inc
require qt5-5.0.2+git.inc
PR = "${INC_PR}.0"
SRCREV = "8e127d9df868952d41c8aa622b6d4ead8139a835"

View File

@ -1,6 +0,0 @@
require ${PN}.inc
require qt5-5.0.0+git.inc
PR = "${INC_PR}.0"
SRCREV = "c8ef32e2b6cded37a6854b94a281464c1b7a298b"

View File

@ -0,0 +1,6 @@
require ${PN}.inc
require qt5-5.0.2+git.inc
PR = "${INC_PR}.0"
SRCREV = "4c94a3ca55e82ade19ff5d4ab361d40e6252f2da"

View File

@ -1,6 +0,0 @@
require ${PN}.inc
require qt5-5.0.0+git.inc
PR = "${INC_PR}.0"
SRCREV = "b41c2151fdfca3f63a6cd45f6c69ae678694b63e"

View File

@ -0,0 +1,6 @@
require ${PN}.inc
require qt5-5.0.2+git.inc
PR = "${INC_PR}.0"
SRCREV = "c97afb08eb28ce36f726fe427556622790a287c1"

View File

@ -1,6 +0,0 @@
require ${PN}.inc
require qt5-5.0.0+git.inc
PR = "${INC_PR}.0"
SRCREV = "b41c2151fdfca3f63a6cd45f6c69ae678694b63e"

View File

@ -0,0 +1,6 @@
require ${PN}.inc
require qt5-5.0.2+git.inc
PR = "${INC_PR}.0"
SRCREV = "c97afb08eb28ce36f726fe427556622790a287c1"