2006-07-19 16:12:45 +00:00
|
|
|
FILES_${PN} += "${datadir}/icons/hicolor"
|
|
|
|
|
2015-06-09 13:46:38 +00:00
|
|
|
DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk-icon-utils-native"
|
2011-08-05 14:18:57 +00:00
|
|
|
|
2008-05-20 08:40:02 +00:00
|
|
|
gtk_icon_cache_postinst() {
|
2006-07-19 16:12:45 +00:00
|
|
|
if [ "x$D" != "x" ]; then
|
2015-09-25 22:25:12 +00:00
|
|
|
$INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} \
|
|
|
|
mlprefix=${MLPREFIX} \
|
2015-10-27 17:52:47 +00:00
|
|
|
libdir_native=${libdir_native}
|
2013-04-22 08:01:23 +00:00
|
|
|
else
|
|
|
|
|
|
|
|
# Update the pixbuf loaders in case they haven't been registered yet
|
2015-09-25 22:43:55 +00:00
|
|
|
${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache
|
2013-04-22 08:01:23 +00:00
|
|
|
|
|
|
|
for icondir in /usr/share/icons/* ; do
|
|
|
|
if [ -d $icondir ] ; then
|
|
|
|
gtk-update-icon-cache -fqt $icondir
|
|
|
|
fi
|
|
|
|
done
|
2006-07-19 16:12:45 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2008-05-20 08:40:02 +00:00
|
|
|
gtk_icon_cache_postrm() {
|
2013-01-17 12:56:37 +00:00
|
|
|
if [ "x$D" != "x" ]; then
|
2015-09-25 22:25:12 +00:00
|
|
|
$INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} \
|
|
|
|
mlprefix=${MLPREFIX} \
|
2015-10-20 19:19:27 +00:00
|
|
|
libdir=${libdir}
|
2013-04-22 08:01:23 +00:00
|
|
|
else
|
|
|
|
for icondir in /usr/share/icons/* ; do
|
|
|
|
if [ -d $icondir ] ; then
|
|
|
|
gtk-update-icon-cache -qt $icondir
|
|
|
|
fi
|
|
|
|
done
|
2013-01-17 12:56:37 +00:00
|
|
|
fi
|
2006-07-19 16:12:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
python populate_packages_append () {
|
2012-07-11 17:33:43 +00:00
|
|
|
packages = d.getVar('PACKAGES', True).split()
|
|
|
|
pkgdest = d.getVar('PKGDEST', True)
|
|
|
|
|
|
|
|
for pkg in packages:
|
|
|
|
icon_dir = '%s/%s/%s/icons' % (pkgdest, pkg, d.getVar('datadir', True))
|
|
|
|
if not os.path.exists(icon_dir):
|
|
|
|
continue
|
|
|
|
|
|
|
|
bb.note("adding hicolor-icon-theme dependency to %s" % pkg)
|
2015-06-18 14:14:16 +00:00
|
|
|
rdepends = ' ' + d.getVar('MLPREFIX', False) + "hicolor-icon-theme"
|
2013-01-31 19:02:23 +00:00
|
|
|
d.appendVar('RDEPENDS_%s' % pkg, rdepends)
|
2012-07-11 17:33:43 +00:00
|
|
|
|
|
|
|
bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
|
|
|
|
|
2013-02-03 22:10:21 +00:00
|
|
|
postinst = d.getVar('pkg_postinst_%s' % pkg, True)
|
2012-07-11 17:33:43 +00:00
|
|
|
if not postinst:
|
|
|
|
postinst = '#!/bin/sh\n'
|
|
|
|
postinst += d.getVar('gtk_icon_cache_postinst', True)
|
|
|
|
d.setVar('pkg_postinst_%s' % pkg, postinst)
|
|
|
|
|
2013-02-03 22:10:21 +00:00
|
|
|
postrm = d.getVar('pkg_postrm_%s' % pkg, True)
|
2012-07-11 17:33:43 +00:00
|
|
|
if not postrm:
|
|
|
|
postrm = '#!/bin/sh\n'
|
|
|
|
postrm += d.getVar('gtk_icon_cache_postrm', True)
|
|
|
|
d.setVar('pkg_postrm_%s' % pkg, postrm)
|
2006-07-19 16:12:45 +00:00
|
|
|
}
|
|
|
|
|