Initial import (perl-ExtUtils-Helpers-0.014-2)

This module provides various portable helper functions for module building
modules.
This commit is contained in:
Paul Howarth 2013-04-08 16:40:17 +01:00
parent 611c43f039
commit efc3342f5e
6 changed files with 149 additions and 0 deletions

1
.gitignore vendored
View File

@ -0,0 +1 @@
/ExtUtils-Helpers-[0-9.]*.tar.gz

View File

@ -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;

View File

@ -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 {

View File

@ -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

View File

@ -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 <paul@city-fan.org> - 0.014-2
- Sanitize for Fedora submission
* Sun Mar 31 2013 Paul Howarth <paul@city-fan.org> - 0.014-1
- Initial RPM version

View File

@ -0,0 +1 @@
fb98fda3d6e1a3a98758e944495157ec ExtUtils-Helpers-0.014.tar.gz