diff options
author | Kent Fredric <kentnl@gentoo.org> | 2018-03-16 21:48:29 +1300 |
---|---|---|
committer | Kent Fredric <kentnl@gentoo.org> | 2018-03-16 21:49:02 +1300 |
commit | 937e8139b661733f43802651a8c6d6fc0f9ab7bd (patch) | |
tree | ea581e3a6a73bf2e2196a5202f38f63c3549de3c /dev-perl/Time-Format | |
parent | sys-devel/make: Revbump to support guile-2.2 wih USE="guile" (diff) | |
download | gentoo-937e8139b661733f43802651a8c6d6fc0f9ab7bd.tar.gz gentoo-937e8139b661733f43802651a8c6d6fc0f9ab7bd.tar.bz2 gentoo-937e8139b661733f43802651a8c6d6fc0f9ab7bd.zip |
dev-perl/Time-Format: EAPI6 + tests
- EAPI6ify
- Fix and enable tests
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'dev-perl/Time-Format')
3 files changed, 240 insertions, 0 deletions
diff --git a/dev-perl/Time-Format/Time-Format-1.120.0-r1.ebuild b/dev-perl/Time-Format/Time-Format-1.120.0-r1.ebuild new file mode 100644 index 000000000000..a42be47c6766 --- /dev/null +++ b/dev-perl/Time-Format/Time-Format-1.120.0-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +DIST_AUTHOR=ROODE +DIST_VERSION=1.12 +inherit perl-module + +DESCRIPTION="Easy-to-use date/time formatting" +LICENSE="Time-Format" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="test" + +RDEPEND=" + dev-perl/Date-Manip + >=virtual/perl-Time-Local-1.70.0 +" +DEPEND="${RDEPEND} + >=dev-perl/Module-Build-0.400.0 + test? ( >=virtual/perl-Test-Simple-0.400.0 ) +" +PATCHES=( + "${FILESDIR}/${PN}-1.12-datetimetest.patch" + "${FILESDIR}/${PN}-1.12-nosig.patch" +) +PERL_RM_FILES=( "t/0-signature.t" "SIGNATURE" ) + +src_configure() { + export TZ=UTC # https://rt.cpan.org/Public/Bug/Display.html?id=85001 + perl-module_src_configure +} diff --git a/dev-perl/Time-Format/files/Time-Format-1.12-datetimetest.patch b/dev-perl/Time-Format/files/Time-Format-1.12-datetimetest.patch new file mode 100644 index 000000000000..b43f685c7b01 --- /dev/null +++ b/dev-perl/Time-Format/files/Time-Format-1.12-datetimetest.patch @@ -0,0 +1,117 @@ +From 83aaff839cf3b6788d95a253bb099992b366136d Mon Sep 17 00:00:00 2001 +From: Kent Fredric <kentnl@gentoo.org> +Date: Fri, 16 Mar 2018 21:09:54 +1300 +Subject: Disable auto-probes for Date-Manip + +These are currently fragile and broken, and ultimately unnecessary +on Gentoo (because we have the luxury of forcing a TZ, and if +Date::Manip still doesn't work, that's a bigger bug we care about ) + +Bug: https://rt.cpan.org/Public/Bug/Display.html?id=85001 +--- + t/doc.t | 15 --------------- + t/funcs.t | 14 -------------- + t/manip.t | 17 ----------------- + 3 files changed, 46 deletions(-) + +diff --git a/t/doc.t b/t/doc.t +index c5bfe6f..b9ce2af 100755 +--- a/t/doc.t ++++ b/t/doc.t +@@ -9,19 +9,6 @@ BEGIN { $Time::Format::NOXS = 1 } + BEGIN { use_ok 'Time::Format', qw(:all) }
+ my $tl_notok;
+ BEGIN { $tl_notok = eval('use Time::Local; 1')? 0 : 1 }
+-my $dm_notok;
+-my $dm_notz;
+-BEGIN
+-{
+- $dm_notok = eval('use Date::Manip (); 1')? 0 : 1;
+- unless ($dm_notok)
+- {
+- # If Date::Manip can't determine the time zone, it'll bomb out of the tests.
+- $dm_notz = eval('Date::Manip::Date_TimeZone (); 1')? 0 : 1;
+- }
+- delete $INC{'Date/Manip.pm'};
+- %Date::Manip:: = ();
+-}
+
+ # Were all variables imported? (3)
+ is ref tied %time, 'Time::Format' => '%time imported';
+@@ -83,8 +70,6 @@ SKIP: + # manip tests (3)
+ SKIP:
+ {
+- skip 'Date::Manip not available', 3 if $dm_notok;
+- skip 'Date::Manip cannot determine timezone', 3 if $dm_notz;
+ is $manip{'%m/%d/%Y',"epoch $t"}, '06/05/2003' => 'Example 13';
+ is $manip{'%m/%d/%Y','first monday in November 2000'}, '11/06/2000' => 'Example 14';
+ is qq[$time{'yyyymmdd',$manip{'%s',"epoch $t"}}], '20030605' => 'Example 15';
+diff --git a/t/funcs.t b/t/funcs.t +index 1e5bdb6..88f3fdc 100755 +--- a/t/funcs.t ++++ b/t/funcs.t +@@ -13,18 +13,6 @@ BEGIN { + delete $INC{'POSIX.pm'};
+ %POSIX:: = ();
+ }
+-my $manip_bad;
+-my $manip_notz;
+-BEGIN {
+- $manip_bad = eval('use Date::Manip (); 1')? 0 : 1;
+- unless ($manip_bad)
+- {
+- # If Date::Manip can't determine the time zone, it'll bomb out of the tests.
+- $manip_notz = eval ('Date::Manip::Date_TimeZone (); 1')? 0 : 1;
+- }
+- delete $INC{'Date/Manip.pm'};
+- %Date::Manip:: = ();
+-}
+
+ # Get day/month names in current locale
+ my ($Thursday, $Thu, $June, $Jun);
+@@ -71,8 +59,6 @@ SKIP: + # time_manip tests (6)
+ SKIP:
+ {
+- skip 'Date::Manip not available', 6 if $manip_bad;
+- skip 'Date::Manip cannot determine timezone', 6 if $manip_notz;
+ my $m = 'first thursday in june 2003';
+ is time_manip('%Y',$m), '2003' => 'year';
+ is time_manip('%d',$m), '05' => 'day of month';
+diff --git a/t/manip.t b/t/manip.t +index 763ad59..6f94607 100755 +--- a/t/manip.t ++++ b/t/manip.t +@@ -5,28 +5,11 @@ use Test::More tests => 6; +
+ BEGIN { $Time::Format::NOXS = 1 }
+ BEGIN { use_ok 'Time::Format', qw(%manip) }
+-my $manip_bad;
+-BEGIN
+-{
+- unless (eval 'use Date::Manip (); 1')
+- {
+- $manip_bad = 'Date::Manip is not available';
+- }
+- else
+- {
+- # If Date::Manip can't determine the time zone, it'll bomb out of the tests.
+- $manip_bad = 'Date::Manip cannot determine time zone'
+- unless eval 'Date::Manip::Date_TimeZone(); 1';
+- }
+- delete $INC{'Date/Manip.pm'};
+- %Date::Manip:: = ();
+-}
+
+ my $t = 'first thursday in june 2003';
+
+ SKIP:
+ {
+- skip $manip_bad, 5 if $manip_bad;
+ is $manip{'%Y',$t}, '2003' => 'year';
+ is $manip{'%d',$t}, '05' => 'day of month';
+ is $manip{'%D',$t}, '06/05/03' => '%D';
+-- +2.16.2 + diff --git a/dev-perl/Time-Format/files/Time-Format-1.12-nosig.patch b/dev-perl/Time-Format/files/Time-Format-1.12-nosig.patch new file mode 100644 index 000000000000..ccb11b849f21 --- /dev/null +++ b/dev-perl/Time-Format/files/Time-Format-1.12-nosig.patch @@ -0,0 +1,91 @@ +From 24b17d6a4787db19888cda208197539c324b257f Mon Sep 17 00:00:00 2001 +From: Kent Fredric <kentnl@gentoo.org> +Date: Fri, 16 Mar 2018 21:18:37 +1300 +Subject: Kill signature code + +Invalidated anyway due to other patches, and non-critical on Gentoo +due to many other layers of integrity checks. +--- + Build.PL | 2 -- + MANIFEST | 3 --- + META.json | 1 - + META.yml | 1 - + Makefile.PL | 1 - + SIGNATURE | 59 --------------------------------------------------------- + t/0-signature.t | 26 ------------------------- + 7 files changed, 93 deletions(-) + delete mode 100644 SIGNATURE + delete mode 100755 t/0-signature.t + +diff --git a/Build.PL b/Build.PL +index faed77f..6541305 100755 +--- a/Build.PL ++++ b/Build.PL +@@ -29,9 +29,7 @@ my $builder = Module::Build->new( + 'Time::HiRes' => 0,
+ 'DateTime' => 0,
+ 'Date::Manip' => 0,
+- 'Module::Signature' => 0,
+ },
+- sign => 1,
+ add_to_cleanup => [ 'Time-Format-*' ],
+ );
+
+diff --git a/MANIFEST b/MANIFEST +index e1aeeb9..fd31290 100755 +--- a/MANIFEST ++++ b/MANIFEST +@@ -6,11 +6,9 @@ META.json + META.yml
+ Makefile.PL
+ README
+-SIGNATURE
+ lib/Time/Format.pm
+ quickref.ps
+ quickref.txt
+-t/0-signature.t
+ t/1-load.t
+ t/DateManip.t
+ t/DateTime.t
+@@ -35,4 +33,3 @@ t/xs_funcs.t + t/xs_locale.t
+ t/xs_quot.t
+ t/xs_time.t
+-SIGNATURE Added here by Module::Build +diff --git a/META.json b/META.json +index cdfee24..e57c760 100644 +--- a/META.json ++++ b/META.json +@@ -29,7 +29,6 @@ + "Date::Manip" : 0, + "DateTime" : 0, + "I18N::Langinfo" : 0, +- "Module::Signature" : 0, + "POSIX" : 0, + "Time::HiRes" : 0 + }, +diff --git a/META.yml b/META.yml +index 2efa55e..318c0ff 100644 +--- a/META.yml ++++ b/META.yml +@@ -21,7 +21,6 @@ recommends: + Date::Manip: 0 + DateTime: 0 + I18N::Langinfo: 0 +- Module::Signature: 0 + POSIX: 0 + Time::HiRes: 0 + requires: +diff --git a/Makefile.PL b/Makefile.PL +index 7d3059e..14903ab 100755 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -13,5 +13,4 @@ WriteMakefile ( + ($] >= 5.005 ? ## Add these new keywords supported since 5.005
+ (ABSTRACT_FROM => 'lib/Time/Format.pm', # retrieve abstract from module
+ AUTHOR => 'Eric Roode <roode@cpan.org>') : ()),
+- (MM->can('signature_target')? (SIGN => 1) : ()),
+ );
+-- +2.16.2 + |