very preliminary support for building from tzdata
[pkg-perl/packages/libtime-olsontz-data-perl.git] / debian / patches / tzdata.patch
1 Description: use tzfiles from tzdata package
2 Origin: vendor
3 Forwarded: not-needed
4 Author: gregor herrmann <gregoa@debian.org>
5 Last-Update: 2014-03-20
6
7 --- a/lib/Time/OlsonTZ/Data.pm
8 +++ b/lib/Time/OlsonTZ/Data.pm
9 @@ -42,6 +42,7 @@
10  { use 5.006; }
11  use warnings;
12  use strict;
13 +use File::Spec;
14  
15  our $VERSION = "0.201401";
16  
17 @@ -58,7 +59,6 @@
18  sub _data_file($) {
19         my($upath) = @_;
20         unless(defined $datadir) {
21 -               require File::Spec;
22                 ($datavol, $datadir, undef) =
23                         File::Spec->splitpath($INC{"Time/OlsonTZ/Data.pm"});
24         }
25 @@ -539,7 +539,7 @@
26                 Carp::croak("no such timezone `$tzname' ".
27                         "in the Olson @{[olson_version]} database");
28         }
29 -       return _data_file($tzname.".tz");
30 +       return File::Spec->catfile('/usr/share/zoneinfo', $tzname);
31  }
32  
33  =back
34 --- a/lib/Time/OlsonTZ/Data.pm.tpl
35 +++ b/lib/Time/OlsonTZ/Data.pm.tpl
36 @@ -42,6 +42,7 @@
37  { use 5.006; }
38  use warnings;
39  use strict;
40 +use File::Spec;
41  
42  our $VERSION = "0.<?version_numeric?>";
43  
44 @@ -58,7 +59,6 @@
45  sub _data_file($) {
46         my($upath) = @_;
47         unless(defined $datadir) {
48 -               require File::Spec;
49                 ($datavol, $datadir, undef) =
50                         File::Spec->splitpath($INC{"Time/OlsonTZ/Data.pm"});
51         }
52 @@ -278,7 +278,7 @@
53                 Carp::croak("no such timezone `$tzname' ".
54                         "in the Olson @{[olson_version]} database");
55         }
56 -       return _data_file($tzname.".tz");
57 +       return File::Spec->catfile('/usr/share/zoneinfo', $tzname);
58  }
59  
60  =back