X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=scripts%2Fmetadata.pl;h=70d1b40255847328d14a607ee767a82fcd41c3a7;hb=3c48fb6ff9dbe5898be0c988ce8a2c4680b75dc2;hp=ca00fcae6dc893ce11cb92fc78eca57679934e39;hpb=ea63b88b10642bdc482650db389dcc75880495db;p=oweals%2Fopenwrt.git diff --git a/scripts/metadata.pl b/scripts/metadata.pl index ca00fcae6d..70d1b40255 100755 --- a/scripts/metadata.pl +++ b/scripts/metadata.pl @@ -152,6 +152,7 @@ sub target_config_features(@) { while ($_ = shift @_) { /broken/ and $ret .= "\tdepends BROKEN\n"; + /audio/ and $ret .= "\tselect AUDIO_SUPPORT\n"; /display/ and $ret .= "\tselect DISPLAY_SUPPORT\n"; /gpio/ and $ret .= "\tselect GPIO_SUPPORT\n"; /pci/ and $ret .= "\tselect PCI_SUPPORT\n"; @@ -163,6 +164,7 @@ sub target_config_features(@) { /ext2/ and $ret .= "\tselect USES_EXT2\n"; /tgz/ and $ret .= "\tselect USES_TGZ\n"; /cpiogz/ and $ret .= "\tselect USES_CPIOGZ\n"; + /ubifs/ and $ret .= "\tselect USES_UBIFS\n"; /fpu/ and $ret .= "\tselect HAS_FPU\n"; /ramdisk/ and $ret .= "\tselect USES_INITRAMFS\n"; /powerpc64/ and $ret .= "\tselect powerpc64\n"; @@ -421,6 +423,8 @@ sub mconf_depends { my $vdep; my $condition = $parent_condition; + next if $seen->{$depend}; + $seen->{$depend} = 1; if ($depend =~ /^(.+):(.+)$/) { if ($1 ne "PACKAGE_$pkgname") { if ($condition) { @@ -431,9 +435,7 @@ sub mconf_depends { } $depend = $2; } - next if $seen->{$depend}; next if $package{$depend} and $package{$depend}->{buildonly}; - $seen->{$depend} = 1; if ($vdep = $package{$depend}->{vdepends}) { $depend = join("||", map { "PACKAGE_".$_ } @$vdep); } else { @@ -549,9 +551,10 @@ EOF print <{name} bool "$feature->{title}" - help -$feature->{description} EOF + $feature->{description} =~ /\w/ and do { + print "\t\thelp\n".$feature->{description}."\n"; + }; } print "endchoice\n" } @@ -560,20 +563,24 @@ EOF sub gen_package_config() { parse_package_metadata($ARGV[0]) or exit 1; - print "menuconfig UCI_PRECONFIG\n\tbool \"Image configuration\"\n" if %preconfig; + print "menuconfig IMAGEOPT\n\tbool \"Image configuration\"\n\tdefault n\n"; foreach my $preconfig (keys %preconfig) { foreach my $cfg (keys %{$preconfig{$preconfig}}) { my $conf = $preconfig{$preconfig}->{$cfg}->{id}; $conf =~ tr/\.-/__/; print <{$cfg}->{label}" if UCI_PRECONFIG + string "$preconfig{$preconfig}->{$cfg}->{label}" if IMAGEOPT depends PACKAGE_$preconfig default "$preconfig{$preconfig}->{$cfg}->{default}" EOF } } + print "source \"package/*/image-config.in\"\n"; + if (scalar glob "package/feeds/*/*/image-config.in") { + print "source \"package/feeds/*/*/image-config.in\"\n"; + } print_package_features(); print_package_config_category 'Base system'; foreach my $cat (keys %category) { @@ -620,6 +627,9 @@ sub gen_package_mk() { if ($config) { $pkg->{buildonly} and $config = ""; print "package-$config += $pkg->{subdir}$pkg->{src}\n"; + if ($pkg->{variant}) { + print "\$(curdir)/$pkg->{subdir}$pkg->{src}/variants += \$(if $config,$pkg->{variant})\n" + } $pkg->{prereq} and print "prereq-$config += $pkg->{subdir}$pkg->{src}\n"; } @@ -756,7 +766,7 @@ sub gen_package_mk() { $cmds \\ ) > \$@ -ifneq (\$(UCI_PRECONFIG)\$(CONFIG_UCI_PRECONFIG),) +ifneq (\$(IMAGEOPT)\$(CONFIG_IMAGEOPT),) package/preconfig: \$(TARGET_DIR)/etc/uci-defaults/$preconfig endif EOF