summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2016-08-18 14:13:34 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2016-08-19 12:27:53 +0000
commitb421956621a4e4389ba6c68cbf3fb7aa692fa566 (patch)
treef8dea80d362fd074065c904364beb52023c7d0ee
parenta9c0c957a458a17be52cef418a5fec22760a69cf (diff)
downloadmeta-boot2qt-b421956621a4e4389ba6c68cbf3fb7aa692fa566.tar.gz
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 <teemu.holappa@theqtcompany.com>
-rw-r--r--classes/internal-build.bbclass1
-rw-r--r--classes/qtquickcompiler.bbclass20
-rw-r--r--conf/local.conf.sample3
3 files changed, 14 insertions, 10 deletions
diff --git a/classes/internal-build.bbclass b/classes/internal-build.bbclass
index 2a975f6..72498cb 100644
--- a/classes/internal-build.bbclass
+++ b/classes/internal-build.bbclass
@@ -26,6 +26,7 @@ python enable_internal_build () {
26 except: 26 except:
27 return 27 return
28 28
29 e.data.setVar('ENABLE_QTQUICKCOMPILER', "1")
29 e.data.setVar('SSTATE_MIRRORS', "file://.* http://yocto-cache.ci.local/sstate-caches/${DISTRO_CODENAME}/PATH") 30 e.data.setVar('SSTATE_MIRRORS', "file://.* http://yocto-cache.ci.local/sstate-caches/${DISTRO_CODENAME}/PATH")
30 e.data.setVar('PREMIRRORS', "\ 31 e.data.setVar('PREMIRRORS', "\
31 ftp://.*/.* http://yocto-cache.ci.local/sources/ \n \ 32 ftp://.*/.* http://yocto-cache.ci.local/sources/ \n \
diff --git a/classes/qtquickcompiler.bbclass b/classes/qtquickcompiler.bbclass
index b6710be..90fcfb4 100644
--- a/classes/qtquickcompiler.bbclass
+++ b/classes/qtquickcompiler.bbclass
@@ -20,18 +20,18 @@
20############################################################################## 20##############################################################################
21 21
22python __anonymous() { 22python __anonymous() {
23 provider = "qtquickcompiler" 23 provider = ""
24 sdk_path = d.getVar('B2QTBASE', True) + "/recipes-qt/qt5-addons/qtquickcompiler-sdk"
25 pn = d.getVar("PN", True)
24 26
25 sdk_path = d.getVar('QT_SDK_PATH', True) or "" 27 if d.getVar('ENABLE_QTQUICKCOMPILER', True) == "1":
26 if len(sdk_path) != 0: 28 provider = "qtquickcompiler"
27 qtquickcompiler_path = d.getVar('B2QTBASE', True) + "/recipes-qt/qt5-addons/qtquickcompiler-sdk" 29 elif os.path.isdir(sdk_path):
28 if not os.path.isdir(qtquickcompiler_path): 30 provider = "qtquickcompiler-sdk"
29 bb.note("QtQuickCompiler not available") 31 else:
30 return 32 bb.note("qtquickcompiler not enabled for %s" % pn)
31 else: 33 return
32 provider = "qtquickcompiler-sdk"
33 34
34 pn = d.getVar("PN", True)
35 if "toolchain-host" in pn: 35 if "toolchain-host" in pn:
36 d.appendVar('RDEPENDS_' + pn, " nativesdk-%s-tools" % provider) 36 d.appendVar('RDEPENDS_' + pn, " nativesdk-%s-tools" % provider)
37 if "toolchain-target" in pn: 37 if "toolchain-target" in pn:
diff --git a/conf/local.conf.sample b/conf/local.conf.sample
index 5dd5c3d..ad55f78 100644
--- a/conf/local.conf.sample
+++ b/conf/local.conf.sample
@@ -273,6 +273,9 @@ INHERIT += "rm_work"
273INHERIT += "image-buildinfo" 273INHERIT += "image-buildinfo"
274INHERIT += "internal-build" 274INHERIT += "internal-build"
275 275
276# Enables use of QtQuickCompiler if you have access to the gerrit project
277#ENABLE_QTQUICKCOMPILER = "1"
278
276ACCEPT_FSL_EULA = "1" 279ACCEPT_FSL_EULA = "1"
277LICENSE_FLAGS_WHITELIST = "commercial" 280LICENSE_FLAGS_WHITELIST = "commercial"
278 281