Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/DateTime-Tiny/files/, dev-perl/DateTime-Tiny/
Date: Sun, 28 Feb 2016 19:04:47
Message-Id: 1456659852.1f4d88f9e6423d634e37cb35ba43940ff86bc51a.monsieurp@gentoo
1 commit: 1f4d88f9e6423d634e37cb35ba43940ff86bc51a
2 Author: Kent Fredric <kentfredric <AT> gmail <DOT> com>
3 AuthorDate: Sun Feb 28 11:11:44 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 28 11:44:12 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f4d88f9
7
8 dev-perl/DateTime-Tiny: Fix test bug w/ new DateTime::Locale
9
10 See https://rt.cpan.org/Public/Bug/Display.html?id=108636
11
12 Only affects tests.
13
14 Package-Manager: portage-2.2.27
15
16 dev-perl/DateTime-Tiny/DateTime-Tiny-1.40.0.ebuild | 4 ++-
17 dev-perl/DateTime-Tiny/files/1.04-locale-c.patch | 34 ++++++++++++++++++++++
18 2 files changed, 37 insertions(+), 1 deletion(-)
19
20 diff --git a/dev-perl/DateTime-Tiny/DateTime-Tiny-1.40.0.ebuild b/dev-perl/DateTime-Tiny/DateTime-Tiny-1.40.0.ebuild
21 index 8cb041c..caa1627 100644
22 --- a/dev-perl/DateTime-Tiny/DateTime-Tiny-1.40.0.ebuild
23 +++ b/dev-perl/DateTime-Tiny/DateTime-Tiny-1.40.0.ebuild
24 @@ -1,4 +1,4 @@
25 -# Copyright 1999-2015 Gentoo Foundation
26 +# Copyright 1999-2016 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 # $Id$
29
30 @@ -14,5 +14,7 @@ SLOT="0"
31 KEYWORDS="~amd64"
32 IUSE="test"
33 SRC_TEST=do
34 +# https://rt.cpan.org/Public/Bug/Display.html?id=108636
35 +PATCHES=( "${FILESDIR}/${MODULE_VERSION}-locale-c.patch" )
36 DEPEND="virtual/perl-ExtUtils-MakeMaker
37 test? ( virtual/perl-Test-Simple )"
38
39 diff --git a/dev-perl/DateTime-Tiny/files/1.04-locale-c.patch b/dev-perl/DateTime-Tiny/files/1.04-locale-c.patch
40 new file mode 100644
41 index 0000000..9276f7d
42 --- /dev/null
43 +++ b/dev-perl/DateTime-Tiny/files/1.04-locale-c.patch
44 @@ -0,0 +1,34 @@
45 +From b03f13d762d577a3f4774c0ed64b8d376c74da9a Mon Sep 17 00:00:00 2001
46 +From: Nigel Gregoire <nigelg@××××.com>
47 +Date: Mon, 11 Jan 2016 12:00:06 -0800
48 +Subject: [PATCH] Fix locale test for newer DateTime::Locale
49 +
50 +As of v1.00, DateTime::Locale uses "en-US-POSIX" instead of "C".
51 +---
52 + t/02_main.t | 6 +++++-
53 + 1 file changed, 5 insertions(+), 1 deletion(-)
54 +
55 +diff --git a/t/02_main.t b/t/02_main.t
56 +index 18bd8d1..6c2b371 100644
57 +--- a/t/02_main.t
58 ++++ b/t/02_main.t
59 +@@ -10,6 +10,7 @@ BEGIN {
60 +
61 + use Test::More tests => 31;
62 + use DateTime::Tiny;
63 ++use version 0.77;
64 +
65 +
66 +
67 +@@ -76,7 +77,10 @@ SKIP: {
68 + # Expand to a DateTime
69 + my $dt = $date->DateTime;
70 + isa_ok( $dt, 'DateTime' );
71 +- is( $dt->locale->id, 'C', '->locate ok' );
72 ++ # DateTime::Locale version 1.00 changes "C" to "en-US-POSIX".
73 ++ my $expected = version->parse($DateTime::Locale::VERSION) < version->parse("1.00")
74 ++ ? "C" : "en-US-POSIX";
75 ++ is( $dt->locale->id, $expected, '->locale ok' );
76 + is( $dt->time_zone->name, 'floating', '->timezone ok' );
77 +
78 + # Compare accessor results