Package: libpdf-api2-perl / 2.033-1

reproducible-resources.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Description: Remove '~'.time() from internal font IDs
 Adding '~'.time() is not necessary because the identifiers already include
 the result of the pdfkey() function, which gives increasing numbers through
 a process lifetime.
 .
 Keeping '~'.time() only makes the output unreproducible and adds a slight
 performance penalty for thesyscall needed to get the current time.
Bug: https://rt.cpan.org/Ticket/Display.html?id=113084
Bug-Debian: https://bugs.debian.org/818363
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=113084
Author: Damyan Ivanov <dmn@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2016-10-31
Applied-Upstream: no. rejected.

--- a/lib/PDF/API2/Resource/CIDFont/TrueType.pm
+++ b/lib/PDF/API2/Resource/CIDFont/TrueType.pm
@@ -39,7 +39,7 @@ sub new {
     my ($ff,$data)=PDF::API2::Resource::CIDFont::TrueType::FontFile->new($pdf,$file,@opts);
 
     $class = ref $class if ref $class;
-    my $self=$class->SUPER::new($pdf,$data->{apiname}.pdfkey().'~'.time());
+    my $self=$class->SUPER::new($pdf,$data->{apiname}.pdfkey());
     $pdf->new_obj($self) if(defined($pdf) && !$self->is_obj($pdf));
 
     $self->{' data'}=$data;
@@ -52,7 +52,7 @@ sub new {
 
     $de->{'FontDescriptor'} = $des;
     $de->{'Subtype'} = PDFName($self->iscff ? 'CIDFontType0' : 'CIDFontType2');
-    ## $de->{'BaseFont'} = PDFName(pdfkey().'+'.($self->fontname).'~'.time());
+    ## $de->{'BaseFont'} = PDFName(pdfkey().'+'.($self->fontname));
     $de->{'BaseFont'} = PDFName($self->fontname);
     $de->{'DW'} = PDFNum($self->missingwidth);
     if($opts{-noembed} != 1)
--- a/lib/PDF/API2/Resource/Font/BdFont.pm
+++ b/lib/PDF/API2/Resource/Font/BdFont.pm
@@ -57,7 +57,7 @@ sub new {
     my %opts=@opts;
 
     $class = ref $class if ref $class;
-    $self = $class->SUPER::new($pdf, sprintf('%s+Bdf%02i',pdfkey(),++$BmpNum).'~'.time());
+    $self = $class->SUPER::new($pdf, sprintf('%s+Bdf%02i',pdfkey(),++$BmpNum));
     $pdf->new_obj($self) unless($self->is_obj($pdf));
 
     # adobe bitmap distribution font
@@ -184,7 +184,7 @@ sub readBDF {
         $data->{bbox}{'.notdef'} = [0, 0, 0, 0];
     }
 
-    $data->{fontname}=pdfkey().pdfkey().'~'.time();
+    $data->{fontname}=pdfkey();
     $data->{apiname}=$data->{fontname};
     $data->{flags} = 34;
     $data->{fontbbox} = [ split(/\s+/,$data->{FONTBOUNDINGBOX}) ];
--- a/lib/PDF/API2/Resource/Font/CoreFont.pm
+++ b/lib/PDF/API2/Resource/Font/CoreFont.pm
@@ -164,7 +164,7 @@ sub new
     #}
 
     $class = ref $class if ref $class;
-    $self = $class->SUPER::new($pdf, $data->{apiname}.pdfkey().'~'.time());
+    $self = $class->SUPER::new($pdf, $data->{apiname}.pdfkey());
     $pdf->new_obj($self) unless($self->is_obj($pdf));
     $self->{' data'}=$data;
     $self->{-dokern}=1 if($opts{-dokern});
--- a/lib/PDF/API2/Resource/Font/Postscript.pm
+++ b/lib/PDF/API2/Resource/Font/Postscript.pm
@@ -29,7 +29,7 @@ sub new {
     }
 
     $class = ref $class if ref $class;
-    $self = $class->SUPER::new($pdf, $data->{apiname}.pdfkey().'~'.time());
+    $self = $class->SUPER::new($pdf, $data->{apiname}.pdfkey());
     $pdf->new_obj($self) unless($self->is_obj($pdf));
     $self->{' data'}=$data;
 
@@ -41,7 +41,7 @@ sub new {
     $self->{'FontDescriptor'}=$self->descrByData();
     if(-f $psfile)
     {
-        $self->{'BaseFont'} = PDFName(pdfkey().'+'.($self->fontname).'~'.time());
+        $self->{'BaseFont'} = PDFName(pdfkey().'+'.($self->fontname));
 
         my ($l1,$l2,$l3,$stream)=$self->readPFAPFB($psfile);