aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--classes/qmake5.bbclass4
-rw-r--r--classes/qmake5_base.bbclass69
-rw-r--r--recipes-qt/qt5/nativesdk-qtbase_git.bb47
-rw-r--r--recipes-qt/qt5/qt5-git.inc2
-rw-r--r--recipes-qt/qt5/qtbase-native_git.bb10
-rw-r--r--recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch8
-rw-r--r--recipes-qt/qt5/qtbase/0001-QMake-Add-option-to-set-qt.conf-file.patch114
-rw-r--r--recipes-qt/qt5/qtbase/0002-configure-Separate-host-and-build-platform.patch642
-rw-r--r--recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch36
-rw-r--r--recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch156
-rw-r--r--recipes-qt/qt5/qtbase/0011-Add-external-hostbindir-option-for-native-sdk.patch131
-rw-r--r--recipes-qt/qt5/qtbase_git.bb32
-rw-r--r--recipes-qt/qt5/qtdeclarative_git.bb5
-rw-r--r--recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch6
-rw-r--r--recipes-qt/qt5/qtwayland-native_git.bb2
-rw-r--r--recipes-qt/qt5/qtwebengine_git.bb2
16 files changed, 848 insertions, 418 deletions
diff --git a/classes/qmake5.bbclass b/classes/qmake5.bbclass
index 2b43f2e3..1a960e8f 100644
--- a/classes/qmake5.bbclass
+++ b/classes/qmake5.bbclass
@@ -17,7 +17,3 @@ do_install() {
do_install_class-native() {
qmake5_base_native_do_install
}
-
-do_install_class-nativesdk() {
- qmake5_base_nativesdk_do_install
-}
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
index c2a84985..1f651fb6 100644
--- a/classes/qmake5_base.bbclass
+++ b/classes/qmake5_base.bbclass
@@ -30,8 +30,6 @@ EXTRA_OEMAKE = " \
OE_QMAKE_INCDIR_QT='${STAGING_DIR_TARGET}/${OE_QMAKE_PATH_HEADERS}' \
"
-OE_QMAKESPEC = "${QMAKE_MKSPEC_PATH_NATIVE}/mkspecs/${OE_QMAKE_PLATFORM_NATIVE}"
-OE_XQMAKESPEC = "${QMAKE_MKSPEC_PATH}/mkspecs/${OE_QMAKE_PLATFORM}"
OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake"
OE_QMAKE_COMPILER = "${CC}"
OE_QMAKE_CC = "${CC}"
@@ -43,14 +41,18 @@ OE_QMAKE_LDFLAGS = "${LDFLAGS}"
OE_QMAKE_AR = "${AR}"
OE_QMAKE_STRIP = "echo"
OE_QMAKE_WAYLAND_SCANNER = "${STAGING_BINDIR_NATIVE}/wayland-scanner"
-
-# this one needs to be exported, because qmake reads it from shell env
-export QT_CONF_PATH = "${WORKDIR}/qt.conf"
+OE_QMAKE_QTCONF_PATH = "${WORKDIR}/qt.conf"
+OE_QMAKE_QTCONF = "-qtconf ${OE_QMAKE_QTCONF_PATH}"
inherit qmake5_paths remove-libtool
do_generate_qt_config_file() {
- cat > ${QT_CONF_PATH} <<EOF
+ generate_qt_config_file_paths
+ generate_qt_config_file_effective_paths
+}
+
+generate_qt_config_file_paths() {
+ cat > ${OE_QMAKE_QTCONF_PATH} <<EOF
[Paths]
Prefix = ${OE_QMAKE_PATH_PREFIX}
Headers = ${OE_QMAKE_PATH_HEADERS}
@@ -70,12 +72,21 @@ Tests = ${OE_QMAKE_PATH_TESTS}
HostBinaries = ${OE_QMAKE_PATH_HOST_BINS}
HostData = ${OE_QMAKE_PATH_HOST_DATA}
HostLibraries = ${OE_QMAKE_PATH_HOST_LIBS}
-HostSpec = ${OE_QMAKESPEC}
-TartgetSpec = ${OE_XQMAKESPEC}
+HostSpec = ${OE_QMAKE_PLATFORM_NATIVE}
+TargetSpec = ${OE_QMAKE_PLATFORM}
ExternalHostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
Sysroot = ${STAGING_DIR_TARGET}
EOF
}
+
+generate_qt_config_file_effective_paths() {
+ cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF
+[EffectivePaths]
+HostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
+HostData = ${OE_QMAKE_PATH_HOST_DATA}
+HostPrefix = ${STAGING_DIR_NATIVE}${prefix_native}
+EOF
+}
#
# Allows to override following values (as in version 5.0.1)
# Prefix The default prefix for all paths.
@@ -154,8 +165,8 @@ qmake5_base_do_configure () {
# for config.tests to read this
export QMAKE_MAKE_ARGS="${EXTRA_OEMAKE}"
- CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST"
- ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling $CMD"
+ CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_QTCONF} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST"
+ ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_QTCONF} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling $CMD"
}
qmake5_base_native_do_install() {
@@ -163,32 +174,34 @@ qmake5_base_native_do_install() {
find "${D}" -ignore_readdir_race -name "*.la" -delete
}
-qmake5_base_nativesdk_do_install() {
- # Fix install paths for all
- find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_HOST},(INSTALL_ROOT),g"
-
- oe_runmake install INSTALL_ROOT=${D}
+qmake5_base_fix_install() {
+ STAGING_PATH=$1
+ if [ -d ${D}${STAGING_PATH} ] ; then
+ echo "Some files are installed in wrong directory ${D}${STAGING_PATH}"
+ cp -ra ${D}${STAGING_PATH}/* ${D}
+ rm -rf ${D}${STAGING_PATH}
+ # remove empty dirs
+ TMP=`dirname ${D}${STAGING_PATH}`
+ while test ${TMP} != ${D}; do
+ rmdir ${TMP}
+ TMP=`dirname ${TMP}`;
+ done
+ fi
}
qmake5_base_do_install() {
# Fix install paths for all
find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"
+ find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_HOST},(INSTALL_ROOT),g"
+ find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE},(INSTALL_ROOT),g"
oe_runmake install INSTALL_ROOT=${D}
# everything except HostData and HostBinaries is prefixed with sysroot value,
# but we cannot remove sysroot override, because that's useful for pkg-config etc
- # In some cases like QtQmlDevTools in qtdeclarative, the sed above does not work,
- # fix them manually
- if [ -d ${D}${STAGING_DIR_TARGET} ] ; then
- echo "Some files are installed in wrong directory ${D}${STAGING_DIR_TARGET}"
- cp -ra ${D}${STAGING_DIR_TARGET}/* ${D}
- rm -rf ${D}${STAGING_DIR_TARGET}
- # remove empty dirs
- TMP=`dirname ${D}/${STAGING_DIR_TARGET}`
- while test ${TMP} != ${D}; do
- rmdir ${TMP}
- TMP=`dirname ${TMP}`;
- done
- fi
+ # concurrent builds may cause qmake to regenerate Makefiles and override the above
+ # sed changes. If that happens, move files manually to correct location.
+ qmake5_base_fix_install ${STAGING_DIR_TARGET}
+ qmake5_base_fix_install ${STAGING_DIR_HOST}
+ qmake5_base_fix_install ${STAGING_DIR_NATIVE}
}
diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb
index bcaa890e..54a5b521 100644
--- a/recipes-qt/qt5/nativesdk-qtbase_git.bb
+++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb
@@ -12,7 +12,6 @@ LIC_FILES_CHKSUM = " \
file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
"
-
QT_MODULE = "qtbase"
require nativesdk-qt5.inc
@@ -24,20 +23,18 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
# common for qtbase-native, qtbase-nativesdk and qtbase
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
- file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
file://0003-Add-external-hostbindir-option.patch \
file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
file://0005-configure-bump-path-length-from-256-to-512-character.patch \
file://0006-QOpenGLPaintDevice-sub-area-support.patch \
file://0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch \
- file://0008-configure-paths-for-target-qmake-properly.patch \
- file://0009-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \
+ file://0002-configure-Separate-host-and-build-platform.patch \
"
# common for qtbase-native and nativesdk-qtbase
SRC_URI += " \
file://0010-Always-build-uic.patch \
- file://0011-Add-external-hostbindir-option-for-native-sdk.patch \
+ file://0001-QMake-Add-option-to-set-qt.conf-file.patch \
"
# CMake's toolchain configuration of nativesdk-qtbase
@@ -54,10 +51,11 @@ FILES_${PN}-tools-dev = " \
${FILES_SOLIBSDEV} ${libdir}/*.la \
${libdir}/*.prl \
${OE_QMAKE_PATH_ARCHDATA}/mkspecs \
+ ${OE_QMAKE_PATH_LIBS}/*.prl \
"
FILES_${PN}-tools-staticdev = " \
- ${libdir}/libQt5Bootstrap.a \
+ ${OE_QMAKE_PATH_LIBS}/*.a \
"
FILES_${PN}-tools-dbg = " \
@@ -92,7 +90,7 @@ OE_QMAKE_PATH_HOST_DATA = "${libdir}${QT_DIR_NAME}"
OE_QMAKE_PATH_HOST_LIBS = "${libdir}"
do_generate_qt_config_file() {
- cat > ${QT_CONF_PATH} <<EOF
+ cat > ${OE_QMAKE_QTCONF_PATH} <<EOF
[Paths]
Prefix = ${OE_QMAKE_PATH_PREFIX}
Headers = ${OE_QMAKE_PATH_HEADERS}
@@ -112,18 +110,18 @@ Tests = ${OE_QMAKE_PATH_TESTS}
HostBinaries = ${OE_QMAKE_PATH_HOST_BINS}
HostData = ${OE_QMAKE_PATH_HOST_DATA}
HostLibraries = ${OE_QMAKE_PATH_HOST_LIBS}
-HostSpec = ${OE_QMAKESPEC}
-TartgetSpec = ${OE_XQMAKESPEC}
+HostSpec = ${OE_QMAKE_PLATFORM_NATIVE}
+TargetSpec = ${OE_QMAKE_PLATFORM}
ExternalHostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
Sysroot =
EOF
}
do_generate_qt_config_file_append() {
- cat >> ${QT_CONF_PATH} <<EOF
+ cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF
[EffectivePaths]
-Prefix=..
+Prefix=${B}
EOF
}
@@ -141,21 +139,10 @@ export OE_QMAKE_LDFLAGS
export OE_QMAKE_AR
export OE_QMAKE_STRIP
-# another exception is that we need to run bin/qmake, because EffectivePaths are relative to qmake location
-OE_QMAKE_QMAKE_ORIG = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake"
-OE_QMAKE_QMAKE = "bin/qmake"
-
do_configure() {
- # we need symlink in path relative to source, because
- # EffectivePaths:Prefix is relative to qmake location
- if [ ! -e ${B}/bin/qmake ]; then
- mkdir -p ${B}/bin
- ln -sf ${OE_QMAKE_QMAKE_ORIG} ${B}/bin/qmake
- fi
-
${S}/configure -v \
-opensource -confirm-license \
- -sysroot ${STAGING_DIR_NATIVE} \
+ -sysroot ${STAGING_DIR_TARGET} \
-no-gcc-sysroot \
-system-zlib \
-dbus-runtime \
@@ -189,6 +176,7 @@ do_configure() {
-testsdir ${OE_QMAKE_PATH_TESTS} \
-hostbindir ${OE_QMAKE_PATH_HOST_BINS} \
-hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \
+ -host-option CROSS_COMPILE=${HOST_PREFIX} \
-external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \
-no-glib \
-no-iconv \
@@ -198,11 +186,11 @@ do_configure() {
-nomake libs \
-no-compile-examples \
-no-rpath \
- -platform ${OE_QMAKESPEC} \
- -xplatform linux-oe-g++ \
+ -platform ${OE_QMAKE_PLATFORM_NATIVE} \
+ -xplatform ${OE_QMAKE_PLATFORM} \
${QT_CONFIG_FLAGS}
- bin/qmake ${OE_QMAKE_DEBUG_OUTPUT} ${S} -o Makefile || die "Configuring qt with qmake failed. PACKAGECONFIG_CONFARGS was ${PACKAGECONFIG_CONFARGS}"
+ ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_QTCONF} ${S} -o Makefile || die "Configuring qt with qmake failed. PACKAGECONFIG_CONFARGS was ${PACKAGECONFIG_CONFARGS}"
}
do_install() {
@@ -211,12 +199,6 @@ do_install() {
oe_runmake install INSTALL_ROOT=${D}
- install -m 755 ${B}/bin/qmake-target ${D}${OE_QMAKE_PATH_HOST_BINS}/qmake
-
- # for modules which are still using syncqt and call qtPrepareTool(QMAKE_SYNCQT, syncqt)
- # e.g. qt3d, qtwayland
- ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt
-
# remove things unused in nativesdk, we need the headers and libs
rm -rf ${D}${datadir} \
${D}/${OE_QMAKE_PATH_PLUGINS} \
@@ -240,7 +222,6 @@ fakeroot do_generate_qt_environment_file() {
echo 'export OE_QMAKE_CXX=$CXX' >> $script
echo 'export OE_QMAKE_LINK=$CXX' >> $script
echo 'export OE_QMAKE_AR=$AR' >> $script
- echo 'export QT_CONF_PATH=${OE_QMAKE_PATH_HOST_BINS}/qt.conf' >> $script
echo 'export OE_QMAKE_LIBDIR_QT=`qmake -query QT_INSTALL_LIBS`' >> $script
echo 'export OE_QMAKE_INCDIR_QT=`qmake -query QT_INSTALL_HEADERS`' >> $script
echo 'export OE_QMAKE_MOC=${OE_QMAKE_PATH_HOST_BINS}/moc' >> $script
diff --git a/recipes-qt/qt5/qt5-git.inc b/recipes-qt/qt5/qt5-git.inc
index c5795ed5..2bc7b9b0 100644
--- a/recipes-qt/qt5/qt5-git.inc
+++ b/recipes-qt/qt5/qt5-git.inc
@@ -2,7 +2,7 @@
# Copyright (C) 2013-2014 Martin Jansa <martin.jansa@gmail.com>
QT_MODULE ?= "${BPN}"
-QT_MODULE_BRANCH ?= "5.6"
+QT_MODULE_BRANCH ?= "5.6;nobranch=1"
# each module needs to define valid SRCREV
SRC_URI = " \
diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb
index efce827a..a928a9a4 100644
--- a/recipes-qt/qt5/qtbase-native_git.bb
+++ b/recipes-qt/qt5/qtbase-native_git.bb
@@ -17,12 +17,12 @@ require qt5-git.inc
# common for qtbase-native, qtbase-nativesdk and qtbase
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
- file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
file://0003-Add-external-hostbindir-option.patch \
file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
file://0005-configure-bump-path-length-from-256-to-512-character.patch \
file://0006-QOpenGLPaintDevice-sub-area-support.patch \
file://0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch \
+ file://0002-configure-Separate-host-and-build-platform.patch \
file://0008-configure-paths-for-target-qmake-properly.patch \
file://0009-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \
"
@@ -30,19 +30,16 @@ SRC_URI += "\
# common for qtbase-native and nativesdk-qtbase
SRC_URI += " \
file://0010-Always-build-uic.patch \
- file://0011-Add-external-hostbindir-option-for-native-sdk.patch \
+ file://0001-QMake-Add-option-to-set-qt.conf-file.patch \
"
CLEANBROKEN = "1"
-QT_CONF_PATH = "${B}/qt.conf"
-
do_generate_qt_config_file() {
:
}
PACKAGECONFIG_CONFARGS = " \
- -prefix ${prefix} \
-sysroot ${STAGING_DIR_NATIVE} \
-no-gcc-sysroot \
-system-zlib \
@@ -63,10 +60,13 @@ PACKAGECONFIG_CONFARGS = " \
-release \
-prefix ${OE_QMAKE_PATH_PREFIX} \
-bindir ${OE_QMAKE_PATH_BINS} \
+ -hostbindir ${OE_QMAKE_PATH_BINS} \
-libdir ${OE_QMAKE_PATH_LIBS} \
+ -hostlibdir ${OE_QMAKE_PATH_LIBS} \
-headerdir ${OE_QMAKE_PATH_HEADERS} \
-archdatadir ${OE_QMAKE_PATH_ARCHDATA} \
-datadir ${OE_QMAKE_PATH_DATA} \
+ -hostdatadir ${QMAKE_MKSPEC_PATH_NATIVE} \
-docdir ${OE_QMAKE_PATH_DOCS} \
-sysconfdir ${OE_QMAKE_PATH_SETTINGS} \
-no-glib \
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
index e606cdbe..b52ca8f6 100644
--- a/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
+++ b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
@@ -37,10 +37,6 @@ Subject: [PATCH] Add linux-oe-g++ platform
/bin/sh: line 0: test: -gt: unary operator expected
which are not fatal, but still misleading in do_configure output
-* add -target suffix to qmake built in qtbase configure, this way we can
- use qmake from qtbase-native, but then include qmake built for target
- in qtbase-tools package (smilarly for nativesdk-qtbase).
-
Upstream-Status: Inappropriate [embedded specific]
too OE specific, probably cannot be upstreamed
@@ -49,7 +45,7 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
configure | 71 ++++++++++++++++---------
mkspecs/features/configure.prf | 4 +-
- mkspecs/linux-oe-g++/qmake.conf | 42 +++++++++++++++
+ mkspecs/linux-oe-g++/qmake.conf | 43 +++++++++++++++
mkspecs/linux-oe-g++/qplatformdefs.h | 100 +++++++++++++++++++++++++++++++++++
4 files changed, 189 insertions(+), 28 deletions(-)
create mode 100644 mkspecs/linux-oe-g++/qmake.conf
@@ -184,7 +180,7 @@ index f4c7813..9ab6a9d 100755
\"\$(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/tools/qlocale_unix.cpp\""
EXEEXT=
-+ [ "$QT_CROSS_COMPILE" = "yes" ] && EXEEXT=-target
++
fi
if [ "$BUILD_ON_MAC" = "yes" ]; then
echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile"
diff --git a/recipes-qt/qt5/qtbase/0001-QMake-Add-option-to-set-qt.conf-file.patch b/recipes-qt/qt5/qtbase/0001-QMake-Add-option-to-set-qt.conf-file.patch
new file mode 100644
index 00000000..ce266572
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0001-QMake-Add-option-to-set-qt.conf-file.patch
@@ -0,0 +1,114 @@
+From dbf1c2eb9f4e1feb24a58699b7b550016802e386 Mon Sep 17 00:00:00 2001
+From: David Schulz <david.schulz@theqtcompany.com>
+Date: Mon, 13 Jul 2015 11:21:22 +0200
+Subject: [PATCH] QMake: Add option to set qt.conf file.
+
+Upstream-Status: Integrated in dev (dbf1c2eb9f4e1feb24a58699b7b550016802e386),
+ will be in 5.7 branch
+
+Change-Id: Ie5db11892ccf2d357773a4db6a0464bf27be9a26
+Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
+---
+ mkspecs/features/configure.prf | 4 +++-
+ qmake/library/qmakeevaluator.cpp | 2 ++
+ qmake/library/qmakeglobals.cpp | 7 ++++++-
+ qmake/library/qmakeglobals.h | 1 +
+ qmake/option.cpp | 3 +++
+ 5 files changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
+index 6b37a04..92c288c 100644
+--- a/mkspecs/features/configure.prf
++++ b/mkspecs/features/configure.prf
+@@ -67,7 +67,9 @@ defineTest(qtCompileTest) {
+
+ mkpath($$test_out_dir)|error("Aborting.")
+
+- qtRunLoggedCommand("$$test_cmd_base $$system_quote($$system_path($$QMAKE_QMAKE)) -spec $$QMAKESPEC $$qmake_configs $$shell_quote($$test_dir)") {
++ !isEmpty (QMAKE_QTCONF): qtconfarg = -qtconf $$QMAKE_QTCONF
++
++ qtRunLoggedCommand("$$test_cmd_base $$system_quote($$system_path($$QMAKE_QMAKE)) $$qtconfarg -spec $$QMAKESPEC $$qmake_configs $$shell_quote($$test_dir)") {
+ qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE $$(QMAKE_MAKE_ARGS)") {
+ log("yes$$escape_expand(\\n)")
+ msg = "test $$1 succeeded"
+diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
+index cfb95b9..31be44e 100644
+--- a/qmake/library/qmakeevaluator.cpp
++++ b/qmake/library/qmakeevaluator.cpp
+@@ -992,6 +992,8 @@ void QMakeEvaluator::loadDefaults()
+ vars[ProKey("QMAKE_QMAKE")] << ProString(m_option->qmake_abslocation);
+ if (!m_option->qmake_args.isEmpty())
+ vars[ProKey("QMAKE_ARGS")] = ProStringList(m_option->qmake_args);
++ if (!m_option->qtconf.isEmpty())
++ vars[ProKey("QMAKE_QTCONF")] = ProString(m_option->qtconf);
+ vars[ProKey("QMAKE_HOST.cpu_count")] = ProString(QString::number(idealThreadCount()));
+ #if defined(Q_OS_WIN32)
+ vars[ProKey("QMAKE_HOST.os")] << ProString("Windows");
+diff --git a/qmake/library/qmakeglobals.cpp b/qmake/library/qmakeglobals.cpp
+index 55ce404..4f1a9d2 100644
+--- a/qmake/library/qmakeglobals.cpp
++++ b/qmake/library/qmakeglobals.cpp
+@@ -128,7 +128,7 @@ QString QMakeGlobals::cleanSpec(QMakeCmdLineParserState &state, const QString &s
+ QMakeGlobals::ArgumentReturn QMakeGlobals::addCommandLineArguments(
+ QMakeCmdLineParserState &state, QStringList &args, int *pos)
+ {
+- enum { ArgNone, ArgConfig, ArgSpec, ArgXSpec, ArgTmpl, ArgTmplPfx, ArgCache } argState = ArgNone;
++ enum { ArgNone, ArgConfig, ArgSpec, ArgXSpec, ArgTmpl, ArgTmplPfx, ArgCache, ArgQtConf } argState = ArgNone;
+ for (; *pos < args.count(); (*pos)++) {
+ QString arg = args.at(*pos);
+ switch (argState) {
+@@ -153,6 +153,9 @@ QMakeGlobals::ArgumentReturn QMakeGlobals::addCommandLineArguments(
+ case ArgCache:
+ cachefile = args[*pos] = QDir::cleanPath(QDir(state.pwd).absoluteFilePath(arg));
+ break;
++ case ArgQtConf:
++ qtconf = args[*pos] = QDir::cleanPath(QDir(state.pwd).absoluteFilePath(arg));
++ break;
+ default:
+ if (arg.startsWith(QLatin1Char('-'))) {
+ if (arg == QLatin1String("-after"))
+@@ -163,6 +166,8 @@ QMakeGlobals::ArgumentReturn QMakeGlobals::addCommandLineArguments(
+ do_cache = false;
+ else if (arg == QLatin1String("-cache"))
+ argState = ArgCache;
++ else if (arg == QLatin1String("-qtconf"))
++ argState = ArgQtConf;
+ else if (arg == QLatin1String("-platform") || arg == QLatin1String("-spec"))
+ argState = ArgSpec;
+ else if (arg == QLatin1String("-xplatform") || arg == QLatin1String("-xspec"))
+diff --git a/qmake/library/qmakeglobals.h b/qmake/library/qmakeglobals.h
+index de46ebb..87fc9d4 100644
+--- a/qmake/library/qmakeglobals.h
++++ b/qmake/library/qmakeglobals.h
+@@ -112,6 +112,7 @@ public:
+ QString qmake_abslocation;
+ QStringList qmake_args;
+
++ QString qtconf;
+ QString qmakespec, xqmakespec;
+ QString user_template, user_template_prefix;
+ QString precmds, postcmds;
+diff --git a/qmake/option.cpp b/qmake/option.cpp
+index da59616..1d1aece 100644
+--- a/qmake/option.cpp
++++ b/qmake/option.cpp
+@@ -172,6 +172,7 @@ bool usage(const char *a0)
+ " -set <prop> <value> Set persistent property\n"
+ " -unset <prop> Unset persistent property\n"
+ " -query <prop> Query persistent property. Show all if <prop> is empty.\n"
++ " -qtconf file Use file instead of looking for qt.conf\n"
+ " -cache file Use file as cache [makefile mode only]\n"
+ " -spec spec Use spec as QMAKESPEC [makefile mode only]\n"
+ " -nocache Don't use a cache file [makefile mode only]\n"
+@@ -642,6 +643,8 @@ qmakeAddCacheClear(qmakeCacheClearFunc func, void **data)
+
+ QString qmake_libraryInfoFile()
+ {
++ if (!Option::globals->qtconf.isEmpty())
++ return Option::globals->qtconf;
+ if (!Option::globals->qmake_abslocation.isEmpty())
+ return QDir(QFileInfo(Option::globals->qmake_abslocation).absolutePath()).filePath("qt.conf");
+ return QString();
+--
+2.5.0.windows.1
+
diff --git a/recipes-qt/qt5/qtbase/0002-configure-Separate-host-and-build-platform.patch b/recipes-qt/qt5/qtbase/0002-configure-Separate-host-and-build-platform.patch
new file mode 100644
index 00000000..70a71ff9
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0002-configure-Separate-host-and-build-platform.patch
@@ -0,0 +1,642 @@
+From d98f945aade15bf49eb7c016d2eefd513351b360 Mon Sep 17 00:00:00 2001
+From: David Schulz <david.schulz@theqtcompany.com>
+Date: Mon, 12 Oct 2015 09:55:30 +0200
+Subject: [PATCH] configure: Separate host and build platform.
+
+Upstream-Status: Integrated in dev (c23a086e4fc9d7d7b2420de26cbc5adcbd23596e),
+ will be in 5.7 branch
+
+This separation makes it possible to make a
+canadian cross build of Qt on a linux build machine.
+The canadian cross build requires an external Qt that
+runs on the build system.
+
+Change-Id: Ifd83a4c6376d3299647e74bb349a3452a6f433fc
+---
+ config.tests/unix/arch.test | 6 +-
+ config.tests/unix/compile.test | 7 +-
+ configure | 164 ++++++++++++++++++++++++++++++++-----
+ mkspecs/features/device_config.prf | 15 ++--
+ mkspecs/features/qt_functions.prf | 2 +-
+ mkspecs/features/qt_tool.prf | 57 ++++++++-----
+ qmake/qmake-aux.pro | 11 +++
+ qmake/qmake-docs.pro | 2 -
+ qtbase.pro | 15 +---
+ 9 files changed, 211 insertions(+), 68 deletions(-)
+ create mode 100644 qmake/qmake-aux.pro
+ delete mode 100644 qmake/qmake-docs.pro
+
+diff --git a/config.tests/unix/arch.test b/config.tests/unix/arch.test
+index c50bd8b..cfb47de 100755
+--- a/config.tests/unix/arch.test
++++ b/config.tests/unix/arch.test
+@@ -6,7 +6,9 @@ SRCDIR=$3
+ OUTDIR=$4
+ RESULTFILE=$5
+ TARGET=$6
+-shift 6
++QMAKE=$7
++QTCONF=$8
++shift 8
+
+ if [ "$TARGET" = "host" ]; then
+ VARPREFIX="CFG_HOST"
+@@ -44,7 +46,7 @@ done
+ test -d "$OUTDIR/config.tests/arch" || mkdir -p "$OUTDIR/config.tests/arch"
+ cd "$OUTDIR/config.tests/arch"
+ [ -f Makefile ] && $MAKE distclean >/dev/null 2>&1
+-OUTDIR=$OUTDIR "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "LIBS+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "INCLUDEPATH+=$INCLUDEPATH" "CONFIG-=app_bundle" "$SRCDIR/config.tests/arch/arch$PROSUFFIX.pro" >/dev/null 2>&1 || echo "qmake is broken" >&2
++OUTDIR=$OUTDIR "$QMAKE" -qtconf "$QTCONF" -nocache -spec "$QMKSPEC" "LIBS+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "INCLUDEPATH+=$INCLUDEPATH" "CONFIG-=app_bundle" "$SRCDIR/config.tests/arch/arch$PROSUFFIX.pro" >/dev/null 2>&1 || echo "qmake is broken" >&2
+
+
+ ARCH=""
+diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test
+index bc5258c..f5db184 100755
+--- a/config.tests/unix/compile.test
++++ b/config.tests/unix/compile.test
+@@ -10,7 +10,9 @@ OUTDIR=$5
+ TEST=$6
+ EXE=`basename "$6"`
+ DESCRIPTION=$7
+-shift 7
++QMAKE=$8
++QTCONF=$9
++shift 9
+ LFLAGS="$SYSROOT_FLAG"
+ INCLUDEPATH=""
+ CFLAGS="$SYSROOT_FLAG"
+@@ -73,7 +75,8 @@ test -r Makefile && $MAKE distclean >/dev/null 2>&1
+ rm -f "$EXE" "${EXE}.exe"
+
+ set -- \
+- "$OUTDIR/bin/qmake" \
++ "$QMAKE" \
++ -qtconf "$QTCONF" \
+ -nocache \
+ -spec "$QMKSPEC" \
+ "CONFIG+=$QMAKE_CONFIG" \
+diff --git a/configure b/configure
+index 55b1886..ef9c29b 100755
+--- a/configure
++++ b/configure
+@@ -105,9 +105,11 @@ QT_CONFIG=
+ SUPPORTED=
+ QMAKE_VARS_FILE=.qmake.vars
+ DEVICE_VARS_FILE=.device.vars
++HOST_VARS_FILE=.host.vars
+
+ :> "$QMAKE_VARS_FILE"
+ :> "$DEVICE_VARS_FILE"
++:> "$HOST_VARS_FILE"
+
+ #-------------------------------------------------------------------------------
+ # utility functions
+@@ -196,15 +198,15 @@ expandQMakeConf()
+ echo "WARNING: Unable to find file $conf_file" >&2
+ continue
+ fi
+- expandQMakeConf "$conf_file"
++ expandQMakeConf "$conf_file" "$2"
+ ;;
+ *load\(device_config\)*)
+- conf_file="$DEVICE_VARS_FILE"
++ conf_file="$2"
+ if [ ! -f "$conf_file" ]; then
+ echo "WARNING: Unable to find file $conf_file" >&2
+ continue
+ fi
+- expandQMakeConf "$conf_file"
++ expandQMakeConf "$conf_file" "$2"
+ ;;
+ *)
+ echo "$line"
+@@ -337,7 +339,7 @@ macSDKify()
+ getQMakeConf()
+ {
+ if [ -z "$specvals" ]; then
+- specvals=`expandQMakeConf "$QMAKESPEC/qmake.conf" | extractQMakeVariables "host_build"`
++ specvals=`expandQMakeConf "$QMAKESPEC/qmake.conf" "$HOST_VARS_FILE" | extractQMakeVariables "host_build"`
+ if [ "$BUILD_ON_MAC" = "yes" ]; then specvals=$(macSDKify "$specvals"); fi
+ fi
+ getSingleQMakeVariable "$1" "$specvals"
+@@ -356,7 +358,7 @@ getQEvalMakeConf()
+ getXQMakeConf()
+ {
+ if [ -z "$xspecvals" ]; then
+- xspecvals=`expandQMakeConf "$XQMAKESPEC/qmake.conf" | extractQMakeVariables "!host_build"`
++ xspecvals=`expandQMakeConf "$XQMAKESPEC/qmake.conf" "$DEVICE_VARS_FILE" | extractQMakeVariables "!host_build"`
+ if [ "$XPLATFORM_MAC" = "yes" ]; then xspecvals=$(macSDKify "$xspecvals"); fi
+ fi
+ getSingleQMakeVariable "$1" "$xspecvals"
+@@ -514,6 +516,23 @@ resolveDeviceMkspec()
+ }
+
+ #-------------------------------------------------------------------------------
++# Host options
++#-------------------------------------------------------------------------------
++HostVar()
++{
++ case "$1" in
++ set)
++ eq="="
++ ;;
++ *)
++ echo >&2 "BUG: wrong command to QMakeVar: $1"
++ ;;
++ esac
++
++ echo "$2" "$eq" "$3" >> "$HOST_VARS_FILE"
++}
++
++#-------------------------------------------------------------------------------
+ # operating system detection
+ #-------------------------------------------------------------------------------
+
+@@ -538,12 +557,10 @@ BUILD_ON_MAC=no
+ if [ -d /System/Library/Frameworks/Carbon.framework ]; then
+ BUILD_ON_MAC=yes
+ fi
+-BUILD_ON_MSYS=no
+ HOST_DIRLIST_SEP=":"
+ DEV_NULL=/dev/null
+ if [ "$OSTYPE" = "msys" ]; then
+ HOST_DIRLIST_SEP=";"
+- BUILD_ON_MSYS=yes
+ DEV_NULL=/tmp/empty-file
+ echo "" > $DEV_NULL
+ relpath=`(cd "$relpath"; pwd -W)`
+@@ -948,6 +965,7 @@ while [ "$#" -gt 0 ]; do
+ -hostlibdir| \
+ -extprefix| \
+ -sysroot| \
++ -external-hostbindir| \
+ -depths| \
+ -make| \
+ -nomake| \
+@@ -956,6 +974,7 @@ while [ "$#" -gt 0 ]; do
+ -xplatform| \
+ -device| \
+ -device-option| \
++ -host-option| \
+ -sdk| \
+ -arch| \
+ -host-arch| \
+@@ -1275,6 +1294,10 @@ while [ "$#" -gt 0 ]; do
+ gcc-sysroot)
+ CFG_GCC_SYSROOT="$VAL"
+ ;;
++ external-hostbindir)
++ CFG_HOST_QT_TOOLS_PATH="$VAL"
++ HostVar set HOST_QT_TOOLS "$VAL"
++ ;;
+ bindir)
+ QT_INSTALL_BINS="$VAL"
+ ;;
+@@ -1456,6 +1479,11 @@ while [ "$#" -gt 0 ]; do
+ DEV_VAL=`echo $VAL | cut -d '=' -f 2-`
+ DeviceVar set $DEV_VAR "$DEV_VAL"
+ ;;
++ host-option)
++ HOST_VAR=`echo $VAL | cut -d '=' -f 1`
++ HOST_VAL=`echo $VAL | cut -d '=' -f 2-`
++ HostVar set $HOST_VAR "$HOST_VAL"
++ ;;
+ qpa)
+ QT_QPA_DEFAULT_PLATFORM="$VAL"
+ ;;
+@@ -2696,6 +2724,8 @@ Additional options:
+ -device-option <key=value> ... Add device specific options for the device mkspec
+ (experimental)
+
++ -host-option <key=value> ..... Add host specific options for the host mkspec
++
+ * -no-separate-debug-info . Do not store debug information in a separate file.
+ -separate-debug-info .... Strip debug information into a separate file.
+
+@@ -2727,6 +2757,9 @@ Additional options:
+ -sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot and also sets pkg-config paths.
+ -no-gcc-sysroot ..... When using -sysroot, it disables the passing of --sysroot to the compiler
+
++ -external-hostbindir <path> .. Path to Qt tools built for this machine. Use this when -platform
++ does not match the current system, i.e., to make a Canadian Cross Build.
++
+ -no-feature-<feature> Do not compile in <feature>.
+ -feature-<feature> .. Compile in <feature>. The available features
+ are described in src/corelib/global/qfeatures.txt
+@@ -3306,7 +3339,7 @@ if [ -d "$XPLATFORM" ]; then
+ else
+ XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
+ fi
+-if [ "$PLATFORM" != "$XPLATFORM" ]; then
++if [ "$PLATFORM" != "$XPLATFORM" ] || [ -n "$CFG_HOST_QT_TOOLS_PATH" ]; then
+ QT_CROSS_COMPILE=yes
+ QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
+@@ -4082,7 +4115,8 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
+ EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
+ fi
+
+- if [ "$BUILD_ON_MSYS" = "yes" ]; then
++ case `basename "$PLATFORM"` in
++ win32-g++*)
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DUNICODE"
+ EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DUNICODE"
+ EXTRA_OBJS="qfilesystemengine_win.o \
+@@ -4101,7 +4135,8 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
+ \"\$(SOURCE_PATH)/tools/shared/windows/registry.cpp\""
+ EXTRA_LFLAGS="$EXTRA_LFLAGS -static -s -lole32 -luuid -ladvapi32 -lkernel32"
+ EXEEXT=".exe"
+- else
++ ;;
++ *)
+ EXTRA_OBJS="qfilesystemengine_unix.o \
+ qfilesystemiterator_unix.o \
+ qfsfileengine_unix.o \
+@@ -4111,8 +4146,8 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
+ \"\$(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp\" \
+ \"\$(SOURCE_PATH)/src/corelib/tools/qlocale_unix.cpp\""
+ EXEEXT=
+-
+- fi
++ ;;
++ esac
+ if [ "$BUILD_ON_MAC" = "yes" ]; then
+ echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile"
+ echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
+@@ -4130,6 +4165,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
+ \"\$(SOURCE_PATH)/src/corelib/kernel/qcore_mac.cpp\" \
+ \"\$(SOURCE_PATH)/src/corelib/kernel/qcore_mac_objc.mm\""
+ fi
++
+ echo >>"$mkfile"
+ adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
+ adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
+@@ -4199,7 +4235,81 @@ QTCONFFILE="$outpath/bin/qt.conf"
+ cat > "$QTCONFFILE" <<EOF
+ [EffectivePaths]
+ Prefix=..
++[Paths]
++Prefix=$QT_EXT_PREFIX
++TargetSpec=$XQMAKESPEC
++HostSpec=$QMAKESPEC
++EOF
++if [ -n "$CFG_SYSROOT" ]; then
++ cat >> "$QTCONFFILE" <<EOF
++Sysroot=$CFG_SYSROOT
++EOF
++fi
++if [ -n "$QT_INSTALL_BINS" ]; then
++cat >> "$QTCONFFILE" <<EOF
++Binaries=$QT_INSTALL_BINS
++EOF
++fi
++if [ -n "$QT_INSTALL_LIBS" ]; then
++cat >> "$QTCONFFILE" <<EOF
++Libraries=$QT_INSTALL_LIBS
++EOF
++fi
++if [ -n "$QT_INSTALL_DOCS" ]; then
++cat >> "$QTCONFFILE" <<EOF
++Documentation=$QT_INSTALL_DOCS
++EOF
++fi
++if [ -n "$QT_INSTALL_HEADERS" ]; then
++cat >> "$QTCONFFILE" <<EOF
++Headers=$QT_INSTALL_HEADERS
++EOF
++fi
++if [ -n "$QT_INSTALL_PLUGINS" ]; then
++cat >> "$QTCONFFILE" <<EOF
++Plugins=$QT_INSTALL_PLUGINS
++EOF
++fi
++if [ -n "$QT_INSTALL_IMPORTS" ]; then
++cat >> "$QTCONFFILE" <<EOF
++Imports=$QT_INSTALL_IMPORTS
++EOF
++fi
++if [ -n "$QT_INSTALL_SETTINGS" ]; then
++cat >> "$QTCONFFILE" <<EOF
++Settings=$QT_INSTALL_SETTINGS
++EOF
++fi
++if [ -n "$QT_INSTALL_ARCHDATA" ]; then
++cat >> "$QTCONFFILE" <<EOF
++ArchData=$QT_INSTALL_ARCHDATA
++EOF
++fi
++if [ -n "$QT_INSTALL_DATA" ]; then
++cat >> "$QTCONFFILE" <<EOF
++Data=$QT_INSTALL_DATA
+ EOF
++fi
++if [ -n "$QT_HOST_PREFIX" ]; then
++cat >> "$QTCONFFILE" <<EOF
++HostPrefix=$QT_HOST_PREFIX
++EOF
++fi
++if [ -n "$QT_HOST_BINS" ]; then
++cat >> "$QTCONFFILE" <<EOF
++HostBinaries=$QT_HOST_BINS
++EOF
++fi
++if [ -n "$QT_HOST_LIBS" ]; then
++cat >> "$QTCONFFILE" <<EOF
++HostLibraries=$QT_HOST_LIBS
++EOF
++fi
++if [ -n "$QT_HOST_DATA" ]; then
++cat >> "$QTCONFFILE" <<EOF
++HostData=$QT_HOST_DATA
++EOF
++fi
+ if [ x"$relpath" != x"$outpath" ]; then
+ cat >> "$QTCONFFILE" <<EOF
+ [EffectiveSourcePaths]
+@@ -4207,6 +4317,9 @@ Prefix=$relpath
+ EOF
+ fi
+
++[ -z "$CFG_HOST_QT_TOOLS_PATH" ] && CFG_HOST_QT_TOOLS_PATH="$outpath/bin"
++CFG_QMAKE_PATH="$CFG_HOST_QT_TOOLS_PATH/qmake"
++
+ #-------------------------------------------------------------------------------
+ # write out device config before we run the test.
+ #-------------------------------------------------------------------------------
+@@ -4219,9 +4332,20 @@ else
+ fi
+
+ #-------------------------------------------------------------------------------
++# write out host config.
++#-------------------------------------------------------------------------------
++HOST_VARS_OUTFILE="$outpath/mkspecs/qhost.pri"
++if cmp -s "$HOST_VARS_FILE" "$HOST_VARS_OUTFILE"; then
++ rm -f "$HOST_VARS_FILE"
++else
++ mv -f $HOST_VARS_FILE "$HOST_VARS_OUTFILE"
++ HOST_VARS_FILE="$HOST_VARS_OUTFILE"
++fi
++
++#-------------------------------------------------------------------------------
+ # Verify makespec
+ #-------------------------------------------------------------------------------
+-QMAKE_OUTPUT=`"$outpath/bin/qmake" -E -nocache -spec "$XQMAKESPEC" "QT=" $DEV_NULL 2>&1`
++QMAKE_OUTPUT=`"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" -E -nocache -spec "$XQMAKESPEC" "QT=" $DEV_NULL 2>&1`
+ if [ $? != "0" ]; then
+ echo "Failed to process makespec for platform '$XPLATFORM'"
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+@@ -4237,7 +4361,7 @@ fi
+ #-------------------------------------------------------------------------------
+ if [ -z "$PKG_CONFIG" ]; then
+ # See if PKG_CONFIG is set in the mkspec:
+- PKG_CONFIG="`"$outpath/bin/qmake" -E -nocache -spec "$XQMAKESPEC" "CONFIG=" $DEV_NULL 2>&1 | sed -n -e 's,^PKG_CONFIG = \(.*\),\1,p'`"
++ PKG_CONFIG="`"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" -E -nocache -spec "$XQMAKESPEC" "CONFIG=" $DEV_NULL 2>&1 | sed -n -e 's,^PKG_CONFIG = \(.*\),\1,p'`"
+ [ -n "$PKG_CONFIG" ] && [ "$OPT_VERBOSE" = "yes" ] && echo "Found pkg-config from mkspec: $PKG_CONFIG"
+ fi
+ if [ -z "$PKG_CONFIG" ]; then
+@@ -4317,7 +4441,7 @@ compileTest()
+ TEST_CONFIG_FLAGS="QT_CONFIG+=no-pkg-config"
+ fi
+ echo $ECHO_N "checking for $name... $ECHO_C"
+- "$unixtests/compile.test" "$XQMAKESPEC" "$test_config" $OPT_VERBOSE "$relpath" "$outpath" "$path" "$name" $I_FLAGS $D_FLAGS $L_FLAGS $TEST_CONFIG_FLAGS "$@"
++ "$unixtests/compile.test" "$XQMAKESPEC" "$test_config" $OPT_VERBOSE "$relpath" "$outpath" "$path" "$name" "$CFG_QMAKE_PATH" "$QTCONFFILE" $I_FLAGS $D_FLAGS $L_FLAGS $TEST_CONFIG_FLAGS "$@"
+ }
+
+ compileTestWithPkgConfig()
+@@ -4366,7 +4490,7 @@ compileTestWithPkgConfig()
+
+ # Use config.tests/arch/arch.pro to have the compiler tell us what the target architecture is
+ OUTFILE=$outpath/arch.result
+-"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "target" $I_FLAGS $D_FLAGS $L_FLAGS
++"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "target" $CFG_QMAKE_PATH $QTCONFFILE $I_FLAGS $D_FLAGS $L_FLAGS
+ if [ $? -eq 0 ]; then
+ eval `cat "$OUTFILE"`
+ else
+@@ -4379,7 +4503,7 @@ rm -f "$OUTFILE" 2>/dev/null
+
+ if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
+ # Do the same test again, using the host compiler
+- SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "host" $I_FLAGS $D_FLAGS $L_FLAGS
++ SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "host" $CFG_QMAKE_PATH $QTCONFFILE $I_FLAGS $D_FLAGS $L_FLAGS
+ if [ $? -eq 0 ]; then
+ eval `cat "$OUTFILE"`
+ else
+@@ -4595,7 +4719,7 @@ fi
+
+ # detect mips_dsp support
+ if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSP}" = "auto" ]; then
+- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dsp "mips_dsp" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
++ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dsp "mips_dsp" "$CFG_QMAKE_PATH" "$QTCONFFILE" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
+ CFG_MIPS_DSP=yes
+ else
+ CFG_MIPS_DSP=no
+@@ -4606,7 +4730,7 @@ fi
+
+ # detect mips_dspr2 support
+ if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "auto" ]; then
+- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dspr2 "mips_dspr2" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
++ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dspr2 "mips_dspr2" "$CFG_QMAKE_PATH" "$QTCONFFILE" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
+ CFG_MIPS_DSPR2=yes
+ else
+ CFG_MIPS_DSPR2=no
+@@ -7500,7 +7624,7 @@ rm -f "$QMAKE_VARS_FILE" 2>/dev/null
+ cd ..
+ fi
+
+- "$outpath/bin/qmake" "$relpathMangled"
++ "$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" "$relpathMangled"
+
+ ) || exit
+
+diff --git a/mkspecs/features/device_config.prf b/mkspecs/features/device_config.prf
+index e0383ef..9281d3e 100644
+--- a/mkspecs/features/device_config.prf
++++ b/mkspecs/features/device_config.prf
+@@ -1,16 +1,15 @@
+ # This file is loaded by some qmakespecs to get early configuration data.
+
+-# Load generated qdevice.pri
+-DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri
++host_build: \
++ PRI_FILE_NAME = qhost.pri
++else: \
++ PRI_FILE_NAME = qdevice.pri
++DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/$$PRI_FILE_NAME
+ exists($$DEVICE_PRI):include($$DEVICE_PRI)
+ unset(DEVICE_PRI)
+
+-host_build {
+- CROSS_COMPILE =
+-} else: isEmpty(CROSS_COMPILE) {
+- #this variable can be persisted via qmake -set CROSS_COMPILE /foo
+- CROSS_COMPILE = $$[CROSS_COMPILE]
+-}
++# this variable can be persisted via qmake -set CROSS_COMPILE /foo
++!host_build:isEmpty(CROSS_COMPILE): CROSS_COMPILE = $$[CROSS_COMPILE]
+
+ # Provide a function to be used by mkspecs
+ defineTest(deviceSanityCheckCompiler) {
+diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
+index 4a1d265..ee1ada3 100644
+--- a/mkspecs/features/qt_functions.prf
++++ b/mkspecs/features/qt_functions.prf
+@@ -70,7 +70,7 @@ defineTest(qtHaveModule) {
+ defineTest(qtPrepareTool) {
+ cmd = $$eval(QT_TOOL.$${2}.binary)
+ isEmpty(cmd) {
+- cmd = $$[QT_HOST_BINS]/$$2
++ cmd = $$[QT_HOST_BINS/get]/$$2
+ exists($${cmd}.pl) {
+ cmd = perl -w $$system_path($${cmd}.pl)
+ } else: contains(QMAKE_HOST.os, Windows) {
+diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
+index 839c3d6..45f1b94 100644
+--- a/mkspecs/features/qt_tool.prf
++++ b/mkspecs/features/qt_tool.prf
+@@ -17,39 +17,52 @@ DEFINES *= QT_USE_QSTRINGBUILDER
+ # 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(HOST_QT_TOOLS)) {
+ isEmpty(MODULE):MODULE = $$TARGET
+
+- !host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, _private)
+-
+ load(qt_build_paths)
+-
+- load(resolve_target)
++ load(device_config)
+
+ TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri
+
+- vars = binary depends
+- !isEmpty(QT_TOOL_ENV) {
+- vars += envvars
+- module_var_names =
+- module_var_sets =
+- for(var, QT_TOOL_ENV) {
+- vars += env.$${var}.name env.$${var}.value
+- module_var_names += QT_TOOL.$${MODULE}.env.$${var}
+- module_var_sets += \
+- "QT_TOOL.$${MODULE}.env.$${var}.name = $$val_escape($${var}.name)" \
+- "QT_TOOL.$${MODULE}.env.$${var}.value = $$val_escape($${var}.value)"
++ vars = binary
++
++ isEmpty(HOST_QT_TOOLS) {
++ load(resolve_target)
++
++ vars += depends
++ depends_var = "QT_TOOL.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")"
++
++ !host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, _private)
++
++ !isEmpty(QT_TOOL_ENV) {
++ vars += envvars
++ module_var_names =
++ module_var_sets =
++ for(var, QT_TOOL_ENV) {
++ vars += env.$${var}.name env.$${var}.value
++ module_var_names += QT_TOOL.$${MODULE}.env.$${var}
++ module_var_sets += \
++ "QT_TOOL.$${MODULE}.env.$${var}.name = $$val_escape($${var}.name)" \
++ "QT_TOOL.$${MODULE}.env.$${var}.value = $$val_escape($${var}.value)"
++ }
++ module_envvars = \
++ "QT_TOOL.$${MODULE}.envvars = $$module_var_names" \
++ $$module_var_sets
++ } else {
++ module_envvars =
+ }
+- module_envvars = \
+- "QT_TOOL.$${MODULE}.envvars = $$module_var_names" \
+- $$module_var_sets
++
++ bin = $$system_path($$QMAKE_RESOLVED_TARGET)
+ } else {
+- module_envvars =
++ bin = $${HOST_QT_TOOLS}/$${TARGET}
++ equals(QMAKE_HOST.os, Windows): bin = $${bin}.exe
++ bin = $$system_path($$bin)
+ }
+- bin = $$system_path($$QMAKE_RESOLVED_TARGET)
++
+ TOOL_PRI_CONT = \
+ "QT_TOOL.$${MODULE}.binary = $$val_escape(bin)" \
+- "QT_TOOL.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
++ $$depends_var \
+ $$module_envvars
+ write_file($$TOOL_PRI, TOOL_PRI_CONT)|error("Aborting.")
+
+diff --git a/qmake/qmake-aux.pro b/qmake/qmake-aux.pro
+new file mode 100644
+index 0000000..33a7fbf
+--- /dev/null
++++ b/qmake/qmake-aux.pro
+@@ -0,0 +1,11 @@
++option(host_build)
++TEMPLATE = aux
++
++# qmake documentation
++QMAKE_DOCS = $$PWD/doc/qmake.qdocconf
++
++# qmake binary
++win32: EXTENSION = .exe
++qmake.path = $$[QT_HOST_BINS]
++qmake.files = $$OUT_PWD/../bin/qmake$$EXTENSION
++INSTALLS += qmake
+diff --git a/qmake/qmake-docs.pro b/qmake/qmake-docs.pro
+deleted file mode 100644
+index 3123f7c..0000000
+--- a/qmake/qmake-docs.pro
++++ /dev/null
+@@ -1,2 +0,0 @@
+-TEMPLATE = aux
+-QMAKE_DOCS = $$PWD/doc/qmake.qdocconf
+diff --git a/qtbase.pro b/qtbase.pro
+index 98ca86a..11cff9e 100644
+--- a/qtbase.pro
++++ b/qtbase.pro
+@@ -4,7 +4,7 @@
+
+ load(qt_parts)
+
+-SUBDIRS += qmake/qmake-docs.pro
++SUBDIRS += qmake/qmake-aux.pro
+
+ cross_compile: CONFIG += nostrip
+
+@@ -28,6 +28,7 @@ QMAKE_DISTCLEAN += \
+ config.tests/.qmake.cache \
+ mkspecs/qconfig.pri \
+ mkspecs/qdevice.pri \
++ mkspecs/qhost.pri \
+ mkspecs/qmodule.pri \
+ src/corelib/global/qconfig.h \
+ src/corelib/global/qconfig.cpp \
+@@ -37,15 +38,6 @@ CONFIG -= qt
+
+ ### installations ####
+
+-#qmake
+-qmake.path = $$[QT_HOST_BINS]
+-equals(QMAKE_HOST.os, Windows) {
+- qmake.files = $$OUT_PWD/bin/qmake.exe
+-} else {
+- qmake.files = $$OUT_PWD/bin/qmake
+-}
+-INSTALLS += qmake
+-
+ #licheck
+ licheck.path = $$[QT_HOST_BINS]
+ licheck.files = $$PWD/bin/$$QT_LICHECK
+@@ -175,7 +167,8 @@ QMAKE_DISTCLEAN += \
+ #mkspecs
+ mkspecs.path = $$[QT_HOST_DATA]/mkspecs
+ mkspecs.files = \
+- $$OUT_PWD/mkspecs/qconfig.pri $$OUT_PWD/mkspecs/qmodule.pri $$OUT_PWD/mkspecs/qdevice.pri $$OUT_PWD/mkspecs/qfeatures.pri \
++ $$OUT_PWD/mkspecs/qconfig.pri $$OUT_PWD/mkspecs/qmodule.pri $$OUT_PWD/mkspecs/qfeatures.pri \
++ $$OUT_PWD/mkspecs/qdevice.pri $$OUT_PWD/mkspecs/qhost.pri \
+ $$files($$PWD/mkspecs/*)
+ mkspecs.files -= $$PWD/mkspecs/modules $$PWD/mkspecs/modules-inst
+ INSTALLS += mkspecs
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
deleted file mode 100644
index 41d10eaf..00000000
--- a/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 03824427f227ff16c6d23d08c73708b0faf98e06 Mon Sep 17 00:00:00 2001
-From: Holger Freyther <zecke@selfish.org>
-Date: Wed, 26 Sep 2012 17:22:30 +0200
-Subject: [PATCH] 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: Inappropriate [embedded specific]
- again very OE specific to read everything from environment (reusing the same
- qmake from sstate and replacing all configured paths in it with qt.conf from
- environment).
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/corelib/global/qlibraryinfo.cpp | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
-index 8bcacca..e1c87b5 100644
---- a/src/corelib/global/qlibraryinfo.cpp
-+++ b/src/corelib/global/qlibraryinfo.cpp
-@@ -157,7 +157,10 @@ void QLibrarySettings::load()
-
- 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");
- if (QFile::exists(qtconfig))
- return new QSettings(qtconfig, QSettings::IniFormat);
- #ifdef QT_BUILD_QMAKE
diff --git a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
index f7066371..8224171a 100644
--- a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
+++ b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
@@ -1,165 +1,25 @@
-From 7421a689c695a09fff2d5ffbdbe56e34d73f771d Mon Sep 17 00:00:00 2001
+From 502b95b840a5f79e5a68e9bd5b10dbdc92485f1f 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] 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
-
-* qt_functions: temporary remove isEmpty check
-* now we assume that every build will provide QT_EXTERNAL_HOST_BINS value
-* isEmpty works correctly only with qmake variables (e.g. $$FOO -
- isEmpty(FOO)), but doesn't work with system properties like $$[FOO].
-
* cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to determine path to host binaries
-Upstream-Status: Pending
- is a lot better for upstreaming (and it was already sort of approved by
- Oswald) but in 5.2.0 I've noticed that he added something similar for
- android builds
+Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Simon Busch <morphis@gravedo.de>
Signed-off-by: Jonathan Liu <net147@gmail.com>
-Conflicts:
- configure
+Change-Id: Iacaa1c5531cd6dcc094891610c351673db55d7b2
---
- configure | 14 ++++++++++++++
- mkspecs/features/qt_functions.prf | 6 +++++-
- mkspecs/features/qt_tool.prf | 5 +++--
- qtbase.pro | 13 ++++++++++---
- src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++---
- src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++--
- src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +-
- 7 files changed, 38 insertions(+), 12 deletions(-)
+ src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++---
+ src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++--
+ src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
-diff --git a/configure b/configure
-index 9ab6a9d..225b9f3 100755
---- a/configure
-+++ b/configure
-@@ -826,6 +826,7 @@ QT_HOST_BINS=
- QT_HOST_LIBS=
- QT_HOST_DATA=
- QT_EXT_PREFIX=
-+QT_EXTERNAL_HOST_BINS=
-
- #flags for SQL drivers
- QT_CFLAGS_PSQL=
-@@ -945,6 +946,7 @@ while [ "$#" -gt 0 ]; do
- -testsdir| \
- -hostdatadir| \
- -hostbindir| \
-+ -external-hostbindir| \
- -hostlibdir| \
- -extprefix| \
- -sysroot| \
-@@ -1175,6 +1177,9 @@ while [ "$#" -gt 0 ]; do
- extprefix)
- QT_EXT_PREFIX="$VAL"
- ;;
-+ external-hostbindir)
-+ QT_EXTERNAL_HOST_BINS="$VAL"
-+ ;;
- pkg-config)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_PKGCONFIG="$VAL"
-@@ -2444,6 +2449,10 @@ 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
-@@ -3195,6 +3204,11 @@ fi
- # command line and environment validation
- #-------------------------------------------------------------------------------
-
-+# 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
-+
- # update QT_CONFIG to show our current predefined configuration
- CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h
- case "$CFG_QCONFIG" in
-diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
-index 4a1d265..a2bdd29 100644
---- a/mkspecs/features/qt_functions.prf
-+++ b/mkspecs/features/qt_functions.prf
-@@ -70,7 +70,11 @@ defineTest(qtHaveModule) {
- defineTest(qtPrepareTool) {
- cmd = $$eval(QT_TOOL.$${2}.binary)
- isEmpty(cmd) {
-- cmd = $$[QT_HOST_BINS]/$$2
-+ QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS]
-+ isEmpty(QT_EXTERNAL_HOST_BINS): \
-+ cmd = $$[QT_HOST_BINS]/$$2
-+ else: \
-+ cmd = $$[QT_EXTERNAL_HOST_BINS]/$$2
- exists($${cmd}.pl) {
- cmd = perl -w $$system_path($${cmd}.pl)
- } else: contains(QMAKE_HOST.os, Windows) {
-diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
-index 839c3d6..45934a0 100644
---- a/mkspecs/features/qt_tool.prf
-+++ b/mkspecs/features/qt_tool.prf
-@@ -14,10 +14,11 @@ load(qt_app)
- CONFIG += console
- DEFINES *= QT_USE_QSTRINGBUILDER
-
-+QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS]
-+
- # 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
-
- !host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, _private)
-diff --git a/qtbase.pro b/qtbase.pro
-index 98ca86a..0eed475 100644
---- a/qtbase.pro
-+++ b/qtbase.pro
-@@ -37,12 +37,16 @@ CONFIG -= qt
-
- ### installations ####
-
-+QT_EXTERNAL_HOST_BINS = $$[QT_EXTERNAL_HOST_BINS]
-+
- #qmake
- qmake.path = $$[QT_HOST_BINS]
-+qmake.files = $$OUT_PWD/bin/qmake
-+!isEmpty(QT_EXTERNAL_HOST_BINS) {
-+ qmake.files = $$[QT_EXTERNAL_HOST_BINS]/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
-
-@@ -59,6 +63,9 @@ INSTALLS += fixqt4headers
- #syncqt
- syncqt.path = $$[QT_HOST_BINS]
- syncqt.files = $$PWD/bin/syncqt.pl
-+!isEmpty(QT_EXTERNAL_HOST_BINS) {
-+ syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/syncqt.pl
-+}
- INSTALLS += syncqt
-
- # If we are doing a prefix build, create a "module" pri which enables
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
-index 91a4eb6..25df27c 100644
+index a5ed8b2..0e11a1e 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qmake)
diff --git a/recipes-qt/qt5/qtbase/0011-Add-external-hostbindir-option-for-native-sdk.patch b/recipes-qt/qt5/qtbase/0011-Add-external-hostbindir-option-for-native-sdk.patch
deleted file mode 100644
index d257d3f0..00000000
--- a/recipes-qt/qt5/qtbase/0011-Add-external-hostbindir-option-for-native-sdk.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 2aa52f19cab8eafff84d1828367d1e38cb34315d 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] Add -external-hostbindir option for native(sdk)
-
-* 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
-
-* qt_functions: temporary remove isEmpty check
-* now we assume that every build will provide QT_EXTERNAL_HOST_BINS value
-* isEmpty works correctly only with qmake variables (e.g. $$FOO -
- isEmpty(FOO)), but doesn't work with system properties like $$[FOO].
-
-* cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to determine path to host binaries
-
-Upstream-Status: Pending
- is a lot better for upstreaming (and it was already sort of approved by
- Oswald) but in 5.2.0 I've noticed that he added something similar for
- android builds
-
-Change-Id: I4f6e634bf0b2cb96065ee5c38b9cd8a224c3bd37
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-Signed-off-by: Simon Busch <morphis@gravedo.de>
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Conflicts:
- tools/configure/configureapp.cpp
----
- configure | 1 +
- qmake/property.cpp | 1 +
- src/corelib/global/qlibraryinfo.cpp | 3 ++-
- src/corelib/global/qlibraryinfo.h | 1 +
- tools/configure/configureapp.cpp | 11 +++++++++++
- 5 files changed, 16 insertions(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index d98ea53..f42abe6 100755
---- a/configure
-+++ b/configure
-@@ -3951,6 +3951,7 @@ fi
- addConfStr "$QT_REL_HOST_BINS"
- addConfStr "$QT_REL_HOST_LIBS"
- addConfStr "$QT_REL_HOST_DATA"
-+addConfStr "$QT_EXTERNAL_HOST_BINS"
- addConfStr "$shortxspec"
- addConfStr "$shortspec"
-
-diff --git a/qmake/property.cpp b/qmake/property.cpp
-index 817ae95..c69539f 100644
---- a/qmake/property.cpp
-+++ b/qmake/property.cpp
-@@ -68,6 +68,7 @@ static const struct {
- { "QT_HOST_DATA", QLibraryInfo::HostDataPath, true },
- { "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true },
- { "QT_HOST_LIBS", QLibraryInfo::HostLibrariesPath, true },
-+ { "QT_EXTERNAL_HOST_BINS", QLibraryInfo::ExternalHostBinariesPath, true },
- { "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true },
- { "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true },
- };
-diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
-index e1c87b5..d6e03ba 100644
---- a/src/corelib/global/qlibraryinfo.cpp
-+++ b/src/corelib/global/qlibraryinfo.cpp
-@@ -373,7 +373,7 @@ QLibraryInfo::isDebugBuild()
- */
-
- static const struct {
-- char key[19], value[13];
-+ char key[21], value[13];
- } qtConfEntries[] = {
- { "Prefix", "." },
- { "Documentation", "doc" }, // should be ${Data}/doc
-@@ -398,6 +398,7 @@ static const struct {
- { "HostBinaries", "bin" },
- { "HostLibraries", "lib" },
- { "HostData", "." },
-+ { "ExternalHostBinaries", "" },
- { "TargetSpec", "" },
- { "HostSpec", "" },
- { "HostPrefix", "" },
-diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
-index 1ad7637..5a8b127 100644
---- a/src/corelib/global/qlibraryinfo.h
-+++ b/src/corelib/global/qlibraryinfo.h
-@@ -81,6 +81,7 @@ public:
- HostBinariesPath,
- HostLibrariesPath,
- HostDataPath,
-+ ExternalHostBinariesPath,
- TargetSpecPath,
- HostSpecPath,
- HostPrefixPath,
-diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
-index f2b54f5..d973c11 100644
---- a/tools/configure/configureapp.cpp
-+++ b/tools/configure/configureapp.cpp
-@@ -1261,6 +1261,13 @@ void Configure::parseCmdLine()
- dictionary[ "QT_EXT_PREFIX" ] = 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)
-@@ -4258,6 +4265,9 @@ void Configure::generateQConfigCpp()
-
- if (dictionary["QT_REL_HOST_DATA"].isEmpty())
- dictionary["QT_REL_HOST_DATA"] = haveHpx ? "." : dictionary["QT_REL_INSTALL_ARCHDATA"];
-+
-+ if (dictionary["QT_EXTERNAL_HOST_BINS"].isEmpty())
-+ dictionary["QT_EXTERNAL_HOST_BINS"] = haveHpx ? "bin" : dictionary["QT_REL_INSTALL_BINS"];
-
- confStringOff = 0;
- addConfStr(0, dictionary["QT_REL_INSTALL_DOCS"]);
-@@ -4277,6 +4287,7 @@ void Configure::generateQConfigCpp()
- addConfStr(1, dictionary["QT_REL_HOST_BINS"]);
- addConfStr(1, dictionary["QT_REL_HOST_LIBS"]);
- addConfStr(1, dictionary["QT_REL_HOST_DATA"]);
-+ addConfStr(1, dictionary["QT_EXTERNAL_HOST_BINS"]);
- addConfStr(1, targSpec);
- addConfStr(1, hostSpec);
-
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index 963cd495..114acdf3 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -13,12 +13,13 @@ LIC_FILES_CHKSUM = " \
# common for qtbase-native, qtbase-nativesdk and qtbase
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
- file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
+ file://0001-QMake-Add-option-to-set-qt.conf-file.patch \
file://0003-Add-external-hostbindir-option.patch \
file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
file://0005-configure-bump-path-length-from-256-to-512-character.patch \
file://0006-QOpenGLPaintDevice-sub-area-support.patch \
file://0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch \
+ file://0002-configure-Separate-host-and-build-platform.patch \
file://0008-configure-paths-for-target-qmake-properly.patch \
file://0009-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \
"
@@ -139,20 +140,17 @@ QT_CONFIG_FLAGS += " \
${PACKAGECONFIG_CONFARGS} \
"
-do_generate_qt_config_file_append() {
- cat >> ${QT_CONF_PATH} <<EOF
-
+generate_qt_config_file_effective_paths() {
+ cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF
[EffectivePaths]
-Prefix=..
+Prefix=${B}
EOF
}
+OE_QMAKE_PATH_HOST_DATA = "${STAGING_LIBDIR}${QT_DIR_NAME}"
# qtbase is exception, we need to use mkspecs from ${S}
-QMAKE_MKSPEC_PATH = "${B}"
-
-# another exception is that we need to run bin/qmake, because EffectivePaths are relative to qmake location
-OE_QMAKE_QMAKE_ORIG = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake"
-OE_QMAKE_QMAKE = "bin/qmake"
+QMAKE_MKSPEC_PATH_TARGET = "${B}"
+QMAKE_MKSPEC_PATH = "${S}"
# qtbase is exception, configure script is using our get(X)QEvalMakeConf and setBootstrapEvalVariable functions to read it from shell
export OE_QMAKE_COMPILER
@@ -166,17 +164,9 @@ export OE_QMAKE_AR
export OE_QMAKE_STRIP
do_configure() {
- # we need symlink in path relative to source, because
- # EffectivePaths:Prefix is relative to qmake location
- if [ ! -e ${B}/bin/qmake ]; then
- mkdir -p ${B}/bin
- ln -sf ${OE_QMAKE_QMAKE_ORIG} ${B}/bin/qmake
- fi
-
${S}/configure -v \
-opensource -confirm-license \
-sysroot ${STAGING_DIR_TARGET} \
- -no-gcc-sysroot \
-prefix ${OE_QMAKE_PATH_PREFIX} \
-bindir ${OE_QMAKE_PATH_BINS} \
-libdir ${OE_QMAKE_PATH_LIBS} \
@@ -195,7 +185,7 @@ do_configure() {
-hostbindir ${OE_QMAKE_PATH_HOST_BINS} \
-external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \
-hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \
- -platform ${OE_QMAKESPEC} \
+ -platform ${OE_QMAKE_PLATFORM_NATIVE} \
-xplatform linux-oe-g++ \
${QT_CONFIG_FLAGS}
@@ -206,8 +196,6 @@ do_install_append() {
# Avoid qmake error "Cannot read [...]/usr/lib/qt5/mkspecs/oe-device-extra.pri: No such file or directory"
touch ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/oe-device-extra.pri
- install -m 0755 ${B}/bin/qmake-target ${D}/${bindir}${QT_DIR_NAME}/qmake
-
### Fix up the binaries to the right location
### TODO: FIX
# install fonts manually if they are missing
@@ -226,7 +214,7 @@ do_install_append() {
sed -i 's@^#!/bin/bash$@#!/bin/sh@g' ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/features/data/mac/objc_namespace.sh
# Replace host paths with qmake built-in properties
- sed -i -e 's|${STAGING_DIR_NATIVE}${prefix_native}|$$[QT_HOST_PREFIX]|g' \
+ sed -i -e 's|${STAGING_DIR_NATIVE}${prefix_native}|$$[QT_HOST_PREFIX/get]|g' \
-e 's|${STAGING_DIR_HOST}|$$[QT_SYSROOT]|g' \
${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/*.pri
}
diff --git a/recipes-qt/qt5/qtdeclarative_git.bb b/recipes-qt/qt5/qtdeclarative_git.bb
index 0649ecd6..82468158 100644
--- a/recipes-qt/qt5/qtdeclarative_git.bb
+++ b/recipes-qt/qt5/qtdeclarative_git.bb
@@ -32,6 +32,11 @@ do_configure_prepend() {
echo "QT_TOOL.syncqt.binary = \"${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/syncqt\"" > ${B}/.qmake.cache
}
+do_install_append_class-nativesdk() {
+ # qml files not needed in nativesdk
+ rm -rf ${D}${OE_QMAKE_PATH_QML}
+}
+
EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'qtxmlpatterns', 'CONFIG+=OE_QTXMLPATTERNS_ENABLED', '', d)}"
SRCREV = "c1d726fe19c83cf081042e55ace9d9d7b31c40e6"
diff --git a/recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch b/recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch
index 25cf6fe9..dcae6152 100644
--- a/recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch
+++ b/recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch
@@ -116,9 +116,11 @@ index 387d54f..56b7d0c 100644
-qtHaveModule(dbus): SUBDIRS += qdbus
+!linguistonly:qtHaveModule(dbus): SUBDIRS += qdbus
- win32|winrt:SUBDIRS += windeployqt
- winrt:SUBDIRS += winrtrunner
+-win32|winrt:SUBDIRS += windeployqt
+-winrt:SUBDIRS += winrtrunner
-qtHaveModule(gui):!android:!ios:!qnx:!wince*:!winrt*:SUBDIRS += qtdiag
++!linguistonly:win32|winrt:SUBDIRS += windeployqt
++!linguistonly:winrt:SUBDIRS += winrtrunner
+!linguistonly:qtHaveModule(gui):!android:!ios:!qnx:!wince*:!winrt*:SUBDIRS += qtdiag
qtNomakeTools( \
diff --git a/recipes-qt/qt5/qtwayland-native_git.bb b/recipes-qt/qt5/qtwayland-native_git.bb
index 426bdb2f..ab2eaed7 100644
--- a/recipes-qt/qt5/qtwayland-native_git.bb
+++ b/recipes-qt/qt5/qtwayland-native_git.bb
@@ -19,7 +19,7 @@ SRC_URI += " \
"
do_configure() {
- ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} -r ${S}/src/qtwaylandscanner
+ ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_QTCONF} -r ${S}/src/qtwaylandscanner
}
do_install() {
diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb
index 109b7c87..1e903ae2 100644
--- a/recipes-qt/qt5/qtwebengine_git.bb
+++ b/recipes-qt/qt5/qtwebengine_git.bb
@@ -83,7 +83,7 @@ do_configure() {
# qmake can't find the OE_QMAKE_* variables on it's own so directly passing them as
# arguments here
- ${OE_QMAKE_QMAKE} -r ${EXTRA_QMAKEVARS_PRE} QTWEBENGINE_ROOT="${S}" \
+ ${OE_QMAKE_QMAKE} ${OE_QMAKE_QTCONF} -r ${EXTRA_QMAKEVARS_PRE} QTWEBENGINE_ROOT="${S}" \
QMAKE_CXX="${OE_QMAKE_CXX}" QMAKE_CC="${OE_QMAKE_CC}" \
QMAKE_LINK="${OE_QMAKE_LINK}" \
QMAKE_CFLAGS="${OE_QMAKE_CFLAGS}" \