X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fmetadata.pl;h=2da8851171fa43c4bb6aaf7ddec30c92ae311726;hb=5be08769f35ba9a5c170eb7a1139f7778a2549a1;hp=39304dfbe79c328968ce4d95085c7454fcf1df25;hpb=2b08ef515591897a4a92d8a6ebdd1fff7fc24afd;p=openwrt.git diff --git a/scripts/metadata.pl b/scripts/metadata.pl index 39304dfbe7..2da8851171 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;