From ff7fd3b1a9b39d217928f3e1d8f16341b9fd6fec Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 1 Oct 2015 16:21:45 +0200 Subject: Add Windows host support. Change-Id: I964ede0e49b63f0ff85adc2ad4d260abbe5f8f79 Signed-off-by: David Schulz Reviewed-by: Samuli Piippo --- classes/qmake5.bbclass | 4 - classes/qmake5_base.bbclass | 71 ++- recipes-qt/qt5/nativesdk-qtbase_git.bb | 59 +- recipes-qt/qt5/qtbase-native_git.bb | 13 +- .../qt5/qtbase/0001-Add-linux-oe-g-platform.patch | 2 +- ...g-oe-mkspec-that-uses-the-OE_-environment.patch | 180 ++++++ ...0001-QMake-Add-option-to-set-qt.conf-file.patch | 114 ++++ ...onfigure-Separate-host-and-build-platform.patch | 643 +++++++++++++++++++++ ...o-allow-to-set-qt.conf-from-the-outside-u.patch | 39 -- .../0003-Add-external-hostbindir-option.patch | 229 -------- ...external-hostbindir-option-for-native-sdk.patch | 134 ----- recipes-qt/qt5/qtbase_git.bb | 39 +- recipes-qt/qt5/qtdeclarative_git.bb | 5 + ...w-to-build-only-lrelease-lupdate-lconvert.patch | 6 +- recipes-qt/qt5/qtwayland-native_git.bb | 2 +- recipes-qt/qt5/qtwebengine_git.bb | 2 +- 16 files changed, 1037 insertions(+), 505 deletions(-) create mode 100644 recipes-qt/qt5/qtbase/0001-Add-win32-g-oe-mkspec-that-uses-the-OE_-environment.patch create mode 100644 recipes-qt/qt5/qtbase/0001-QMake-Add-option-to-set-qt.conf-file.patch create mode 100644 recipes-qt/qt5/qtbase/0002-configure-Separate-host-and-build-platform.patch delete mode 100644 recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch delete mode 100644 recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch delete mode 100644 recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch 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 a766cc6b..13bb0abc 100644 --- a/classes/qmake5_base.bbclass +++ b/classes/qmake5_base.bbclass @@ -1,6 +1,8 @@ # hardcode linux, because that's what 0001-Add-linux-oe-g-platform.patch adds OE_QMAKE_PLATFORM_NATIVE = "linux-oe-g++" OE_QMAKE_PLATFORM = "linux-oe-g++" +OE_QMAKE_PLATFORM_NATIVE_mingw32 = "win32-g++-oe" +OE_QMAKE_PLATFORM_mingw32 = "win32-g++-oe" # Add -d to show debug output from every qmake call, but it prints *a lot*, better to add it only to debugged recipe OE_QMAKE_DEBUG_OUTPUT ?= "" @@ -30,8 +32,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 +43,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 do_generate_qt_config_file() { - cat > ${QT_CONF_PATH} < ${OE_QMAKE_QTCONF_PATH} <> ${OE_QMAKE_QTCONF_PATH} < ${QT_CONF_PATH} < ${OE_QMAKE_QTCONF_PATH} <> ${QT_CONF_PATH} <> ${OE_QMAKE_QTCONF_PATH} <> $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 @@ -268,6 +256,9 @@ fakeroot do_generate_qt_environment_file() { sed -i -e 's:${SDKPATHNATIVE}:$OECORE_NATIVE_SYSROOT:g' $script } +fakeroot do_generate_qt_environment_file_mingw32() { +} + addtask generate_qt_environment_file after do_install before do_package SRCREV = "f7f4dde80e13ff1c05a9399297ffb746ab505e62" diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb index 14e85165..dc328d77 100644 --- a/recipes-qt/qt5/qtbase-native_git.bb +++ b/recipes-qt/qt5/qtbase-native_git.bb @@ -17,31 +17,27 @@ 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://0001-Add-win32-g-oe-mkspec-that-uses-the-OE_-environment.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://0002-configure-Separate-host-and-build-platform.patch \ " # common for qtbase-native and nativesdk-qtbase SRC_URI += " \ file://0009-Always-build-uic.patch \ - file://0010-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() { : } EXTRA_OECONF = " \ - -prefix ${prefix} \ -sysroot ${STAGING_DIR_NATIVE} \ -no-gcc-sysroot \ -system-zlib \ @@ -63,10 +59,13 @@ EXTRA_OECONF = " \ -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 9f5bb639..93cc1388 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 @@ -49,7 +49,7 @@ Signed-off-by: Martin Jansa --- 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 diff --git a/recipes-qt/qt5/qtbase/0001-Add-win32-g-oe-mkspec-that-uses-the-OE_-environment.patch b/recipes-qt/qt5/qtbase/0001-Add-win32-g-oe-mkspec-that-uses-the-OE_-environment.patch new file mode 100644 index 00000000..7ce3a9ee --- /dev/null +++ b/recipes-qt/qt5/qtbase/0001-Add-win32-g-oe-mkspec-that-uses-the-OE_-environment.patch @@ -0,0 +1,180 @@ +From 5363b4d6d1f3c5683267ec3e190b85eca964eef8 Mon Sep 17 00:00:00 2001 +From: David Schulz +Date: Fri, 3 Jul 2015 16:06:59 +0200 +Subject: [PATCH] Add win32-g++-oe mkspec that uses the OE_ environment. + +Upstream-Status: Inappropriate [embedded specific] + too OE specific, probably cannot be upstreamed +--- + mkspecs/win32-g++-oe/qmake.conf | 109 +++++++++++++++++++++++++++++++++++ + mkspecs/win32-g++-oe/qplatformdefs.h | 42 ++++++++++++++ + 2 files changed, 151 insertions(+) + create mode 100644 mkspecs/win32-g++-oe/qmake.conf + create mode 100644 mkspecs/win32-g++-oe/qplatformdefs.h + +diff --git a/mkspecs/win32-g++-oe/qmake.conf b/mkspecs/win32-g++-oe/qmake.conf +new file mode 100644 +index 0000000..1c8879a +--- /dev/null ++++ b/mkspecs/win32-g++-oe/qmake.conf +@@ -0,0 +1,109 @@ ++# ++# qmake configuration for win32-g++ ++# ++# Written for MinGW / gcc 4.6 or higher ++# ++# Cross compile example for i686-w64-mingw32-g++: ++# configure -xplatform win32-g++ -device-option CROSS_COMPILE=i686-w64-mingw32- ++# ++ ++load(device_config) ++ ++MAKEFILE_GENERATOR = MINGW ++QMAKE_PLATFORM = win32 mingw ++CONFIG += debug_and_release debug_and_release_target precompile_header ++DEFINES += UNICODE ++QMAKE_COMPILER_DEFINES += __GNUC__ WIN32 ++ ++QMAKE_EXT_OBJ = .o ++QMAKE_EXT_RES = _res.o ++ ++QMAKE_COMPILER = $(OE_QMAKE_COMPILER) gcc ++ ++QMAKE_CC = $(OE_QMAKE_CC) ++QMAKE_LEX = flex ++QMAKE_LEXFLAGS = ++QMAKE_YACC = byacc ++QMAKE_YACCFLAGS = -d ++QMAKE_CFLAGS = -pipe $(OE_QMAKE_CFLAGS) ++QMAKE_CFLAGS_DEPS = -M ++QMAKE_CFLAGS_WARN_ON = -Wall -Wextra ++QMAKE_CFLAGS_WARN_OFF = -w ++QMAKE_CFLAGS_RELEASE = -O2 ++QMAKE_CFLAGS_DEBUG = -g ++QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses ++QMAKE_CFLAGS_SPLIT_SECTIONS = -ffunction-sections ++QMAKE_CFLAGS_SSE2 = -msse2 -mstackrealign ++QMAKE_CFLAGS_SSE3 = -msse3 ++QMAKE_CFLAGS_SSSE3 = -mssse3 ++QMAKE_CFLAGS_SSE4_1 = -msse4.1 ++QMAKE_CFLAGS_SSE4_2 = -msse4.2 ++QMAKE_CFLAGS_AVX = -mavx ++QMAKE_CFLAGS_AVX2 = -mavx2 ++QMAKE_CFLAGS_NEON = -mfpu=neon ++ ++QMAKE_CXX = $(OE_QMAKE_CXX) ++QMAKE_CXXFLAGS = $$QMAKE_CFLAGS $(OE_QMAKE_CXXFLAGS) ++QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS ++QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON ++QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF ++QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE ++QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG ++QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC ++QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD ++QMAKE_CXXFLAGS_RTTI_ON = -frtti ++QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti ++QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads ++QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions ++QMAKE_CXXFLAGS_CXX11 = -std=c++0x ++QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS ++ ++QMAKE_INCDIR = ++ ++QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src ++QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< ++QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src ++QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< ++ ++QMAKE_LINK = $(OE_QMAKE_LINK) ++QMAKE_LINK_C = $(OE_QMAKE_LINK) ++QMAKE_LFLAGS = $(OE_QMAKE_LDFLAGS) ++QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads ++QMAKE_LFLAGS_EXCEPTIONS_OFF = ++QMAKE_LFLAGS_RELEASE = -Wl,-s ++QMAKE_LFLAGS_DEBUG = ++QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console ++QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows ++QMAKE_LFLAGS_DLL = -shared ++QMAKE_LFLAGS_CXX11 = ++QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections ++QMAKE_LFLAGS_USE_GOLD = -fuse-ld=gold ++QMAKE_LINK_OBJECT_MAX = 10 ++QMAKE_LINK_OBJECT_SCRIPT = object_script ++QMAKE_PREFIX_SHLIB = ++QMAKE_EXTENSION_SHLIB = dll ++QMAKE_PREFIX_STATICLIB = lib ++QMAKE_EXTENSION_STATICLIB = a ++QMAKE_LIB_EXTENSIONS = a dll.a ++ ++QMAKE_LIBS = ++QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 ++QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 ++QMAKE_LIBS_NETWORK = -lws2_32 ++QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32 ++QMAKE_LIBS_OPENGL_ES2 = -llibEGL -llibGLESv2 -lgdi32 -luser32 ++QMAKE_LIBS_OPENGL_ES2_DEBUG = -llibEGLd -llibGLESv2d -lgdi32 -luser32 ++QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32 ++QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain ++ ++QMAKE_IDL = midl ++QMAKE_LIB = $(OE_QMAKE_AR) -ru ++QMAKE_RC = $(RC) ++ ++QMAKE_STRIP = $${OE_QMAKE_STRIP} ++QMAKE_STRIPFLAGS_LIB += --strip-unneeded ++QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy ++QMAKE_NM = $${CROSS_COMPILE}nm -P ++ ++isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $(OE_QMAKE_QT_CONFIG) ++load(qt_config) +diff --git a/mkspecs/win32-g++-oe/qplatformdefs.h b/mkspecs/win32-g++-oe/qplatformdefs.h +new file mode 100644 +index 0000000..9d63527 +--- /dev/null ++++ b/mkspecs/win32-g++-oe/qplatformdefs.h +@@ -0,0 +1,42 @@ ++/**************************************************************************** ++** ++** 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$ ++** ++****************************************************************************/ ++ ++#include "../win32-g++/qplatformdefs.h" +-- +1.9.1 + 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 +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 +--- + 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 Set persistent property\n" + " -unset Unset persistent property\n" + " -query Query persistent property. Show all if 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..4ff1643f --- /dev/null +++ b/recipes-qt/qt5/qtbase/0002-configure-Separate-host-and-build-platform.patch @@ -0,0 +1,643 @@ +From 89784751fa045f0bf86bc87b9be4dd5b19e1227d Mon Sep 17 00:00:00 2001 +From: David Schulz +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 | 6 +- + configure | 163 ++++++++++++++++++++++++++++++++----- + 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, 210 insertions(+), 67 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 103321e..57769a3 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="" + CXXFLAGS="$SYSROOT_FLAG" +@@ -67,7 +69,7 @@ test -r Makefile && $MAKE distclean >/dev/null 2>&1 + # Make sure output from possible previous tests is gone + rm -f "$EXE" "${EXE}.exe" + +-set -- "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG+=android_app" "CONFIG-=debug_and_release app_bundle lib_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" ++set -- "$QMAKE" -qtconf "$QTCONF" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG+=android_app" "CONFIG-=debug_and_release app_bundle lib_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" + if [ "$VERBOSE" = "yes" ]; then + OUTDIR=$OUTDIR "$@" && $MAKE && SUCCESS=yes + else +diff --git a/configure b/configure +index 52c1be2..6b89d34 100755 +--- a/configure ++++ b/configure +@@ -104,9 +104,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 +@@ -195,15 +197,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" +@@ -336,7 +338,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" +@@ -345,7 +347,7 @@ getQMakeConf() + 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" +@@ -478,6 +480,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 + #------------------------------------------------------------------------------- + +@@ -502,12 +521,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)` +@@ -922,6 +939,7 @@ while [ "$#" -gt 0 ]; do + -hostlibdir| \ + -extprefix| \ + -sysroot| \ ++ -external-hostbindir| \ + -depths| \ + -make| \ + -nomake| \ +@@ -930,6 +948,7 @@ while [ "$#" -gt 0 ]; do + -xplatform| \ + -device| \ + -device-option| \ ++ -host-option| \ + -sdk| \ + -arch| \ + -host-arch| \ +@@ -1249,6 +1268,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" + ;; +@@ -1423,6 +1446,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" + ;; +@@ -2671,6 +2699,8 @@ Additional options: + -device-option ... Add device specific options for the device mkspec + (experimental) + ++ -host-option ..... 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. + +@@ -2702,6 +2732,9 @@ Additional options: + -sysroot ...... Sets 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 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- Do not compile in . + -feature- .. Compile in . The available features + are described in src/corelib/global/qfeatures.txt +@@ -3301,7 +3301,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" +@@ -4039,7 +4072,8 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; + EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS" + done + fi +- if [ "$BUILD_ON_MSYS" = "yes" ]; then ++ case `basename "$PLATFORM"` in ++ win32-g++*) + EXTRA_CFLAGS="-DUNICODE" + EXTRA_CXXFLAGS="-DUNICODE" + EXTRA_OBJS="qfilesystemengine_win.o \ +@@ -4058,7 +4092,8 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; + \"\$(SOURCE_PATH)/tools/shared/windows/registry.cpp\"" + EXTRA_LFLAGS="-static -s -lole32 -luuid -ladvapi32 -lkernel32" + EXEEXT=".exe" +- else ++ ;; ++ *) + EXTRA_OBJS="qfilesystemengine_unix.o \ + qfilesystemiterator_unix.o \ + qfsfileengine_unix.o \ +@@ -4068,7 +4103,8 @@ \"\$(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp\" + \"\$(SOURCE_PATH)/src/corelib/tools/qlocale_unix.cpp\"" + EXEEXT= + [ "$QT_CROSS_COMPILE" = "yes" ] && EXEEXT=-target +- fi ++ ;; ++ esac + if [ "$BUILD_ON_MAC" = "yes" ]; then + echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile" + echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile" +@@ -4089,6 +4125,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; + if [ '!' -z "$D_FLAGS" ]; then + EXTRA_CFLAGS="$EXTRA_CFLAGS $D_FLAGS" + fi ++ + echo >>"$mkfile" + adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'` + adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'` +@@ -4158,7 +4195,81 @@ QTCONFFILE="$outpath/bin/qt.conf" + cat > "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" <> "$QTCONFFILE" </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 +@@ -4549,7 +4674,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 +@@ -4560,7 +4685,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 +@@ -7447,7 +7572,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 00f4bdf..6615995 100644 +--- a/mkspecs/features/qt_functions.prf ++++ b/mkspecs/features/qt_functions.prf +@@ -57,7 +57,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 3f0301a..add121d 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 +-- +2.5.0.windows.1 + 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 01832386..00000000 --- a/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch +++ /dev/null @@ -1,39 +0,0 @@ -From f902b73eda6d459a3669fd78a3c8908ae13e705b Mon Sep 17 00:00:00 2001 -From: Holger Freyther -Date: Wed, 26 Sep 2012 17:22:30 +0200 -Subject: [PATCH 2/9] 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 ---- - 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 0cfcc4e..c3b5c2d 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 --- -2.6.2 - diff --git a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch deleted file mode 100644 index ea152790..00000000 --- a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch +++ /dev/null @@ -1,229 +0,0 @@ -From 175d86ddb36117c0ca2ff47ae42693980dbfa098 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Sat, 6 Apr 2013 13:15:07 +0200 -Subject: [PATCH 3/9] 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 - -Signed-off-by: Martin Jansa -Signed-off-by: Simon Busch -Signed-off-by: Jonathan Liu - -Conflicts: - configure ---- - 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(-) - -diff --git a/configure b/configure -index 9897fe6..aa89d30 100755 ---- a/configure -+++ b/configure -@@ -808,6 +808,7 @@ QT_HOST_BINS= - QT_HOST_LIBS= - QT_HOST_DATA= - QT_EXT_PREFIX= -+QT_EXTERNAL_HOST_BINS= - - #flags for SQL drivers - QT_CFLAGS_PSQL= -@@ -927,6 +928,7 @@ while [ "$#" -gt 0 ]; do - -testsdir| \ - -hostdatadir| \ - -hostbindir| \ -+ -external-hostbindir| \ - -hostlibdir| \ - -extprefix| \ - -sysroot| \ -@@ -1157,6 +1159,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" -@@ -2419,6 +2424,10 @@ Installation options: - -hostdatadir . Data used by qmake will be installed to - (default HOSTPREFIX) - -+ -external-hostbindir 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 -@@ -3158,6 +3167,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 6616aa4..3d40bf9 100644 ---- a/mkspecs/features/qt_functions.prf -+++ b/mkspecs/features/qt_functions.prf -@@ -57,7 +57,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 3f0301a..7dc66de 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 24d0f52..d3d79b3 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 - -@@ -54,6 +58,9 @@ licheck.files = $$PWD/bin/$$QT_LICHECK - #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 65fd1f9..457518b 100644 ---- a/src/corelib/Qt5CoreConfigExtras.cmake.in -+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in -@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qmake) - !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") - !!ELSE -- set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") -+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qmake$$CMAKE_BIN_SUFFIX\") - !!ENDIF - _qt5_Core_check_file_exists(${imported_location}) - -@@ -20,7 +20,7 @@ if (NOT TARGET Qt5::moc) - !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") - !!ELSE -- set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") -+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/moc$$CMAKE_BIN_SUFFIX\") - !!ENDIF - _qt5_Core_check_file_exists(${imported_location}) - -@@ -37,7 +37,7 @@ if (NOT TARGET Qt5::rcc) - !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") - !!ELSE -- set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") -+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/rcc$$CMAKE_BIN_SUFFIX\") - !!ENDIF - _qt5_Core_check_file_exists(${imported_location}) - -diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in -index 1d94715..301af8f 100644 ---- a/src/dbus/Qt5DBusConfigExtras.cmake.in -+++ b/src/dbus/Qt5DBusConfigExtras.cmake.in -@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::qdbuscpp2xml) - !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") - !!ELSE -- set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") -+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") - !!ENDIF - _qt5_DBus_check_file_exists(${imported_location}) - -@@ -20,7 +20,7 @@ if (NOT TARGET Qt5::qdbusxml2cpp) - !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") - !!ELSE -- set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") -+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") - !!ENDIF - _qt5_DBus_check_file_exists(${imported_location}) - -diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in -index 99d87e2..5621dc0 100644 ---- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in -+++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in -@@ -5,7 +5,7 @@ if (NOT TARGET Qt5::uic) - !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") - !!ELSE -- set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") -+ set(imported_location \"${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/uic$$CMAKE_BIN_SUFFIX\") - !!ENDIF - _qt5_Widgets_check_file_exists(${imported_location}) - --- -2.6.2 - diff --git a/recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch b/recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch deleted file mode 100644 index 4d654a44..00000000 --- a/recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 38ecbe7300925d440fa3d7c58e40ed5a53b2d73a Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Sat, 6 Apr 2013 13:15:07 +0200 -Subject: [PATCH 9/9] 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 -Signed-off-by: Simon Busch -Signed-off-by: Jonathan Liu -Signed-off-by: Martin Jansa - -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 6edfffd..313d921 100755 ---- a/configure -+++ b/configure -@@ -3895,6 +3895,7 @@ addConfStr "$CFG_SYSROOT" - 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 c3b5c2d..1381658 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 6c3217b..980c578 100644 ---- a/tools/configure/configureapp.cpp -+++ b/tools/configure/configureapp.cpp -@@ -1243,6 +1243,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) -@@ -4198,6 +4205,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"]); -@@ -4217,6 +4227,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); - --- -2.6.2 - diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index 7ee5f562..13a30c1c 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb @@ -13,13 +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://0003-Add-external-hostbindir-option.patch \ + file://0001-Add-win32-g-oe-mkspec-that-uses-the-OE_-environment.patch \ + file://0001-QMake-Add-option-to-set-qt.conf-file.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://0002-configure-Separate-host-and-build-platform.patch \ " DEPENDS += "qtbase-native" @@ -139,20 +139,19 @@ QT_CONFIG_FLAGS += " \ ${EXTRA_OECONF} \ " -do_generate_qt_config_file_append() { - cat >> ${QT_CONF_PATH} <> ${OE_QMAKE_QTCONF_PATH} < ${B}/.qmake.cache } +do_install_append_class-nativesdk() { + # qml files not needed in nativesdk + rm -rf ${D}${OE_QMAKE_PATH_QML} +} + EXTRA_QMAKEVARS_PRE += "${@base_contains('PACKAGECONFIG', 'qtxmlpatterns', 'CONFIG+=OE_QTXMLPATTERNS_ENABLED', '', d)}" SRCREV = "1064d5100f4d00af5f56b87331251f97d78f8b87" 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 e743a352..aecf7b8b 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 ba07591a..afe737a9 100644 --- a/recipes-qt/qt5/qtwayland-native_git.bb +++ b/recipes-qt/qt5/qtwayland-native_git.bb @@ -18,7 +18,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 76609322..b5d0b586 100644 --- a/recipes-qt/qt5/qtwebengine_git.bb +++ b/recipes-qt/qt5/qtwebengine_git.bb @@ -81,7 +81,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}" \ -- cgit v1.2.3-54-g00ecf