From efc3342f5e67ab9e96f2d7ddf4f80e75429b4937 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Mon, 8 Apr 2013 16:40:17 +0100 Subject: [PATCH] Initial import (perl-ExtUtils-Helpers-0.014-2) This module provides various portable helper functions for module building modules. --- .gitignore | 1 + ExtUtils-Helpers-0.014-old-Test::More.patch | 33 +++++++ ...s-Helpers-0.014-old-Text::ParseWords.patch | 11 +++ ExtUtils-Helpers-0.014-pod.patch | 11 +++ perl-ExtUtils-Helpers.spec | 92 +++++++++++++++++++ sources | 1 + 6 files changed, 149 insertions(+) create mode 100644 ExtUtils-Helpers-0.014-old-Test::More.patch create mode 100644 ExtUtils-Helpers-0.014-old-Text::ParseWords.patch create mode 100644 ExtUtils-Helpers-0.014-pod.patch create mode 100644 perl-ExtUtils-Helpers.spec diff --git a/.gitignore b/.gitignore index e69de29..1c12e16 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/ExtUtils-Helpers-[0-9.]*.tar.gz diff --git a/ExtUtils-Helpers-0.014-old-Test::More.patch b/ExtUtils-Helpers-0.014-old-Test::More.patch new file mode 100644 index 0000000..c6d5605 --- /dev/null +++ b/ExtUtils-Helpers-0.014-old-Test::More.patch @@ -0,0 +1,33 @@ +--- t/author-split_like_shell.t ++++ t/author-split_like_shell.t +@@ -69,6 +69,8 @@ + { 'a " b " c' => [ 'a', ' b ', 'c' ] }, + ); + ++plan tests => (2 * scalar @win_splits) + (2 * scalar @unix_splits); ++ + foreach my $test (@win_splits) { + my ($string, $expected) = %$test; + my @result = ExtUtils::Helpers::Windows::split_like_shell($string); +@@ -86,4 +88,3 @@ + diag("split_like_shell error \n>$string< is not splitting as >" . join("|", @$expected) . '<'); + } + +-done_testing; +--- t/man_pagename.t ++++ t/man_pagename.t +@@ -2,7 +2,7 @@ + + use strict; + use warnings FATAL => 'all'; +-use Test::More; ++use Test::More tests => 2; + use File::Spec::Functions qw/catfile/; + use ExtUtils::Helpers qw/man1_pagename man3_pagename/; + +@@ -17,5 +17,3 @@ + is man1_pagename('script/foo'), 'foo.1', 'man1_pagename'; + + is man3_pagename(catfile(qw/lib ExtUtils Helpers.pm/)), join($sep, qw/ExtUtils Helpers.3pm/), 'man3_pagename'; +- +-done_testing; diff --git a/ExtUtils-Helpers-0.014-old-Text::ParseWords.patch b/ExtUtils-Helpers-0.014-old-Text::ParseWords.patch new file mode 100644 index 0000000..eb021a0 --- /dev/null +++ b/ExtUtils-Helpers-0.014-old-Text::ParseWords.patch @@ -0,0 +1,11 @@ +--- lib/ExtUtils/Helpers/Unix.pm ++++ lib/ExtUtils/Helpers/Unix.pm +@@ -8,7 +8,7 @@ + use Exporter 5.57 'import'; + our @EXPORT = qw/make_executable split_like_shell/; + +-use Text::ParseWords 3.24 qw/shellwords/; ++use Text::ParseWords 3.22 qw/shellwords/; + use ExtUtils::MakeMaker; + + sub make_executable { diff --git a/ExtUtils-Helpers-0.014-pod.patch b/ExtUtils-Helpers-0.014-pod.patch new file mode 100644 index 0000000..a22d560 --- /dev/null +++ b/ExtUtils-Helpers-0.014-pod.patch @@ -0,0 +1,11 @@ +--- lib/ExtUtils/Helpers.pm ++++ lib/ExtUtils/Helpers.pm +@@ -52,6 +52,8 @@ + + =pod + ++=encoding utf8 ++ + =head1 NAME + + ExtUtils::Helpers - Various portability utilities for module builders diff --git a/perl-ExtUtils-Helpers.spec b/perl-ExtUtils-Helpers.spec new file mode 100644 index 0000000..1c601e8 --- /dev/null +++ b/perl-ExtUtils-Helpers.spec @@ -0,0 +1,92 @@ +# We don't really need Text::ParseWords ≥ 3.24 +%global old_tpw %(perl -MText::ParseWords -e 'print (($Text::ParseWords::VERSION) < 3.24 ? 1 : 0);' 2>/dev/null || echo 0) + +# Test suite needs patching if we have Test::More < 0.88 +%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION) < 0.88 ? 1 : 0);' 2>/dev/null || echo 0) + +Name: perl-ExtUtils-Helpers +Version: 0.014 +Release: 2%{?dist} +Summary: Various portability utilities for module builders +Group: Development/Libraries +License: GPL+ or Artistic +URL: https://metacpan.org/release/ExtUtils-Helpers +Source0: http://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Helpers-%{version}.tar.gz +Patch1: ExtUtils-Helpers-0.014-pod.patch +Patch2: ExtUtils-Helpers-0.014-old-Text::ParseWords.patch +Patch3: ExtUtils-Helpers-0.014-old-Test::More.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) +BuildArch: noarch +# Build +BuildRequires: perl(ExtUtils::MakeMaker) +# Module +BuildRequires: perl(Config) +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(Pod::Man) +BuildRequires: perl(Text::ParseWords) >= 3.22 +# Test Suite +BuildRequires: perl(Cwd) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Test::More) +# Release Tests +BuildRequires: perl(Pod::Coverage::TrustPod) +BuildRequires: perl(Test::Kwalitee) +BuildRequires: perl(Test::Pod) +BuildRequires: perl(Test::Pod::Coverage) +# Runtime +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) + +%description +This module provides various portable helper functions for module building +modules. + +%prep +%setup -q -n ExtUtils-Helpers-%{version} + +# Specify POD encoding +%patch1 + +# We don't really need Text::ParseWords ≥ 3.24 +%if %{old_tpw} +%patch2 +%endif + +# Test suite needs patching if we have Test::More < 0.88 +%if %{old_test_more} +%patch3 +%endif + +%build +perl Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -exec rm -f {} ';' +%{_fixperms} %{buildroot} + +%check +make test AUTHOR_TESTING=1 RELEASE_TESTING=1 + +%clean +rm -rf %{buildroot} + +%files +%doc Changes LICENSE README +%{perl_vendorlib}/ExtUtils/ +%{_mandir}/man3/ExtUtils::Helpers.3pm* +%{_mandir}/man3/ExtUtils::Helpers::Unix.3pm* +%{_mandir}/man3/ExtUtils::Helpers::VMS.3pm* +%{_mandir}/man3/ExtUtils::Helpers::Windows.3pm* + +%changelog +* Mon Apr 1 2013 Paul Howarth - 0.014-2 +- Sanitize for Fedora submission + +* Sun Mar 31 2013 Paul Howarth - 0.014-1 +- Initial RPM version diff --git a/sources b/sources index e69de29..868ed08 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +fb98fda3d6e1a3a98758e944495157ec ExtUtils-Helpers-0.014.tar.gz