|
@@ -127,7 +127,7 @@ $portdir = $ARGV[0] ? $ARGV[0] : '.';
|
|
|
if (defined $ENV{'PORTSDIR'}) {
|
|
|
$portsdir = $ENV{PORTSDIR};
|
|
|
} else {
|
|
|
- my $mconf_portsdir = get_makeconf_var('PORTSDIR');
|
|
|
+ my $mconf_portsdir = &get_makeconf_var('PORTSDIR');
|
|
|
if ($mconf_portsdir ne '') {
|
|
|
$portsdir = $mconf_portsdir;
|
|
|
}
|
|
@@ -1777,12 +1777,16 @@ sub checkmakefile {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ my %seen_opts = ();
|
|
|
foreach my $i ((@opt, @aopt, @aropt)) {
|
|
|
# skip global options
|
|
|
next if ($i eq 'DOCS' or $i eq 'NLS' or $i eq 'EXAMPLES' or $i eq 'IPV6' or $i eq 'X11' or $i eq 'DEBUG');
|
|
|
- my $odescr = &get_makevar("${i}_DESC");
|
|
|
- if (!$odescr) {
|
|
|
- &perror("FATAL", $file, -1, "OPTION $i does not have a description (${i}_DESC).");
|
|
|
+ if (!$seen_opts{$i}) {
|
|
|
+ $seen_opts{$i}++;
|
|
|
+ my $odescr = &get_makevar("${i}_DESC");
|
|
|
+ if ($odescr eq "" && $whole !~ /^${i}_DESC.?=/m) {
|
|
|
+ &perror("FATAL", $file, -1, "OPTION $i does not have a description (${i}_DESC).");
|
|
|
+ }
|
|
|
}
|
|
|
if (!grep(/^$i$/, (@mopt, @popt))) {
|
|
|
if ($whole !~ /\n${i}_($m)(_\w+)?(.)?=[^\n]+/ and $whole !~ /\n[-\w]+-${i}-(on|off):\n/) {
|