[SCM] Debian Qt/KDE packaging tools branch, improved-gensymbols, updated. debian/0.5.3-32-g51b0e54

Modestas Vainius modax at alioth.debian.org
Sun Jan 17 22:16:59 UTC 2010


The following commit has been merged in the improved-gensymbols branch:
commit 6c9c9937ab22601fb7377cc18aa28bc0fef87012
Author: Modestas Vainius <modestas at vainius.eu>
Date:   Sun Jan 17 20:18:23 2010 +0200

    Add copyright notices and retab.
---
 .../Debian/PkgKde/SymbolsHelper/CompileTest.pm     |   33 ++++++---
 symbolshelper/Debian/PkgKde/SymbolsHelper/Patch.pm |   15 ++++
 .../Debian/PkgKde/SymbolsHelper/String.pm          |   15 ++++
 symbolshelper/Debian/PkgKde/SymbolsHelper/Subst.pm |   15 ++++
 .../Debian/PkgKde/SymbolsHelper/Substs.pm          |   15 ++++
 .../PkgKde/SymbolsHelper/Substs/TypeSubst.pm       |   39 +++++++---
 .../PkgKde/SymbolsHelper/Substs/VirtTable.pm       |   75 ++++++++++++--------
 .../Debian/PkgKde/SymbolsHelper/Symbol.pm          |   15 ++++
 .../Debian/PkgKde/SymbolsHelper/SymbolFile.pm      |   15 ++++
 .../PkgKde/SymbolsHelper/SymbolFileCollection.pm   |   15 ++++
 10 files changed, 201 insertions(+), 51 deletions(-)

diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/CompileTest.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/CompileTest.pm
index 0274248..b91dc4a 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/CompileTest.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/CompileTest.pm
@@ -1,3 +1,18 @@
+# Copyright (C) 2008-2010 Modestas Vainius <modax at debian.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>
+
 package Debian::PkgKde::SymbolsHelper::CompileTest;
 
 use strict;
@@ -17,24 +32,24 @@ sub new {
     error("Unable to create a temporary directory for test compilation") unless $tmpdir;
 
     if ($compiler =~ /gcc/) {
-        $sourcefile .= ".c";
+	$sourcefile .= ".c";
     } elsif ($compiler =~ /g\+\+/) {
-        $sourcefile  .= ".cpp";
+	$sourcefile  .= ".cpp";
     } else {
-        error("Unrecognized compiler: $compiler");
+	error("Unrecognized compiler: $compiler");
     }
     $sourcefile = File::Spec::catfile($tmpdir, $sourcefile);
 
     if ($lib) {
-        $cmd = "$compiler -shared -fPIC";
-        $out .= ".so";
+	$cmd = "$compiler -shared -fPIC";
+	$out .= ".so";
     } else {
-        $cmd = "$compiler";
+	$cmd = "$compiler";
     }
     $out = File::Spec::catfile($tmpdir, $out);
 
     my $self = bless { tmpdir => $tmpdir,
-        sourcefile => $sourcefile, out => $out }, $cls;
+	sourcefile => $sourcefile, out => $out }, $cls;
     $self->set_cmd($cmd);
     return $self;
 }
