ports-mgmt/portlint: sync with upstream

Taken from: FreeBSD
This commit is contained in:
Franco Fichtner 2024-04-15 21:11:48 +02:00
parent 5d2df21ba4
commit 3672b41e7b
2 changed files with 2 additions and 33 deletions

View File

@ -1,6 +1,5 @@
PORTNAME= portlint
PORTVERSION= 2.22.0
PORTREVISION= 1
PORTVERSION= 2.22.1
CATEGORIES= ports-mgmt
MASTER_SITES= # none
DISTFILES= # none

View File

@ -52,7 +52,7 @@ $portdir = '.';
# version variables
my $major = 2;
my $minor = 22;
my $micro = 0;
my $micro = 1;
# default setting - for FreeBSD
my $portsdir = '/usr/ports';
@ -544,36 +544,6 @@ sub checkdescr {
"other local characters. files should be in ".
"plain 7-bit ASCII");
}
if ($file =~ /\bpkg-descr/ && $tmp =~ m,https?://,) {
my $has_url = 0;
my $has_www = 0;
my $cpan_url = 0;
my $has_endslash = 0;
foreach my $line (grep($_ =~ "https?://", split(/\n+/, $tmp))) {
$has_url = 1;
if ($line =~ m,WWW:[ \t]+https?://,) {
$has_www = 1;
if ($line =~ m,search.cpan.org,) {
$cpan_url = 1;
if ($line =~ m,/$,) {
$has_endslash = 1;
}
}
}
}
if (!$has_url) {
&perror("WARN", $file, -1, "add \"WWW: URL:\" for this port if possible");
}
if ($cpan_url && !$has_endslash) {
&perror("WARN", $file, -1, "end WWW CPAN URL with a \"/\"");
}
if ($has_url && ! $has_www) {
&perror("FATAL", $file, -1, "contains a URL but no \"WWW:\"");
}
}
close(IN);
}