summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Fredric <kentfredric@gmail.com>2016-02-29 00:11:44 +1300
committerKent Fredric <kentfredric@gmail.com>2016-02-29 00:44:12 +1300
commit1f4d88f9e6423d634e37cb35ba43940ff86bc51a (patch)
tree1b38ab7374f7ca8761f014144e15a4076b6fee6b /dev-perl/DateTime-Tiny
parentdev-perl/Type-Tiny-XS: Added to tree at version 0.12.0 (diff)
downloadgentoo-1f4d88f9e6423d634e37cb35ba43940ff86bc51a.tar.gz
gentoo-1f4d88f9e6423d634e37cb35ba43940ff86bc51a.tar.bz2
gentoo-1f4d88f9e6423d634e37cb35ba43940ff86bc51a.zip
dev-perl/DateTime-Tiny: Fix test bug w/ new DateTime::Locale
See https://rt.cpan.org/Public/Bug/Display.html?id=108636 Only affects tests. Package-Manager: portage-2.2.27
Diffstat (limited to 'dev-perl/DateTime-Tiny')
-rw-r--r--dev-perl/DateTime-Tiny/DateTime-Tiny-1.40.0.ebuild4
-rw-r--r--dev-perl/DateTime-Tiny/files/1.04-locale-c.patch34
2 files changed, 37 insertions, 1 deletions
diff --git a/dev-perl/DateTime-Tiny/DateTime-Tiny-1.40.0.ebuild b/dev-perl/DateTime-Tiny/DateTime-Tiny-1.40.0.ebuild
index 8cb041cf54e4..caa1627689fc 100644
--- a/dev-perl/DateTime-Tiny/DateTime-Tiny-1.40.0.ebuild
+++ b/dev-perl/DateTime-Tiny/DateTime-Tiny-1.40.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -14,5 +14,7 @@ SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
SRC_TEST=do
+# https://rt.cpan.org/Public/Bug/Display.html?id=108636
+PATCHES=( "${FILESDIR}/${MODULE_VERSION}-locale-c.patch" )
DEPEND="virtual/perl-ExtUtils-MakeMaker
test? ( virtual/perl-Test-Simple )"
diff --git a/dev-perl/DateTime-Tiny/files/1.04-locale-c.patch b/dev-perl/DateTime-Tiny/files/1.04-locale-c.patch
new file mode 100644
index 000000000000..9276f7d9f501
--- /dev/null
+++ b/dev-perl/DateTime-Tiny/files/1.04-locale-c.patch
@@ -0,0 +1,34 @@
+From b03f13d762d577a3f4774c0ed64b8d376c74da9a Mon Sep 17 00:00:00 2001
+From: Nigel Gregoire <nigelg@airg.com>
+Date: Mon, 11 Jan 2016 12:00:06 -0800
+Subject: [PATCH] Fix locale test for newer DateTime::Locale
+
+As of v1.00, DateTime::Locale uses "en-US-POSIX" instead of "C".
+---
+ t/02_main.t | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/t/02_main.t b/t/02_main.t
+index 18bd8d1..6c2b371 100644
+--- a/t/02_main.t
++++ b/t/02_main.t
+@@ -10,6 +10,7 @@ BEGIN {
+
+ use Test::More tests => 31;
+ use DateTime::Tiny;
++use version 0.77;
+
+
+
+@@ -76,7 +77,10 @@ SKIP: {
+ # Expand to a DateTime
+ my $dt = $date->DateTime;
+ isa_ok( $dt, 'DateTime' );
+- is( $dt->locale->id, 'C', '->locate ok' );
++ # DateTime::Locale version 1.00 changes "C" to "en-US-POSIX".
++ my $expected = version->parse($DateTime::Locale::VERSION) < version->parse("1.00")
++ ? "C" : "en-US-POSIX";
++ is( $dt->locale->id, $expected, '->locale ok' );
+ is( $dt->time_zone->name, 'floating', '->timezone ok' );
+
+ # Compare accessor results