X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/f52d66ff00b24111f87c274d3d7085ef2e1d27b1..7e450a1c869a5b227e3c91c4e71049059f1193e6:/scripts/gen_deps.pl diff --git a/scripts/gen_deps.pl b/scripts/gen_deps.pl index 745d31c7d..0fc80aae8 100755 --- a/scripts/gen_deps.pl +++ b/scripts/gen_deps.pl @@ -28,12 +28,20 @@ while ($line = <>) { $line =~ /^Source-Makefile: \s*(.+\/([^\/]+)\/Makefile)\s*$/ and do { $makefile = $1; $src = $2; + defined $pkg{$src} or $pkg{$src} = {}; + $pkg{$src}->{src} = $src; }; $line =~ /^Package: \s*(.+)\s*$/ and do { $name = $1; defined $pkg{$name} or $pkg{$name} = {}; $pkg{$name}->{src} = $src; }; + $line =~ /^Provides: \s*(.+)\s*$/ and do { + foreach my $vpkg (split /\s+/, $1) { + defined $pkg{$vpkg} or $pkg{$vpkg} = {}; + $pkg{$vpkg}->{virtual} = 1; + } + }; $line =~ /^Prereq-Check:/ and !defined $prereq{$src} and do { $pkg{$name}->{prereq} = 1; }; @@ -52,6 +60,7 @@ $line=""; foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { my $config; + next if defined $pkg{$name}->{virtual}; if ($options{SDK}) { $conf{$pkg{$name}->{src}} or do { $config = 'm'; @@ -69,6 +78,7 @@ foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { my $depline = ""; foreach my $dep (@{$pkg{$name}->{depends}}) { my $idx; + next if defined $pkg{$dep}->{virtual}; if (defined $pkg{$dep}->{src}) { ($pkg{$name}->{src} ne $pkg{$dep}->{src}) and $idx = $pkg{$dep}->{src}; } elsif (defined($pkg{$dep}) && !$options{SDK}) {