diff options
-rw-r--r-- | classes/populate_sdk_qt5.bbclass | 4 | ||||
-rw-r--r-- | classes/qmake5_base.bbclass | 9 | ||||
-rw-r--r-- | recipes-qt/qt5/nativesdk-qtbase_git.bb | 5 | ||||
-rw-r--r-- | recipes-qt/qt5/qtbase-native_git.bb | 5 | ||||
-rw-r--r-- | recipes-qt/qt5/qtbase/0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch | 38 | ||||
-rw-r--r-- | recipes-qt/qt5/qtbase_git.bb | 5 | ||||
-rw-r--r-- | recipes-qt/qt5/qtwebengine_git.bb | 2 |
7 files changed, 61 insertions, 7 deletions
diff --git a/classes/populate_sdk_qt5.bbclass b/classes/populate_sdk_qt5.bbclass index bbf137d7..a10341dc 100644 --- a/classes/populate_sdk_qt5.bbclass +++ b/classes/populate_sdk_qt5.bbclass @@ -2,7 +2,7 @@ inherit populate_sdk_qt5_base -TOOLCHAIN_HOST_TASK += "nativesdk-packagegroup-qt5-toolchain-host" -TOOLCHAIN_TARGET_TASK += "packagegroup-qt5-toolchain-target" +TOOLCHAIN_HOST_TASK_append = " nativesdk-packagegroup-qt5-toolchain-host" +TOOLCHAIN_TARGET_TASK_append = " packagegroup-qt5-toolchain-target" FEATURE_PACKAGES_qtcreator-debug = "packagegroup-qt5-qtcreator-debug" diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass index 3cd124ae..a556f4f9 100644 --- a/classes/qmake5_base.bbclass +++ b/classes/qmake5_base.bbclass @@ -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() { diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb index 25c072d5..2aa392e2 100644 --- a/recipes-qt/qt5/nativesdk-qtbase_git.bb +++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb @@ -28,6 +28,7 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:" SRC_URI += "\ file://0001-Add-linux-oe-g-platform.patch \ file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \ + file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ file://0005-configure-bump-path-length-from-256-to-512-character.patch \ file://0009-Disable-all-unknown-features-instead-of-erroring-out.patch \ file://0010-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \ @@ -90,6 +91,10 @@ QT_CONFIG_FLAGS += " \ OE_QMAKE_PATH_HOST_DATA = "${libdir}${QT_DIR_NAME}" OE_QMAKE_PATH_HOST_LIBS = "${libdir}" +# for qtbase configuration we need default settings +# since we cannot set empty set filename to a not existent file +export OE_QMAKE_QTCONF_PATH = "foodummy" + do_configure() { ${S}/configure -v \ -opensource -confirm-license \ diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb index 972e8eda..80c4da62 100644 --- a/recipes-qt/qt5/qtbase-native_git.bb +++ b/recipes-qt/qt5/qtbase-native_git.bb @@ -23,6 +23,7 @@ require qt5-git.inc SRC_URI += "\ file://0001-Add-linux-oe-g-platform.patch \ file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \ + file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ file://0005-configure-bump-path-length-from-256-to-512-character.patch \ file://0009-Disable-all-unknown-features-instead-of-erroring-out.patch \ file://0010-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \ @@ -75,6 +76,10 @@ PACKAGECONFIG_CONFARGS = " \ -platform linux-oe-g++ \ " +# for qtbase configuration we need default settings +# since we cannot set empty set filename to a not existent file +export OE_QMAKE_QTCONF_PATH = "foodummy" + do_configure_prepend() { MAKEFLAGS="${PARALLEL_MAKE}" ${S}/configure -opensource -confirm-license ${PACKAGECONFIG_CONFARGS} || die "Configuring qt failed. PACKAGECONFIG_CONFARGS was ${PACKAGECONFIG_CONFARGS}" } 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 @@ +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 27fe10a..29ffcda 100644 +--- a/src/corelib/global/qlibraryinfo.cpp ++++ b/src/corelib/global/qlibraryinfo.cpp +@@ -164,7 +164,10 @@ void QLibrarySettings::load() + QSettings *QLibraryInfoPrivate::findConfiguration() + { + #ifdef QT_BUILD_QMAKE +- QString qtconfig = qmake_libraryInfoFile(); ++ QByteArray config = getenv("OE_QMAKE_QTCONF_PATH"); ++ QString qtconfig = QFile::decodeName(config); ++ if(!QFile::exists(qtconfig)) ++ qtconfig = qmake_libraryInfoFile(); + if (QFile::exists(qtconfig)) + return new QSettings(qtconfig, QSettings::IniFormat); + #else +-- +2.9.3 diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index c0bcd817..30bd9984 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb @@ -18,6 +18,7 @@ LIC_FILES_CHKSUM = " \ SRC_URI += "\ file://0001-Add-linux-oe-g-platform.patch \ file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \ + file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ file://0005-configure-bump-path-length-from-256-to-512-character.patch \ file://0009-Disable-all-unknown-features-instead-of-erroring-out.patch \ file://0010-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \ @@ -127,6 +128,10 @@ QT_CONFIG_FLAGS += " \ ${PACKAGECONFIG_CONFARGS} \ " +# for qtbase configuration we need default settings +# since we cannot set empty set filename to a not existent file +export OE_QMAKE_QTCONF_PATH = "foodummy" + do_configure() { # Avoid qmake error "Cannot read [...]/usr/lib/qt5/mkspecs/oe-device-extra.pri: No such file or directory" during configuration touch ${S}/mkspecs/oe-device-extra.pri diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb index 0ee37593..dffb9d3f 100644 --- a/recipes-qt/qt5/qtwebengine_git.bb +++ b/recipes-qt/qt5/qtwebengine_git.bb @@ -78,7 +78,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} ${OE_QMAKE_QTCONF} -r ${EXTRA_QMAKEVARS_PRE} ${S} \ + ${OE_QMAKE_QMAKE} -r ${EXTRA_QMAKEVARS_PRE} ${S} \ QMAKE_CXX="${OE_QMAKE_CXX}" QMAKE_CC="${OE_QMAKE_CC}" \ QMAKE_LINK="${OE_QMAKE_LINK}" \ QMAKE_CFLAGS="${OE_QMAKE_CFLAGS}" \ |