diff options
| -rw-r--r-- | meta/classes/gtk-icon-cache.bbclass | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass index cf33efd5a6..2ca99acdf9 100644 --- a/meta/classes/gtk-icon-cache.bbclass +++ b/meta/classes/gtk-icon-cache.bbclass | |||
| @@ -2,23 +2,15 @@ FILES_${PN} += "${datadir}/icons/hicolor" | |||
| 2 | 2 | ||
| 3 | DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+-native" | 3 | DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+-native" |
| 4 | 4 | ||
| 5 | # | ||
| 6 | # On host, the postinstall MUST return 1 because we do not know if the intercept | ||
| 7 | # hook will succeed. If it does succeed, than the packages will be marked as | ||
| 8 | # installed. | ||
| 9 | # | ||
| 5 | gtk_icon_cache_postinst() { | 10 | gtk_icon_cache_postinst() { |
| 6 | if [ "x$D" != "x" ]; then | 11 | if [ "x$D" != "x" ]; then |
| 7 | if [ ! -f $INTERCEPT_DIR/update_icon_cache ]; then | 12 | $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} |
| 8 | cat << "EOF" > $INTERCEPT_DIR/update_icon_cache | 13 | exit 1 |
| 9 | #!/bin/sh | ||
| 10 | |||
| 11 | # update native pixbuf loaders | ||
| 12 | gdk-pixbuf-query-loaders --update-cache | ||
| 13 | |||
| 14 | for icondir in $D/usr/share/icons/*/ ; do | ||
| 15 | if [ -d $icondir ] ; then | ||
| 16 | gtk-update-icon-cache -fqt $icondir | ||
| 17 | fi | ||
| 18 | done | ||
| 19 | EOF | ||
| 20 | fi | ||
| 21 | exit 0 | ||
| 22 | fi | 14 | fi |
| 23 | 15 | ||
| 24 | # Update the pixbuf loaders in case they haven't been registered yet | 16 | # Update the pixbuf loaders in case they haven't been registered yet |
| @@ -33,21 +25,8 @@ done | |||
| 33 | 25 | ||
| 34 | gtk_icon_cache_postrm() { | 26 | gtk_icon_cache_postrm() { |
| 35 | if [ "x$D" != "x" ]; then | 27 | if [ "x$D" != "x" ]; then |
| 36 | if [ ! -f $INTERCEPT_DIR/update_icon_cache ]; then | 28 | $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} |
| 37 | cat << "EOF" > $INTERCEPT_DIR/update_icon_cache | 29 | exit 1 |
| 38 | #!/bin/sh | ||
| 39 | |||
| 40 | # update native pixbuf loaders | ||
| 41 | gdk-pixbuf-query-loaders --update-cache | ||
| 42 | |||
| 43 | for icondir in $D/usr/share/icons/*/ ; do | ||
| 44 | if [ -d $icondir ] ; then | ||
| 45 | gtk-update-icon-cache -fqt $icondir | ||
| 46 | fi | ||
| 47 | done | ||
| 48 | EOF | ||
| 49 | fi | ||
| 50 | exit 0 | ||
| 51 | fi | 30 | fi |
| 52 | 31 | ||
| 53 | for icondir in /usr/share/icons/* ; do | 32 | for icondir in /usr/share/icons/* ; do |
