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>
This commit is contained in:
Andreas Müller
2017-02-09 07:26:09 +01:00
committed by Martin Jansa
parent 8ba28144d5
commit efa8aaf82e
6 changed files with 59 additions and 5 deletions

View File

@@ -41,8 +41,9 @@ export OE_QMAKE_LDFLAGS = "${LDFLAGS}"
export OE_QMAKE_AR = "${AR}"
export OE_QMAKE_STRIP = "echo"
export OE_QMAKE_WAYLAND_SCANNER = "${STAGING_BINDIR_NATIVE}/wayland-scanner"
OE_QMAKE_QTCONF_PATH = "${WORKDIR}/qt.conf"
export OE_QMAKE_QTCONF = "-qtconf ${OE_QMAKE_QTCONF_PATH}"
# qmake reads if from shell environment
export OE_QMAKE_QTCONF_PATH = "${WORKDIR}/qt.conf"
inherit qmake5_paths remove-libtool
@@ -170,8 +171,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_QTCONF} ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST -- $QMAKE_VARSUBST_CONFIGURE"
${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"
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"
${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"
}
qmake5_base_native_do_install() {