Blame SOURCES/DateTime-TimeZone-1.70-Inject-DT-TZ-version-when-generating-modules.patch

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