commit 1b387eacd2080dc9ef5c7711d58a7438b66f2a78 Author: Paul Howarth <paul@xxxxxxxxxxxx> Date: Tue Jun 26 13:41:38 2012 +0100 Update to 0.4 - New upstream release 0.4 - _detect_utf8: PP version now handles overlong UTF-8 sequences - Tests update (96% coverage) - Dist::Zilla update - BR: perl(Perl::Critic::Policy::Modules::ProhibitModuleShebang), perl(Test::EOL) and perl(Test::Version) - BR: perl(Test::Kwalitee), perl(Test::MinimumVersion), perl(Test::Perl::Critic) and perl(Test::Synopsis) unconditionally - Drop support for building for EPEL-4 - Drop patch for building with ExtUtils::MakeMaker < 6.30 - Update patch for building with Test::More < 0.88 - Add patch to support building without Test::Version - Add workaround for the old version of PPI in EPEL-5 not being able to handle the unicode byte order mark in t/bom.pl, which breaks t/release-minimum-version.t - Don't need to remove empty directories from the buildroot - Use DESTDIR rather than PERL_INSTALL_ROOT Test-Mojibake-0.3-old-Test::More.patch | 51 -------------------- Test-Mojibake-0.3-old-eu::mm.patch | 30 ------------ Test-Mojibake-0.4-no-Test::Version.patch | 20 ++++++++ Test-Mojibake-0.4-old-Test::More.patch | 74 ++++++++++++++++++++++++++++++ perl-Test-Mojibake.spec | 68 ++++++++++++++++++++-------- sources | 2 +- 6 files changed, 144 insertions(+), 101 deletions(-) --- diff --git a/Test-Mojibake-0.4-no-Test::Version.patch b/Test-Mojibake-0.4-no-Test::Version.patch new file mode 100644 index 0000000..44b2752 --- /dev/null +++ b/Test-Mojibake-0.4-no-Test::Version.patch @@ -0,0 +1,20 @@ +--- t/release-test-version.t ++++ t/release-test-version.t +@@ -10,8 +10,8 @@ + use warnings; + use Test::More; + +-# generated by Dist::Zilla::Plugin::Test::Version 0.002004 +-BEGIN { eval "use Test::Version; 1;" or die $@; } ++eval 'use Test::Version'; ++plan skip_all => 'Test::Version required' if $@; + + my @imports = ( 'version_all_ok' ); + +@@ -26,5 +26,5 @@ + + Test::Version->import(@imports); + +-version_all_ok; ++version_all_ok(); + done_testing; diff --git a/Test-Mojibake-0.4-old-Test::More.patch b/Test-Mojibake-0.4-old-Test::More.patch new file mode 100644 index 0000000..9408fd9 --- /dev/null +++ b/Test-Mojibake-0.4-old-Test::More.patch @@ -0,0 +1,74 @@ +diff -up Test-Mojibake-0.4/t/06-pp-vs-xs.t.orig Test-Mojibake-0.4/t/06-pp-vs-xs.t +--- Test-Mojibake-0.4/t/06-pp-vs-xs.t.orig 2012-06-25 20:36:58.000000000 +0100 ++++ Test-Mojibake-0.4/t/06-pp-vs-xs.t 2012-06-26 13:01:09.341933492 +0100 +@@ -1,7 +1,7 @@ + #!perl -T + use strict; + +-use Test::More; ++use Test::More 'no_plan'; + + BEGIN { + use_ok('Benchmark', 'countit'); +@@ -10,7 +10,6 @@ BEGIN { + + unless ($Test::Mojibake::use_xs) { + diag('No XS module detected, will fallback to PP implementation!'); +- done_testing(2); + exit; + } + +@@ -33,8 +32,6 @@ ok($t0->iters > $t1->iters, 'XS faster t + + diag(sprintf('XS/PP speed ratio is %0.2f', $t0->iters / $t1->iters)); + +-done_testing(7); +- + sub run { + my $i = 0; + for (@buf) { +diff -up Test-Mojibake-0.4/t/07-broken-utf8.t.orig Test-Mojibake-0.4/t/07-broken-utf8.t +--- Test-Mojibake-0.4/t/07-broken-utf8.t.orig 2012-06-25 20:36:58.000000000 +0100 ++++ Test-Mojibake-0.4/t/07-broken-utf8.t 2012-06-26 13:01:09.356933495 +0100 +@@ -24,7 +24,7 @@ my @tests = ( + ["11-overlong-5" => 0 => \"\xfc\x80\x80\x80\x80\xaf"], + ); + ++plan tests => scalar @tests; ++ + ok(Test::Mojibake::_detect_utf8($_->[2]) == $_->[1], $_->[0]) + for @tests; +- +-done_testing(scalar @tests); +diff -up Test-Mojibake-0.4/t/release-cpan-changes.t.orig Test-Mojibake-0.4/t/release-cpan-changes.t +--- Test-Mojibake-0.4/t/release-cpan-changes.t.orig 2012-06-25 20:36:58.000000000 +0100 ++++ Test-Mojibake-0.4/t/release-cpan-changes.t 2012-06-26 13:01:09.356933495 +0100 +@@ -1,15 +1,11 @@ + #!perl + ++use Test::More; ++ + BEGIN { +- unless ($ENV{RELEASE_TESTING}) { +- require Test::More; +- Test::More::plan(skip_all => 'these tests are for release candidate testing'); +- } ++ plan skip_all => 'these tests are for release candidate testing' unless ($ENV{RELEASE_TESTING}); ++ eval 'use Test::CPAN::Changes'; ++ plan skip_all => 'Test::CPAN::Changes required for this test' if $@; + } + +- +-use Test::More; +-eval 'use Test::CPAN::Changes'; +-plan skip_all => 'Test::CPAN::Changes required for this test' if $@; + changes_ok(); +-done_testing(); +diff -up Test-Mojibake-0.4/t/release-test-version.t.orig Test-Mojibake-0.4/t/release-test-version.t +--- Test-Mojibake-0.4/t/release-test-version.t.orig 2012-06-26 13:01:09.000000000 +0100 ++++ Test-Mojibake-0.4/t/release-test-version.t 2012-06-26 13:01:53.073948449 +0100 +@@ -27,4 +27,3 @@ push @imports, $params + Test::Version->import(@imports); + + version_all_ok(); +-done_testing; diff --git a/perl-Test-Mojibake.spec b/perl-Test-Mojibake.spec index af09a51..8de446c 100644 --- a/perl-Test-Mojibake.spec +++ b/perl-Test-Mojibake.spec @@ -1,8 +1,8 @@ -# We don't really need ExtUtils::MakeMaker ≥ 6.30 -%global old_eumm %(perl -MExtUtils::MakeMaker -e 'printf "%d\\n", $ExtUtils::MakeMaker::VERSION < 6.30 ? 1 : 0;' 2>/dev/null || echo 0) - # We need to patch the test suite if we have an old version of Test::More -%global old_test_more %(perl -MTest::More -e 'printf "%d\\n", $Test::More::VERSION < 0.88 ? 1 : 0;' 2>/dev/null || echo 0) +%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0) + +# PPI can't handle the unicode byte order mark in t/bom.pl prior to version 1.204_02 +%global old_ppi %(perl -MPPI -e 'print (($PPI::VERSION < 1.204_02) ? 1 : 0);' 2>/dev/null || echo 0) # noarch, but to avoid debug* files interfering with manifest test: %global debug_package %{nil} @@ -12,15 +12,15 @@ # BuildRequires: perl(Test::Pod::LinkCheck) when available Name: perl-Test-Mojibake -Version: 0.3 -Release: 5%{?dist} +Version: 0.4 +Release: 1%{?dist} Summary: Check your source for encoding misbehavior Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/Test-Mojibake/ Source0: http://search.cpan.org/CPAN/authors/id/S/SY/SYP/Test-Mojibake-%{version}.tar.gz -Patch0: Test-Mojibake-0.3-old-eu::mm.patch -Patch1: Test-Mojibake-0.3-old-Test::More.patch +Patch0: Test-Mojibake-0.4-no-Test::Version.patch +Patch1: Test-Mojibake-0.4-old-Test::More.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildArch: noarch # =================================================================== @@ -29,6 +29,9 @@ BuildArch: noarch BuildRequires: perl(ExtUtils::MakeMaker) # =================================================================== # Module requirements +# +# META.yml suggests that perl(open) and perl(common::sense) are +# required, but they aren't really # =================================================================== BuildRequires: perl(File::Spec) BuildRequires: perl(Test::Builder) @@ -52,25 +55,25 @@ BuildRequires: perl(Test::More) BuildRequires: perl(Pod::Coverage::TrustPod) BuildRequires: perl(Test::CPAN::Meta) BuildRequires: perl(Test::DistManifest) +BuildRequires: perl(Test::EOL) BuildRequires: perl(Test::HasVersion) +BuildRequires: perl(Test::Kwalitee) +BuildRequires: perl(Test::MinimumVersion) BuildRequires: perl(Test::NoTabs) +BuildRequires: perl(Test::Perl::Critic) BuildRequires: perl(Test::Pod::Coverage) BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::Portability::Files) -# Modules only available from EL-5 -%if 0%{?fedora} || 0%{?rhel} > 4 -BuildRequires: perl(Test::Perl::Critic) BuildRequires: perl(Test::Synopsis) -%endif # Modules only available from EL-6 %if 0%{?fedora} || 0%{?rhel} > 5 -BuildRequires: perl(Test::Kwalitee) -BuildRequires: perl(Test::MinimumVersion) BuildRequires: perl(Test::Vars) %endif # Modules only available from EL-7 %if 0%{?fedora} || 0%{?rhel} > 6 +BuildRequires: perl(Perl::Critic::Policy::Modules::ProhibitModuleShebang) BuildRequires: perl(Test::CPAN::Changes) +BuildRequires: perl(Test::Version) %endif %endif # =================================================================== @@ -111,9 +114,9 @@ Enter the Test::Mojibake ;) %prep %setup -q -n Test-Mojibake-%{version} -# We don't really need ExtUtils::MakeMaker ≥ 6.30 -%if %{old_eumm} -%patch0 -p1 +# Test::Version not always available +%if !0%{?fedora} && 0%{?rhel} < 7 +%patch0 %endif # We need to patch the test suite if we have an old version of Test::More @@ -127,13 +130,21 @@ make %{?_smp_mflags} %install rm -rf %{buildroot} -make pure_install PERL_INSTALL_ROOT=%{buildroot} +make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} \; -find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null %{_fixperms} %{buildroot} %check +# PPI can't handle the unicode byte order mark in t/bom.pl prior to version 1.204_02 +%if %{old_ppi} +mv t/release-minimum-version.t ./ +sed -i -e 's|t/release-minimum-version.t|release-minimum-version.t|' MANIFEST +%endif make test %{!?perl_bootstrap:AUTHOR_TESTING=1 RELEASE_TESTING=1} +%if %{old_ppi} +mv ./release-minimum-version.t t/ +sed -i -e 's|release-minimum-version.t|t/release-minimum-version.t|' MANIFEST +%endif %clean rm -rf %{buildroot} @@ -145,6 +156,25 @@ rm -rf %{buildroot} %{_mandir}/man3/Test::Mojibake.3pm* %changelog +* Tue Jun 26 2012 Paul Howarth <paul@xxxxxxxxxxxx> - 0.4-1 +- Update to 0.4 + - _detect_utf8: PP version now handles overlong UTF-8 sequences + - Tests update (96% coverage) + - Dist::Zilla update +- BR: perl(Perl::Critic::Policy::Modules::ProhibitModuleShebang), + perl(Test::EOL) and perl(Test::Version) +- BR: perl(Test::Kwalitee), perl(Test::MinimumVersion), + perl(Test::Perl::Critic) and perl(Test::Synopsis) unconditionally +- Drop support for building for EPEL-4 +- Drop patch for building with ExtUtils::MakeMaker < 6.30 +- Update patch for building with Test::More < 0.88 +- Add patch to support building without Test::Version +- Add workaround for the old version of PPI in EPEL-5 not being able to + handle the unicode byte order mark in t/bom.pl, which breaks + t/release-minimum-version.t +- Don't need to remove empty directories from the buildroot +- Use DESTDIR rather than PERL_INSTALL_ROOT + * Mon Jun 11 2012 Petr Pisar <ppisar@xxxxxxxxxx> - 0.3-5 - Perl 5.16 rebuild diff --git a/sources b/sources index db208fb..a175cac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6387414378fc302582d7955e61f132e3 Test-Mojibake-0.3.tar.gz +2bbae74363c4a10f0f62efd171fcfd00 Test-Mojibake-0.4.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel