Tidy dependencies and add --with authortests build option

- BR/R: optional modules perl(Readonly::XS), perl(Term::ANSIColor) >= 2.02
- BR: perl(Pod::Spell) >= 1
- BR: perl(Text::ParseWords) >= 3
- Add runtime deps for optional modules perl(File::HomeDir), perl(File::Which)
- Add dependency on aspell for Perl::Critic::Policy::Documentation::PodSpelling
- Add version 1.889 requirement for perl(Email::Address)
- Add version 0.19 requirement for perl(List::MoreUtils)
- Add version 0.010 requirement for perl(PPIx::Regexp)
- Add version 1.001 requirement for perl(PPIx::Utilities::Statement)
- Add version 0.77 requirement for perl(version)
- Drop unused buildreq perl(Test::Spelling)
- Drop bogus buildreqs perl(lib) and perl(base)
- Add option for building with author tests enabled (--with authortests)
- Add patch with words not in Fedora dictionaries for spell check tests
- Split buildreqs into separate sections for build process, the module, the
  main test suite and the author tests
This commit is contained in:
Paul Howarth 2011-03-30 09:23:02 +01:00
parent 0bc1d1f650
commit 2868c631b8
2 changed files with 150 additions and 53 deletions

View File

@ -0,0 +1,59 @@
--- Perl-Critic-1.113/xt/author/40_stop_words.orig 2011-02-15 01:38:45.000000000 +0000
+++ Perl-Critic-1.113/xt/author/40_stop_words 2011-03-18 14:26:58.075929860 +0000
@@ -15,7 +15,9 @@
colour
colours
config
+Conway's
CPAN
+customizable
CVS
dereference
dereferencing
@@ -28,6 +30,7 @@
filehandles
filename
filenames
+Fowler's
globals
globbing
Guzis
@@ -37,9 +40,12 @@
HEREDOCs
IDE
lvalue
+maintainer's
+matcher
Maxia
Mehner
memoization
+MERCHANTABILITY
metacharacters
Metadata
metadata
@@ -49,6 +55,7 @@
namespace
namespaces
octothorp
+optimizations
PBP
pbp
perl
@@ -88,6 +95,7 @@
STDIN
STDOUT
stringification
+subclasses
subdirectories
subscripted
superclass
@@ -101,6 +109,9 @@
undef
unescaped
unparsed
+untestable
+untrusted
+unvalidated
vice-versa
whitespace
Wyant

View File

