add frameburst closes #1759
[openwrt.git] / scripts / metadata.pm
index f904462..a220231 100644 (file)
@@ -63,6 +63,7 @@ sub parse_package_metadata($) {
                        $pkg->{depends} = [];
                        $pkg->{builddepends} = [];
                        $pkg->{subdir} = $subdir;
                        $pkg->{depends} = [];
                        $pkg->{builddepends} = [];
                        $pkg->{subdir} = $subdir;
+                       $pkg->{tristate} = 1;
                        $package{$1} = $pkg;
                        push @{$srcpackage{$src}}, $pkg;
                };
                        $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 ");
                        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};
                /^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;
                /^Preconfig-Default:\s*(.*?)\s*$/ and $preconfig->{default} = $1;
        }
        close FILE;
-       return %category;
+       return 1;
 }
 
 1;
 }
 
 1;
This page took 0.023305 seconds and 4 git commands to generate.