build: add GNU install to prerequisites
[openwrt/staging/hauke.git] / scripts / package-metadata.pl
index 76b09a56ebfedbeb3634880ff505a5220c7acd4d..02102be8f39dbf755e9331f8a938dfc9147d1d83 100755 (executable)
@@ -191,9 +191,9 @@ sub mconf_depends {
                                $depend = shift @vdeps;
 
                                if (@vdeps > 1) {
-                                       $condition = ($condition ? "$condition && " : '') . '!('.join("||", map { "PACKAGE_".$_ } @vdeps).')';
+                                       $condition = ($condition ? "$condition && " : '') . join("&&", map { "PACKAGE_$_<PACKAGE_$pkgname" } @vdeps);
                                } elsif (@vdeps > 0) {
-                                       $condition = ($condition ? "$condition && " : '') . '!PACKAGE_'.$vdeps[0];
+                                       $condition = ($condition ? "$condition && " : '') . "PACKAGE_${vdeps[0]}<PACKAGE_$pkgname";
                                }
                        }
 
@@ -532,19 +532,16 @@ sub gen_package_auxiliary() {
                if ($pkg->{name} && $pkg->{repository}) {
                        print "Package/$name/subdir = $pkg->{repository}\n";
                }
-               if ($pkg->{name} && defined($pkg->{abiversion}) && length($pkg->{abiversion})) {
-                       my $abiv;
-
-                       if ($pkg->{abiversion} =~ m!^(\d{4})-(\d{2})-(\d{2})-[0-9a-f]{7,40}$!) {
-                               print STDERR "WARNING: Reducing ABI version '$pkg->{abiversion}' of package '$name' to '$1$2$3'\n";
-                               $abiv = "$1$2$3";
-                       }
-                       else {
-                               $abiv = $pkg->{abiversion};
+               my %depends;
+               foreach my $dep (@{$pkg->{depends} || []}) {
+                       if ($dep =~ m!^\+?(?:[^:]+:)?([^@]+)$!) {
+                               $depends{$1}++;
                        }
-
+               }
+               my @depends = sort keys %depends;
+               if (@depends > 0) {
                        foreach my $n (@{$pkg->{provides}}) {
-                               print "Package/$n/abiversion = $abiv\n";
+                               print "Package/$n/depends = @depends\n";
                        }
                }
        }