add support for hidden packages that get selected/built but do not show up in menuconfig
authorFelix Fietkau <nbd@openwrt.org>
Sat, 2 Jul 2011 06:49:09 +0000 (06:49 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 2 Jul 2011 06:49:09 +0000 (06:49 +0000)
SVN-Revision: 27344

include/package-defaults.mk
include/package-dumpinfo.mk
scripts/metadata.pl
scripts/metadata.pm

index 1695204b36a25872417a6c2c7adbeec096485175..491e401f8c6013f0c9fbf08a184e9a83a99a2b5d 100644 (file)
@@ -42,6 +42,7 @@ define Package/Default
   TITLE:=
   KCONFIG:=
   BUILDONLY:=
+  HIDDEN:=
   URL:=
   VARIANT:=
 endef
index 3f7a83a97909c32d57ac71e96e0e166402b33a1c..a297f2336ea7f4f8e81e009e9609797decad73a2 100644 (file)
@@ -45,6 +45,7 @@ Source: $(PKG_SOURCE)
 Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg))
 $(if $(KCONFIG),Kernel-Config: $(KCONFIG)
 )$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
+)$(if $(HIDDEN),Hidden: $(HIDDEN)
 )Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE))
 $(if $(URL),$(URL)
 )$(MAINTAINER)
index 246520bf789b4e00f48b180127877910a25cb9d8..3acdb16a82fa7fca8d338ad3f8a6e7bc9053b5be 100755 (executable)
@@ -525,10 +525,12 @@ sub print_package_config_category($) {
                        if ($c > 0) {
                                $title .= ("." x $c). " ". $pkg->{title};
                        }
+                       $title = "\"$title\"";
                        print "\t";
                        $pkg->{menu} and print "menu";
                        print "config PACKAGE_".$pkg->{name}."\n";
-                       print "\t\t".($pkg->{tristate} ? 'tristate' : 'bool')." \"$title\"\n";
+                       $pkg->{hidden} and $title = "";
+                       print "\t\t".($pkg->{tristate} ? 'tristate' : 'bool')." $title\n";
                        print "\t\tdefault y if DEFAULT_".$pkg->{name}."\n";
                        foreach my $default (split /\s*,\s*/, $pkg->{default}) {
                                print "\t\tdefault $default\n";
index 6d544c8833cd65b812b76c12986fd8e3374b192c..5efef46924f66b3042531fa55eafc6669a69d4f3 100644 (file)
@@ -114,6 +114,7 @@ sub parse_package_metadata($) {
                };
                /^Menu-Depends: \s*(.+)\s*$/ and $pkg->{mdepends} = [ split /\s+/, $1 ];
                /^Depends: \s*(.+)\s*$/ and $pkg->{depends} = [ split /\s+/, $1 ];
+               /^Hidden: \s*(.+)\s*$/ and $pkg->{hidden} = 1;
                /^Build-Variant: \s*([\w\-]+)\s*/ and $pkg->{variant} = $1;
                /^Build-Only: \s*(.+)\s*$/ and $pkg->{buildonly} = 1;
                /^Build-Depends: \s*(.+)\s*$/ and $pkg->{builddepends} = [ split /\s+/, $1 ];