mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Fixes:
- Allow "MAINTAINER?=". - Allow "CATEGORIES?=" and "CATEGORIES+=". PR: ports/16064 Submitted by: KIRIYAMA Kazuhiko <kiri@pis.toba-cmt.ac.jp>
This commit is contained in:
parent
9ad3b636a7
commit
0e2e06a88a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=24664
2 changed files with 34 additions and 22 deletions
|
@ -677,15 +677,21 @@ EOF
|
|||
|
||||
# check the items that has to be there.
|
||||
$tmp = "\n" . $tmp;
|
||||
foreach $i ('DISTNAME', 'CATEGORIES') {
|
||||
print "OK: checking $i.\n" if ($verbose);
|
||||
if ($tmp !~ /\n$i=/) {
|
||||
&perror("FATAL: $i has to be there.");
|
||||
}
|
||||
if ($tmp =~ /\n$i(\?=)/) {
|
||||
&perror("FATAL: $i has to be set by \"=\", ".
|
||||
"not by \"$1\".");
|
||||
}
|
||||
print "OK: checking DISTNAME.\n" if ($verbose);
|
||||
if ($tmp !~ /\nDISTNAME=/) {
|
||||
&perror("FATAL: DISTNAME has to be there.");
|
||||
}
|
||||
if ($tmp =~ /\nDISTNAME(\?=)/) {
|
||||
&perror("FATAL: DISTNAME has be set by \"=\", ".
|
||||
"not by \"$1\".");
|
||||
}
|
||||
print "OK: checking CATEGORIES.\n" if ($verbose);
|
||||
if ($tmp !~ /\nCATEGORIES(?=)/) {
|
||||
&perror("FATAL: CATEGORIES has to be there.");
|
||||
}
|
||||
if ($tmp =~ /\nCATEGORIES([^?+]=)/) {
|
||||
&perror("WARN: CATEGORIES should be set by \"=\", \"?=\", or \"+=\", ".
|
||||
"not by \"$1\".");
|
||||
}
|
||||
|
||||
# check x11 in CATEGORIES
|
||||
|
@ -890,8 +896,8 @@ EOF
|
|||
|
||||
&checkearlier($tmp, @varnames);
|
||||
$tmp = "\n" . $tmp;
|
||||
if ($tmp =~ /\nMAINTAINER=[^\n]+/) {
|
||||
$tmp =~ s/\nMAINTAINER=[^\n]+//;
|
||||
if ($tmp =~ /\nMAINTAINER\??=[^\n]+/) {
|
||||
$tmp =~ s/\nMAINTAINER\??=[^\n]+//;
|
||||
} else {
|
||||
&perror("FATAL: no MAINTAINER listed in $file.");
|
||||
}
|
||||
|
|
|
@ -677,15 +677,21 @@ EOF
|
|||
|
||||
# check the items that has to be there.
|
||||
$tmp = "\n" . $tmp;
|
||||
foreach $i ('DISTNAME', 'CATEGORIES') {
|
||||
print "OK: checking $i.\n" if ($verbose);
|
||||
if ($tmp !~ /\n$i=/) {
|
||||
&perror("FATAL: $i has to be there.");
|
||||
}
|
||||
if ($tmp =~ /\n$i(\?=)/) {
|
||||
&perror("FATAL: $i has to be set by \"=\", ".
|
||||
"not by \"$1\".");
|
||||
}
|
||||
print "OK: checking DISTNAME.\n" if ($verbose);
|
||||
if ($tmp !~ /\nDISTNAME=/) {
|
||||
&perror("FATAL: DISTNAME has to be there.");
|
||||
}
|
||||
if ($tmp =~ /\nDISTNAME(\?=)/) {
|
||||
&perror("FATAL: DISTNAME has be set by \"=\", ".
|
||||
"not by \"$1\".");
|
||||
}
|
||||
print "OK: checking CATEGORIES.\n" if ($verbose);
|
||||
if ($tmp !~ /\nCATEGORIES(?=)/) {
|
||||
&perror("FATAL: CATEGORIES has to be there.");
|
||||
}
|
||||
if ($tmp =~ /\nCATEGORIES([^?+]=)/) {
|
||||
&perror("WARN: CATEGORIES should be set by \"=\", \"?=\", or \"+=\", ".
|
||||
"not by \"$1\".");
|
||||
}
|
||||
|
||||
# check x11 in CATEGORIES
|
||||
|
@ -890,8 +896,8 @@ EOF
|
|||
|
||||
&checkearlier($tmp, @varnames);
|
||||
$tmp = "\n" . $tmp;
|
||||
if ($tmp =~ /\nMAINTAINER=[^\n]+/) {
|
||||
$tmp =~ s/\nMAINTAINER=[^\n]+//;
|
||||
if ($tmp =~ /\nMAINTAINER\??=[^\n]+/) {
|
||||
$tmp =~ s/\nMAINTAINER\??=[^\n]+//;
|
||||
} else {
|
||||
&perror("FATAL: no MAINTAINER listed in $file.");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue