From b78a292a584f084cc15715c3a68693b008ef6682 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Wed, 3 Apr 2013 21:52:54 +0200 Subject: qtbase: replace g++.conf and linux.conf with qmake.conf * g++.conf and linux.conf were outdated a lot, lacking new options like QMAKE_COMPILER causing a lot of warning like: Project WARNING: qmake spec does not announce the compiler family. Guessed gcc. * Instead of replacing whole common files, use custom qmake.conf which overwrites common setting after including it --- recipes-qt/qt5/qtbase-native.inc | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'recipes-qt/qt5/qtbase-native.inc') diff --git a/recipes-qt/qt5/qtbase-native.inc b/recipes-qt/qt5/qtbase-native.inc index d9cc4870..0f196e4e 100644 --- a/recipes-qt/qt5/qtbase-native.inc +++ b/recipes-qt/qt5/qtbase-native.inc @@ -15,6 +15,7 @@ QT_DIR_NAME ?= "qt5" SRC_URI += " \ file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ file://0001-Always-build-uic.patch \ + file://qmake.conf \ " EXTRA_ENV = 'MAKE="make -e ${PARALLEL_MAKE}"' @@ -56,6 +57,20 @@ EXTRA_OECONF = " \ -no-rpath \ " +# qtbase is exception, we need to use mkspecs from ${S} +QMAKE_MKSPEC_PATH_NATIVE = "${S}/mkspecs" + +do_configure_prepend() { + if [ ! -e ${OE_QMAKESPEC} ]; then + mkdir -p ${OE_QMAKESPEC} + fi + # use default qplatformdefs.h from linux-g++ + cp -va ${QMAKE_MKSPEC_PATH_NATIVE}/linux-g++/qplatformdefs.h ${OE_QMAKESPEC}/ + # use modified qmake.conf which is using OE_QMAKE_* shell variables + # exported from qmake5_base.bbclass to define toolchain and flags + cp -va ${WORKDIR}/qmake.conf ${OE_QMAKESPEC}/ +} + do_configure() { # Avoid setting QMAKE_LINK from LD (since we want the linker to be g++) unset LD @@ -65,9 +80,4 @@ do_configure() { do_install() { oe_runmake install INSTALL_ROOT=${D} - ln -sf linux-g++ ${D}${datadir}/${QT_DIR_NAME}/mkspecs/${BUILD_OS}-oe-g++ - - # replace common files with our version - cp -f ${WORKDIR}/g++.conf ${D}${datadir}/${QT_DIR_NAME}/mkspecs/common/g++-unix.conf - cp -f ${WORKDIR}/linux.conf ${D}${datadir}/${QT_DIR_NAME}/mkspecs/common/linux.conf } -- cgit v1.2.3