mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-26 06:09:37 +00:00
metadata: move 'builddepends' from binary to source packages
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
parent
39be6e7f19
commit
b2ab9c9d33
@ -525,15 +525,17 @@ sub install_package {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# install all dependencies referenced from the source package
|
# install all dependencies referenced from the source package
|
||||||
foreach my $vpkg (@{$feed_src->{$src}{packages}}) {
|
foreach my $dep (
|
||||||
foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}, @{$vpkg->{"builddepends/host"}}) {
|
@{$feed_src->{$src}{builddepends}},
|
||||||
next if $dep =~ /@/;
|
@{$feed_src->{$src}{"builddepends/host"}},
|
||||||
$dep =~ s/^\+//;
|
map { @{$_->{depends}} } @{$feed_src->{$src}{packages}}
|
||||||
$dep =~ s/^.+://;
|
) {
|
||||||
$dep =~ s/\/.+$//;
|
next if $dep =~ /@/;
|
||||||
next unless $dep;
|
$dep =~ s/^\+//;
|
||||||
install_package($feed, $dep, 0) == 0 or $ret = 1;
|
$dep =~ s/^.+://;
|
||||||
}
|
$dep =~ s/\/.+$//;
|
||||||
|
next unless $dep;
|
||||||
|
install_package($feed, $dep, 0) == 0 or $ret = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
|
@ -215,6 +215,7 @@ sub parse_package_metadata($) {
|
|||||||
$srcpackage{$src} = {
|
$srcpackage{$src} = {
|
||||||
packages => [],
|
packages => [],
|
||||||
buildtypes => [],
|
buildtypes => [],
|
||||||
|
builddepends => [],
|
||||||
};
|
};
|
||||||
$override = "";
|
$override = "";
|
||||||
undef $pkg;
|
undef $pkg;
|
||||||
@ -234,7 +235,6 @@ sub parse_package_metadata($) {
|
|||||||
$pkg->{title} = "";
|
$pkg->{title} = "";
|
||||||
$pkg->{depends} = [];
|
$pkg->{depends} = [];
|
||||||
$pkg->{mdepends} = [];
|
$pkg->{mdepends} = [];
|
||||||
$pkg->{builddepends} = [];
|
|
||||||
$pkg->{subdir} = $subdir;
|
$pkg->{subdir} = $subdir;
|
||||||
$pkg->{tristate} = 1;
|
$pkg->{tristate} = 1;
|
||||||
$pkg->{override} = $override;
|
$pkg->{override} = $override;
|
||||||
@ -258,6 +258,8 @@ sub parse_package_metadata($) {
|
|||||||
/^Feature-Description:/ and $feature->{description} = get_multiline(\*FILE, "\t\t\t");
|
/^Feature-Description:/ and $feature->{description} = get_multiline(\*FILE, "\t\t\t");
|
||||||
next;
|
next;
|
||||||
};
|
};
|
||||||
|
/^Build-Depends: \s*(.+)\s*$/ and $srcpackage{$src}{builddepends} = [ split /\s+/, $1 ];
|
||||||
|
/^Build-Depends\/(\w+): \s*(.+)\s*$/ and $srcpackage{$src}{"builddepends/$1"} = [ split /\s+/, $2 ];
|
||||||
/^Build-Types:\s*(.+)\s*$/ and $srcpackage{$src}{buildtypes} = [ split /\s+/, $1 ];
|
/^Build-Types:\s*(.+)\s*$/ and $srcpackage{$src}{buildtypes} = [ split /\s+/, $1 ];
|
||||||
next unless $pkg;
|
next unless $pkg;
|
||||||
/^Version: \s*(.+)\s*$/ and $pkg->{version} = $1;
|
/^Version: \s*(.+)\s*$/ and $pkg->{version} = $1;
|
||||||
@ -289,8 +291,6 @@ sub parse_package_metadata($) {
|
|||||||
/^Build-Variant: \s*([\w\-]+)\s*/ and $pkg->{variant} = $1;
|
/^Build-Variant: \s*([\w\-]+)\s*/ and $pkg->{variant} = $1;
|
||||||
/^Default-Variant: .*/ and $pkg->{variant_default} = 1;
|
/^Default-Variant: .*/ and $pkg->{variant_default} = 1;
|
||||||
/^Build-Only: \s*(.+)\s*$/ and $pkg->{buildonly} = 1;
|
/^Build-Only: \s*(.+)\s*$/ and $pkg->{buildonly} = 1;
|
||||||
/^Build-Depends: \s*(.+)\s*$/ and $pkg->{builddepends} = [ split /\s+/, $1 ];
|
|
||||||
/^Build-Depends\/(\w+): \s*(.+)\s*$/ and $pkg->{"builddepends/$1"} = [ split /\s+/, $2 ];
|
|
||||||
/^Repository:\s*(.+?)\s*$/ and $pkg->{repository} = $1;
|
/^Repository:\s*(.+?)\s*$/ and $pkg->{repository} = $1;
|
||||||
/^Category: \s*(.+)\s*$/ and do {
|
/^Category: \s*(.+)\s*$/ and do {
|
||||||
$pkg->{category} = $1;
|
$pkg->{category} = $1;
|
||||||
|
@ -446,20 +446,18 @@ sub gen_package_mk() {
|
|||||||
print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' ', @{$src->{buildtypes}})."\n";
|
print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' ', @{$src->{buildtypes}})."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $spkg (@{$src->{packages}}) {
|
foreach my $dep (@{$src->{builddepends}}, map { @{$_->{depends}} } @{$src->{packages}}) {
|
||||||
foreach my $dep (@{$spkg->{depends}}, @{$spkg->{builddepends}}) {
|
$dep =~ /@/ or do {
|
||||||
$dep =~ /@/ or do {
|
$dep =~ s/\+//g;
|
||||||
$dep =~ s/\+//g;
|
push @srcdeps, $dep;
|
||||||
push @srcdeps, $dep;
|
};
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
foreach my $type (@{$src->{buildtypes}}) {
|
foreach my $type (@{$src->{buildtypes}}) {
|
||||||
my @extra_deps;
|
my @extra_deps;
|
||||||
my %deplines;
|
my %deplines;
|
||||||
|
|
||||||
next unless $pkg->{"builddepends/$type"};
|
next unless $src->{"builddepends/$type"};
|
||||||
foreach my $dep (@{$pkg->{"builddepends/$type"}}) {
|
foreach my $dep (@{$src->{"builddepends/$type"}}) {
|
||||||
my $suffix = "";
|
my $suffix = "";
|
||||||
my $deptype = "";
|
my $deptype = "";
|
||||||
my $condition;
|
my $condition;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user