X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/d29153dc010840afa45e70ced91c5e558fca6bb6..8d00b42964662d768a1d86e100eb473f8de4f768:/scripts/metadata.pm diff --git a/scripts/metadata.pm b/scripts/metadata.pm index f90446298..a220231f0 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -63,6 +63,7 @@ sub parse_package_metadata($) { $pkg->{depends} = []; $pkg->{builddepends} = []; $pkg->{subdir} = $subdir; + $pkg->{tristate} = 1; $package{$1} = $pkg; push @{$srcpackage{$src}}, $pkg; }; @@ -88,7 +89,14 @@ sub parse_package_metadata($) { 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}; @@ -107,7 +115,7 @@ sub parse_package_metadata($) { /^Preconfig-Default:\s*(.*?)\s*$/ and $preconfig->{default} = $1; } close FILE; - return %category; + return 1; } 1;