aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--classes/qmake5.bbclass4
-rw-r--r--classes/qmake5_base.bbclass71
-rw-r--r--recipes-qt/qt5/nativesdk-qtbase_git.bb41
-rw-r--r--recipes-qt/qt5/qtbase-native_git.bb8
-rw-r--r--recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch6
-rw-r--r--recipes-qt/qt5/qtbase/0002-configure-Separate-host-and-build-platform.patch55
-rw-r--r--recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch36
-rw-r--r--recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch154
-rw-r--r--recipes-qt/qt5/qtbase_git.bb32
-rw-r--r--recipes-qt/qt5/qtdeclarative_git.bb5
-rw-r--r--recipes-qt/qt5/qttools/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch6
-rw-r--r--recipes-qt/qt5/qtwayland-native_git.bb2
-rw-r--r--recipes-qt/qt5/qtwebengine_git.bb2
13 files changed, 141 insertions, 281 deletions
diff --git a/classes/qmake5.bbclass b/classes/qmake5.bbclass
index 2b43f2e3..1a960e8f 100644
--- a/classes/qmake5.bbclass
+++ b/classes/qmake5.bbclass
@@ -17,7 +17,3 @@ do_install() {
do_install_class-native() {
qmake5_base_native_do_install
}
-
-do_install_class-nativesdk() {
- qmake5_base_nativesdk_do_install
-}
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
index a4b7d1bf..f273567d 100644
--- a/classes/qmake5_base.bbclass
+++ b/classes/qmake5_base.bbclass
@@ -30,8 +30,6 @@ EXTRA_OEMAKE = " \
OE_QMAKE_INCDIR_QT='${STAGING_DIR_TARGET}/${OE_QMAKE_PATH_HEADERS}' \
"
-OE_QMAKESPEC = "${QMAKE_MKSPEC_PATH_NATIVE}/mkspecs/${OE_QMAKE_PLATFORM_NATIVE}"
-OE_XQMAKESPEC = "${QMAKE_MKSPEC_PATH}/mkspecs/${OE_QMAKE_PLATFORM}"
OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake"
OE_QMAKE_COMPILER = "${CC}"
OE_QMAKE_CC = "${CC}"
@@ -43,14 +41,18 @@ OE_QMAKE_LDFLAGS = "${LDFLAGS}"
OE_QMAKE_AR = "${AR}"
OE_QMAKE_STRIP = "echo"
OE_QMAKE_WAYLAND_SCANNER = "${STAGING_BINDIR_NATIVE}/wayland-scanner"
-
-# this one needs to be exported, because qmake reads it from shell env
-export QT_CONF_PATH = "${WORKDIR}/qt.conf"
+OE_QMAKE_QTCONF_PATH = "${WORKDIR}/qt.conf"
+OE_QMAKE_QTCONF = "-qtconf ${OE_QMAKE_QTCONF_PATH}"
inherit qmake5_paths remove-libtool
do_generate_qt_config_file() {
- cat > ${QT_CONF_PATH} <<EOF
+ generate_qt_config_file_paths
+ generate_qt_config_file_effective_paths
+}
+
+generate_qt_config_file_paths() {
+ cat > ${OE_QMAKE_QTCONF_PATH} <<EOF
[Paths]
Prefix = ${OE_QMAKE_PATH_PREFIX}
Headers = ${OE_QMAKE_PATH_HEADERS}
@@ -70,12 +72,21 @@ Tests = ${OE_QMAKE_PATH_TESTS}
HostBinaries = ${OE_QMAKE_PATH_HOST_BINS}
HostData = ${OE_QMAKE_PATH_HOST_DATA}
HostLibraries = ${OE_QMAKE_PATH_HOST_LIBS}
-HostSpec = ${OE_QMAKESPEC}
-TartgetSpec = ${OE_XQMAKESPEC}
+HostSpec = ${OE_QMAKE_PLATFORM_NATIVE}
+TargetSpec = ${OE_QMAKE_PLATFORM}
ExternalHostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
Sysroot = ${STAGING_DIR_TARGET}
EOF
}
+
+generate_qt_config_file_effective_paths() {
+ cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF
+[EffectivePaths]
+HostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
+HostData = ${OE_QMAKE_PATH_HOST_DATA}
+HostPrefix = ${STAGING_DIR_NATIVE}${prefix_native}
+EOF
+}
#
# Allows to override following values (as in version 5.0.1)
# Prefix The default prefix for all paths.
@@ -154,8 +165,8 @@ qmake5_base_do_configure () {
# for config.tests to read this
export QMAKE_MAKE_ARGS="${EXTRA_OEMAKE}"
- CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST"
- ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling $CMD"
+ CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_QTCONF} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST"
+ ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_QTCONF} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling $CMD"
}
qmake5_base_native_do_install() {
@@ -166,37 +177,37 @@ qmake5_base_native_do_install() {
fi
}
-qmake5_base_nativesdk_do_install() {
- # Fix install paths for all
- find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_HOST},(INSTALL_ROOT),g"
-
- oe_runmake install INSTALL_ROOT=${D}
- if ls ${D}${libdir}/pkgconfig/Qt5*.pc >/dev/null 2>/dev/null; then
- sed -i "s@-L${STAGING_LIBDIR}@-L\${libdir}@g" ${D}${libdir}/pkgconfig/Qt5*.pc
+qmake5_base_fix_install() {
+ STAGING_PATH=$1
+ if [ -d ${D}${STAGING_PATH} ] ; then
+ echo "Some files are installed in wrong directory ${D}${STAGING_PATH}"
+ cp -ra ${D}${STAGING_PATH}/* ${D}
+ rm -rf ${D}${STAGING_PATH}
+ # remove empty dirs
+ TMP=`dirname ${D}${STAGING_PATH}`
+ while test ${TMP} != ${D}; do
+ rmdir ${TMP}
+ TMP=`dirname ${TMP}`;
+ done
fi
}
qmake5_base_do_install() {
# Fix install paths for all
find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"
+ find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_HOST},(INSTALL_ROOT),g"
+ find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE},(INSTALL_ROOT),g"
oe_runmake install INSTALL_ROOT=${D}
# everything except HostData and HostBinaries is prefixed with sysroot value,
# but we cannot remove sysroot override, because that's useful for pkg-config etc
- # In some cases like QtQmlDevTools in qtdeclarative, the sed above does not work,
- # fix them manually
- if [ -d ${D}${STAGING_DIR_TARGET} ] ; then
- echo "Some files are installed in wrong directory ${D}${STAGING_DIR_TARGET}"
- cp -ra ${D}${STAGING_DIR_TARGET}/* ${D}
- rm -rf ${D}${STAGING_DIR_TARGET}
- # remove empty dirs
- TMP=`dirname ${D}/${STAGING_DIR_TARGET}`
- while test ${TMP} != ${D}; do
- rmdir ${TMP}
- TMP=`dirname ${TMP}`;
- done
- fi
+ # concurrent builds may cause qmake to regenerate Makefiles and override the above
+ # sed changes. If that happens, move files manually to correct location.
+ qmake5_base_fix_install ${STAGING_DIR_TARGET}
+ qmake5_base_fix_install ${STAGING_DIR_HOST}
+ qmake5_base_fix_install ${STAGING_DIR_NATIVE}
+
if ls ${D}${libdir}/pkgconfig/Qt5*.pc >/dev/null 2>/dev/null; then
sed -i "s@-L${STAGING_LIBDIR}@-L\${libdir}@g" ${D}${libdir}/pkgconfig/Qt5*.pc
fi
diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb
index 74526484..aecb0856 100644
--- a/recipes-qt/qt5/nativesdk-qtbase_git.bb
+++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb
@@ -27,7 +27,7 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
# common for qtbase-native, qtbase-nativesdk and qtbase
SRC_URI += "\
file://0001-Add-linux-oe-g-platform.patch \
- file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
+ file://0002-configure-Separate-host-and-build-platform.patch \
file://0003-Add-external-hostbindir-option.patch \
file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
file://0005-configure-bump-path-length-from-256-to-512-character.patch \
@@ -58,10 +58,11 @@ FILES_${PN}-tools-dev = " \
${FILES_SOLIBSDEV} ${libdir}/*.la \
${libdir}/*.prl \
${OE_QMAKE_PATH_ARCHDATA}/mkspecs \
+ ${OE_QMAKE_PATH_LIBS}/*.prl \
"
FILES_${PN}-tools-staticdev = " \
- ${libdir}/libQt5Bootstrap.a \
+ ${OE_QMAKE_PATH_LIBS}/*.a \
"
FILES_${PN}-tools-dbg = " \
@@ -96,7 +97,7 @@ OE_QMAKE_PATH_HOST_DATA = "${libdir}${QT_DIR_NAME}"
OE_QMAKE_PATH_HOST_LIBS = "${libdir}"
do_generate_qt_config_file() {
- cat > ${QT_CONF_PATH} <<EOF
+ cat > ${OE_QMAKE_QTCONF_PATH} <<EOF
[Paths]
Prefix = ${OE_QMAKE_PATH_PREFIX}
Headers = ${OE_QMAKE_PATH_HEADERS}
@@ -116,18 +117,18 @@ Tests = ${OE_QMAKE_PATH_TESTS}
HostBinaries = ${OE_QMAKE_PATH_HOST_BINS}
HostData = ${OE_QMAKE_PATH_HOST_DATA}
HostLibraries = ${OE_QMAKE_PATH_HOST_LIBS}
-HostSpec = ${OE_QMAKESPEC}
-TartgetSpec = ${OE_XQMAKESPEC}
+HostSpec = ${OE_QMAKE_PLATFORM_NATIVE}
+TargetSpec = ${OE_QMAKE_PLATFORM}
ExternalHostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}
Sysroot =
EOF
}
do_generate_qt_config_file_append() {
- cat >> ${QT_CONF_PATH} <<EOF
+ cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF
[EffectivePaths]
-Prefix=..
+Prefix=${B}
EOF
}
@@ -145,21 +146,10 @@ export OE_QMAKE_LDFLAGS
export OE_QMAKE_AR
export OE_QMAKE_STRIP
-# another exception is that we need to run bin/qmake, because EffectivePaths are relative to qmake location
-OE_QMAKE_QMAKE_ORIG = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake"
-OE_QMAKE_QMAKE = "bin/qmake"
-
do_configure() {
- # we need symlink in path relative to source, because
- # EffectivePaths:Prefix is relative to qmake location
- if [ ! -e ${B}/bin/qmake ]; then
- mkdir -p ${B}/bin
- ln -sf ${OE_QMAKE_QMAKE_ORIG} ${B}/bin/qmake
- fi
-
${S}/configure -v \
-opensource -confirm-license \
- -sysroot ${STAGING_DIR_NATIVE} \
+ -sysroot ${STAGING_DIR_TARGET} \
-no-gcc-sysroot \
-system-zlib \
-dbus-runtime \
@@ -193,6 +183,7 @@ do_configure() {
-testsdir ${OE_QMAKE_PATH_TESTS} \
-hostbindir ${OE_QMAKE_PATH_HOST_BINS} \
-hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \
+ -host-option CROSS_COMPILE=${HOST_PREFIX} \
-external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \
-no-glib \
-no-iconv \
@@ -202,11 +193,11 @@ do_configure() {
-nomake libs \
-no-compile-examples \
-no-rpath \
- -platform ${OE_QMAKESPEC} \
- -xplatform linux-oe-g++ \
+ -platform ${OE_QMAKE_PLATFORM_NATIVE} \
+ -xplatform ${OE_QMAKE_PLATFORM} \
${QT_CONFIG_FLAGS}
- bin/qmake ${OE_QMAKE_DEBUG_OUTPUT} ${S} -o Makefile || die "Configuring qt with qmake failed. PACKAGECONFIG_CONFARGS was ${PACKAGECONFIG_CONFARGS}"
+ ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_QTCONF} ${S} -o Makefile || die "Configuring qt with qmake failed. PACKAGECONFIG_CONFARGS was ${PACKAGECONFIG_CONFARGS}"
}
do_install() {
@@ -215,12 +206,6 @@ do_install() {
oe_runmake install INSTALL_ROOT=${D}
- install -m 755 ${B}/bin/qmake-target ${D}${OE_QMAKE_PATH_HOST_BINS}/qmake
-
- # for modules which are still using syncqt and call qtPrepareTool(QMAKE_SYNCQT, syncqt)
- # e.g. qt3d, qtwayland
- ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt
-
# remove things unused in nativesdk, we need the headers and libs
rm -rf ${D}${datadir} \
${D}/${OE_QMAKE_PATH_PLUGINS} \
diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb
index 4da56405..a9bd2538 100644
--- a/recipes-qt/qt5/qtbase-native_git.bb
+++ b/recipes-qt/qt5/qtbase-native_git.bb
@@ -22,7 +22,7 @@ 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://0002-configure-Separate-host-and-build-platform.patch \
file://0003-Add-external-hostbindir-option.patch \
file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
file://0005-configure-bump-path-length-from-256-to-512-character.patch \
@@ -41,14 +41,11 @@ SRC_URI += " \
CLEANBROKEN = "1"
-QT_CONF_PATH = "${B}/qt.conf"
-
do_generate_qt_config_file() {
:
}
PACKAGECONFIG_CONFARGS = " \
- -prefix ${prefix} \
-sysroot ${STAGING_DIR_NATIVE} \
-no-gcc-sysroot \
-system-zlib \
@@ -69,10 +66,13 @@ PACKAGECONFIG_CONFARGS = " \
-release \
-prefix ${OE_QMAKE_PATH_PREFIX} \
-bindir ${OE_QMAKE_PATH_BINS} \
+ -hostbindir ${OE_QMAKE_PATH_BINS} \
-libdir ${OE_QMAKE_PATH_LIBS} \
+ -hostlibdir ${OE_QMAKE_PATH_LIBS} \
-headerdir ${OE_QMAKE_PATH_HEADERS} \
-archdatadir ${OE_QMAKE_PATH_ARCHDATA} \
-datadir ${OE_QMAKE_PATH_DATA} \
+ -hostdatadir ${QMAKE_MKSPEC_PATH_NATIVE} \
-docdir ${OE_QMAKE_PATH_DOCS} \
-sysconfdir ${OE_QMAKE_PATH_SETTINGS} \
-no-glib \
diff --git a/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
index b28ca8b6..43ce9bf2 100644
--- a/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
+++ b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch
@@ -37,10 +37,6 @@ Subject: [PATCH] Add linux-oe-g++ platform
/bin/sh: line 0: test: -gt: unary operator expected
which are not fatal, but still misleading in do_configure output
-* add -target suffix to qmake built in qtbase configure, this way we can
- use qmake from qtbase-native, but then include qmake built for target
- in qtbase-tools package (smilarly for nativesdk-qtbase).
-
Upstream-Status: Inappropriate [embedded specific]
too OE specific, probably cannot be upstreamed
@@ -161,7 +157,7 @@ index 0ba0c31..052872e 100755
EXEEXT=
;;
esac
-+ [ "$QT_CROSS_COMPILE" = "yes" ] && EXEEXT=-target
++
if [ "$BUILD_ON_MAC" = "yes" ]; then
echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile"
echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
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..9884976d
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0002-configure-Separate-host-and-build-platform.patch
@@ -0,0 +1,55 @@
+From 34676aae2d06271014ee4a67498e6e2f0fe97139 Mon Sep 17 00:00:00 2001
+From: Samuli Piippo <samuli.piippo@theqtcompany.com>
+Date: Fri, 11 Mar 2016 16:00:23 +0200
+Subject: [PATCH] configure: Separate host and build platform
+
+Missing bits that were not upstreamed
+
+Change-Id: I6bfed072c9826094dcda9c7112b0c8b9d4055366
+---
+ configure | 2 +-
+ mkspecs/features/qt_functions.prf | 2 +-
+ mkspecs/features/qt_tool.prf | 1 +
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 03e89d5..2fa97d3 100755
+--- a/configure
++++ b/configure
+@@ -3293,7 +3293,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"
+diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
+index 9c3414c..91d1888 100644
+--- a/mkspecs/features/qt_functions.prf
++++ b/mkspecs/features/qt_functions.prf
+@@ -71,7 +71,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 bdeb59c..ecc0ca2 100644
+--- a/mkspecs/features/qt_tool.prf
++++ b/mkspecs/features/qt_tool.prf
+@@ -21,6 +21,7 @@ DEFINES *= QT_USE_QSTRINGBUILDER
+ isEmpty(MODULE):MODULE = $$TARGET
+
+ load(qt_build_paths)
++ load(device_config)
+
+ TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri
+
+--
+1.9.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 699e3856..00000000
--- a/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From e5f8607cfa1d2bcc798686cdf7c87ea0c6577d30 Mon Sep 17 00:00:00 2001
-From: Holger Freyther <zecke@selfish.org>
-Date: Wed, 26 Sep 2012 17:22:30 +0200
-Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the
- environment
-
-Allow to set a qt.conf from the outside using the environment. This allows
-to inject new prefixes and other paths into qmake. This is needed when using
-the same qmake binary to build qt/x11 and qt/embedded
-
-Upstream-Status: Inappropriate [embedded specific]
- again very OE specific to read everything from environment (reusing the same
- qmake from sstate and replacing all configured paths in it with qt.conf from
- environment).
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/corelib/global/qlibraryinfo.cpp | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
-index 4582001..ff65ef9 100644
---- a/src/corelib/global/qlibraryinfo.cpp
-+++ b/src/corelib/global/qlibraryinfo.cpp
-@@ -163,7 +163,10 @@ void QLibrarySettings::load()
-
- QSettings *QLibraryInfoPrivate::findConfiguration()
- {
-- QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
-+ QByteArray config = getenv("QT_CONF_PATH");
-+ QString qtconfig = QFile::decodeName(config);
-+ if(!QFile::exists(qtconfig))
-+ qtconfig = QStringLiteral(":/qt/etc/qt.conf");
- if (QFile::exists(qtconfig))
- return new QSettings(qtconfig, QSettings::IniFormat);
- #ifdef QT_BUILD_QMAKE
diff --git a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
index 381cde29..8224171a 100644
--- a/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
+++ b/recipes-qt/qt5/qtbase/0003-Add-external-hostbindir-option.patch
@@ -1,165 +1,23 @@
-From c1dc6165d6a085f162ed32ef5697f645019f9ee0 Mon Sep 17 00:00:00 2001
+From 502b95b840a5f79e5a68e9bd5b10dbdc92485f1f Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 6 Apr 2013 13:15:07 +0200
Subject: [PATCH] Add -external-hostbindir option
-* when cross-compiling it's sometimes useful to use existing tools from machine
- (or in OpenEmbedded built with separate native recipe) when building for target
-
-* this way we can skip bootstraping tools we already have
-
-* qt_functions: temporary remove isEmpty check
-* now we assume that every build will provide QT_EXTERNAL_HOST_BINS value
-* isEmpty works correctly only with qmake variables (e.g. $$FOO -
- isEmpty(FOO)), but doesn't work with system properties like $$[FOO].
-
* cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to determine path to host binaries
-Upstream-Status: Pending
- is a lot better for upstreaming (and it was already sort of approved by
- Oswald) but in 5.2.0 I've noticed that he added something similar for
- android builds
+Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Simon Busch <morphis@gravedo.de>
Signed-off-by: Jonathan Liu <net147@gmail.com>
-Conflicts:
- configure
-
Change-Id: Iacaa1c5531cd6dcc094891610c351673db55d7b2
---
- configure | 14 ++++++++++++++
- mkspecs/features/qt_functions.prf | 6 +++++-
- mkspecs/features/qt_tool.prf | 4 +++-
- qtbase.pro | 16 ++++++++++++++++
- src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++---
- src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++--
- src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +-
- 7 files changed, 44 insertions(+), 8 deletions(-)
+ src/corelib/Qt5CoreConfigExtras.cmake.in | 6 +++---
+ src/dbus/Qt5DBusConfigExtras.cmake.in | 4 ++--
+ src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
-diff --git a/configure b/configure
-index 052872e..1fcbb3a 100755
---- a/configure
-+++ b/configure
-@@ -834,6 +834,7 @@ QT_HOST_BINS=
- QT_HOST_LIBS=
- QT_HOST_DATA=
- QT_EXT_PREFIX=
-+QT_EXTERNAL_HOST_BINS=
-
- #flags for SQL drivers
- QT_CFLAGS_PSQL=
-@@ -953,6 +954,7 @@ while [ "$#" -gt 0 ]; do
- -testsdir| \
- -hostdatadir| \
- -hostbindir| \
-+ -external-hostbindir| \
- -hostlibdir| \
- -extprefix| \
- -sysroot| \
-@@ -1185,6 +1187,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"
-@@ -2447,6 +2452,10 @@ Installation options:
- -hostdatadir <dir> . Data used by qmake will be installed to <dir>
- (default HOSTPREFIX)
-
-+ -external-hostbindir <dir> Use external host executables instead of building them
-+ (not used by defaut)
-+
-+
- Configure options:
-
- The defaults (*) are usually acceptable. A plus (+) denotes a default value
-@@ -3209,6 +3218,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 54641ce..7d7baa4 100644
---- a/mkspecs/features/qt_functions.prf
-+++ b/mkspecs/features/qt_functions.prf
-@@ -71,7 +71,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) {
- $${1}_EXE = $${cmd}.pl
- cmd = perl -w $$system_path($${cmd}.pl)
-diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
-index bdeb59c..b8c539f 100644
---- a/mkspecs/features/qt_tool.prf
-+++ b/mkspecs/features/qt_tool.prf
-@@ -14,10 +14,12 @@ 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|!isEmpty(HOST_QT_TOOLS)) {
-+!build_pass:if(!host_build|!force_bootstrap|force_independent|!isEmpty(HOST_QT_TOOLS)):isEmpty(QT_EXTERNAL_HOST_BINS) {
- isEmpty(MODULE):MODULE = $$TARGET
-
- load(qt_build_paths)
-diff --git a/qtbase.pro b/qtbase.pro
-index 11cff9e..ec03669 100644
---- a/qtbase.pro
-+++ b/qtbase.pro
-@@ -38,6 +38,19 @@ 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 = $${qmake.files}.exe
-+}
-+INSTALLS += qmake
-+
- #licheck
- licheck.path = $$[QT_HOST_BINS]
- licheck.files = $$PWD/bin/$$QT_LICHECK
-@@ -51,6 +64,9 @@ INSTALLS += fixqt4headers
- #syncqt
- syncqt.path = $$[QT_HOST_BINS]
- syncqt.files = $$PWD/bin/syncqt.pl
-+!isEmpty(QT_EXTERNAL_HOST_BINS) {
-+ syncqt.files = $$[QT_EXTERNAL_HOST_BINS]/syncqt.pl
-+}
- INSTALLS += syncqt
-
- # If we are doing a prefix build, create a "module" pri which enables
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index a5ed8b2..0e11a1e 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index f69c33cb..c907b93c 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -17,7 +17,7 @@ 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://0002-configure-Separate-host-and-build-platform.patch \
file://0003-Add-external-hostbindir-option.patch \
file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
file://0005-configure-bump-path-length-from-256-to-512-character.patch \
@@ -121,7 +121,7 @@ PACKAGECONFIG[gtk] = "-gtk,-no-gtk,gtk+"
PACKAGECONFIG[directfb] = "-directfb,-no-directfb,directfb"
PACKAGECONFIG[linuxfb] = "-linuxfb,-no-linuxfb"
PACKAGECONFIG[mitshm] = "-mitshm,-no-mitshm,mitshm"
-PACKAGECONFIG[kms] = "-kms,-no-kms,virtual/mesa virtual/egl"
+PACKAGECONFIG[kms] = "-kms,-no-kms,drm virtual/egl"
# needed for qtwebkit
PACKAGECONFIG[icu] = "-icu,-no-icu,icu"
PACKAGECONFIG[udev] = "-libudev,-no-libudev,udev"
@@ -142,20 +142,17 @@ QT_CONFIG_FLAGS += " \
${PACKAGECONFIG_CONFARGS} \
"
-do_generate_qt_config_file_append() {
- cat >> ${QT_CONF_PATH} <<EOF
-
+generate_qt_config_file_effective_paths() {
+ cat >> ${OE_QMAKE_QTCONF_PATH} <<EOF
[EffectivePaths]
-Prefix=..
+Prefix=${B}
EOF
}
+OE_QMAKE_PATH_HOST_DATA = "${STAGING_LIBDIR}${QT_DIR_NAME}"
# qtbase is exception, we need to use mkspecs from ${S}
-QMAKE_MKSPEC_PATH = "${B}"
-
-# another exception is that we need to run bin/qmake, because EffectivePaths are relative to qmake location
-OE_QMAKE_QMAKE_ORIG = "${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/qmake"
-OE_QMAKE_QMAKE = "bin/qmake"
+QMAKE_MKSPEC_PATH_TARGET = "${B}"
+QMAKE_MKSPEC_PATH = "${S}"
# qtbase is exception, configure script is using our get(X)QEvalMakeConf and setBootstrapEvalVariable functions to read it from shell
export OE_QMAKE_COMPILER
@@ -169,17 +166,9 @@ export OE_QMAKE_AR
export OE_QMAKE_STRIP
do_configure() {
- # we need symlink in path relative to source, because
- # EffectivePaths:Prefix is relative to qmake location
- if [ ! -e ${B}/bin/qmake ]; then
- mkdir -p ${B}/bin
- ln -sf ${OE_QMAKE_QMAKE_ORIG} ${B}/bin/qmake
- fi
-
${S}/configure -v \
-opensource -confirm-license \
-sysroot ${STAGING_DIR_TARGET} \
- -no-gcc-sysroot \
-prefix ${OE_QMAKE_PATH_PREFIX} \
-bindir ${OE_QMAKE_PATH_BINS} \
-libdir ${OE_QMAKE_PATH_LIBS} \
@@ -198,7 +187,7 @@ do_configure() {
-hostbindir ${OE_QMAKE_PATH_HOST_BINS} \
-external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \
-hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \
- -platform ${OE_QMAKESPEC} \
+ -platform ${OE_QMAKE_PLATFORM_NATIVE} \
-xplatform linux-oe-g++ \
${QT_CONFIG_FLAGS}
@@ -206,7 +195,6 @@ do_configure() {
}
do_install_append() {
- install -m 0755 ${B}/bin/qmake-target ${D}/${bindir}${QT_DIR_NAME}/qmake
# Remove example.pro file as it is useless
rm -f ${D}${OE_QMAKE_PATH_EXAMPLES}/examples.pro
@@ -218,7 +206,7 @@ do_install_append() {
sed -i 's@^#!/bin/bash$@#!/bin/sh@g' ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/features/data/mac/objc_namespace.sh
# Replace host paths with qmake built-in properties
- sed -i -e 's|${STAGING_DIR_NATIVE}${prefix_native}|$$[QT_HOST_PREFIX]|g' \
+ sed -i -e 's|${STAGING_DIR_NATIVE}${prefix_native}|$$[QT_HOST_PREFIX/get]|g' \
-e 's|${STAGING_DIR_HOST}|$$[QT_SYSROOT]|g' \
${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/*.pri
}
diff --git a/recipes-qt/qt5/qtdeclarative_git.bb b/recipes-qt/qt5/qtdeclarative_git.bb
index 4a690cb9..6d268cac 100644
--- a/recipes-qt/qt5/qtdeclarative_git.bb
+++ b/recipes-qt/qt5/qtdeclarative_git.bb
@@ -35,6 +35,11 @@ do_configure_prepend() {
echo "QT_TOOL.syncqt.binary = \"${STAGING_BINDIR_NATIVE}${QT_DIR_NAME}/syncqt\"" > ${B}/.qmake.cache
}
+do_install_append_class-nativesdk() {
+ # qml files not needed in nativesdk
+ rm -rf ${D}${OE_QMAKE_PATH_QML}
+}
+
EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'qtxmlpatterns', 'CONFIG+=OE_QTXMLPATTERNS_ENABLED', '', d)}"
SRCREV = "d48b397cc79265e80c8437888f9ded0b0364e418"
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 94cd0484..46ab795d 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 a214346a..ef6cf0ac 100644
--- a/recipes-qt/qt5/qtwayland-native_git.bb
+++ b/recipes-qt/qt5/qtwayland-native_git.bb
@@ -21,7 +21,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 aedd1417..21c9aa38 100644
--- a/recipes-qt/qt5/qtwebengine_git.bb
+++ b/recipes-qt/qt5/qtwebengine_git.bb
@@ -85,7 +85,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}" \