[SCM] Debian packaging of libfont-ttf-perl branch, master, updated. cc73b19a6bd127d0b0375d7071586d833c23490c
gregor herrmann
gregoa at debian.org
Sat Aug 18 14:48:29 UTC 2012
The following commit has been merged in the master branch:
commit fab69ba77511c3803b37dcc6da13f500bd9140af
Author: gregor herrmann <gregoa at debian.org>
Date: Sat Aug 18 16:46:47 2012 +0200
Add 2 patches to avoid warnings about uninitialized values and unnecessary defined() calls.
Thanks: Jeffrey Ratcliffe for the bug reports and the patches.
Closes: #658653, #679637
diff --git a/debian/patches/series b/debian/patches/series
index 865fdf6..c1cc361 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
fix-pod.patch
fix-spelling.patch
+warnings-uninitialized.patch
+warnings-defined.patch
diff --git a/debian/patches/warnings-defined.patch b/debian/patches/warnings-defined.patch
new file mode 100644
index 0000000..cf4eacd
--- /dev/null
+++ b/debian/patches/warnings-defined.patch
@@ -0,0 +1,37 @@
+Description: fix warnings about unnecessary defined() calls in perl 5.16
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/679637
+Forwarded: unknown
+Author: Jeffrey Ratcliffe <jeffrey.ratcliffe at gmail.com>
+Reviewed-by: gregor herrmann <gregoa at debian.org>
+Last-Update: 2012-08-18
+
+--- a/lib/Font/TTF/Name.pm
++++ b/lib/Font/TTF/Name.pm
+@@ -142,7 +142,7 @@
+ {
+ if ($pid == 1 && defined $apple_encodings[0][$eid])
+ { $dat = TTF_word_utf8(pack("n*", map({$apple_encodings[0][$eid][$_]} unpack("C*", $dat)))); }
+- elsif ($pid == 2 && $eid == 2 && defined @cp_1252)
++ elsif ($pid == 2 && $eid == 2 && @cp_1252)
+ { $dat = TTF_word_utf8(pack("n*", map({$cp_1252[0][$_]} unpack("C*", $dat)))); }
+ elsif ($pid == 0 || $pid == 3 || ($pid == 2 && $eid == 1))
+ { $dat = TTF_word_utf8($dat); }
+@@ -185,7 +185,7 @@
+ { $str_trans = pack("C*",
+ map({$apple_encodings[1][$eid]{$_} || 0x3F} unpack("n*",
+ TTF_utf8_word($str_trans)))); }
+- elsif ($pid == 2 && $eid == 2 && defined @cp_1252)
++ elsif ($pid == 2 && $eid == 2 && @cp_1252)
+ { $str_trans = pack("C*",
+ map({$cp_1252[1][$eid]{$_} || 0x3F} unpack("n*",
+ TTF_utf8_word($str_trans)))); }
+@@ -292,7 +292,7 @@
+ {
+ my ($self, $pid, $eid) = @_;
+
+- return ($utf8 && ($pid == 0 || $pid == 3 || ($pid == 2 && ($eid != 2 || defined @cp_1252))
++ return ($utf8 && ($pid == 0 || $pid == 3 || ($pid == 2 && ($eid != 2 || @cp_1252))
+ || ($pid == 1 && defined $apple_encodings[$eid])));
+ }
+
diff --git a/debian/patches/warnings-uninitialized.patch b/debian/patches/warnings-uninitialized.patch
new file mode 100644
index 0000000..a2208ff
--- /dev/null
+++ b/debian/patches/warnings-uninitialized.patch
@@ -0,0 +1,40 @@
+Description: fix warnings about initialized values
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/658653
+Forwarded: unknown
+Author: Jeffrey Ratcliffe <Jeffrey.Ratcliffe at gmail.com>
+Reviewed-by: gregor herrmann <gregoa at debian.org>
+Last-Update: 2012-08-18
+
+--- a/lib/Font/TTF/Glyph.pm
++++ b/lib/Font/TTF/Glyph.pm
+@@ -252,7 +252,7 @@
+ my ($fh) = $self->{' INFILE'};
+ my ($dat);
+
+- return $self if ($self->{' read'} > 0);
++ return $self if (defined($self->{' read'}) and $self->{' read'} > 0);
+ $self->{' read'} = 1;
+ $fh->seek($self->{' LOC'} + $self->{' BASE'}, 0);
+ $fh->read($self->{' DAT'}, $self->{' LEN'});
+--- a/lib/Font/TTF/Cmap.pm
++++ b/lib/Font/TTF/Cmap.pm
+@@ -326,11 +326,15 @@
+
+ if ($s->{'Format'} == 0)
+ {
+- $fh->print(pack("C256", @{$s->{'val'}}{0 .. 255}));
++ for (0 .. 255) {
++ $fh->print(pack("C1", $s->{'val'}{$_})) if (defined $s->{'val'}{$_});
++ }
+ } elsif ($s->{'Format'} == 6)
+ {
+- $fh->print(pack("n2", $keys[0], $keys[-1] - $keys[0] + 1));
+- $fh->print(pack("n*", @{$s->{'val'}}{$keys[0] .. $keys[-1]}));
++ $fh->print(pack("n2", $keys[0], scalar(@keys)));
++ for (@keys) {
++ $fh->print(pack("n1", $s->{'val'}{$_}));
++ }
+ } elsif ($s->{'Format'} == 2) # Contributed by Huw Rogers
+ {
+ my ($g, $k, $h, $l, $m, $n);
--
Debian packaging of libfont-ttf-perl
More information about the Pkg-perl-cvs-commits
mailing list