mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 00:56:14 +02:00
implement conditional dependencies for menuconfig and build deps
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12820 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
fe71fc77ef
commit
7e8f0bc28d
@ -17,7 +17,7 @@ PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
|
|||||||
PKG_SOURCE_SUBDIR:=hostapd-$(PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=hostapd-$(PKG_VERSION)
|
||||||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
||||||
PKG_MD5SUM:=62876f2179f316db0621cc33adf04c19
|
PKG_MD5SUM:=62876f2179f316db0621cc33adf04c19
|
||||||
PKG_BUILD_DEPENDS:=madwifi mac80211 libnl openssl
|
PKG_BUILD_DEPENDS:=PACKAGE_kmod-madwifi:madwifi PACKAGE_kmod-mac80211:mac80211 PACKAGE_kmod-mac80211:libnl
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_kmod-mac80211 CONFIG_PACKAGE_kmod-madwifi CONFIG_PACKAGE_hostapd CONFIG_PACKAGE_hostapd-mini)
|
STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_kmod-mac80211 CONFIG_PACKAGE_kmod-madwifi CONFIG_PACKAGE_hostapd CONFIG_PACKAGE_hostapd-mini)
|
||||||
@ -33,7 +33,7 @@ endef
|
|||||||
define Package/hostapd
|
define Package/hostapd
|
||||||
$(call Package/hostapd/Default)
|
$(call Package/hostapd/Default)
|
||||||
TITLE+= (full)
|
TITLE+= (full)
|
||||||
DEPENDS+= +libopenssl
|
DEPENDS+= +PACKAGE_hostapd:libopenssl
|
||||||
endef
|
endef
|
||||||
|
|
||||||
#define Package/hostapd/conffiles
|
#define Package/hostapd/conffiles
|
||||||
|
@ -290,6 +290,7 @@ sub install_package {
|
|||||||
foreach my $vpkg (@{$srcpackage{$src}}, $pkg) {
|
foreach my $vpkg (@{$srcpackage{$src}}, $pkg) {
|
||||||
foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}) {
|
foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}) {
|
||||||
next if $dep =~ /@/;
|
next if $dep =~ /@/;
|
||||||
|
next if $dep =~ /:/;
|
||||||
$dep =~ s/^\+//;
|
$dep =~ s/^\+//;
|
||||||
install_package($feed, $dep) == 0 or $ret = 1;
|
install_package($feed, $dep) == 0 or $ret = 1;
|
||||||
}
|
}
|
||||||
|
@ -223,6 +223,7 @@ EOF
|
|||||||
$flags = $1;
|
$flags = $1;
|
||||||
$name = $2;
|
$name = $2;
|
||||||
|
|
||||||
|
next if $name =~ /:/;
|
||||||
$flags =~ /-/ and $mode = "deselect";
|
$flags =~ /-/ and $mode = "deselect";
|
||||||
$flags =~ /\+/ and $mode = "select";
|
$flags =~ /\+/ and $mode = "select";
|
||||||
$flags =~ /@/ and $confstr .= "\t$mode $name\n";
|
$flags =~ /@/ and $confstr .= "\t$mode $name\n";
|
||||||
@ -374,8 +375,13 @@ sub mconf_depends($$) {
|
|||||||
my $m = "depends";
|
my $m = "depends";
|
||||||
$depend =~ s/^([@\+]+)//;
|
$depend =~ s/^([@\+]+)//;
|
||||||
my $flags = $1;
|
my $flags = $1;
|
||||||
|
my $condition;
|
||||||
my $vdep;
|
my $vdep;
|
||||||
|
|
||||||
|
if ($depend =~ /^(.+):(.+)$/) {
|
||||||
|
$condition = $1;
|
||||||
|
$depend = $2;
|
||||||
|
}
|
||||||
if ($vdep = $package{$depend}->{vdepends}) {
|
if ($vdep = $package{$depend}->{vdepends}) {
|
||||||
$depend = join("||", map { "PACKAGE_".$_ } @$vdep);
|
$depend = join("||", map { "PACKAGE_".$_ } @$vdep);
|
||||||
} else {
|
} else {
|
||||||
@ -390,6 +396,7 @@ sub mconf_depends($$) {
|
|||||||
next if $only_dep;
|
next if $only_dep;
|
||||||
};
|
};
|
||||||
$flags =~ /@/ or $depend = "PACKAGE_$depend";
|
$flags =~ /@/ or $depend = "PACKAGE_$depend";
|
||||||
|
$condition and $depend = "$depend if $condition";
|
||||||
}
|
}
|
||||||
$dep->{$depend} =~ /select/ or $dep->{$depend} = $m;
|
$dep->{$depend} =~ /select/ or $dep->{$depend} = $m;
|
||||||
}
|
}
|
||||||
@ -535,6 +542,13 @@ sub gen_package_mk() {
|
|||||||
my $depline = "";
|
my $depline = "";
|
||||||
foreach my $deps (@srcdeps) {
|
foreach my $deps (@srcdeps) {
|
||||||
my $idx;
|
my $idx;
|
||||||
|
my $condition;
|
||||||
|
|
||||||
|
if ($deps =~ /^(.+):(.+)/) {
|
||||||
|
$condition = $1;
|
||||||
|
$deps = $2;
|
||||||
|
}
|
||||||
|
|
||||||
my $pkg_dep = $package{$deps};
|
my $pkg_dep = $package{$deps};
|
||||||
my @deps;
|
my @deps;
|
||||||
|
|
||||||
@ -556,13 +570,20 @@ sub gen_package_mk() {
|
|||||||
next if $pkg->{src} eq $pkg_dep->{src};
|
next if $pkg->{src} eq $pkg_dep->{src};
|
||||||
next if $dep{$pkg->{src}."->".$idx};
|
next if $dep{$pkg->{src}."->".$idx};
|
||||||
next if $dep{$pkg->{src}."->($dep)".$idx};
|
next if $dep{$pkg->{src}."->($dep)".$idx};
|
||||||
|
my $depstr;
|
||||||
|
|
||||||
if ($pkg_dep->{vdepends}) {
|
if ($pkg_dep->{vdepends}) {
|
||||||
$depline .= " \$(if \$(CONFIG_PACKAGE_$dep),\$(curdir)/$idx/compile)";
|
$depstr = "\$(if \$(CONFIG_PACKAGE_$dep),\$(curdir)/$idx/compile)";
|
||||||
$dep{$pkg->{src}."->($dep)".$idx} = 1;
|
$dep{$pkg->{src}."->($dep)".$idx} = 1;
|
||||||
} else {
|
} else {
|
||||||
$depline .= " \$(curdir)/$idx/compile";
|
$depstr = "\$(curdir)/$idx/compile";
|
||||||
$dep{$pkg->{src}."->".$idx} = 1;
|
$dep{$pkg->{src}."->".$idx} = 1;
|
||||||
}
|
}
|
||||||
|
if ($condition) {
|
||||||
|
$depline .= " \$(if \$(CONFIG_$condition),$depstr)";
|
||||||
|
} else {
|
||||||
|
$depline .= " $depstr";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user