some more build system cleanup
[openwrt.git] / scripts / metadata.pm
index ff39e34..a527d68 100644 (file)
@@ -54,6 +54,7 @@ sub parse_package_metadata($) {
                        $srcpackage{$src} = [];
                        undef $pkg;
                };
                        $srcpackage{$src} = [];
                        undef $pkg;
                };
+               next unless $src;
                /^Package:\s*(.+?)\s*$/ and do {
                        $pkg = {};
                        $pkg->{src} = $src;
                /^Package:\s*(.+?)\s*$/ and do {
                        $pkg = {};
                        $pkg->{src} = $src;
@@ -76,7 +77,13 @@ sub parse_package_metadata($) {
                /^Provides: \s*(.+)\s*$/ and do {
                        my @vpkg = split /\s+/, $1;
                        foreach my $vpkg (@vpkg) {
                /^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 @{$package{$vpkg}->{vdepends}}, $pkg->{name};
                        }
                };
@@ -96,7 +103,7 @@ sub parse_package_metadata($) {
                                $type =~ /ipkg/ and $pkg->{tristate} = 1;
                        }
                };
                                $type =~ /ipkg/ and $pkg->{tristate} = 1;
                        }
                };
-               /^Config: \s*(.*)\s*$/ and $pkg->{config} = "$1\n".get_multiline(*FILE);
+               /^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};
@@ -115,7 +122,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.022867 seconds and 4 git commands to generate.