From b421956621a4e4389ba6c68cbf3fb7aa692fa566 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 18 Aug 2016 14:13:34 +0300 Subject: Correctly use QtQuickCompiler when available Make sure the we use QtQuickCompiler only when we either have access to the sources (internal gerrit repo) or the prebuilt binaries are available. The internal-build class checks if we are working within The Qt Company network, so we will also have access to the sources. Setting ENABLE_QTQUICKCOMPILER env to "1" in local.conf has the same effect. Otherwise check if the prebuilt binaries are available as installed by the Qt Online SDK. Change-Id: I63b09ebabc96bb14b119ea7472a3fa7b10e5c2a8 Task-number: QTBUG-53052 Task-number: QTBUG-53216 Reviewed-by: Teemu Holappa --- classes/internal-build.bbclass | 1 + classes/qtquickcompiler.bbclass | 20 ++++++++++---------- conf/local.conf.sample | 3 +++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/classes/internal-build.bbclass b/classes/internal-build.bbclass index 2a975f6a..72498cb3 100644 --- a/classes/internal-build.bbclass +++ b/classes/internal-build.bbclass @@ -26,6 +26,7 @@ python enable_internal_build () { except: return + e.data.setVar('ENABLE_QTQUICKCOMPILER', "1") e.data.setVar('SSTATE_MIRRORS', "file://.* http://yocto-cache.ci.local/sstate-caches/${DISTRO_CODENAME}/PATH") e.data.setVar('PREMIRRORS', "\ ftp://.*/.* http://yocto-cache.ci.local/sources/ \n \ diff --git a/classes/qtquickcompiler.bbclass b/classes/qtquickcompiler.bbclass index b6710beb..90fcfb46 100644 --- a/classes/qtquickcompiler.bbclass +++ b/classes/qtquickcompiler.bbclass @@ -20,18 +20,18 @@ ############################################################################## python __anonymous() { - provider = "qtquickcompiler" + provider = "" + sdk_path = d.getVar('B2QTBASE', True) + "/recipes-qt/qt5-addons/qtquickcompiler-sdk" + pn = d.getVar("PN", True) - sdk_path = d.getVar('QT_SDK_PATH', True) or "" - if len(sdk_path) != 0: - qtquickcompiler_path = d.getVar('B2QTBASE', True) + "/recipes-qt/qt5-addons/qtquickcompiler-sdk" - if not os.path.isdir(qtquickcompiler_path): - bb.note("QtQuickCompiler not available") - return - else: - provider = "qtquickcompiler-sdk" + if d.getVar('ENABLE_QTQUICKCOMPILER', True) == "1": + provider = "qtquickcompiler" + elif os.path.isdir(sdk_path): + provider = "qtquickcompiler-sdk" + else: + bb.note("qtquickcompiler not enabled for %s" % pn) + return - pn = d.getVar("PN", True) if "toolchain-host" in pn: d.appendVar('RDEPENDS_' + pn, " nativesdk-%s-tools" % provider) if "toolchain-target" in pn: diff --git a/conf/local.conf.sample b/conf/local.conf.sample index 5dd5c3dd..ad55f784 100644 --- a/conf/local.conf.sample +++ b/conf/local.conf.sample @@ -273,6 +273,9 @@ INHERIT += "rm_work" INHERIT += "image-buildinfo" INHERIT += "internal-build" +# Enables use of QtQuickCompiler if you have access to the gerrit project +#ENABLE_QTQUICKCOMPILER = "1" + ACCEPT_FSL_EULA = "1" LICENSE_FLAGS_WHITELIST = "commercial" -- cgit v1.2.3