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.bbclass18
1 files changed, 14 insertions, 4 deletions
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
index 01fb2f3946..f87a30fd5b 100644
--- a/meta/classes/gtk-icon-cache.bbclass
+++ b/meta/classes/gtk-icon-cache.bbclass
@@ -1,12 +1,22 @@
1FILES_${PN} += "${datadir}/icons/hicolor" 1FILES_${PN} += "${datadir}/icons/hicolor"
2 2
3DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']}" 3DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+-native"
4 4
5# This could run on the host as icon cache files are architecture independent,
6# but there is no gtk-update-icon-cache built natively.
7gtk_icon_cache_postinst() { 5gtk_icon_cache_postinst() {
8if [ "x$D" != "x" ]; then 6if [ "x$D" != "x" ]; then
9 exit 1 7 if [ ! -f $INTERCEPT_DIR/update_icon_cache ]; then
8 cat << "EOF" > $INTERCEPT_DIR/update_icon_cache
9#!/bin/sh
10
11# update native pixbuf loaders
12gdk-pixbuf-query-loaders --update-cache
13
14for icondir in $D/usr/share/icons/*/ ; do
15 gtk-update-icon-cache -fqt $icondir
16done
17EOF
18 fi
19 exit 0
10fi 20fi
11 21
12# Update the pixbuf loaders in case they haven't been registered yet 22# Update the pixbuf loaders in case they haven't been registered yet