consider virtual dependencies (generated by using PROVIDES:=) when generating the build dependencies (fixes python build dependency errors)
SVN-Revision: 11428
This commit is contained in:
parent
306910e5d1
commit
51bc4434dd
1 changed files with 32 additions and 14 deletions
|
@ -495,6 +495,7 @@ EOF
|
||||||
sub gen_package_mk() {
|
sub gen_package_mk() {
|
||||||
my %conf;
|
my %conf;
|
||||||
my %dep;
|
my %dep;
|
||||||
|
my %done;
|
||||||
my $line;
|
my $line;
|
||||||
|
|
||||||
parse_package_metadata($ARGV[0]) or exit 1;
|
parse_package_metadata($ARGV[0]) or exit 1;
|
||||||
|
@ -503,6 +504,9 @@ sub gen_package_mk() {
|
||||||
my $pkg = $package{$name};
|
my $pkg = $package{$name};
|
||||||
|
|
||||||
next if defined $pkg->{vdepends};
|
next if defined $pkg->{vdepends};
|
||||||
|
next if $done{$pkg->{src}};
|
||||||
|
$done{$pkg->{src}} = 1;
|
||||||
|
|
||||||
if ($ENV{SDK}) {
|
if ($ENV{SDK}) {
|
||||||
$conf{$pkg->{src}} or do {
|
$conf{$pkg->{src}} or do {
|
||||||
$config = 'm';
|
$config = 'm';
|
||||||
|
@ -518,23 +522,37 @@ sub gen_package_mk() {
|
||||||
|
|
||||||
my $hasdeps = 0;
|
my $hasdeps = 0;
|
||||||
my $depline = "";
|
my $depline = "";
|
||||||
foreach my $dep (@{$pkg->{depends}}, @{$pkg->{builddepends}}) {
|
foreach my $deps (@{$pkg->{depends}}, @{$pkg->{builddepends}}) {
|
||||||
next if $dep =~ /@/;
|
next if $deps =~ /@/;
|
||||||
$dep =~ s/\+//;
|
$deps =~ s/\+//;
|
||||||
my $idx;
|
my $idx;
|
||||||
my $pkg_dep = $package{$dep};
|
my $pkg_dep = $package{$deps};
|
||||||
next if defined $pkg_dep->{vdepends};
|
my @deps;
|
||||||
|
|
||||||
if (defined $pkg_dep->{src}) {
|
if ($pkg_dep->{vdepends}) {
|
||||||
($pkg->{src} ne $pkg_dep->{src}) and $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
|
@deps = @{$pkg_dep->{vdepends}};
|
||||||
} elsif (defined($srcpackage{$dep})) {
|
} else {
|
||||||
$idx = $subdir{$dep}.$dep;
|
@deps = ($deps);
|
||||||
}
|
}
|
||||||
undef $idx if $idx =~ /^(kernel)|(base-files)$/;
|
|
||||||
if ($idx) {
|
foreach my $dep (@deps) {
|
||||||
next if $dep{$pkg->{src}."->".$idx};
|
$pkg_dep = $package{$deps};
|
||||||
$depline .= " \$(curdir)/$idx/compile";
|
if (defined $pkg_dep->{src}) {
|
||||||
$dep{$pkg->{src}."->".$idx} = 1;
|
($pkg->{src} ne $pkg_dep->{src}) and $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
|
||||||
|
} elsif (defined($srcpackage{$dep})) {
|
||||||
|
$idx = $subdir{$dep}.$dep;
|
||||||
|
}
|
||||||
|
undef $idx if $idx =~ /^(kernel)|(base-files)$/;
|
||||||
|
if ($idx) {
|
||||||
|
next if $dep{$pkg->{src}."->".$idx};
|
||||||
|
next if $pkg->{src} eq $pkg_dep->{src};
|
||||||
|
if ($pkg_dep->{vdepends}) {
|
||||||
|
$depline .= " \$(if \$(CONFIG_PACKAGE_$dep),\$(curdir)/$idx/compile)";
|
||||||
|
} else {
|
||||||
|
$depline .= " \$(curdir)/$idx/compile";
|
||||||
|
$dep{$pkg->{src}."->".$idx} = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($depline) {
|
if ($depline) {
|
||||||
|
|
Loading…
Reference in a new issue