@ -1,3 +1,5 @@
%bcond_with authortests
Name: perl-Perl-Critic
Version: 1.114
Release: 1%{?dist}
@ -7,66 +9,83 @@ Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/Perl-Critic/
Source0: http://search.cpan.org/CPAN/authors/id/E/EL/ELLIOTJS/Perl-Critic-%{version}.tar.gz
Patch0: Perl-Critic-1.113-stopwords.patch
BuildArch: noarch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
# Build process
BuildRequires: perl(Module::Build)
BuildRequires: perl(B::Keywords) >= 1.05
BuildRequires: perl(Config::Tiny) >= 2
BuildRequires: perl(File::HomeDir)
BuildRequires: perl(IO::String)
BuildRequires: perl(List::MoreUtils)
BuildRequires: perl(String::Format) >= 1.13
BuildRequires: perl(Task::Weaken)
# Module requirements
BuildRequires: aspell-en
Requires: aspell
BuildRequires: perl(B::Keywords) >= 1.05
BuildRequires: perl(Carp)
BuildRequires: perl(charnames)
BuildRequires: perl(Config::Tiny) >= 2
BuildRequires: perl(Email::Address) >= 1.889
BuildRequires: perl(English)
BuildRequires: perl(Exception::Class) >= 1.23
BuildRequires: perl(Exporter)
BuildRequires: perl(File::Basename)
BuildRequires: perl(File::Find)
BuildRequires: perl(File::Path)
BuildRequires: perl(File::Spec)
BuildRequires: perl(File::Spec::Unix)
BuildRequires: perl(File::Temp)
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(IO::String)
BuildRequires: perl(List::MoreUtils) >= 0.19
BuildRequires: perl(List::Util)
BuildRequires: perl(Module::Pluggable) >= 3.1
Requires: perl(Module::Pluggable) >= 3.1
BuildRequires: perl(overload)
BuildRequires: perl(Perl::Tidy)
BuildRequires: perl(Pod::Parser)
Requires: perl(Pod::Parser)
BuildRequires: perl(PPI) >= 1.215
Requires: perl(PPI) >= 1.215
BuildRequires: perl(Perl::Tidy)
BuildRequires: perl(PPIx::Utilities::Statement)
BuildRequires: perl(Task::Weaken)
BuildRequires: perl(PPIx::Regexp)
BuildRequires: perl(Test::Memory::Cycle)
BuildRequires: perl(Readonly) >= 1.03
BuildRequires: perl(Exception::Class) >= 1.23
BuildRequires: perl(Email::Address)
BuildRequires: perl(Test::Deep)
# Author tests
BuildRequires: perl(Test::Perl::Critic)
BuildRequires: perl(Test::Kwalitee)
BuildRequires: aspell-en
BuildRequires: perl(File::Which)
BuildRequires: perl(Test::Spelling)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
### auto-added brs!
BuildRequires: perl(strict)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(File::Temp)
BuildRequires: perl(Pod::Usage)
BuildRequires: perl(File::Find)
BuildRequires: perl(charnames)
BuildRequires: perl(File::Spec::Unix)
BuildRequires: perl(List::Util)
BuildRequires: perl(lib)
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(Exporter)
BuildRequires: perl(Test::More)
BuildRequires: perl(overload)
BuildRequires: perl(base)
BuildRequires: perl(version)
BuildRequires: perl(Carp)
BuildRequires: perl(warnings)
BuildRequires: perl(File::Basename)
BuildRequires: perl(File::Spec)
BuildRequires: perl(File::Path)
BuildRequires: perl(Pod::PlainText)
BuildRequires: perl(Pod::Select)
BuildRequires: perl(English)
BuildRequires: perl(Pod::Spell) >= 1
BuildRequires: perl(Pod::Usage)
BuildRequires: perl(PPI) >= 1.215
Requires: perl(PPI) >= 1.215
BuildRequires: perl(PPIx::Regexp) >= 0.010
BuildRequires: perl(PPIx::Utilities::Statement) >= 1.001
BuildRequires: perl(Readonly) >= 1.03
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(strict)
BuildRequires: perl(String::Format) >= 1.13
BuildRequires: perl(Text::ParseWords) >= 3
BuildRequires: perl(version) >= 0.77
BuildRequires: perl(warnings)
# Optional module requirements
BuildRequires: perl(File::HomeDir)
Requires: perl(File::HomeDir)
BuildRequires: perl(File::Which)
Requires: perl(File::Which)
BuildRequires: perl(Readonly::XS)
Requires: perl(Readonly::XS)
BuildRequires: perl(Term::ANSIColor) >= 2.02
Requires: perl(Term::ANSIColor) >= 2.02
# Main test suite
BuildRequires: perl(Test::Deep)
BuildRequires: perl(Test::Memory::Cycle)
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Perl::Critic)
# Author tests
%if %{with authortests}
BuildRequires: perl(Devel::EnforceEncapsulation)
BuildRequires: perl(Perl::Critic::Policy::Editor::RequireEmacsFileVariables)
BuildRequires: perl(Perl::Critic::Policy::ErrorHandling::RequireUseOfExceptions)
BuildRequires: perl(Test::Kwalitee)
BuildRequires: perl(Test::Pod) >= 1.00
BuildRequires: perl(Test::Pod::Coverage) >= 1.04
BuildRequires: perl(Test::Without::Module)
%endif
# don't "provide" private Perl libs
%{?perl_default_filter}
@ -101,6 +120,8 @@ of Perl code were mixed directly in the test script. That sucked.
%setup -q -n Perl-Critic-%{version}
find . -type f -exec chmod -c -x {} +
# Extra stopwords for spell checker for author tests
%patch0 -p1
%build
%{__perl} Build.PL installdirs=vendor
@ -113,10 +134,11 @@ find . -type f -exec chmod -c -x {} +
%check
# Additional requirements of author tests:
# Test::Perl::Critic, Test::Kwalitee
#TEST_AUTHOR=1 ./Build test
./Build test
%if %{with authortests}
LC_ALL=en_US ./Build authortest
%else
LC_ALL=en_US ./Build test
%endif
%files
@ -162,8 +184,24 @@ find . -type f -exec chmod -c -x {} +
block; this was fixed by PPI 1.215 (CPAN RT#64132)
- bump PPI version requirement to 1.215
- BR/R: perl(Pod::Parser)
- BR/R: optional modules perl(Readonly::XS), perl(Term::ANSIColor) >= 2.02
- BR: perl(Pod::Spell) >= 1
- BR: perl(Text::ParseWords) >= 3
- add runtime deps for optional modules perl(File::HomeDir), perl(File::Which)
- drop redundant (for modern rpm) BuildRoot tag and buildroot cleaning
- split Test::Perl::Critic::Policy off into its own package
- add dependency on aspell for Perl::Critic::Policy::Documentation::PodSpelling
- add version 1.889 requirement for perl(Email::Address)
- add version 0.19 requirement for perl(List::MoreUtils)
- add version 0.010 requirement for perl(PPIx::Regexp)
- add version 1.001 requirement for perl(PPIx::Utilities::Statement)
- add version 0.77 requirement for perl(version)
- drop unused buildreq perl(Test::Spelling)
- drop bogus buildreqs perl(lib) and perl(base)
- add option for building with author tests enabled (--with authortests)
- add patch with words not in Fedora dictionaries for spell check tests
- split buildreqs into separate sections for build process, the module, the
main test suite and the author tests
* Mon Mar 7 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.113-1
- update to 1.113