summaryrefslogtreecommitdiff
path: root/mk/plist
diff options
context:
space:
mode:
authorprlw1 <prlw1@pkgsrc.org>2017-06-14 16:23:09 +0000
committerprlw1 <prlw1@pkgsrc.org>2017-06-14 16:23:09 +0000
commit8dd99e554e1fc3d7fdf0d84d40203778c90bcbe4 (patch)
tree82615598735fe5be3f7419c4692fccd58adb04ed /mk/plist
parent7b3176e84991c07b2d32b6b091b7e2b72453cf87 (diff)
downloadpkgsrc-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 'mk/plist')
-rw-r--r--mk/plist/plist.mk8
-rw-r--r--mk/plist/print-plist.mk5
2 files changed, 11 insertions, 2 deletions
diff --git a/mk/plist/plist.mk b/mk/plist/plist.mk
index d003a52fe8c..e26d8cda3fd 100644
--- a/mk/plist/plist.mk
+++ b/mk/plist/plist.mk
@@ -1,4 +1,4 @@
-# $NetBSD: plist.mk,v 1.49 2015/07/04 16:18:38 joerg Exp $
+# $NetBSD: plist.mk,v 1.50 2017/06/14 16:23:09 prlw1 Exp $
#
# This Makefile fragment handles the creation of PLISTs for use by
# pkg_create(8).
@@ -283,6 +283,12 @@ INFO_FILES_cmd= \
${AWK} '($$0 !~ "-[0-9]*(\\.gz)?$$") { print }'
.endif
+ICON_THEMES_cmd= \
+ ${CAT} ${PLIST} | \
+ ${PKGSRC_SETENV} ${_PLIST_AWK_ENV} ${AWK} -F / \
+ '$$0 ~ "^share/icons/[^/]+/.*$$" { print $$3 }' | \
+ ${SORT} -u
+
######################################################################
### plist-clean (PRIVATE)
######################################################################
diff --git a/mk/plist/print-plist.mk b/mk/plist/print-plist.mk
index d269bf357eb..aba0ee1548f 100644
--- a/mk/plist/print-plist.mk
+++ b/mk/plist/print-plist.mk
@@ -1,4 +1,4 @@
-# $NetBSD: print-plist.mk,v 1.32 2016/07/25 21:57:23 wiz Exp $
+# $NetBSD: print-plist.mk,v 1.33 2017/06/14 16:23:09 prlw1 Exp $
###
### Automatic PLIST generation
@@ -43,6 +43,9 @@ _PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^.*\/fonts\.scale/)
(defined(FONTS_DIRS.x11) && !empty(FONTS_DIRS.x11:M*))
_PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^.*\/fonts\.cache-1/)
.endif
+.if defined(ICON_THEMES)
+_PRINT_PLIST_AWK_IGNORE+= || ($$0 ~ /^share\/icons\/*\/icon-theme\.cache$$/)
+.endif
# List the content of $PREFIX and emit "@pkgdir " statements for
# empty directories.