You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.6 KiB
55 lines
1.6 KiB
4 years ago
|
From 5650e9d07940825507e65ae71d30c4579ffea353 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||
|
Date: Mon, 10 Jul 2017 15:12:17 +0200
|
||
|
Subject: [PATCH] Inject DT::TZ version when generating modules
|
||
|
|
||
|
This is implemented with new parse_olson --dtdzversion option.
|
||
|
---
|
||
|
tools/parse_olson | 9 ++++++++-
|
||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/tools/parse_olson b/tools/parse_olson
|
||
|
index c948de8..ff9c1f6 100755
|
||
|
--- a/tools/parse_olson
|
||
|
+++ b/tools/parse_olson
|
||
|
@@ -32,6 +32,7 @@ GetOptions(
|
||
|
'dir:s' => \$opts{dir},
|
||
|
'clean' => \$opts{clean},
|
||
|
'version:s' => \$opts{version},
|
||
|
+ 'dttzversion:s' => \$opts{dttzversion},
|
||
|
'old' => \$opts{old},
|
||
|
'file:s' => \$opts{file},
|
||
|
'name:s' => \$opts{name},
|
||
|
@@ -47,6 +48,8 @@ $opts{help} = 1
|
||
|
|
||
|
$opts{version} ||= 'test';
|
||
|
|
||
|
+$opts{dttversion} ||= '0';
|
||
|
+
|
||
|
if ( $opts{help} ) {
|
||
|
print <<'EOF';
|
||
|
|
||
|
@@ -65,6 +68,10 @@ It takes the following arguments:
|
||
|
--version The version of the Olson data files being used.
|
||
|
Required unless one of the debugging options is given.
|
||
|
|
||
|
+ --dttzversion
|
||
|
+ The version of the DateTime-TimeZone distribution to inject into
|
||
|
+ each generated module as its version. Default is 0.
|
||
|
+
|
||
|
--clean Remove old generated modules (which may not be valid with
|
||
|
the latest Olson database)
|
||
|
|
||
|
@@ -208,7 +215,7 @@ $autogen_warning
|
||
|
# Do not edit this file directly.
|
||
|
#
|
||
|
$pkg_keyword DateTime::TimeZone::$mod_name;
|
||
|
-
|
||
|
+\$DateTime::TimeZone::${mod_name}::VERSION = '$opts{dttzversion}';
|
||
|
use strict;
|
||
|
|
||
|
use Class::Singleton 1.03;
|
||
|
--
|
||
|
1.8.3.1
|
||
|
|