git: c33aae9e6a5c - main - ports-mgmt/portlint: Update to 2.19.10

From: Joe Marcus Clarke <marcus_at_FreeBSD.org>
Date: Mon, 21 Feb 2022 19:47:38 UTC
The branch main has been updated by marcus:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c33aae9e6a5c66516f3759f507a6d4a4543f10b4

commit c33aae9e6a5c66516f3759f507a6d4a4543f10b4
Author:     Joe Marcus Clarke <marcus@FreeBSD.org>
AuthorDate: 2022-02-21 19:45:11 +0000
Commit:     Joe Marcus Clarke <marcus@FreeBSD.org>
CommitDate: 2022-02-21 19:45:11 +0000

    ports-mgmt/portlint: Update to 2.19.10
    
    * Don't check for direct use of commands in PORTNAME [1]
    * Split on first '@' to avoid breaking directory detection [2]
    * Remove checks for deprecated INSTALLS_ICONS [3]
    
    PR:             229627 [1]
                    260246 [2]
                    261556 [3]
    Submitted by:   gerald [1]
                    Derek Schrock <dereks@lifeofadishwasher.com> [2]
---
 ports-mgmt/portlint/Makefile        |  2 +-
 ports-mgmt/portlint/src/portlint.pl | 33 ++++++++-------------------------
 2 files changed, 9 insertions(+), 26 deletions(-)

diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile
index 3149b7c9a1cd..bda2fb9402fe 100644
--- a/ports-mgmt/portlint/Makefile
+++ b/ports-mgmt/portlint/Makefile
@@ -1,7 +1,7 @@
 # Created by: Jun-ichiro itojun Hagino <itojun@itojun.org>
 
 PORTNAME=	portlint
-PORTVERSION=	2.19.9
+PORTVERSION=	2.19.10
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	# none
 DISTFILES=	# none
diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl
index 87777de21918..5f6240beae9b 100644
--- a/ports-mgmt/portlint/src/portlint.pl
+++ b/ports-mgmt/portlint/src/portlint.pl
@@ -49,7 +49,7 @@ $portdir = '.';
 # version variables
 my $major = 2;
 my $minor = 19;
-my $micro = 9;
+my $micro = 10;
 
 # default setting - for FreeBSD
 my $portsdir = '/usr/ports';
@@ -813,13 +813,6 @@ sub checkplist {
 			$found_so++;
 		}
 
-		if ($_ =~ m|^share/icons/.*/| &&
-			$makevar{INSTALLS_ICONS} eq '' &&
-			needs_installs_icons()) {
-			&perror("WARN", $file, $., "installing icons, ".
-				"please define INSTALLS_ICONS as appropriate");
-		}
-
 		if ($_ =~ m|\.omf$| && $makevar{INSTALLS_OMF} eq '') {
 			&perror("WARN", $file, $., "installing OMF files, ".
 				"please define INSTALLS_OMF (see the FreeBSD GNOME ".
@@ -1162,7 +1155,7 @@ sub check_depends_syntax {
 			if ($k eq '') {
 				next;
 			}
-			my $tmp_depends = $k;
+			my ($tmp_depends, $fl) = split(/\@/, $k);
 			$tmp_depends =~ s/\$\{[^}]+}//g;
 			my @l = split(':', $tmp_depends);
 
@@ -1183,8 +1176,7 @@ sub check_depends_syntax {
 			}
 			my %m = ();
 			$m{'dep'} = $l[0];
-			my ($di, $fl) = split(/\@/, $l[1]);
-			$m{'dir'} = $di;
+			$m{'dir'} = $l[1];
 			$m{'fla'} = $fl // '';
 			$m{'tgt'} = $l[2] // '';
 			my %depmvars = ();
@@ -1572,12 +1564,6 @@ sub checkmakefile {
 					"daily_clean_disks_enable=\"YES\" in /etc/periodic.conf.  ".
 					"If possible, install this file with a different name.");
 			}
-			if ($plist_file =~ m|^share/icons/.*/| &&
-				$makevar{INSTALLS_ICONS} eq '' &&
-		        needs_installs_icons()) {
-				&perror("WARN", "", -1, "PLIST_FILES: installing icons, ".
-					"please define INSTALLS_ICONS as appropriate");
-			}
 			if ($plist_file =~ /%%[\w_\d]+%%/) {
 				&perror("FATAL", "", -1, "PLIST_FILES: files cannot contain ".
 					"%%FOO%% variables.  Use make variables and logic instead");
@@ -2005,9 +1991,8 @@ sub checkmakefile {
 	#
 	# 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.");
+	if (!($makevar{INSTALLS_ICONS} eq '')) {
+		&perror("WARN", $file, -1, "INSTALLS_ICONS is now deprecated.  It should be removed.");
 	}
 
 	#
@@ -2176,6 +2161,7 @@ xargs xmkmf
 				next;
 			}
 			if ($curline =~ /(?:^|\s)[\@\-]{0,2}$i(?:$|\s)/
+				&& $curline !~ /^PORTNAME=[^\n]+$i/m
 				&& $curline !~ /^[A-Z]+_TARGET[?+]?=[^\n]+$i/m
 				&& $curline !~ /^[A-Z]+_INSTALL_TARGET[?+]?=[^\n]+$i/m
 				&& $curline !~ /^IGNORE(_[\w\d]+)?(.)?=[^\n]+$i/m
@@ -2873,7 +2859,8 @@ DIST_SUBDIR EXTRACT_ONLY
 					if ($i =~ /^$ms/ && $i ne $ms) {
 						my $ip = $i;
 						$ip =~ s/^$ms\///;
-						my $exp_sd = get_makevar($ip);
+						my (@ip_parts) = split(/:/, $ip);
+						my $exp_sd = get_makevar($ip_parts[0]);
 						if ($exp_sd eq $sd) {
 							&perror("WARN", $file, -1, "typically when you specify magic site $ms ".
 								"you do not need anything else as $sd is assumed");
@@ -3953,10 +3940,6 @@ sub urlcheck {
 	}
 }
 
-sub needs_installs_icons {
-	return $makevar{USES} =~ /gnome/
-}
-
 sub TRUE {1;}
 
 # Local variables: