portgen(1) will still spit out the old-style PERMIT_PACKAGE_* lines.
This diff changes it to just use the newer PERMIT_PACKAGE and
PERMIT_DISTFILE lines.
--Kurt
Index: Port.pm
===================================================================
RCS file: /cvs/ports/infrastructure/lib/OpenBSD/PortGen/Port.pm,v
retrieving revision 1.17
diff -u -p -r1.17 Port.pm
--- Port.pm 16 May 2019 15:55:47 -0000 1.17
+++ Port.pm 12 Jun 2019 17:44:54 -0000
@@ -176,11 +176,10 @@ sub set_license
my ( $self, $license ) = @_;
if ( is_good($license) ) {
- $self->{PERMIT_PACKAGE_CDROM} = 'Yes';
+ $self->{PERMIT_PACKAGE} = 'Yes';
} else {
- $self->{PERMIT_PACKAGE_CDROM} = 'unknown license';
- $self->{PERMIT_PACKAGE_FTP} = 'unknown license';
- $self->{PERMIT_DISTFILES_FTP} = 'unknown license';
+ $self->{PERMIT_PACKAGE} = 'unknown license';
+ $self->{PERMIT_DISTFILES} = 'unknown license';
}
$self->{license} = pretty_license($license);
@@ -396,7 +395,7 @@ sub write_makefile
my $print_key = "$key$equal";
$print_key .= $tabs if length $value;
- if ( $key eq 'PERMIT_PACKAGE_CDROM' && $license ) {
+ if ( $key eq 'PERMIT_PACKAGE' && $license ) {
# guess that the comment before this was
# the license marker.
pop @makefile if $makefile[-1] =~ /^#/;