my $makefile;
my %conf;
my %pkg;
+my %prereq;
+my $prereq;
my %dep;
my %options;
my $opt;
defined $pkg{$name} or $pkg{$name} = {};
$pkg{$name}->{src} = $src;
};
+ $line =~ /^Prereq-Check:/ and !defined $prereq{$src} and do {
+ $prereq{$src} = 1;
+ $prereq .= "package-prereq += $src\n";
+ };
$line =~ /^(Build-)?Depends: \s*(.+)\s*$/ and do {
$pkg{$name}->{depends} ||= [];
foreach my $v (split /\s+/, $2) {
} elsif (defined($pkg{$dep}) && !$options{SDK}) {
$idx = $dep;
}
+ undef $idx if $idx =~ /^(kernel)|(base-files)$/;
if ($idx) {
next if $dep{$pkg{$name}->{src}."->".$idx};
$depline .= " $idx\-compile";
}
if ($line ne "") {
- print "\n$line";
+ print "\n$line\n$prereq";
}