$srcpackage{$src} = [];
undef $pkg;
};
+ next unless $src;
/^Package:\s*(.+?)\s*$/ and do {
$pkg = {};
$pkg->{src} = $src;
$pkg->{depends} = [];
$pkg->{builddepends} = [];
$pkg->{subdir} = $subdir;
+ $pkg->{tristate} = 1;
$package{$1} = $pkg;
push @{$srcpackage{$src}}, $pkg;
};
/^Provides: \s*(.+)\s*$/ and do {
my @vpkg = split /\s+/, $1;
foreach my $vpkg (@vpkg) {
- $package{$vpkg} or $package{$vpkg} = { vdepends => [] };
+ $package{$vpkg} or $package{$vpkg} = {
+ name => $vpkg,
+ vdepends => [],
+ src => $src,
+ subdir => $subdir,
+ makefile => $makefile
+ };
push @{$package{$vpkg}->{vdepends}}, $pkg->{name};
}
};
push @{$category{$1}->{$src}}, $pkg;
};
/^Description: \s*(.*)\s*$/ and $pkg->{description} = "\t\t $1\n". get_multiline(*FILE, "\t\t ");
- /^Config: \s*(.*)\s*$/ and $pkg->{config} = "$1\n".get_multiline(*FILE);
+ /^Type: \s*(.+)\s*$/ and do {
+ $pkg->{type} = [ split /\s+/, $1 ];
+ undef $pkg->{tristate};
+ foreach my $type (@{$pkg->{type}}) {
+ $type =~ /ipkg/ and $pkg->{tristate} = 1;
+ }
+ };
+ /^Config: \s*(.*)\s*$/ and $pkg->{config} = "$1\n".get_multiline(*FILE, "\t");
/^Prereq-Check:/ and $pkg->{prereq} = 1;
/^Preconfig:\s*(.+)\s*$/ and do {
my $pkgname = $pkg->{name};
/^Preconfig-Default:\s*(.*?)\s*$/ and $preconfig->{default} = $1;
}
close FILE;
- return %category;
+ return 1;
}
1;