X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/2b08ef515591897a4a92d8a6ebdd1fff7fc24afd..e1ec0a87e19fc1e27d1b989093a6ee2cf644f55c:/scripts/metadata.pl?ds=sidebyside diff --git a/scripts/metadata.pl b/scripts/metadata.pl index 39304dfbe..2da885117 100755 --- a/scripts/metadata.pl +++ b/scripts/metadata.pl @@ -166,6 +166,7 @@ sub target_config_features(@) { /fpu/ and $ret .= "\tselect HAS_FPU\n"; /ramdisk/ and $ret .= "\tselect USES_INITRAMFS\n"; /powerpc64/ and $ret .= "\tselect powerpc64\n"; + /nommu/ and $ret .= "\tselect NOMMU\n"; } return $ret; } @@ -414,8 +415,8 @@ sub mconf_depends { my @depends = @$depends; foreach my $depend (@depends) { my $m = "depends"; - $depend =~ s/^([@\+]+)//; - my $flags = $1; + my $flags = ""; + $depend =~ s/^([@\+]+)// and $flags = $1; my $vdep; my $condition = $parent_condition; @@ -532,6 +533,30 @@ sub print_package_config_category($) { undef $category{$cat}; } +sub print_package_features() { + keys %features > 0 or return; + print "menu \"Package features\"\n"; + foreach my $n (keys %features) { + my @features = sort { $b->{priority} <=> $a->{priority} or $a->{title} cmp $b->{title} } @{$features{$n}}; + print <{target_title}" + default FEATURE_$features[0]->{name} +EOF + + foreach my $feature (@features) { + print <{name} + bool "$feature->{title}" + help +$feature->{description} +EOF + } + print "endchoice\n" + } + print "endmenu\n\n"; +} + sub gen_package_config() { parse_package_metadata($ARGV[0]) or exit 1; print "menuconfig UCI_PRECONFIG\n\tbool \"Image configuration\"\n" if %preconfig; @@ -548,6 +573,7 @@ sub gen_package_config() { EOF } } + print_package_features(); print_package_config_category 'Base system'; foreach my $cat (keys %category) { print_package_config_category $cat;