diff --git a/licenses_changes.txt b/licenses_changes.txt index 7aeebb7..c2ee98a 100644 --- a/licenses_changes.txt +++ b/licenses_changes.txt @@ -1,3 +1,4 @@ +SPDX Name in Spec File AAL AAL AFL-2.1 Academic Free License 2.1 AGPL-3.0 Affero GPL @@ -288,7 +289,6 @@ MS-PL Ms-Pl MS-PL MS-PL MS-RL MS-RL Multics Multics -SPDX Name in Spec File NASA-1.3 NASA-1.3 Naumen Naumen NCSA NCSA diff --git a/obs-service-format_spec_file.changes b/obs-service-format_spec_file.changes index 3e8307b..b3b8073 100644 --- a/obs-service-format_spec_file.changes +++ b/obs-service-format_spec_file.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Dec 7 14:04:46 UTC 2011 - coolo@suse.com + +- move pkgconfig() and co to the end of the buildrequires + ------------------------------------------------------------------- Wed Dec 7 08:22:29 UTC 2011 - coolo@suse.com diff --git a/prepare_spec b/prepare_spec index c954a9d..6393469 100644 --- a/prepare_spec +++ b/prepare_spec @@ -231,6 +231,18 @@ sub set_current_pkg { return ($curpack, $curlang); } +sub sort_buildrequires_helper { + if (($a =~ /^[^#]*\(/) != ($b =~ /^[^#]*\(/)) { + if ($a =~ /^[^#]*\(/) { + 1; + } else { + -1; + } + } else { + $a cmp $b; + } +} + sub read_and_parse_old_spec { my ( $specfile, $base_package ) = @_; my $current_package = $base_package; @@ -614,9 +626,9 @@ while ($linesmoved) { } else { # if there are already buildrequires, we need to sort and exit if (@buildrequires > 0) { - my @sortedbrs = sort(@buildrequires); + my @sortedbrs = sort sort_buildrequires_helper @buildrequires; $linesmoved = !compare_arrays(\@buildrequires, \@sortedbrs); - @oldspec = (@firstlines, sort(@buildrequires), $l, @oldspec); + @oldspec = (@firstlines, @sortedbrs, $l, @oldspec); @firstlines = (); @buildrequires = (); last;