add a new package metadata variable MDEPENDS for specifying local menuconfig dependen...
authorFelix Fietkau <nbd@openwrt.org>
Tue, 5 Apr 2011 19:03:51 +0000 (19:03 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 5 Apr 2011 19:03:51 +0000 (19:03 +0000)
SVN-Revision: 26491

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

index 1d29119d81fab0aba0a8f3eab81c430ae99000af..1695204b36a25872417a6c2c7adbeec096485175 100644 (file)
@@ -10,6 +10,7 @@ define Package/Default
   SECTION:=opt
   CATEGORY:=Extra packages
   DEPENDS:=
+  MDEPENDS:=
   PROVIDES:=
   EXTRA_DEPENDS:=
   MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
index 34196e408611ac0b9f3ba046057b6468554c9c18..3f7a83a97909c32d57ac71e96e0e166402b33a1c 100644 (file)
@@ -31,6 +31,7 @@ $(if $(MENU),Menu: $(MENU)
 )$(if $(findstring $(PREREQ_CHECK),1),Prereq-Check: 1
 )Version: $(VERSION)
 Depends: $(DEPENDS)
+Menu-Depends: $(MDEPENDS)
 Provides: $(PROVIDES)
 $(if $(VARIANT),Build-Variant: $(VARIANT)
 )$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS)
index 7c60efbf4a0ad307b9d6f600d79a893bbe89989d..9cb846539fd7be52039f681ff413ffa60fd3a73b 100755 (executable)
@@ -530,6 +530,7 @@ sub print_package_config_category($) {
                                print "\t\tdefault $default\n";
                        }
                        print mconf_depends($pkg->{name}, $pkg->{depends}, 0);
+                       print mconf_depends($pkg->{name}, $pkg->{mdepends}, 0);
                        print "\t\thelp\n";
                        print $pkg->{description};
                        print "\n";
index 52ca9895e4d81661145be32487519b147dce3a1a..6d544c8833cd65b812b76c12986fd8e3374b192c 100644 (file)
@@ -66,6 +66,7 @@ sub parse_package_metadata($) {
                        $pkg->{title} = "";
                        $pkg->{default} = "m if ALL";
                        $pkg->{depends} = [];
+                       $pkg->{mdepends} = [];
                        $pkg->{builddepends} = [];
                        $pkg->{buildtypes} = [];
                        $pkg->{subdir} = $subdir;
@@ -111,6 +112,7 @@ sub parse_package_metadata($) {
                                push @{$package{$vpkg}->{vdepends}}, $pkg->{name};
                        }
                };
+               /^Menu-Depends: \s*(.+)\s*$/ and $pkg->{mdepends} = [ split /\s+/, $1 ];
                /^Depends: \s*(.+)\s*$/ and $pkg->{depends} = [ split /\s+/, $1 ];
                /^Build-Variant: \s*([\w\-]+)\s*/ and $pkg->{variant} = $1;
                /^Build-Only: \s*(.+)\s*$/ and $pkg->{buildonly} = 1;