aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/metadata.pl2
-rw-r--r--scripts/metadata.pm1
2 files changed, 2 insertions, 1 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 79f930c5ea..4014613de6 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -684,7 +684,7 @@ sub gen_package_mk() {
$pkg->{buildonly} and $config = "";
print "package-$config += $pkg->{subdir}$pkg->{src}\n";
if ($pkg->{variant}) {
- if (!defined($done{$pkg->{src}})) {
+ if (!defined($done{$pkg->{src}}) or $pkg->{variant_default}) {
print "\$(curdir)/$pkg->{subdir}$pkg->{src}/default-variant := $pkg->{variant}\n";
}
print "\$(curdir)/$pkg->{subdir}$pkg->{src}/variants += \$(if $config,$pkg->{variant})\n"
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index 0e55c8ebed..ab5abc0363 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -115,6 +115,7 @@ sub parse_package_metadata($) {
/^Depends: \s*(.+)\s*$/ and $pkg->{depends} = [ split /\s+/, $1 ];
/^Hidden: \s*(.+)\s*$/ and $pkg->{hidden} = 1;
/^Build-Variant: \s*([\w\-]+)\s*/ and $pkg->{variant} = $1;
+ /^Default-Variant: .*/ and $pkg->{variant_default} = 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 ];