summaryrefslogtreecommitdiff
path: root/pkgtools
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 /pkgtools
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 'pkgtools')
-rw-r--r--pkgtools/pkglint4/files/makevars.map3
-rw-r--r--pkgtools/pkglint4/files/pkglint.pl9
2 files changed, 9 insertions, 3 deletions
diff --git a/pkgtools/pkglint4/files/makevars.map b/pkgtools/pkglint4/files/makevars.map
index 9bcb92a61b7..684d3411261 100644
--- a/pkgtools/pkglint4/files/makevars.map
+++ b/pkgtools/pkglint4/files/makevars.map
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.4 2017/05/24 19:51:12 adam Exp $
+# $NetBSD: makevars.map,v 1.5 2017/06/14 16:23:09 prlw1 Exp $
#
# This file contains the guessed type of some variables, according to
@@ -384,6 +384,7 @@ GNU_CONFIGURE_PREFIX Pathname [m:s]
HAS_CONFIGURE Yes [m:s,c:s]
HEADER_TEMPLATES List of Pathname [$package_list]
HOMEPAGE URL [$package]
+ICON_THEMES Yes
IGNORE_PKG.* Yes [*:sp]
INCOMPAT_CURSES InternalList of PlatformTriple [m:as]
INCOMPAT_ICONV InternalList of PlatformTriple
diff --git a/pkgtools/pkglint4/files/pkglint.pl b/pkgtools/pkglint4/files/pkglint.pl
index 489fd8aa056..4cc8c9e9de9 100644
--- a/pkgtools/pkglint4/files/pkglint.pl
+++ b/pkgtools/pkglint4/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.4 2016/02/02 08:02:29 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.5 2017/06/14 16:23:09 prlw1 Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -5284,7 +5284,12 @@ sub checkfile_PLIST($) {
"Otherwise, this warning is harmless.");
}
- } elsif (substr($text, 0, 6) eq "share/" && $pkgpath ne "graphics/hicolor-icon-theme" && $text =~ m"^share/icons/hicolor(?:$|/)") {
+ } elsif ($text =~ m"^share/icons/[^/]+/.+$") {
+ if (defined($pkgctx_vardef) && !exists($pkgctx_vardef->{"ICON_THEMES"})) {
+ $line->log_warning("Packages that install icon theme files should set ICON_THEMES.");
+ }
+
+ } elsif ($pkgpath ne "graphics/hicolor-icon-theme" && $text =~ m"^share/icons/hicolor(?:$|/)") {
my $f = "../../graphics/hicolor-icon-theme/buildlink3.mk";
if (defined($pkgctx_included) && !exists($pkgctx_included->{$f})) {
$line->log_error("Please .include \"$f\" in the Makefile");