Changeset 42654


Ignore:
Timestamp:
2014-09-23T12:41:15+02:00 (3 years ago)
Author:
nbd
Message:

build: allow packages with build variants to explicitly select a default variant

Signed-off-by: Felix Fietkau <nbd@…>

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/package-defaults.mk

    r42547 r42654  
    5454  URL:= 
    5555  VARIANT:= 
     56  DEFAULT_VARIANT:= 
    5657  USERID:= 
    5758endef 
  • trunk/include/package-dumpinfo.mk

    r42469 r42654  
    3535Provides: $(PROVIDES) 
    3636$(if $(VARIANT),Build-Variant: $(VARIANT) 
    37 )$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS) 
     37$(if $(DEFAULT_VARIANT),Default-Variant: $(VARIANT) 
     38))$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS) 
    3839)$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS) 
    3940)$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES) 
  • trunk/scripts/metadata.pl

    r42002 r42654  
    685685                        print "package-$config += $pkg->{subdir}$pkg->{src}\n"; 
    686686                        if ($pkg->{variant}) { 
    687                                 if (!defined($done{$pkg->{src}})) { 
     687                                if (!defined($done{$pkg->{src}}) or $pkg->{variant_default}) { 
    688688                                        print "\$(curdir)/$pkg->{subdir}$pkg->{src}/default-variant := $pkg->{variant}\n"; 
    689689                                } 
  • trunk/scripts/metadata.pm

    r42002 r42654  
    116116                /^Hidden: \s*(.+)\s*$/ and $pkg->{hidden} = 1; 
    117117                /^Build-Variant: \s*([\w\-]+)\s*/ and $pkg->{variant} = $1; 
     118                /^Default-Variant: .*/ and $pkg->{variant_default} = 1; 
    118119                /^Build-Only: \s*(.+)\s*$/ and $pkg->{buildonly} = 1; 
    119120                /^Build-Depends: \s*(.+)\s*$/ and $pkg->{builddepends} = [ split /\s+/, $1 ]; 
Note: See TracChangeset for help on using the changeset viewer.