Index: ports-mgmt/portlint/src/portlint.pl =================================================================== --- ports-mgmt/portlint/src/portlint.pl +++ ports-mgmt/portlint/src/portlint.pl @@ -1650,6 +1650,21 @@ my %seen = (); @popt = grep { !$seen{$_}++ } @popt; } + + foreach my $i (@popt) { + if ($i eq 'PORTDOCS') { + if (!grep(/^DOCS$/, @opt)) { + &perror("FATAL", $file, -1, "PORTDOCS appears in plist ". + "but DOCS is not listed in OPTIONS_DEFINE."); + } + } elsif ($i eq 'PORTEXAMPLES') { + if (!grep(/^EXAMPLES$/, @opt)) { + &perror("FATAL", $file, -1, "PORTEXAMPLES appears in plist ". + "but EXAMPLES is not listed in OPTIONS_DEFINE."); + } + } + } + foreach my $i ((@opt, @aopt)) { # 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');