fix multiple ipkg builds of the same arch but with different targets in the same...
[openwrt/svn-archive/archive.git] / scripts / metadata.pm
index 97746809a4698b6e428c3a16fdb2a6516e1aa109..65ba0b890d05e8834cc1c9af205a4fec9585ec1e 100644 (file)
@@ -60,9 +60,11 @@ sub parse_package_metadata($) {
                        $pkg->{src} = $src;
                        $pkg->{makefile} = $makefile;
                        $pkg->{name} = $1;
+                       $pkg->{title} = "";
                        $pkg->{default} = "m if ALL";
                        $pkg->{depends} = [];
                        $pkg->{builddepends} = [];
+                       $pkg->{buildtypes} = [];
                        $pkg->{subdir} = $subdir;
                        $pkg->{tristate} = 1;
                        $package{$1} = $pkg;
@@ -91,6 +93,8 @@ sub parse_package_metadata($) {
                /^Depends: \s*(.+)\s*$/ and $pkg->{depends} = [ split /\s+/, $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 ];
+               /^Build-Types:\s*(.+)\s*$/ and $pkg->{buildtypes} = [ split /\s+/, $1 ];
                /^Category: \s*(.+)\s*$/ and do {
                        $pkg->{category} = $1;
                        defined $category{$1} or $category{$1} = {};
@@ -105,7 +109,7 @@ sub parse_package_metadata($) {
                                $type =~ /ipkg/ and $pkg->{tristate} = 1;
                        }
                };
-               /^Config: \s*(.*)\s*$/ and $pkg->{config} = "$1\n".get_multiline(*FILE, "\t");
+               /^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};