fixes PR python/18299, python/18285. - Add gdb-s390-reorder-arch.diff [bnc #936050] - Added patches for fate#318039, s390 z13 support: 0001-S390-Add-target-descriptions-for-vector-register-set.patch 0002-S390-Add-vector-register-support-to-gdb.patch 0003-S390-Add-vector-register-support-to-gdbserver.patch 0004-S390-Vector-register-test-case.patch 0005-S390-Name-invisible-registers-with-the-empty-string-.patch OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=124
75 lines
1.8 KiB
Perl
75 lines
1.8 KiB
Perl
#!/usr/bin/perl
|
|
|
|
die "need gdb-Fedora directory" unless -d $ARGV[0];
|
|
|
|
my $gdbFedora = $ARGV[0];
|
|
my $dir = `pwd`;
|
|
chomp($dir);
|
|
|
|
system "rm \$(grep \"^Patch[0-9]\\{1,3\\}:\" gdb.spec | cut -d\" \" -f 2) 2>/dev/null";
|
|
system "rm *.tar.bz2";
|
|
system "cp $gdbFedora/*.tar.bz2 ./";
|
|
system "pushd $gdbFedora ; sh $dir/patchname_get.sh -v gdb.spec 2>$dir/test.txt; popd";
|
|
system "grep \"^Patch\" test.txt > test2.txt";
|
|
|
|
my @patchliste = `cat test2.txt`;
|
|
my @patchdeklarationen = ();
|
|
my @patchstatements = ();
|
|
my %seenpatches = ();
|
|
my $blockcounter = 0;
|
|
my @patchcopy = ();
|
|
|
|
foreach my $line (@patchliste) {
|
|
chomp($line);
|
|
if ($line =~ /\((.*)\)/) {
|
|
$patchname = $1;
|
|
if (exists $seenpatches{$patchname}){
|
|
my $oldcount = $seenpatches{$patchname};
|
|
push @patchstatements, "%patch$oldcount -p1 -R\n";
|
|
}
|
|
else {
|
|
$count = $count + 1;
|
|
push @patchdeklarationen, "Patch$count: ". (($count < 10) ? " " : (($count < 100) ? " " : "")) ."$patchname\n";
|
|
push @patchstatements, "%patch$count -p1\n";
|
|
$seenpatches{$patchname} = $count;
|
|
push @patchcopy, $patchname;
|
|
}
|
|
}
|
|
}
|
|
|
|
foreach my $copy (@patchcopy) {
|
|
system "cp \"$gdbFedora/$copy\" ./";
|
|
}
|
|
|
|
open F, ">gdb.spec.new";
|
|
foreach my $line (`cat gdb.spec`) {
|
|
if ($line eq "#Fedora Packages begin\n") {
|
|
print F $line;
|
|
$blockcounter = 1;
|
|
}
|
|
elsif ($line eq "#Fedora Packages end\n") {
|
|
$blockcounter = 0;
|
|
}
|
|
elsif($line eq "#Fedora patching start\n") {
|
|
print F $line;
|
|
$blockcounter = 3;
|
|
}
|
|
elsif($line eq "#Fedora patching end\n") {
|
|
$blockcounter = 0;
|
|
}
|
|
if ($blockcounter == 0){
|
|
print F $line;
|
|
} elsif ($blockcounter == 1) {
|
|
print F @patchdeklarationen;
|
|
$blockcounter = 2;
|
|
} elsif ($blockcounter == 3) {
|
|
print F @patchstatements;
|
|
$blockcounter = 4;
|
|
}
|
|
}
|
|
close F;
|
|
|
|
system "mv gdb.spec.new gdb.spec";
|
|
system "rm test.txt test2.txt";
|
|
system "osc addremove";
|