diff options
author | Michael Schroeder <mls@suse.de> | 2012-10-29 12:14:41 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-10-29 12:14:41 +0100 |
commit | f83e273bca0b64b145d1633a300376a7c6b10f0a (patch) | |
tree | 62c64ef7b7aab6dd15bf9f803a3adf78fc2b13e9 | |
parent | cca643cb1db7d887d1025da01ec42e971c5609fb (diff) | |
download | build-f83e273bca0b64b145d1633a300376a7c6b10f0a.tar.gz build-f83e273bca0b64b145d1633a300376a7c6b10f0a.tar.bz2 build-f83e273bca0b64b145d1633a300376a7c6b10f0a.zip |
Support 'Constraint:' directive
-rw-r--r-- | Build.pm | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -202,6 +202,7 @@ sub read_config { $config->{'repotype'} = []; $config->{'patterntype'} = []; $config->{'fileprovides'} = {}; + $config->{'constraint'} = []; for my $l (@spec) { $l = $l->[1] if ref $l; next unless defined $l; @@ -288,6 +289,13 @@ sub read_config { push @macros, "%define _target_cpu ".(split('-', $config->{'target'}))[0] if $config->{'target'}; } elsif ($l0 eq 'hostarch:') { $config->{'hostarch'} = join(' ', @l); + } elsif ($l0 eq 'constraint:') { + my $l = join(' ', @l); + if ($l eq '!*') { + $config->{'constraint'} = []; + } else { + push @{$config->{'constraint'}}, $l; + } } elsif ($l0 !~ /^[#%]/) { warn("unknown keyword in config: $l0\n"); } |