summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2017-02-09 07:26:09 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2017-02-10 18:50:57 +0100
commitefa8aaf82e580a7d32eaaab48eb92d436f2e222a (patch)
tree2092c91c5c5c27af0b8465bd891f76b941642d5d
parent8ba28144d5571504112fd4f32c7bfcbac531e2cb (diff)
downloadmeta-qt5-efa8aaf82e580a7d32eaaab48eb92d436f2e222a.tar.gz
qmake5_base.bbclass: set qt.conf by environment variable again
Qt update to 5.8 caused fallout in meta-qt5-extra. It turned out that qmake pulled in many pointers to native sysroot. Native sysroot is qmake's default in case no configuration file qt.conf is set. The problem with the new way of setting qt.conf by cmd parameter is that is has to be set explicitly. For instance all the packages coming from [1] use autotools for configuration. These ask qmake for paths during configuration and build further Makefiles during compile. To patch these for additional cmd parameter is nasty business. Setting qt.conf when building all qtbase's causes errors during configuration. To fix this we set the filename to a non existent file so that Qt's default is used. This dirty hack was necessary because there was no way found to export an empty variable OE_QMAKE_QTCONF_PATH. This patch was tested by building huge parts of meta-qt5-extra. The meta-layers did not yet contain oe-core's recipe-specific-sysroot changes so master build might fail for missing dependencies. [1] http://www.rncbc.org/drupal/ Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--classes/qmake5_base.bbclass9
-rw-r--r--recipes-qt/qt5/nativesdk-qtbase_git.bb5
-rw-r--r--recipes-qt/qt5/qtbase-native_git.bb5
-rw-r--r--recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch38
-rw-r--r--recipes-qt/qt5/qtbase_git.bb5
-rw-r--r--recipes-qt/qt5/qtwebengine_git.bb2
6 files changed, 59 insertions, 5 deletions
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
index 50e5a306..df8f6246 100644
--- a/classes/qmake5_base.bbclass
+++ b/classes/qmake5_base.bbclass
@@ -41,8 +41,9 @@ export OE_QMAKE_LDFLAGS = "${LDFLAGS}"
41export OE_QMAKE_AR = "${AR}" 41export OE_QMAKE_AR = "${AR}"
42export OE_QMAKE_STRIP = "echo" 42export OE_QMAKE_STRIP = "echo"
43export OE_QMAKE_WAYLAND_SCANNER = "${STAGING_BINDIR_NATIVE}/wayland-scanner" 43export OE_QMAKE_WAYLAND_SCANNER = "${STAGING_BINDIR_NATIVE}/wayland-scanner"
44OE_QMAKE_QTCONF_PATH = "${WORKDIR}/qt.conf" 44
45export OE_QMAKE_QTCONF = "-qtconf ${OE_QMAKE_QTCONF_PATH}" 45# qmake reads if from shell environment
46export OE_QMAKE_QTCONF_PATH = "${WORKDIR}/qt.conf"
46 47
47inherit qmake5_paths remove-libtool 48inherit qmake5_paths remove-libtool
48 49
@@ -170,8 +171,8 @@ qmake5_base_do_configure () {
170 # for config.tests to read this 171 # for config.tests to read this
171 export QMAKE_MAKE_ARGS="${EXTRA_OEMAKE}" 172 export QMAKE_MAKE_ARGS="${EXTRA_OEMAKE}"
172 173
173 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 -- $QMAKE_VARSUBST_CONFIGURE" 174 CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST -- $QMAKE_VARSUBST_CONFIGURE"
174 ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_QTCONF} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST -- $QMAKE_VARSUBST_CONFIGURE || die "Error calling $CMD" 175 ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST -- $QMAKE_VARSUBST_CONFIGURE || die "Error calling $CMD"
175} 176}
176 177
177qmake5_base_native_do_install() { 178qmake5_base_native_do_install() {
diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb
index 7d2ce583..7a4c1139 100644
--- a/recipes-qt/qt5/nativesdk-qtbase_git.bb
+++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb
@@ -27,6 +27,7 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:"
27# common for qtbase-native, qtbase-nativesdk and qtbase 27# common for qtbase-native, qtbase-nativesdk and qtbase
28SRC_URI += "\ 28SRC_URI += "\
29 file://0001-Add-linux-oe-g-platform.patch \ 29 file://0001-Add-linux-oe-g-platform.patch \
30 file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
30 file://0003-Add-external-hostbindir-option.patch \ 31 file://0003-Add-external-hostbindir-option.patch \
31 file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \ 32 file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
32 file://0005-configure-bump-path-length-from-256-to-512-character.patch \ 33 file://0005-configure-bump-path-length-from-256-to-512-character.patch \
@@ -92,6 +93,10 @@ QT_CONFIG_FLAGS += " \
92OE_QMAKE_PATH_HOST_DATA = "${libdir}${QT_DIR_NAME}" 93OE_QMAKE_PATH_HOST_DATA = "${libdir}${QT_DIR_NAME}"
93OE_QMAKE_PATH_HOST_LIBS = "${libdir}" 94OE_QMAKE_PATH_HOST_LIBS = "${libdir}"
94 95
96# for qtbase configuration we need default settings
97# since we cannot set empty set filename to a not existent file
98export OE_QMAKE_QTCONF_PATH = "foodummy"
99
95do_configure() { 100do_configure() {
96 ${S}/configure -v \ 101 ${S}/configure -v \
97 -opensource -confirm-license \ 102 -opensource -confirm-license \
diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb
index ba1be2c1..9cd3dfcc 100644
--- a/recipes-qt/qt5/qtbase-native_git.bb
+++ b/recipes-qt/qt5/qtbase-native_git.bb
@@ -22,6 +22,7 @@ require qt5-git.inc
22# common for qtbase-native, qtbase-nativesdk and qtbase 22# common for qtbase-native, qtbase-nativesdk and qtbase
23SRC_URI += "\ 23SRC_URI += "\
24 file://0001-Add-linux-oe-g-platform.patch \ 24 file://0001-Add-linux-oe-g-platform.patch \
25 file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
25 file://0003-Add-external-hostbindir-option.patch \ 26 file://0003-Add-external-hostbindir-option.patch \
26 file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \ 27 file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
27 file://0005-configure-bump-path-length-from-256-to-512-character.patch \ 28 file://0005-configure-bump-path-length-from-256-to-512-character.patch \
@@ -77,6 +78,10 @@ PACKAGECONFIG_CONFARGS = " \
77 -platform linux-oe-g++ \ 78 -platform linux-oe-g++ \
78" 79"
79 80
81# for qtbase configuration we need default settings
82# since we cannot set empty set filename to a not existent file
83export OE_QMAKE_QTCONF_PATH = "foodummy"
84
80do_configure_prepend() { 85do_configure_prepend() {
81 MAKEFLAGS="${PARALLEL_MAKE}" ${S}/configure -opensource -confirm-license ${PACKAGECONFIG_CONFARGS} || die "Configuring qt failed. PACKAGECONFIG_CONFARGS was ${PACKAGECONFIG_CONFARGS}" 86 MAKEFLAGS="${PARALLEL_MAKE}" ${S}/configure -opensource -confirm-license ${PACKAGECONFIG_CONFARGS} || die "Configuring qt failed. PACKAGECONFIG_CONFARGS was ${PACKAGECONFIG_CONFARGS}"
82} 87}
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
new file mode 100644
index 00000000..4b72ebf1
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
@@ -0,0 +1,38 @@
1From e5f8607cfa1d2bcc798686cdf7c87ea0c6577d30 Mon Sep 17 00:00:00 2001
2From: Holger Freyther <zecke@selfish.org>
3Date: Wed, 26 Sep 2012 17:22:30 +0200
4Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the
5 environment
6
7Allow to set a qt.conf from the outside using the environment. This allows
8to inject new prefixes and other paths into qmake. This is needed when using
9the same qmake binary to build qt/x11 and qt/embedded
10
11Upstream-Status: Inappropriate [embedded specific]
12 again very OE specific to read everything from environment (reusing the same
13 qmake from sstate and replacing all configured paths in it with qt.conf from
14 environment).
15
16Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
17---
18 src/corelib/global/qlibraryinfo.cpp | 5 ++++-
19 1 file changed, 4 insertions(+), 1 deletion(-)
20
21diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
22index 27fe10a..29ffcda 100644
23--- a/src/corelib/global/qlibraryinfo.cpp
24+++ b/src/corelib/global/qlibraryinfo.cpp
25@@ -164,7 +164,10 @@ void QLibrarySettings::load()
26 QSettings *QLibraryInfoPrivate::findConfiguration()
27 {
28 #ifdef QT_BUILD_QMAKE
29- QString qtconfig = qmake_libraryInfoFile();
30+ QByteArray config = getenv("OE_QMAKE_QTCONF_PATH");
31+ QString qtconfig = QFile::decodeName(config);
32+ if(!QFile::exists(qtconfig))
33+ qtconfig = qmake_libraryInfoFile();
34 if (QFile::exists(qtconfig))
35 return new QSettings(qtconfig, QSettings::IniFormat);
36 #else
37--
382.9.3
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index 5db9aad1..ecdc7634 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -17,6 +17,7 @@ LIC_FILES_CHKSUM = " \
17# common for qtbase-native, qtbase-nativesdk and qtbase 17# common for qtbase-native, qtbase-nativesdk and qtbase
18SRC_URI += "\ 18SRC_URI += "\
19 file://0001-Add-linux-oe-g-platform.patch \ 19 file://0001-Add-linux-oe-g-platform.patch \
20 file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
20 file://0003-Add-external-hostbindir-option.patch \ 21 file://0003-Add-external-hostbindir-option.patch \
21 file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \ 22 file://0004-qt_module-Fix-pkgconfig-and-libtool-replacements.patch \
22 file://0005-configure-bump-path-length-from-256-to-512-character.patch \ 23 file://0005-configure-bump-path-length-from-256-to-512-character.patch \
@@ -129,6 +130,10 @@ QT_CONFIG_FLAGS += " \
129 ${PACKAGECONFIG_CONFARGS} \ 130 ${PACKAGECONFIG_CONFARGS} \
130" 131"
131 132
133# for qtbase configuration we need default settings
134# since we cannot set empty set filename to a not existent file
135export OE_QMAKE_QTCONF_PATH = "foodummy"
136
132do_configure() { 137do_configure() {
133 # Avoid qmake error "Cannot read [...]/usr/lib/qt5/mkspecs/oe-device-extra.pri: No such file or directory" during configuration 138 # Avoid qmake error "Cannot read [...]/usr/lib/qt5/mkspecs/oe-device-extra.pri: No such file or directory" during configuration
134 touch ${S}/mkspecs/oe-device-extra.pri 139 touch ${S}/mkspecs/oe-device-extra.pri
diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb
index 3d139d0b..8e60d724 100644
--- a/recipes-qt/qt5/qtwebengine_git.bb
+++ b/recipes-qt/qt5/qtwebengine_git.bb
@@ -78,7 +78,7 @@ do_configure() {
78 78
79 # qmake can't find the OE_QMAKE_* variables on it's own so directly passing them as 79 # qmake can't find the OE_QMAKE_* variables on it's own so directly passing them as
80 # arguments here 80 # arguments here
81 ${OE_QMAKE_QMAKE} ${OE_QMAKE_QTCONF} -r ${EXTRA_QMAKEVARS_PRE} ${S} \ 81 ${OE_QMAKE_QMAKE} -r ${EXTRA_QMAKEVARS_PRE} ${S} \
82 QMAKE_CXX="${OE_QMAKE_CXX}" QMAKE_CC="${OE_QMAKE_CC}" \ 82 QMAKE_CXX="${OE_QMAKE_CXX}" QMAKE_CC="${OE_QMAKE_CC}" \
83 QMAKE_LINK="${OE_QMAKE_LINK}" \ 83 QMAKE_LINK="${OE_QMAKE_LINK}" \
84 QMAKE_CFLAGS="${OE_QMAKE_CFLAGS}" \ 84 QMAKE_CFLAGS="${OE_QMAKE_CFLAGS}" \