/
task-guacamayo.bb
167 lines (138 loc) · 5.31 KB
/
task-guacamayo.bb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
DESCRIPTION="Guacamayo tasks"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${THISDIR}/../../COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
PR = "r40"
PACKAGES="\
task-guacamayo \
task-guacamayo-core \
task-guacamayo-renderer \
task-guacamayo-restricted-core \
task-guacamayo-restricted-audio \
task-guacamayo-restricted-video \
task-guacamayo-devtools \
task-guacamayo-demos-audio \
task-guacamayo-demos-video \
task-guacamayo-demos-pictures \
task-guacamayo-server \
task-guacamayo-openmax \
"
RDEPENDS_task-guacamayo = ""
ALLOW_EMPTY = "1"
# The following packages might be desirable, but have restricted license, so we
# require the user to specifically flag them up as acceptable -- filter out
# these packages down to what the whitelist permits
#
# These packages have 'commercial' license flag set
GUACA_COMMERCIAL_CORE = "connman-guacamayo-ntp"
GUACA_COMMERCIAL_AUDIO = "gst-fluendo-mp3"
GUACA_COMMERCIAL_VIDEO = ""
python __anonymous () {
def license_flag_matches(flag, whitelist, pn):
"""
Borrowed from license.bbclass, unomodified
Return True if flag matches something in whitelist, None if not.
"""
flag_pn = ("%s_%s" % (flag, pn))
for candidate in whitelist:
if flag_pn == candidate:
return True
flag_cur = ""
flagments = flag_pn.split("_")
flagments.pop() # we've already tested the full string
for flagment in flagments:
if flag_cur:
flag_cur += "_"
flag_cur += flagment
for candidate in whitelist:
if flag_cur == candidate:
return True
return False
def check_license_ok(d, pns, license_flag):
"""
Filters list of packages names pns to those that are permitted for
the given license_flag
"""
good = ""
whitelist = d.getVar('LICENSE_FLAGS_WHITELIST', True)
if not whitelist:
bb.warn ("The following packages will not be included because their restrictive license is not whitelisted: %s; you can enable them by including LICENSE_FLAGS_WHITELIST in your local.conf, see Yocto documentation for LICENSE_FLAGS_WHITELIST" % pns)
return ""
split_whitelist = whitelist.split()
for pn in pns.split():
if license_flag_matches(license_flag, split_whitelist, pn):
good += ' ' + pn
else:
bb.warn ("Package %s will not be included because its restrictive license is not whitelisted; you can enable it by including LICENSE_FLAGS_WHITELIST in your local.conf, see Yocto documentation for LICENSE_FLAGS_WHITELIST" % pn)
return good
restricted = ""
commercial = d.getVar('GUACA_COMMERCIAL_CORE', True)
restricted += check_license_ok(d, commercial, 'commercial')
d.setVar('GUACA_RESTRICTED_CORE', restricted)
restricted = ""
commercial = d.getVar('GUACA_COMMERCIAL_AUDIO', True)
restricted += check_license_ok(d, commercial, 'commercial')
d.setVar('GUACA_RESTRICTED_AUDIO', restricted)
restricted = ""
commercial = d.getVar('GUACA_COMMERCIAL_VIDEO', True)
restricted += check_license_ok(d, commercial, 'commercial')
d.setVar('GUACA_RESTRICTED_VIDEO', restricted)
}
GUACA_NETWORKING = "connman-initd \
connman-plugin-ethernet \
connman-plugin-loopback \
${@base_contains('DISTRO_FEATURES', 'wifi','connman-plugin-wifi', '', d)} \
"
GUACA_PA_CORE = "pulseaudio \
pulseaudio-server \
gst-plugins-good-pulse \
libasound-module-conf-pulse \
libasound-module-ctl-pulse \
libasound-module-pcm-pulse \
pulseaudio-misc \
"
GUACA_DEVTOOLS += "pulseaudio-misc \
dbus-daemon-proxy \
evtest \
connman-tests \
"
GUACA_DEMOS_PICTURES = "guacamayo-demos-pictures"
GUACA_DEMOS_AUDIO = "guacamayo-demos-audio"
GUACA_DEMOS_VIDEO = "guacamayo-demos-video"
RDEPENDS_task-guacamayo-core = " \
linux-firmware \
tzdata \
dconf \
guacamayo-gsettings \
dbus \
${GUACA_NETWORKING} \
gstreamer \
gst-plugins-base \
gst-plugins-good \
gst-plugins-bad \
gst-meta-audio \
gst-meta-video \
gst-plugins-base-meta \
gst-plugins-good-meta \
gst-plugins-bad-meta \
gst-plugins-good-id3demux \
gst-plugins-bad-id3tag \
gst-ffmpeg \
rygel \
shared-mime-info \
"
RDEPENDS_task-guacamayo-core_append_beagleboard = "gstreamer-ti"
RDEPENDS_task-guacamayo-renderer = " \
${GUACA_PA_CORE} \
rygel-plugin-playbin \
"
RDEPENDS_task-guacamayo-server = " \
rygel-plugin-media-export \
"
RDEPENDS_task-guacamayo-restricted-core = "${GUACA_RESTRICTED_CORE}"
RDEPENDS_task-guacamayo-restricted-audio = "${GUACA_RESTRICTED_AUDIO}"
RDEPENDS_task-guacamayo-restricted-video = "${GUACA_RESTRICTED_VIDEO}"
RDEPENDS_task-guacamayo-devtools = "${GUACA_DEVTOOLS}"
RDEPENDS_task-guacamayo-demos-pictures = "${GUACA_DEMOS_PICTURES}"
RDEPENDS_task-guacamayo-demos-audio = "${GUACA_DEMOS_AUDIO}"
RDEPENDS_task-guacamayo-demos-video = "${GUACA_DEMOS_VIDEO}"
RDEPENDS_task-guacamayo-openmax = "${@base_contains('MACHINE_FEATURES', 'openmax', 'gst-omx', '', d)}"