diff options
author | prlw1 <prlw1@pkgsrc.org> | 2017-06-14 16:23:09 +0000 |
---|---|---|
committer | prlw1 <prlw1@pkgsrc.org> | 2017-06-14 16:23:09 +0000 |
commit | 8dd99e554e1fc3d7fdf0d84d40203778c90bcbe4 (patch) | |
tree | 82615598735fe5be3f7419c4692fccd58adb04ed /x11/gtk2 | |
parent | 7b3176e84991c07b2d32b6b091b7e2b72453cf87 (diff) | |
download | pkgsrc-8dd99e554e1fc3d7fdf0d84d40203778c90bcbe4.tar.gz |
Essentially from OBATA Akio in private mail, June 2015:
Introduce Icon Theme cache handling framework
Icon Theme cache files are used by GTK+ and maintained with the
gtk-update-icon-cache tool. Each Icon Theme package duplicates
its own maintainance scripts: only the specified icon theme directory
differs. With this framework, if packages have ICON_THEMES=yes,
associated icon themes will be detected and their cache files will
be maintained automatically.
Change cache handling behaviour as follows:
* Icon theme caches will be updated if either gtk2+ or gtk3+
gtk-update-icon-cache tool is available.
* With installation of gtk2+ package, not only hicolor icon theme but
also any other icon theme cache files will be updated.
* Prevent removal of icon caches at deinstall, gtk3+ may be installed and
using them.
* Ditto with gtk3+, gtk2+ may not be installed now, so caches must be
maintained by gtk3+.
Diffstat (limited to 'x11/gtk2')
-rw-r--r-- | x11/gtk2/Makefile | 5 | ||||
-rw-r--r-- | x11/gtk2/files/icon-cache.tmpl | 12 |
2 files changed, 8 insertions, 9 deletions
diff --git a/x11/gtk2/Makefile b/x11/gtk2/Makefile index d3df355db57..0eed7fb7fd0 100644 --- a/x11/gtk2/Makefile +++ b/x11/gtk2/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.285 2017/05/19 13:29:05 prlw1 Exp $ +# $NetBSD: Makefile,v 1.286 2017/06/14 16:23:09 prlw1 Exp $ DISTNAME= gtk+-2.24.31 PKGNAME= ${DISTNAME:S/gtk/gtk2/} @@ -90,9 +90,8 @@ post-install: ${RM} -f ${DESTDIR}${GTK_IMMODULES_DB} FILES_SUBST+= GTK_UPDATE_ICON_CACHE="${PREFIX}/bin/gtk2-update-icon-cache" -FILES_SUBST+= ICON_THEME_DIR="${LOCALBASE}/share/icons/hicolor" +FILES_SUBST+= ICON_THEME_DIR="${LOCALBASE}/share/icons" INSTALL_TEMPLATES+= ../../x11/gtk2/files/icon-cache.tmpl -PRINT_PLIST_AWK+= /^share\/icons\/hicolor\/icon-theme.cache$$/ { next; } _BUILDING_GTK2= yes .include "modules.mk" diff --git a/x11/gtk2/files/icon-cache.tmpl b/x11/gtk2/files/icon-cache.tmpl index b48f64ec5d3..5868491929d 100644 --- a/x11/gtk2/files/icon-cache.tmpl +++ b/x11/gtk2/files/icon-cache.tmpl @@ -1,19 +1,19 @@ -# $NetBSD: icon-cache.tmpl,v 1.1 2007/01/26 00:55:01 markd Exp $ +# $NetBSD: icon-cache.tmpl,v 1.2 2017/06/14 16:23:09 prlw1 Exp $ # # Rebuild the icon cache. # GTK_UPDATE_ICON_CACHE="@GTK_UPDATE_ICON_CACHE@" ICON_THEME_DIR="@ICON_THEME_DIR@" +LS="@LS@" case ${STAGE} in POST-INSTALL) ${TEST} -d ${ICON_THEME_DIR} && \ - ${GTK_UPDATE_ICON_CACHE} -f -t ${ICON_THEME_DIR} >/dev/null 2>&1 || \ - ${TRUE} - ;; -DEINSTALL) - ${RM} -f ${ICON_THEME_DIR}/icon-theme.cache + ${LS} ${ICON_THEME_DIR} | while read theme; do + ${TEST} -f ${ICON_THEME_DIR}/${theme}/index.theme && \ + ${GTK_UPDATE_ICON_CACHE} -q -f -t ${ICON_THEME_DIR}/${theme} + done ;; *) ;; |