summaryrefslogtreecommitdiffstats
path: root/meta/classes/gtk-icon-cache.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/gtk-icon-cache.bbclass')
-rw-r--r--meta/classes/gtk-icon-cache.bbclass38
1 files changed, 28 insertions, 10 deletions
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
index 91cb4ad409..0248ba285e 100644
--- a/meta/classes/gtk-icon-cache.bbclass
+++ b/meta/classes/gtk-icon-cache.bbclass
@@ -1,6 +1,15 @@
-FILES_${PN} += "${datadir}/icons/hicolor"
+FILES:${PN} += "${datadir}/icons/hicolor"
-DEPENDS +=" ${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+3-native"
+#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']} \
+ gtk+3-native \
+"
PACKAGE_WRITE_DEPS += "gtk+3-native gdk-pixbuf-native"
@@ -36,7 +45,7 @@ else
fi
}
-python populate_packages_append () {
+python populate_packages:append () {
packages = d.getVar('PACKAGES').split()
pkgdest = d.getVar('PKGDEST')
@@ -47,20 +56,29 @@ python populate_packages_append () {
bb.note("adding hicolor-icon-theme dependency to %s" % pkg)
rdepends = ' ' + d.getVar('MLPREFIX', False) + "hicolor-icon-theme"
- d.appendVar('RDEPENDS_%s' % pkg, rdepends)
-
+ d.appendVar('RDEPENDS:%s' % pkg, rdepends)
+
+ #gtk_icon_cache_postinst depend on gdk-pixbuf and gtk+3
+ bb.note("adding gdk-pixbuf dependency to %s" % pkg)
+ rdepends = ' ' + d.getVar('MLPREFIX', False) + "gdk-pixbuf"
+ d.appendVar('RDEPENDS:%s' % pkg, rdepends)
+
+ bb.note("adding gtk+3 dependency to %s" % pkg)
+ rdepends = ' ' + d.getVar('MLPREFIX', False) + "gtk+3"
+ d.appendVar('RDEPENDS:%s' % pkg, rdepends)
+
bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
-
- postinst = d.getVar('pkg_postinst_%s' % pkg)
+
+ postinst = d.getVar('pkg_postinst:%s' % pkg)
if not postinst:
postinst = '#!/bin/sh\n'
postinst += d.getVar('gtk_icon_cache_postinst')
- d.setVar('pkg_postinst_%s' % pkg, postinst)
+ d.setVar('pkg_postinst:%s' % pkg, postinst)
- postrm = d.getVar('pkg_postrm_%s' % pkg)
+ postrm = d.getVar('pkg_postrm:%s' % pkg)
if not postrm:
postrm = '#!/bin/sh\n'
postrm += d.getVar('gtk_icon_cache_postrm')
- d.setVar('pkg_postrm_%s' % pkg, postrm)
+ d.setVar('pkg_postrm:%s' % pkg, postrm)
}