--- /usr/local/bin/portlint 2017-08-17 03:23:21.000000000 +0200 +++ portlint 2017-11-17 13:23:00.903113000 +0100 @@ -153,7 +153,7 @@ WRKDIR WRKSRC NO_WRKSUBDIR SCRIPTDIR FILESDIR PKGDIR COMMENT DESCR PLIST PKGCATEGORY PKGINSTALL PKGDEINSTALL PKGREQ PKGMESSAGE DISTINFO_FILE .CURDIR USE_LDCONFIG USE_AUTOTOOLS - USE_GNOME USE_PERL5 INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION + USE_GNOME USE_PERL5 USE_QT5 INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION PLIST_FILES PLIST_DIRS PORTDOCS PORTEXAMPLES OPTIONS_DEFINE OPTIONS_RADIO OPTIONS_SINGLE OPTIONS_MULTI OPTIONS_GROUP OPTIONS_SUB INSTALLS_OMF USE_RC_SUBR USES DIST_SUBDIR @@ -776,7 +776,8 @@ } if ($_ =~ m|^share/icons/.*/| && - $makevar{INSTALLS_ICONS} eq '') { + $makevar{INSTALLS_ICONS} eq '' && + needs_installs_icons()) { &perror("WARN", $file, $., "installing icons, ". "please define INSTALLS_ICONS as appropriate"); } @@ -1476,7 +1477,8 @@ "If possible, install this file with a different name."); } if ($plist_file =~ m|^share/icons/.*/| && - $makevar{INSTALLS_ICONS} eq '') { + $makevar{INSTALLS_ICONS} eq '' && + needs_installs_icons()) { &perror("WARN", "", -1, "PLIST_FILES: installing icons, ". "please define INSTALLS_ICONS as appropriate"); } @@ -1825,6 +1827,14 @@ } # + # whole file: using INSTALLS_ICONS when it is not wanted + # + if (!($makevar{INSTALLS_ICONS} eq '') && + !needs_installs_icons()) { + &perror("WARN", $file, -1, "INSTALLS_ICONS is set, but should not be."); + } + + # # whole file: EXPIRATION_DATE # print "OK: checking for valid EXPIRATION_DATE.\n" if ($verbose); @@ -3570,6 +3580,12 @@ } sub TRUE {1;} +# GNOME wants INSTALL_ICONS, but Qt-based applications, including KDE, don't. +# Be pessimistic: everything needs it unless we know it doesn't. +sub needs_installs_icons { + return $makevar{USE_QT5} eq '' +} + # Local variables: # tab-width: 4 # End: