This looks right to me, although I won't have time to test or commit for a few weeks yet.
On Fri, Jun 17, 2022 at 04:45:36PM +0300, Kirill Bychkov wrote: > Hi! > Just tried portgen for generating p5 port and found out that it > still places $OpenBSD$ at the top of Makefile. > The patch below fixes that. Not sure it is 100% correct. > > Index: Port.pm > =================================================================== > RCS file: /cvs/ports/infrastructure/lib/OpenBSD/PortGen/Port.pm,v > retrieving revision 1.24 > diff -u -p -u -r1.24 Port.pm > --- Port.pm 5 Jan 2022 21:23:18 -0000 1.24 > +++ Port.pm 17 Jun 2022 13:41:24 -0000 > @@ -355,12 +355,10 @@ sub write_makefile > grep { $_->{name} ne 'EXTRACT_SUFX' } > grep { ref } @template; > } else { > - my $tag = 'OpenBSD'; > my $template = > ports_dir() . '/infrastructure/templates/Makefile.template'; > > @template = ( > - "# \$$tag\$", > grep { $_ !~ /^\#/x } $self->parse_makefile($template) > ); > } > > -- andrew Beta. Software undergoes beta testing shortly before it's released. Beta is Latin for "still doesn't work."