aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-09-27 18:01:46 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2018-09-30 16:02:19 +0000
commit15a8c254c248104f8aa4a499f89fe78b763197f5 (patch)
tree0411cfcd3b27d15c322f05015495e3e16fff9dc4
parentf11e9420e995a2aeb4ea308a45ddab09cb644a59 (diff)
qt5-creator: Pick native tools from native sysroot e.g. lrelease etc.
qtcreator's build system is not as creative when it comes to cross building, it assumes to find some of tools used during translations to be installed in bindir where its building on. In other words native build is assumed. This patch helps the build system to locate the right binaries during cross compilation Fix install as we do not need chrpath'ing anymore Fix cross-builds for non x86 systems Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-qt/qt5/qt5-creator/0001-Use-correct-path-prefix.patch32
-rw-r--r--recipes-qt/qt5/qt5-creator/0001-botan-Always-define-BOTAN_ARCH_SWITCH-when-cross-bui.patch26
-rw-r--r--recipes-qt/qt5/qt5-creator_git.bb17
3 files changed, 33 insertions, 42 deletions
diff --git a/recipes-qt/qt5/qt5-creator/0001-Use-correct-path-prefix.patch b/recipes-qt/qt5/qt5-creator/0001-Use-correct-path-prefix.patch
deleted file mode 100644
index c064a9a9..00000000
--- a/recipes-qt/qt5/qt5-creator/0001-Use-correct-path-prefix.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 50443809cc261a3f466cdebd3fa2dd4dda6e6a28 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 25 Sep 2018 23:15:08 +0000
-Subject: [PATCH] Use correct path prefix
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- share/qtcreator/translations/translations.pro | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/share/qtcreator/translations/translations.pro b/share/qtcreator/translations/translations.pro
-index 0df9762fcc..de09bc47ed 100644
---- a/share/qtcreator/translations/translations.pro
-+++ b/share/qtcreator/translations/translations.pro
-@@ -12,10 +12,10 @@ defineReplace(prependAll) {
- return($$result)
- }
-
--XMLPATTERNS = $$shell_path($$[QT_INSTALL_BINS]/xmlpatterns)
--LUPDATE = $$shell_path($$[QT_INSTALL_BINS]/lupdate) -locations relative -no-ui-lines -no-sort
--LRELEASE = $$shell_path($$[QT_INSTALL_BINS]/lrelease)
--LCONVERT = $$shell_path($$[QT_INSTALL_BINS]/lconvert)
-+XMLPATTERNS = $$OE_QMAKE_PATH_EXTERNAL_HOST_BINS/xmlpatterns
-+LUPDATE = $$OE_QMAKE_PATH_EXTERNAL_HOST_BINS/lupdate -locations relative -no-ui-lines -no-sort
-+LRELEASE = $$OE_QMAKE_PATH_EXTERNAL_HOST_BINS/lrelease
-+LCONVERT = $$OE_QMAKE_PATH_EXTERNAL_HOST_BINS/lconvert
-
- wd = $$replace(IDE_SOURCE_TREE, /, $$QMAKE_DIR_SEP)
-
diff --git a/recipes-qt/qt5/qt5-creator/0001-botan-Always-define-BOTAN_ARCH_SWITCH-when-cross-bui.patch b/recipes-qt/qt5/qt5-creator/0001-botan-Always-define-BOTAN_ARCH_SWITCH-when-cross-bui.patch
new file mode 100644
index 00000000..eebda742
--- /dev/null
+++ b/recipes-qt/qt5/qt5-creator/0001-botan-Always-define-BOTAN_ARCH_SWITCH-when-cross-bui.patch
@@ -0,0 +1,26 @@
+From 766e5b37a42b440b66823262eb553f9981940115 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 27 Sep 2018 20:48:17 -0700
+Subject: [PATCH] botan: Always define BOTAN_ARCH_SWITCH when cross-building
+
+this helps in compiling botan for non-x86 architectures
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/libs/botan/botan.pro | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/libs/botan/botan.pro b/src/libs/botan/botan.pro
+index 0c939b2a30..6e1a85fe84 100644
+--- a/src/libs/botan/botan.pro
++++ b/src/libs/botan/botan.pro
+@@ -18,6 +18,7 @@ else: clang: BOTAN_CC_TYPE = clang
+ else: BOTAN_CC_TYPE = gcc
+ contains(QT_ARCH, i386): BOTAN_ARCH_SWITCH = "--cpu=x86"
+ else: contains(QT_ARCH, x86_64): BOTAN_ARCH_SWITCH = "--cpu=x86_64"
++else: BOTAN_ARCH_SWITCH = --cpu=$$QT_ARCH
+ BOTAN_MODULES = aes aes_ssse3 auto_rng bigint block cbc ctr des dh dsa ec_group ecdh ecdsa entropy \
+ filters hmac mode_pad pubkey rsa sha1 sha1_sse2 sha1_x86 sha2_32 sha2_32_x86 \
+ sha2_64 simd system_rng,emsa_pkcs1,pbes2,pbkdf2
+-- 2.19.0
+
diff --git a/recipes-qt/qt5/qt5-creator_git.bb b/recipes-qt/qt5/qt5-creator_git.bb
index 218609bd..45e6d8ac 100644
--- a/recipes-qt/qt5/qt5-creator_git.bb
+++ b/recipes-qt/qt5/qt5-creator_git.bb
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \
inherit qmake5
-DEPENDS = "qtbase qtscript qtwebkit qtxmlpatterns qtx11extras qtdeclarative qttools qttools-native qtsvg chrpath-replacement-native"
+DEPENDS = "qtbase qtscript qtwebkit qtxmlpatterns qtx11extras qtdeclarative qttools qttools-native qtsvg"
DEPENDS_append_libc-musl = " libexecinfo"
SRCREV = "8768e39d3c8e74e583eca3897cc6de53a99c3dde"
@@ -24,8 +24,8 @@ PV = "4.7.1+git${SRCPV}"
# 4.7.1.meta-qt5.1
SRC_URI = " \
git://code.qt.io/qt-creator/qt-creator.git;branch=4.7 \
- file://0001-Use-correct-path-prefix.patch \
file://0002-botan.pro-pass-QMAKE_AR.patch \
+ file://0001-botan-Always-define-BOTAN_ARCH_SWITCH-when-cross-bui.patch \
file://qtcreator.desktop.in \
"
SRC_URI_append_libc-musl = " file://0003-Link-with-libexecinfo-on-musl.patch"
@@ -34,25 +34,22 @@ S = "${WORKDIR}/git"
EXTRA_QMAKEVARS_PRE += "IDE_LIBRARY_BASENAME=${baselib}${QT_DIR_NAME}"
-EXTRANATIVEPATH += "chrpath-native"
-
do_configure_append() {
# Find native tools
sed -i 's:${STAGING_BINDIR}.*/qdoc:${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/qdoc:g' ${B}/Makefile
+ sed -i 's:${STAGING_BINDIR}.*/lrelease:${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/lrelease:g' ${B}/share/qtcreator/translations/Makefile
+ sed -i 's:${STAGING_BINDIR}.*/lupdate:${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/lupdate:g' ${B}/share/qtcreator/translations/Makefile
+ sed -i 's:${STAGING_BINDIR}.*/xmlpatterns:${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/xmlpatterns:g' ${B}/share/qtcreator/translations/Makefile
+ sed -i 's:${STAGING_BINDIR}.*/lconvert:${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/lconvert:g' ${B}/share/qtcreator/translations/Makefile
+
}
do_install() {
oe_runmake install INSTALL_ROOT=${D}${prefix}
- oe_runmake install_inst_qch_docs INSTALL_ROOT=${D}${prefix}
# install desktop and ensure that qt-creator finds qmake
install -d ${D}${datadir}/applications
install -m 0644 ${WORKDIR}/qtcreator.desktop.in ${D}${datadir}/applications/qtcreator.desktop
sed -i 's:@QT5_QMAKE@:${OE_QMAKE_PATH_QT_BINS}:g' ${D}${datadir}/applications/qtcreator.desktop
- chrpath --delete ${D}${libexecdir}/qtcreator/qtcreator_process_stub
- chrpath --delete ${D}${libexecdir}/qtcreator/qbs_processlauncher
- chrpath --delete ${D}${libdir}/${QT_DIR_NAME}/qtcreator/libqbscore.so.*
- test -e ${D}${libdir}/${QT_DIR_NAME}/qtcreator/plugins/qmldesigner/libcomponentsplugin.so && chrpath --delete ${D}${libdir}/${QT_DIR_NAME}/qtcreator/plugins/qmldesigner/libcomponentsplugin.so
- test -e ${D}${libdir}/${QT_DIR_NAME}/qtcreator/plugins/qmldesigner/libqtquickplugin.so && chrpath --delete ${D}${libdir}/${QT_DIR_NAME}/qtcreator/plugins/qmldesigner/libqtquickplugin.so
}
FILES_${PN} += " \