X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/fca1e2883934a6d918878c05ddbea9aadb91b2a5..cd23d9d0f296226f8983f580fc3125dd6b91a769:/scripts/metadata.pl?ds=sidebyside diff --git a/scripts/metadata.pl b/scripts/metadata.pl index ded38058a..7514a1713 100755 --- a/scripts/metadata.pl +++ b/scripts/metadata.pl @@ -180,6 +180,7 @@ sub target_config_features(@) { /usb/ and $ret .= "\tselect USB_SUPPORT\n"; /atm/ and $ret .= "\tselect ATM_SUPPORT\n"; /pcmcia/ and $ret .= "\tselect PCMCIA_SUPPORT\n"; + /video/ and $ret .= "\tselect VIDEO_SUPPORT\n"; /squashfs/ and $ret .= "\tselect USES_SQUASHFS\n"; /jffs2/ and $ret .= "\tselect USES_JFFS2\n"; /ext2/ and $ret .= "\tselect USES_EXT2\n"; @@ -340,6 +341,39 @@ sub package_depends($$) { return $ret; } +sub mconf_depends($$) { + my $depends = shift; + my $only_dep = shift; + my $res; + + $depends or return; + my @depends = @$depends; + foreach my $depend (@depends) { + my $m = "depends"; + $depend =~ s/^([@\+]+)//; + my $flags = $1; + my $vdep; + + if ($vdep = $package{$depend}->{vdepends}) { + $depend = join("||", map { "PACKAGE_".$_ } @$vdep); + } else { + $flags =~ /\+/ and do { + next if $only_dep; + $m = "select"; + + # Menuconfig will not treat 'select FOO' as a real dependency + # thus if FOO depends on other config options, these dependencies + # will not be checked. To fix this, we simply emit all of FOO's + # depends here as well. + $package{$depend} and $res .= mconf_depends($package{$depend}->{depends}, 1); + }; + $flags =~ /@/ or $depend = "PACKAGE_$depend"; + } + $res .= "\t\t$m $depend\n"; + } + return $res; +} + sub print_package_config_category($) { my $cat = shift; my %menus; @@ -393,20 +427,7 @@ sub print_package_config_category($) { foreach my $default (split /\s*,\s*/, $pkg->{default}) { print "\t\tdefault $default\n"; } - foreach my $depend (@{$pkg->{depends}}) { - my $m = "depends"; - $depend =~ s/^([@\+]+)//; - my $flags = $1; - my $vdep; - - if ($vdep = $package{$depend}->{vdepends}) { - $depend = join("||", map { "PACKAGE_".$_ } @$vdep); - } else { - $flags =~ /@/ or $depend = "PACKAGE_$depend"; - $flags =~ /\+/ and $m = "select"; - } - print "\t\t$m $depend\n"; - } + print mconf_depends($pkg->{depends}, 0); print "\t\thelp\n"; print $pkg->{description}; print "\n";