projects
/
openwrt
/
staging
/
yousong.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
treewide: clean up download hashes
[openwrt/staging/yousong.git]
/
scripts
/
package-metadata.pl
diff --git
a/scripts/package-metadata.pl
b/scripts/package-metadata.pl
index f5d28e41a362eabe6fa296d2e83c3580ee97f182..f8f16f07fa8bb67a037e86473233343e7d2ced0a 100755
(executable)
--- a/
scripts/package-metadata.pl
+++ b/
scripts/package-metadata.pl
@@
-176,12
+176,25
@@
sub mconf_depends {
next if $package{$depend} and $package{$depend}->{buildonly};
if ($flags =~ /\+/) {
if ($vdep = $package{$depend}->{vdepends}) {
next if $package{$depend} and $package{$depend}->{buildonly};
if ($flags =~ /\+/) {
if ($vdep = $package{$depend}->{vdepends}) {
- my @vdeps = @$vdep;
- $depend = shift @vdeps;
+ my @vdeps;
+ $depend = undef;
+
+ foreach my $v (@$vdep) {
+ if ($package{$v} && $package{$v}->{variant_default}) {
+ $depend = $v;
+ } else {
+ push @vdeps, $v;
+ }
+ }
+
+ if (!$depend) {
+ $depend = shift @vdeps;
+ }
+
if (@vdeps > 1) {
if (@vdeps > 1) {
- $condition = '!('.join("||", map { "PACKAGE_".$_ } @vdeps).')';
+ $condition =
($condition ? "$condition && " : '') .
'!('.join("||", map { "PACKAGE_".$_ } @vdeps).')';
} elsif (@vdeps > 0) {
} elsif (@vdeps > 0) {
- $condition = '!PACKAGE_'.$vdeps[0];
+ $condition =
($condition ? "$condition && " : '') .
'!PACKAGE_'.$vdeps[0];
}
}
}
}