summaryrefslogtreecommitdiffstats
path: root/classes/sdk-sources.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/sdk-sources.bbclass')
-rw-r--r--classes/sdk-sources.bbclass40
1 files changed, 25 insertions, 15 deletions
diff --git a/classes/sdk-sources.bbclass b/classes/sdk-sources.bbclass
index 5f75357..b12f371 100644
--- a/classes/sdk-sources.bbclass
+++ b/classes/sdk-sources.bbclass
@@ -1,23 +1,31 @@
1############################################################################## 1############################################################################
2## 2##
3## Copyright (C) 2016 The Qt Company Ltd. 3## Copyright (C) 2016 The Qt Company Ltd.
4## Contact: http://www.qt.io/licensing/ 4## Contact: https://www.qt.io/licensing/
5## 5##
6## This file is part of the Boot to Qt meta layer. 6## This file is part of the Boot to Qt meta layer.
7## 7##
8## $QT_BEGIN_LICENSE:COMM$ 8## $QT_BEGIN_LICENSE:GPL$
9##
10## Commercial License Usage 9## Commercial License Usage
11## Licensees holding valid commercial Qt licenses may use this file in 10## Licensees holding valid commercial Qt licenses may use this file in
12## accordance with the commercial license agreement provided with the 11## accordance with the commercial license agreement provided with the
13## Software or, alternatively, in accordance with the terms contained in 12## Software or, alternatively, in accordance with the terms contained in
14## a written agreement between you and The Qt Company. For licensing terms 13## a written agreement between you and The Qt Company. For licensing terms
15## and conditions see http://www.qt.io/terms-conditions. For further 14## and conditions see https://www.qt.io/terms-conditions. For further
16## information use the contact form at http://www.qt.io/contact-us. 15## information use the contact form at https://www.qt.io/contact-us.
16##
17## GNU General Public License Usage
18## Alternatively, this file may be used under the terms of the GNU
19## General Public License version 3 or (at your option) any later version
20## approved by the KDE Free Qt Foundation. The licenses are as published by
21## the Free Software Foundation and appearing in the file LICENSE.GPL3
22## included in the packaging of this file. Please review the following
23## information to ensure the GNU General Public License requirements will
24## be met: https://www.gnu.org/licenses/gpl-3.0.html.
17## 25##
18## $QT_END_LICENSE$ 26## $QT_END_LICENSE$
19## 27##
20############################################################################## 28############################################################################
21 29
22python do_fetch () { 30python do_fetch () {
23 src_uri = (d.getVar('SRC_URI', True) or "").split() 31 src_uri = (d.getVar('SRC_URI', True) or "").split()
@@ -44,6 +52,7 @@ python do_fetch () {
44} 52}
45 53
46python do_unpack () { 54python do_unpack () {
55 sdk_uds = [];
47 src_uri = (d.getVar('SRC_URI', True) or "").split() 56 src_uri = (d.getVar('SRC_URI', True) or "").split()
48 if len(src_uri) == 0: 57 if len(src_uri) == 0:
49 return 58 return
@@ -56,17 +65,18 @@ python do_unpack () {
56 for url in uris: 65 for url in uris:
57 ud = list(bb.fetch2.decodeurl(url)) 66 ud = list(bb.fetch2.decodeurl(url))
58 if ("sdk-uri" in ud[5]): 67 if ("sdk-uri" in ud[5]):
59 unpack_local_uri(ud, d) 68 sdk_uds.append(ud)
60 src_uri.remove(url) 69 src_uri.remove(url)
61 70
62 if len(src_uri) == 0: 71 if len(src_uri) != 0:
63 return 72 try:
73 fetcher = bb.fetch2.Fetch(src_uri, d)
74 fetcher.unpack(rootdir)
75 except bb.fetch2.BBFetchException as e:
76 raise bb.build.FuncFailed(e)
64 77
65 try: 78 for ud in sdk_uds:
66 fetcher = bb.fetch2.Fetch(src_uri, d) 79 unpack_local_uri(ud, d)
67 fetcher.unpack(rootdir)
68 except bb.fetch2.BBFetchException as e:
69 raise bb.build.FuncFailed(e)
70} 80}
71 81
72def unpack_local_uri(ud, d): 82def unpack_local_uri(ud, d):