@@ -48,9 +63,9 @@ sub compile {
     my ($self, $sourcecode) = @_;
 
     open(SOURCE, ">", $self->{sourcefile})
-        or error("Unable to open temporary source file for writing: $self->{sourcefile}");
+	or error("Unable to open temporary source file for writing: $self->{sourcefile}");
     print SOURCE $sourcecode
-        or error("Unable to write to temporary source file $self->{sourcefile}");
+	or error("Unable to write to temporary source file $self->{sourcefile}");
     close(SOURCE);
 
     system($self->{cmd}) == 0 or error("Compilation failed: $self->{cmd}");
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/Patch.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/Patch.pm
index b221ab6..9b3f2e7 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/Patch.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/Patch.pm
@@ -1,3 +1,18 @@
+# Copyright (C) 2008-2010 Modestas Vainius <modax at debian.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>
+
 package Debian::PkgKde::SymbolsHelper::Patch;
 
 use strict;
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/String.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/String.pm
index 65b71c4..ef3db9d 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/String.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/String.pm
@@ -1,3 +1,18 @@
+# Copyright (C) 2008-2010 Modestas Vainius <modax at debian.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>
+
 package Debian::PkgKde::SymbolsHelper::String;
 
 use strict;
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/Subst.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/Subst.pm
index d4aa202..7b2b926 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/Subst.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/Subst.pm
@@ -1,3 +1,18 @@
+# Copyright (C) 2008-2010 Modestas Vainius <modax at debian.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>
+
 package Debian::PkgKde::SymbolsHelper::Subst;
 
 use strict;
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/Substs.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/Substs.pm
index 7bef70a..b10b522 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/Substs.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/Substs.pm
@@ -1,3 +1,18 @@
+# Copyright (C) 2008-2010 Modestas Vainius <modax at debian.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>
+
 package Debian::PkgKde::SymbolsHelper::Substs;
 
 use strict;
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm
index 156715a..63ffb50 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm
@@ -1,3 +1,18 @@
+# Copyright (C) 2008-2010 Modestas Vainius <modax at debian.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>
+
 package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst;
 
 use strict;
@@ -13,12 +28,12 @@ sub neutralize {
     my ($self, $rawname) = @_;
     my $ret = 0;
     my $str = "$rawname";
-    
+
     return undef unless exists $self->{type_re};
 
     while ($str =~ /$self->{type_re}/g) {
-        $rawname->substr(pos($str)-1, 1, $self->{main_type});
-        $ret = 1;
+	$rawname->substr(pos($str)-1, 1, $self->{main_type});
+	$ret = 1;
     }
     return ($ret) ? $rawname : undef;
 }
@@ -32,11 +47,11 @@ sub detect {
 
     # Find architecture with other type
     foreach my $a2 (keys %$arch_rawnames) {
-        $t2 = $self->expand($a2);
-        if ($t2 ne $t1) {
-            $s2 = $arch_rawnames->{$a2};
-            last;
-        }
+	$t2 = $self->expand($a2);
+	if ($t2 ne $t1) {
+	    $s2 = $arch_rawnames->{$a2};
+	    last;
+	}
     }
 
     return undef unless defined $s2;
@@ -46,10 +61,10 @@ sub detect {
     my @s2 = split(//, $s2);
     my $ret = 0;
     for (my $i = 0; $i <= $#s1; $i++) {
-        if ($s1[$i] eq $t1 && $s2[$i] eq $t2) {
-            $rawname->substr($i, 1, $self->{main_type}, $self->{substvar});
-            $ret = 1;
-        }
+	if ($s1[$i] eq $t1 && $s2[$i] eq $t2) {
+	    $rawname->substr($i, 1, $self->{main_type}, $self->{substvar});
+	    $ret = 1;
+	}
     }
     return ($ret) ? $rawname : undef;
 }
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/Substs/VirtTable.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/Substs/VirtTable.pm
index 6399a00..7346bb8 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/Substs/VirtTable.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/Substs/VirtTable.pm
@@ -1,3 +1,18 @@
+# Copyright (C) 2008-2010 Modestas Vainius <modax at debian.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>
+
 package Debian::PkgKde::SymbolsHelper::Substs::VirtTable;
 
 use strict;
@@ -39,25 +54,25 @@ sub find_ztc_offset {
 
     my @matches = ($rawname =~ m/(\d+)_/gc);
     if (!@matches) {
-        error("Invalid construction table symbol: $rawname");
+	error("Invalid construction table symbol: $rawname");
     } elsif (@matches == 1) {
-        # Found it
-        return (pos($rawname) - length($1) - 1, $1);
+	# Found it
+	return (pos($rawname) - length($1) - 1, $1);
     } else {
-        # The idea behind the algorithm is that c++filt output does not
-        # change when an offset is changed.
-        $rawname =~ s/@[^@]+$//;
-        my $demangled = cppfilt_demangle($rawname, 'auto');
-        pos($rawname) = undef;
-        while ($rawname =~ m/(\d+)_/g) {
-            my $offset = $1;
-            my $pos = pos($rawname) - length($offset) - 1;
-            my $newsymbol = $rawname; 
-            substr($newsymbol, $pos, length($offset)) = $offset + 1234;
-            my $newdemangled = cppfilt_demangle($newsymbol, 'auto');
-            return ($pos, $offset) if (defined $newdemangled && $newdemangled eq $demangled);
-        }
-        error("Unable to determine construction table offset position in symbol '$rawname'");
+	# The idea behind the algorithm is that c++filt output does not
+	# change when an offset is changed.
+	$rawname =~ s/@[^@]+$//;
+	my $demangled = cppfilt_demangle($rawname, 'auto');
+	pos($rawname) = undef;
+	while ($rawname =~ m/(\d+)_/g) {
+	    my $offset = $1;
+	    my $pos = pos($rawname) - length($offset) - 1;
+	    my $newsymbol = $rawname;
+	    substr($newsymbol, $pos, length($offset)) = $offset + 1234;
+	    my $newdemangled = cppfilt_demangle($newsymbol, 'auto');
+	    return ($pos, $offset) if (defined $newdemangled && $newdemangled eq $demangled);
+	}
+	error("Unable to determine construction table offset position in symbol '$rawname'");
     }
 }
 
@@ -67,21 +82,21 @@ sub neutralize {
 
     # construction vtable: e.g. _ZTCN6KParts15DockMainWindow3E56_NS_8PartBaseE
     if ($rawname =~ /^_ZTC/) {
-        my ($pos, $num) = $self->find_ztc_offset($rawname);
-        $ret = $self->subvt($rawname, $num, $pos) if ($num > 0);
+	my ($pos, $num) = $self->find_ztc_offset($rawname);
+	$ret = $self->subvt($rawname, $num, $pos) if ($num > 0);
     } elsif ($rawname =~ /^_ZThn(\d+)_/) {
-        # non-virtual base override: e.g. _ZThn8_N6KParts13ReadWritePartD0Ev
-        my $num = $1;
-        $ret = $self->subvt($rawname, $num, 5) if ($num > 0);
+	# non-virtual base override: e.g. _ZThn8_N6KParts13ReadWritePartD0Ev
+	my $num = $1;
+	$ret = $self->subvt($rawname, $num, 5) if ($num > 0);
     } elsif ($rawname =~ /^_ZTvn?(\d+)_(n?\d+)/) {
-        # virtual base override, with vcall offset, e.g. _ZTv0_n12_N6KParts6PluginD0Ev
-        my $voffset = $1;
-        my $num = $2;
-        my $numoffset = 4 + length("$voffset") + 1 + (($num =~ /^n/) ? 1 : 0);
-        $num =~ s/^n//;
-
-        $ret = $self->subvt($rawname, $voffset, 4) if ($voffset > 0);
-        $ret = $self->subvt($rawname, $num, $numoffset) || $ret if ($num > 0);
+	# virtual base override, with vcall offset, e.g. _ZTv0_n12_N6KParts6PluginD0Ev
+	my $voffset = $1;
+	my $num = $2;
+	my $numoffset = 4 + length("$voffset") + 1 + (($num =~ /^n/) ? 1 : 0);
+	$num =~ s/^n//;
+
+	$ret = $self->subvt($rawname, $voffset, 4) if ($voffset > 0);
+	$ret = $self->subvt($rawname, $num, $numoffset) || $ret if ($num > 0);
     }
     return ($ret) ? $rawname : undef;
 }
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/Symbol.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/Symbol.pm
index b83d512..684a12a 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/Symbol.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/Symbol.pm
@@ -1,3 +1,18 @@
+# Copyright (C) 2008-2010 Modestas Vainius <modax at debian.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>
+
 package Debian::PkgKde::SymbolsHelper::Symbol;
 
 use strict;
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/SymbolFile.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/SymbolFile.pm
index 46d2248..2189a2b 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/SymbolFile.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/SymbolFile.pm
@@ -1,3 +1,18 @@
+# Copyright (C) 2008-2010 Modestas Vainius <modax at debian.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>
+
 package Debian::PkgKde::SymbolsHelper::SymbolFile;
 
 use strict;
diff --git a/symbolshelper/Debian/PkgKde/SymbolsHelper/SymbolFileCollection.pm b/symbolshelper/Debian/PkgKde/SymbolsHelper/SymbolFileCollection.pm
index 721f48a..5190866 100644
--- a/symbolshelper/Debian/PkgKde/SymbolsHelper/SymbolFileCollection.pm
+++ b/symbolshelper/Debian/PkgKde/SymbolsHelper/SymbolFileCollection.pm
@@ -1,3 +1,18 @@
+# Copyright (C) 2008-2010 Modestas Vainius <modax at debian.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>
+
 package Debian::PkgKde::SymbolsHelper::SymbolFileCollection;
 
 use strict;

-- 
Debian Qt/KDE packaging tools



More information about the pkg-kde-commits mailing list