add a new package metadata variable MDEPENDS for specifying local menuconfig dependencies that do not propagate to other packages

SVN-Revision: 26491
This commit is contained in:
Felix Fietkau 2011-04-05 19:03:51 +00:00
parent 980190367c
commit 459762ace2
4 changed files with 5 additions and 0 deletions

View 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>

View 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)

View File

@ -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";

View 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;