On Sat, Apr 18, 2020 at 01:48:48AM +0200, Thomas L. wrote:
> Moving the logic back to get_deps allows a less hacky approach, since
> the Makefile is already created. I like this much better.

I like this better too, but unfortunately it doesn't work.  So we need
to do something else.



> diff --git infrastructure/lib/OpenBSD/PortGen/Port/Ruby.pm 
> infrastructure/lib/OpenBSD/PortGen/Port/Ruby.pm
> index 1703fba5b89..e4ed3d9d6a4 100644
> --- infrastructure/lib/OpenBSD/PortGen/Port/Ruby.pm
> +++ infrastructure/lib/OpenBSD/PortGen/Port/Ruby.pm
> @@ -21,6 +21,8 @@ use warnings;
> 
>  use parent 'OpenBSD::PortGen::Port';
> 
> +use List::Util qw( reduce );
> +
>  use OpenBSD::PortGen::Dependency;
>  use OpenBSD::PortGen::Utils qw( module_in_ports );
> 
> @@ -97,8 +99,9 @@ sub get_deps
> 
>               next if $self->is_standard_module($name);
> 
> -             my $port = module_in_ports( $name, 'ruby-' )
> -                 || $self->name_new_port($name);
> +             my @flavors = split ' ', $self->make_show('FLAVORS');
> +             my $port = reduce { $a || module_in_ports($name, "$b-") } 0, 
> @flavors;
> +             $port = $self->name_new_port($name) unless $port;
> 
>               $req =~ s/ //g;
> 

-- 
andrew - http://afresh1.com

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots. So far, the Universe is
winning."             -- Rich Cook

Reply via email to