[OE-core][dunfell 06/12] gtk-icon-cache.bbclass: add features_check

Steve Sakoman
2020-08-03T14:27:33Z

From: Changqing Li <changqing.li@windriver.com>

'bitbake world -k' when DISTRO_FEATURES don't have x11 and wayland,
report errors:
Nothing PROVIDES 'gtk+3'
Nothing RPROVIDES 'blueman'

gtk+3 set ANY_OF_DISTRO_FEATURES, so add it here too
since we DEPENDS on it

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit ab9ff563c77cd5105f4ef9426f076b10ea8e2ee8)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
meta/classes/gtk-icon-cache.bbclass | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
index dd394af27c..340a283851 100644
--- a/meta/classes/gtk-icon-cache.bbclass
+++ b/meta/classes/gtk-icon-cache.bbclass
@@ -1,5 +1,10 @@
FILES_${PN} += "${datadir}/icons/hicolor"

+#gtk+3 reqiure GTK3DISTROFEATURES, DEPENDS on it make all the
+#recipes inherit this class require GTK3DISTROFEATURES
+inherit features_check
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
DEPENDS +=" ${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} \
${@['gdk-pixbuf', '']['${BPN}' == 'gdk-pixbuf']} \
${@['gtk+3', '']['${BPN}' == 'gtk+3']} \
--
2.17.1