From 1a42aa78af040d0fbecc960e4f9dd3f180ccb404 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Wed, 27 Jul 2016 17:25:07 +0200 Subject: qt5: upgrade to latest revisions in 5.7 branch * LIC_FILES_CHKSUM were changed because of this small change: commit 4343c4e731c3268614fc79c9c42b4e5e4d59d7e6 Author: Sze Howe Koh Date: Tue Jun 14 19:12:35 2016 +0800 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" * -no-nis option was removed from qtbase in: commit 644d0e75240811212ed9fd0c21e3bd05db3ba5db Author: Ralf Nolden Date: Fri May 20 22:03:39 2016 +0200 Cleanup NIS support leftover from Qt 3/4 * allow to disable eglfs independently from gles2, because eglfs-egldevice may be autodetected when libdrm was built before qtbase since this upstream commit: commit 5c6d27b8dfa695ab04766a1711b00421dba9c7d0 Author: Ralf Nolden Date: Tue May 17 12:38:44 2016 +0200 Make eglfs-egldevice check work with pkgconfig as well and then it fails to build, because libdrm could be removed from sysroot and drm.h is missing. * recipes-qt/qt5/qtquick1/0001-qdeclarativetextinput-update-to-match-QWidgetLineCon.patch was resolved in upstream commit: commit 26229cfa0b729313893af5674d604e8692dbb946 Author: Richard Moe Gustavsen Date: Tue Apr 26 15:08:34 2016 +0200 QDeclarativeTextInput: update API to use setBlinkingCursorEnabled Signed-off-by: Martin Jansa --- .../qt5/qtbase/0001-Add-linux-oe-g-platform.patch | 24 ++-- ...o-allow-to-set-qt.conf-from-the-outside-u.patch | 2 +- .../0003-Add-external-hostbindir-option.patch | 16 +-- ...le-Fix-pkgconfig-and-libtool-replacements.patch | 6 +- ...ump-path-length-from-256-to-512-character.patch | 6 +- .../0006-QOpenGLPaintDevice-sub-area-support.patch | 6 +- ...Invert-conditional-for-defining-QT_SOCKLE.patch | 2 +- ...configure-paths-for-target-qmake-properly.patch | 12 +- recipes-qt/qt5/qtbase/0009-Always-build-uic.patch | 28 ----- ...EGL-libraries-from-pkgconfig-and-defaults.patch | 95 +++++++++++++++ ...external-hostbindir-option-for-native-sdk.patch | 131 --------------------- ...-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch | 63 ++++++++++ recipes-qt/qt5/qtbase/0011-Always-build-uic.patch | 28 +++++ ...-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch | 67 ----------- ...EGL-libraries-from-pkgconfig-and-defaults.patch | 98 --------------- ...external-hostbindir-option-for-native-sdk.patch | 131 +++++++++++++++++++++ 16 files changed, 354 insertions(+), 361 deletions(-) delete mode 100644 recipes-qt/qt5/qtbase/0009-Always-build-uic.patch create mode 100644 recipes-qt/qt5/qtbase/0009-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch delete mode 100644 recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch create mode 100644 recipes-qt/qt5/qtbase/0010-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch create mode 100644 recipes-qt/qt5/qtbase/0011-Always-build-uic.patch delete mode 100644 recipes-qt/qt5/qtbase/0011-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch delete mode 100644 recipes-qt/qt5/qtbase/0011-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch create mode 100644 recipes-qt/qt5/qtbase/0012-Add-external-hostbindir-option-for-native-sdk.patch (limited to 'recipes-qt/qt5/qtbase') 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 af85fe9d..b28ca8b6 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 @@ -1,4 +1,4 @@ -From 79f881eaa0a4a980963ce4ea1bc4c5e26c640c9a Mon Sep 17 00:00:00 2001 +From d6c75f788e15fb552eacb08359698a1342a97f20 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Mon, 15 Apr 2013 04:29:32 +0200 Subject: [PATCH] Add linux-oe-g++ platform @@ -56,10 +56,10 @@ Signed-off-by: Martin Jansa create mode 100644 mkspecs/linux-oe-g++/qplatformdefs.h diff --git a/configure b/configure -index b65c564..ffe6931 100755 +index 0ba0c31..052872e 100755 --- a/configure +++ b/configure -@@ -339,6 +339,16 @@ getQMakeConf() +@@ -333,6 +333,16 @@ getQMakeConf() getSingleQMakeVariable "$1" "$specvals" } @@ -76,8 +76,8 @@ index b65c564..ffe6931 100755 getXQMakeConf() { if [ -z "$xspecvals" ]; then -@@ -348,6 +358,16 @@ getXQMakeConf() - getSingleQMakeVariable "$1" "$xspecvals" +@@ -357,6 +367,16 @@ testXConfig() + esac } +# OE qmake.conf is reading some variables from shell env @@ -93,7 +93,7 @@ index b65c564..ffe6931 100755 compilerSupportsFlag() { cat >conftest.cpp <> "$mkfile" } @@ -157,7 +157,7 @@ index b65c564..ffe6931 100755 # build qmake if true; then ###[ '!' -f "$outpath/bin/qmake" ]; echo "Creating qmake..." -@@ -3977,6 +3995,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; +@@ -3986,6 +4004,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; EXEEXT= ;; esac @@ -166,10 +166,10 @@ index b65c564..ffe6931 100755 echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile" echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile" diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf -index 92c288c..f3019e0 100644 +index a890c7f..151630c 100644 --- a/mkspecs/features/configure.prf +++ b/mkspecs/features/configure.prf -@@ -63,14 +63,14 @@ defineTest(qtCompileTest) { +@@ -71,14 +71,14 @@ defineTest(qtCompileTest) { } # Clean up after previous run 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 index 54895dfb..699e3856 100644 --- 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 @@ -1,4 +1,4 @@ -From aaa1675d3c9f0d100f596ca4e2ddf3bd25fae5b6 Mon Sep 17 00:00:00 2001 +From e5f8607cfa1d2bcc798686cdf7c87ea0c6577d30 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Wed, 26 Sep 2012 17:22:30 +0200 Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the 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 11cd97b0..381cde29 100644 --- a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch +++ b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch @@ -1,4 +1,4 @@ -From 502b95b840a5f79e5a68e9bd5b10dbdc92485f1f Mon Sep 17 00:00:00 2001 +From c1dc6165d6a085f162ed32ef5697f645019f9ee0 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Sat, 6 Apr 2013 13:15:07 +0200 Subject: [PATCH] Add -external-hostbindir option @@ -39,10 +39,10 @@ Change-Id: Iacaa1c5531cd6dcc094891610c351673db55d7b2 7 files changed, 44 insertions(+), 8 deletions(-) diff --git a/configure b/configure -index ffe6931..5aa87b4 100755 +index 052872e..1fcbb3a 100755 --- a/configure +++ b/configure -@@ -825,6 +825,7 @@ QT_HOST_BINS= +@@ -834,6 +834,7 @@ QT_HOST_BINS= QT_HOST_LIBS= QT_HOST_DATA= QT_EXT_PREFIX= @@ -50,7 +50,7 @@ index ffe6931..5aa87b4 100755 #flags for SQL drivers QT_CFLAGS_PSQL= -@@ -944,6 +945,7 @@ while [ "$#" -gt 0 ]; do +@@ -953,6 +954,7 @@ while [ "$#" -gt 0 ]; do -testsdir| \ -hostdatadir| \ -hostbindir| \ @@ -58,7 +58,7 @@ index ffe6931..5aa87b4 100755 -hostlibdir| \ -extprefix| \ -sysroot| \ -@@ -1176,6 +1178,9 @@ while [ "$#" -gt 0 ]; do +@@ -1185,6 +1187,9 @@ while [ "$#" -gt 0 ]; do extprefix) QT_EXT_PREFIX="$VAL" ;; @@ -68,7 +68,7 @@ index ffe6931..5aa87b4 100755 pkg-config) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_PKGCONFIG="$VAL" -@@ -2438,6 +2443,10 @@ Installation options: +@@ -2447,6 +2452,10 @@ Installation options: -hostdatadir . Data used by qmake will be installed to (default HOSTPREFIX) @@ -79,7 +79,7 @@ index ffe6931..5aa87b4 100755 Configure options: The defaults (*) are usually acceptable. A plus (+) denotes a default value -@@ -3196,6 +3205,11 @@ fi +@@ -3209,6 +3218,11 @@ fi # command line and environment validation #------------------------------------------------------------------------------- @@ -92,7 +92,7 @@ index ffe6931..5aa87b4 100755 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 cfac583..41ca7f1 100644 +index 54641ce..7d7baa4 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -71,7 +71,11 @@ defineTest(qtHaveModule) { diff --git a/recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch b/recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch index b3677eb0..e24d4758 100644 --- a/recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch +++ b/recipes-qt/qt5/qtbase/0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch @@ -1,4 +1,4 @@ -From ac2f94a42878c1500e1ab6bbbec7834d9e5edfbb Mon Sep 17 00:00:00 2001 +From d83234c35de8f52ce3bf6eb262ad8e6af467ac34 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Sat, 27 Apr 2013 23:15:37 +0200 Subject: [PATCH] qt_module: Fix pkgconfig and libtool replacements @@ -68,7 +68,7 @@ Signed-off-by: Jonathan Liu 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf -index 03ec36a..2ab192b 100644 +index 71e96b4..0d7535c 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -317,6 +317,19 @@ contains(TEMPLATE, .*app) { @@ -92,7 +92,7 @@ index 03ec36a..2ab192b 100644 contains(QT_CONFIG, static) { QT_PLUGIN_VERIFY += QTPLUGIN diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf -index c1c668a..67d916d 100644 +index b367bc1..209cc43 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -38,7 +38,7 @@ contains(TEMPLATE, .*lib) { diff --git a/recipes-qt/qt5/qtbase/0005-configure-bump-path-length-from-256-to-512-character.patch b/recipes-qt/qt5/qtbase/0005-configure-bump-path-length-from-256-to-512-character.patch index 404c0686..d455d2cd 100644 --- a/recipes-qt/qt5/qtbase/0005-configure-bump-path-length-from-256-to-512-character.patch +++ b/recipes-qt/qt5/qtbase/0005-configure-bump-path-length-from-256-to-512-character.patch @@ -1,4 +1,4 @@ -From d108da324156b9d709c106c1698bd7466cb26f69 Mon Sep 17 00:00:00 2001 +From 60f490b57faf979a912074506a75c74767a27d3b Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Tue, 25 Aug 2015 10:05:15 -0400 Subject: [PATCH] configure: bump path length from 256 to 512 characters @@ -14,10 +14,10 @@ Signed-off-by: Denys Dmytriyenko 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure -index 5aa87b4..17bca95 100755 +index 1fcbb3a..f49a674 100755 --- a/configure +++ b/configure -@@ -3832,10 +3832,10 @@ static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$ +@@ -3847,10 +3847,10 @@ static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$ static const char qt_configure_installation [12+11] = "qt_instdate=2012-12-20"; /* Installation Info */ diff --git a/recipes-qt/qt5/qtbase/0006-QOpenGLPaintDevice-sub-area-support.patch b/recipes-qt/qt5/qtbase/0006-QOpenGLPaintDevice-sub-area-support.patch index 92ecb133..c58b1d9a 100644 --- a/recipes-qt/qt5/qtbase/0006-QOpenGLPaintDevice-sub-area-support.patch +++ b/recipes-qt/qt5/qtbase/0006-QOpenGLPaintDevice-sub-area-support.patch @@ -1,4 +1,4 @@ -From 17450df40d6c163c85b66c1cc485317fd6f9a9c9 Mon Sep 17 00:00:00 2001 +From f207997b59f1381cf3523521209cb435b1a73f25 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Thu, 16 May 2013 09:52:07 +0300 Subject: [PATCH] QOpenGLPaintDevice sub-area support @@ -140,10 +140,10 @@ index c9f3282..7c0616b 100644 QOpenGLContext *ctx; EngineMode mode; diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp -index 8f69095..cf82ee7 100644 +index 9a7b1eb..6f301f8 100644 --- a/src/gui/opengl/qopengltextureglyphcache.cpp +++ b/src/gui/opengl/qopengltextureglyphcache.cpp -@@ -316,7 +316,7 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height) +@@ -403,7 +403,7 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height) funcs->glBindFramebuffer(GL_FRAMEBUFFER, (GLuint)oldFbo); if (pex != 0) { diff --git a/recipes-qt/qt5/qtbase/0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch b/recipes-qt/qt5/qtbase/0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch index 4cc8ce6d..4ea4061a 100644 --- a/recipes-qt/qt5/qtbase/0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch +++ b/recipes-qt/qt5/qtbase/0007-linux-oe-g-Invert-conditional-for-defining-QT_SOCKLE.patch @@ -1,4 +1,4 @@ -From edb00662de57d0b6ddb39f80800cf3d20c6c07fd Mon Sep 17 00:00:00 2001 +From 7ab6ff7ba20a3173c10a76814d3c9ed312c80627 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 8 Jun 2015 13:59:25 -0700 Subject: [PATCH] linux-oe-g++: Invert conditional for defining QT_SOCKLEN_T diff --git a/recipes-qt/qt5/qtbase/0008-configure-paths-for-target-qmake-properly.patch b/recipes-qt/qt5/qtbase/0008-configure-paths-for-target-qmake-properly.patch index 106486f3..bac18412 100644 --- a/recipes-qt/qt5/qtbase/0008-configure-paths-for-target-qmake-properly.patch +++ b/recipes-qt/qt5/qtbase/0008-configure-paths-for-target-qmake-properly.patch @@ -1,4 +1,4 @@ -From e1bc7a14ae9e433112006b1b6944f8b0e3f619ab Mon Sep 17 00:00:00 2001 +From 0f4ab3e27938002134e8f3f9eb12cf9c50b2ab95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Fri, 13 Nov 2015 12:36:11 +0100 Subject: [PATCH] configure paths for target qmake properly @@ -19,10 +19,10 @@ Signed-off-by: Martin Jansa 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/configure b/configure -index 17bca95..6abdd6b 100755 +index f49a674..d30d0ca 100755 --- a/configure +++ b/configure -@@ -3777,8 +3777,13 @@ if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then +@@ -3792,8 +3792,13 @@ if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then QMAKE_CONFIG="$QMAKE_CONFIG compile_examples" fi @@ -38,7 +38,7 @@ index 17bca95..6abdd6b 100755 QT_CONFIGURE_STR_OFF=0 -@@ -3811,7 +3816,11 @@ QT_CONFIGURE_STRS_ALL=$QT_CONFIGURE_STRS +@@ -3826,7 +3831,11 @@ QT_CONFIGURE_STRS_ALL=$QT_CONFIGURE_STRS QT_CONFIGURE_STR_OFFSETS= QT_CONFIGURE_STRS= @@ -51,7 +51,7 @@ index 17bca95..6abdd6b 100755 addConfStr "$QT_REL_HOST_BINS" addConfStr "$QT_REL_HOST_LIBS" addConfStr "$QT_REL_HOST_DATA" -@@ -3823,6 +3832,12 @@ addConfStr "$shortspec" +@@ -3838,6 +3847,12 @@ addConfStr "$shortspec" #------------------------------------------------------------------------------- [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global" @@ -64,7 +64,7 @@ index 17bca95..6abdd6b 100755 cat > "$outpath/src/corelib/global/qconfig.cpp.new" < -Date: Sat, 16 Nov 2013 00:32:30 +0100 -Subject: [PATCH] Always build uic - -Even if we are not building gui or widgets. This tool is needed later -as a native tool when compiling the target. - -Change-Id: I257668ac28c22b192e7ec7736e6c23fa3be6bab6 -Signed-off-by: Mikko Levonmaa -Signed-off-by: Martin Jansa ---- - src/src.pro | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/src.pro b/src/src.pro -index 4a165a2..0f84791 100644 ---- a/src/src.pro -+++ b/src/src.pro -@@ -180,7 +180,7 @@ contains(QT_CONFIG, concurrent):SUBDIRS += src_concurrent - } - } - } --SUBDIRS += src_plugins -+SUBDIRS += src_plugins src_tools_uic - - nacl: SUBDIRS -= src_network src_testlib - diff --git a/recipes-qt/qt5/qtbase/0009-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch b/recipes-qt/qt5/qtbase/0009-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch new file mode 100644 index 00000000..23d0ab38 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0009-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch @@ -0,0 +1,95 @@ +From 91b87aed0a2a96b0d6b54757ea13c75ee648a9b0 Mon Sep 17 00:00:00 2001 +From: Julien Gueytat +Date: Wed, 27 Apr 2016 19:24:39 +0200 +Subject: [PATCH] Reorder EGL libraries from pkgconfig and defaults: + +https://bugreports.qt.io/browse/QTBUG-50838 +https://bugreports.qt.io/browse/QTBUG-52739 + +The modification is the less intrusive possible. It only swaps LIBS and QMAKE_LIBS_EGL. +The reason behind that was that for the RaspberryPi: + * -lEGL -GLESv2 can link + * -lGLESv2 -lEGL can't + +Adding -lEGL -lGLESv2 and then -lEGL gives -lGLESv2 -lEGL ... the libraries swaped. + +Signed-off-by: Julien Gueytat +--- + config.tests/qpa/egl/egl.pro | 5 ++++- + config.tests/qpa/eglfs-brcm/eglfs-brcm.pro | 12 +++++++----- + configure | 16 ++++++++++++++-- + 3 files changed, 25 insertions(+), 8 deletions(-) + +diff --git a/config.tests/qpa/egl/egl.pro b/config.tests/qpa/egl/egl.pro +index b5396da..828b674 100644 +--- a/config.tests/qpa/egl/egl.pro ++++ b/config.tests/qpa/egl/egl.pro +@@ -5,6 +5,9 @@ for(p, QMAKE_LIBDIR_EGL) { + } + + !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL +-!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL ++ ++BACKUP_LIBS = $$LIBS ++!isEmpty(QMAKE_LIBS_EGL): LIBS = $$QMAKE_LIBS_EGL ++LIBS += $$BACKUP_LIBS + + CONFIG -= qt +diff --git a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro +index d8b1c3e..06f7241 100644 +--- a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro ++++ b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro +@@ -1,11 +1,13 @@ + SOURCES = eglfs-brcm.cpp + +-CONFIG -= qt +- +-INCLUDEPATH += $$QMAKE_INCDIR_EGL +- + for(p, QMAKE_LIBDIR_EGL) { + LIBS += -L$$p + } + +-LIBS += -lEGL -lGLESv2 -lbcm_host ++INCLUDEPATH += $$QMAKE_INCDIR_EGL ++ ++BACKUP_LIBS = $$LIBS ++LIBS = -lEGL -lGLESv2 -lbcm_host ++LIBS += $$BACKUP_LIBS ++ ++CONFIG -= qt +diff --git a/configure b/configure +index d30d0ca..14f348c 100755 +--- a/configure ++++ b/configure +@@ -5891,7 +5891,9 @@ if [ "$CFG_EGL" != "no" ]; then + QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL" + QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL" + QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`" +- fi # detect EGL support ++ fi ++ ++ # detect EGL support + if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then + CFG_EGL=yes + if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then +@@ -5914,8 +5916,18 @@ fi + if [ "$CFG_EGLFS" != "no" ]; then + if [ "$XPLATFORM_QNX" = "no" ] && [ "$CFG_OPENGL" != "no" ]; then + CFG_EGLFS="$CFG_EGL" ++ ++ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then ++ QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'` ++ QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null` ++ QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null` ++ QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL" ++ QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL" ++ QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`" ++ fi ++ + # Detect eglfs backends. +- if compileTest qpa/eglfs-brcm "eglfs-brcm"; then ++ if compileTest qpa/eglfs-brcm "eglfs-brcm" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then + CFG_EGLFS_BRCM=yes + else + CFG_EGLFS_BRCM=no 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 949b323f..00000000 --- a/recipes-qt/qt5/qtbase/0010-Add-external-hostbindir-option-for-native-sdk.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 6df8d620081bd78319fc97846e52b1a83042401a Mon Sep 17 00:00:00 2001 -From: Martin Jansa -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 -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 6abdd6b..7c5a066 100755 ---- a/configure -+++ b/configure -@@ -3824,6 +3824,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 9ee08f4..e6ecf92 100644 ---- a/qmake/property.cpp -+++ b/qmake/property.cpp -@@ -63,6 +63,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 ff65ef9..3726831 100644 ---- a/src/corelib/global/qlibraryinfo.cpp -+++ b/src/corelib/global/qlibraryinfo.cpp -@@ -381,7 +381,7 @@ QLibraryInfo::isDebugBuild() - */ - - static const struct { -- char key[19], value[13]; -+ char key[21], value[13]; - } qtConfEntries[] = { - { "Prefix", "." }, - { "Documentation", "doc" }, // should be ${Data}/doc -@@ -406,6 +406,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 362d47d..a2326e2 100644 ---- a/src/corelib/global/qlibraryinfo.h -+++ b/src/corelib/global/qlibraryinfo.h -@@ -87,6 +87,7 @@ public: - HostBinariesPath, - HostLibrariesPath, - HostDataPath, -+ ExternalHostBinariesPath, - TargetSpecPath, - HostSpecPath, - HostPrefixPath, -diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp -index 7fd0b98..47fa6c3 100644 ---- a/tools/configure/configureapp.cpp -+++ b/tools/configure/configureapp.cpp -@@ -1202,6 +1202,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) -@@ -4121,6 +4128,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"]); -@@ -4140,6 +4150,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/0010-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch b/recipes-qt/qt5/qtbase/0010-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch new file mode 100644 index 00000000..1d0ea3e8 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0010-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch @@ -0,0 +1,63 @@ +From b397a71531e31383ee86135e21072d033480f5bc Mon Sep 17 00:00:00 2001 +From: Pascal Bach +Date: Wed, 11 May 2016 15:20:41 +0200 +Subject: [PATCH] Pretend Qt5 wasn't found if OE_QMAKE_PATH_EXTERNAL_HOST_BINS + isn't set + +This prevents errors like: + +| The imported target "Qt5::Core" references the file +| +| "/qmake" +| +| but this file does not exist. Possible reasons include: + +Which happen if CMake is used without setting OE_QMAKE_PATH_EXTERNAL_HOST_BINS. +To achieve this a check for OE_QMAKE_PATH_EXTERNAL_HOST_BINS is added to each Qt5*Config.cmake +file. And in the case where the variable is not set we just return which is basically +equal to telling CMake that Qt5 wasn't found. + +Upstream-Status: Pending + The patch only makes sense in connection with other patches included here. + Specifically this are: + - 0003-Add-external-hostbindir-option.patch + - 0010-Add-external-hostbindir-option-for-native-sdk.patch + +Signed-off-by: Pascal Bach +--- + mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 5 +++++ + src/corelib/Qt5Config.cmake.in | 5 +++++ + 2 files changed, 10 insertions(+) + +diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +index d2358ca..feb73c0 100644 +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +@@ -9,6 +9,11 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0) + endif() + !!ENDIF + ++if(NOT DEFINED OE_QMAKE_PATH_EXTERNAL_HOST_BINS) ++ message(WARNING "Skipping because OE_QMAKE_PATH_EXTERNAL_HOST_BINS is not defined") ++ return() ++endif() ++ + !!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND) + !!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) + set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\") +diff --git a/src/corelib/Qt5Config.cmake.in b/src/corelib/Qt5Config.cmake.in +index a872d0e..233d663 100644 +--- a/src/corelib/Qt5Config.cmake.in ++++ b/src/corelib/Qt5Config.cmake.in +@@ -3,6 +3,11 @@ if (CMAKE_VERSION VERSION_LESS 2.8.9) + message(FATAL_ERROR \"Qt5 requires at least CMake version 2.8.9\") + endif() + ++if(NOT DEFINED OE_QMAKE_PATH_EXTERNAL_HOST_BINS) ++ message(WARNING "Skipping because OE_QMAKE_PATH_EXTERNAL_HOST_BINS is not defined") ++ return() ++endif() ++ + if (NOT Qt5_FIND_COMPONENTS) + set(Qt5_NOT_FOUND_MESSAGE \"The Qt5 package requires at least one component\") + set(Qt5_FOUND False) diff --git a/recipes-qt/qt5/qtbase/0011-Always-build-uic.patch b/recipes-qt/qt5/qtbase/0011-Always-build-uic.patch new file mode 100644 index 00000000..fb3d316f --- /dev/null +++ b/recipes-qt/qt5/qtbase/0011-Always-build-uic.patch @@ -0,0 +1,28 @@ +From 1b94b0f2579edcf870bc953f820af8fb2ec4376f Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Sat, 16 Nov 2013 00:32:30 +0100 +Subject: [PATCH] Always build uic + +Even if we are not building gui or widgets. This tool is needed later +as a native tool when compiling the target. + +Change-Id: I257668ac28c22b192e7ec7736e6c23fa3be6bab6 +Signed-off-by: Mikko Levonmaa +Signed-off-by: Martin Jansa +--- + src/src.pro | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/src.pro b/src/src.pro +index 3d18540..d128b3a 100644 +--- a/src/src.pro ++++ b/src/src.pro +@@ -195,7 +195,7 @@ contains(QT_CONFIG, concurrent):SUBDIRS += src_concurrent + } + } + } +-SUBDIRS += src_plugins ++SUBDIRS += src_plugins src_tools_uic + + nacl: SUBDIRS -= src_network src_testlib + diff --git a/recipes-qt/qt5/qtbase/0011-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch b/recipes-qt/qt5/qtbase/0011-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch deleted file mode 100644 index 7a24459c..00000000 --- a/recipes-qt/qt5/qtbase/0011-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch +++ /dev/null @@ -1,67 +0,0 @@ -From f5a949e17aa8b37491fbc414c38557c9920fa1e5 Mon Sep 17 00:00:00 2001 -From: Pascal Bach -Date: Wed, 11 May 2016 15:20:41 +0200 -Subject: [PATCH] Pretend Qt5 wasn't found if OE_QMAKE_PATH_EXTERNAL_HOST_BINS - isn't set - -This prevents errors like: - -| The imported target "Qt5::Core" references the file -| -| "/qmake" -| -| but this file does not exist. Possible reasons include: - -Which happen if CMake is used without setting OE_QMAKE_PATH_EXTERNAL_HOST_BINS. -To achieve this a check for OE_QMAKE_PATH_EXTERNAL_HOST_BINS is added to each Qt5*Config.cmake -file. And in the case where the variable is not set we just return which is basically -equal to telling CMake that Qt5 wasn't found. - -Upstream-Status: Pending - The patch only makes sense in connection with other patches included here. - Specifically this are: - - 0003-Add-external-hostbindir-option.patch - - 0010-Add-external-hostbindir-option-for-native-sdk.patch - -Signed-off-by: Pascal Bach - ---- - mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 5 +++++ - src/corelib/Qt5Config.cmake.in | 5 +++++ - 2 files changed, 10 insertions(+) - -diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in -index d2358ca..feb73c0 100644 ---- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in -+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in -@@ -9,6 +9,11 @@ if (CMAKE_VERSION VERSION_LESS 3.0.0) - endif() - !!ENDIF - -+if(NOT DEFINED OE_QMAKE_PATH_EXTERNAL_HOST_BINS) -+ message(WARNING "Skipping because OE_QMAKE_PATH_EXTERNAL_HOST_BINS is not defined") -+ return() -+endif() -+ - !!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND) - !!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\") -diff --git a/src/corelib/Qt5Config.cmake.in b/src/corelib/Qt5Config.cmake.in -index a872d0e..233d663 100644 ---- a/src/corelib/Qt5Config.cmake.in -+++ b/src/corelib/Qt5Config.cmake.in -@@ -3,6 +3,11 @@ if (CMAKE_VERSION VERSION_LESS 2.8.9) - message(FATAL_ERROR \"Qt5 requires at least CMake version 2.8.9\") - endif() - -+if(NOT DEFINED OE_QMAKE_PATH_EXTERNAL_HOST_BINS) -+ message(WARNING "Skipping because OE_QMAKE_PATH_EXTERNAL_HOST_BINS is not defined") -+ return() -+endif() -+ - if (NOT Qt5_FIND_COMPONENTS) - set(Qt5_NOT_FOUND_MESSAGE \"The Qt5 package requires at least one component\") - set(Qt5_FOUND False) --- -2.1.4 - diff --git a/recipes-qt/qt5/qtbase/0011-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch b/recipes-qt/qt5/qtbase/0011-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch deleted file mode 100644 index 3c0b9e61..00000000 --- a/recipes-qt/qt5/qtbase/0011-Reorder-EGL-libraries-from-pkgconfig-and-defaults.patch +++ /dev/null @@ -1,98 +0,0 @@ -From d623d2c2ed49c4dc57fb0dde1faab20976dfc3dc Mon Sep 17 00:00:00 2001 -From: Julien Gueytat -Date: Wed, 27 Apr 2016 19:24:39 +0200 -Subject: [PATCH] Reorder EGL libraries from pkgconfig and defaults: - -https://bugreports.qt.io/browse/QTBUG-50838 -https://bugreports.qt.io/browse/QTBUG-52739 - -The modification is the less intrusive possible. It only swaps LIBS and QMAKE_LIBS_EGL. -The reason behind that was that for the RaspberryPi: - * -lEGL -GLESv2 can link - * -lGLESv2 -lEGL can't - -Adding -lEGL -lGLESv2 and then -lEGL gives -lGLESv2 -lEGL ... the libraries swaped. - -Signed-off-by: Julien Gueytat ---- - config.tests/qpa/egl/egl.pro | 5 ++++- - config.tests/qpa/eglfs-brcm/eglfs-brcm.pro | 12 +++++++----- - configure | 16 ++++++++++++++-- - 3 files changed, 25 insertions(+), 8 deletions(-) - -diff --git a/config.tests/qpa/egl/egl.pro b/config.tests/qpa/egl/egl.pro -index b5396da..828b674 100644 ---- a/config.tests/qpa/egl/egl.pro -+++ b/config.tests/qpa/egl/egl.pro -@@ -5,6 +5,9 @@ for(p, QMAKE_LIBDIR_EGL) { - } - - !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL --!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL -+ -+BACKUP_LIBS = $$LIBS -+!isEmpty(QMAKE_LIBS_EGL): LIBS = $$QMAKE_LIBS_EGL -+LIBS += $$BACKUP_LIBS - - CONFIG -= qt -diff --git a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro -index d8b1c3e..06f7241 100644 ---- a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro -+++ b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro -@@ -1,11 +1,13 @@ - SOURCES = eglfs-brcm.cpp - --CONFIG -= qt -- --INCLUDEPATH += $$QMAKE_INCDIR_EGL -- - for(p, QMAKE_LIBDIR_EGL) { - LIBS += -L$$p - } - --LIBS += -lEGL -lGLESv2 -lbcm_host -+INCLUDEPATH += $$QMAKE_INCDIR_EGL -+ -+BACKUP_LIBS = $$LIBS -+LIBS = -lEGL -lGLESv2 -lbcm_host -+LIBS += $$BACKUP_LIBS -+ -+CONFIG -= qt -diff --git a/configure b/configure -index 2e99d39..072838b 100755 ---- a/configure -+++ b/configure -@@ -5803,7 +5803,9 @@ if [ "$CFG_EGL" != "no" ]; then - QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL" - QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL" - QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`" -- fi # detect EGL support -+ fi -+ -+ # detect EGL support - if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then - CFG_EGL=yes - if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then -@@ -5826,8 +5828,18 @@ fi - if [ "$CFG_EGLFS" != "no" ]; then - if [ "$XPLATFORM_QNX" = "no" ] && [ "$CFG_OPENGL" != "no" ]; then - CFG_EGLFS="$CFG_EGL" -+ -+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then -+ QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'` -+ QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null` -+ QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null` -+ QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL" -+ QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL" -+ QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`" -+ fi -+ - # Detect eglfs backends. -- if compileTest qpa/eglfs-brcm "eglfs-brcm"; then -+ if compileTest qpa/eglfs-brcm "eglfs-brcm" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then - CFG_EGLFS_BRCM=yes - else - CFG_EGLFS_BRCM=no --- -1.9.1 - diff --git a/recipes-qt/qt5/qtbase/0012-Add-external-hostbindir-option-for-native-sdk.patch b/recipes-qt/qt5/qtbase/0012-Add-external-hostbindir-option-for-native-sdk.patch new file mode 100644 index 00000000..1ab8abef --- /dev/null +++ b/recipes-qt/qt5/qtbase/0012-Add-external-hostbindir-option-for-native-sdk.patch @@ -0,0 +1,131 @@ +From cb66a3193b1b1b8b402548b615c3675c4adcf13a Mon Sep 17 00:00:00 2001 +From: Martin Jansa +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 +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 14f348c..61f22e8 100755 +--- a/configure ++++ b/configure +@@ -3839,6 +3839,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 9ee08f4..e6ecf92 100644 +--- a/qmake/property.cpp ++++ b/qmake/property.cpp +@@ -63,6 +63,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 ff65ef9..3726831 100644 +--- a/src/corelib/global/qlibraryinfo.cpp ++++ b/src/corelib/global/qlibraryinfo.cpp +@@ -381,7 +381,7 @@ QLibraryInfo::isDebugBuild() + */ + + static const struct { +- char key[19], value[13]; ++ char key[21], value[13]; + } qtConfEntries[] = { + { "Prefix", "." }, + { "Documentation", "doc" }, // should be ${Data}/doc +@@ -406,6 +406,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 362d47d..a2326e2 100644 +--- a/src/corelib/global/qlibraryinfo.h ++++ b/src/corelib/global/qlibraryinfo.h +@@ -87,6 +87,7 @@ public: + HostBinariesPath, + HostLibrariesPath, + HostDataPath, ++ ExternalHostBinariesPath, + TargetSpecPath, + HostSpecPath, + HostPrefixPath, +diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp +index 0fa205b..2921e2b 100644 +--- a/tools/configure/configureapp.cpp ++++ b/tools/configure/configureapp.cpp +@@ -1219,6 +1219,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) +@@ -4171,6 +4178,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"]); +@@ -4190,6 +4200,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); + -- cgit v1.2.3-54-g00ecf