aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshige <shige@FreeBSD.org>2000-01-12 12:48:15 +0800
committershige <shige@FreeBSD.org>2000-01-12 12:48:15 +0800
commite50b27dd1e88c8706e10cf0a1ab6909a47fa02d5 (patch)
treefb2457687424746869a204ba8669b254ad32be9b
parente30daade2bd146af2915c2d1d7b3c5e4bd8068d7 (diff)
downloadfreebsd-ports-gnome-e50b27dd1e88c8706e10cf0a1ab6909a47fa02d5.tar.gz
freebsd-ports-gnome-e50b27dd1e88c8706e10cf0a1ab6909a47fa02d5.tar.zst
freebsd-ports-gnome-e50b27dd1e88c8706e10cf0a1ab6909a47fa02d5.zip
Fixes:
- Allow "MAINTAINER?=". - Allow "CATEGORIES?=" and "CATEGORIES+=". PR: ports/16064 Submitted by: KIRIYAMA Kazuhiko <kiri@pis.toba-cmt.ac.jp>
-rw-r--r--devel/portlint/src/portlint.pl28
-rw-r--r--ports-mgmt/portlint/src/portlint.pl28
2 files changed, 34 insertions, 22 deletions
diff --git a/devel/portlint/src/portlint.pl b/devel/portlint/src/portlint.pl
index 7b5205f738cf..d575e78944a0 100644
--- a/devel/portlint/src/portlint.pl
+++ b/devel/portlint/src/portlint.pl
@@ -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.");
}
diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl
index 7b5205f738cf..d575e78944a0 100644
--- a/ports-mgmt/portlint/src/portlint.pl
+++ b/ports-mgmt/portlint/src/portlint.pl
@@ -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.");
}