Compare commits

...

10 Commits
rawhide ... el5

Author SHA1 Message Date
Paul Howarth 812867b923 Clean up and fix FTBFS
- Don't rely on the behavior of all() when the list is empty (CPAN RT#63816)
- Fix expected failure count for multiple glob test in
  BuiltinFunctions::RequireGlobFunction, changed with later version of PPI
  (CPAN RT#30139)
- Fix license tag
- Fix source URL to point to MetaCPAN, where it can still be found
- Classify buildreqs by usage
- Run tests with LANG=en_US so spell check works properly
- Drop %defattr, redundant since rpm 4.4
- Don't use macros for commands
- Make %files list more explicit
- Use %{_fixperms} macro rather than our own chmod incantation
2016-01-21 14:39:17 +00:00
Fedora Release Engineering 8a062cf6f1 dist-git conversion 2010-07-29 07:45:11 +00:00
Bill Nottingham 00a92f42a8 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 02:12:26 +00:00
Toshio くらとみ 519ccc1ecd Initialize branch EL-5 for perl-Perl-Critic 2007-11-15 19:10:17 +00:00
Jose Pedro Oliveira f0053cf9f1 Update to 1.05. 2007-03-20 15:51:41 +00:00
Jose Pedro Oliveira 651fcf8578 Update to 1.03. 2007-02-15 17:30:07 +00:00
Jose Pedro Oliveira ff489bc26a Sync with devel. 2007-01-27 00:29:06 +00:00
Jose Pedro Oliveira 30fca93721 Sync with devel. 2007-01-26 14:24:18 +00:00
Jose Pedro Oliveira 564116f7c1 Update to 0.22. 2006-12-17 15:29:08 +00:00
Jose Pedro Oliveira 3c30efd357 Sync with devel 2006-11-13 19:58:43 +00:00
7 changed files with 175 additions and 53 deletions

View File

@ -1 +0,0 @@
Perl-Critic-0.2.tar.gz

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/Perl-Critic-[0-9.]*.tar.gz

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: perl-Perl-Critic
# $Id$
NAME := perl-Perl-Critic
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -0,0 +1,39 @@
From 678628c8eb4614c45d644f33b6cadf2e9c410e69 Mon Sep 17 00:00:00 2001
From: Tom Wyant <harryfmudd@comcast.net>
Date: Sat, 11 Dec 2010 08:19:59 +0000
Subject: [PATCH] RT #63816: installation fails when using lastest version of
List::MoreUtils
The proximate problem is that the behavior of all() when the list is
empty has changed. Previous behavior (as of List::MoreUtils 0.26,
anyway) was that all() with an empty list returned false. With
List::MoreUtils it returns true. But the code relies on the old
behavior.
Unfortunately, what's really needed is first a review of the
List::MoreUtils functions used by Perl::Critic, then protection of all
affected functions. Or maybe just protect them all, to be truly
paranoid.
---
--- lib/Perl/Critic/Policy/TestingAndDebugging/ProhibitNoStrict.pm
+++ lib/Perl/Critic/Policy/TestingAndDebugging/ProhibitNoStrict.pm
@@ -61,7 +61,7 @@ sub violates {
return if !$stmnt;
my @words = split m{ [^a-z]+ }mx, $stmnt;
@words = grep { $_ !~ m{ qw|no|strict }mx } @words;
- return if all { exists $self->{_allow}->{$_} } @words;
+ return if @words && all { exists $self->{_allow}->{$_} } @words;
#If we get here, then it must be a violation
return $self->violation( $desc, $expl, $elem );
--- lib/Perl/Critic/Policy/TestingAndDebugging/ProhibitNoWarnings.pm
+++ lib/Perl/Critic/Policy/TestingAndDebugging/ProhibitNoWarnings.pm
@@ -61,7 +61,7 @@ sub violates {
return if !$stmnt;
my @words = split m{ [^a-z]+ }mx, $stmnt;
@words = grep { $_ !~ m{ qw|no|warnings }mx } @words;
- return if all { exists $self->{_allow}->{$_} } @words;
+ return if @words && all { exists $self->{_allow}->{$_} } @words;
#If we get here, then it must be a violation
return $self->violation( $desc, $expl, $elem );

View File

@ -0,0 +1,11 @@
--- t/BuiltinFunctions/RequireGlobFunction.run
+++ t/BuiltinFunctions/RequireGlobFunction.run
@@ -17,7 +17,7 @@ foreach my $file (<*.pl>) {
#-----------------------------------------------------------------------------
## name Multiple globs via <...>
-## failures 1
+## failures 2
## cut
@files = (<*.pl>, <*.pm>);

View File

@ -1,28 +1,75 @@
Name: perl-Perl-Critic
Version: 0.2
Release: 1%{?dist}
Version: 1.05
Release: 2%{?dist}
Summary: Critique Perl source code for best-practices
Group: Development/Libraries
License: GPL or Artistic
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/Perl-Critic/
Source0: http://www.cpan.org/authors/id/T/TH/THALJEF/perlcritic/Perl-Critic-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: https://cpan.metacpan.org/authors/id/T/TH/THALJEF/perlcritic/Perl-Critic-%{version}.tar.gz
Patch0: Perl-Critic-1.05-678628c8.patch
Patch1: Perl-Critic-1.05-rt30139.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
# Module Build
BuildRequires: coreutils
BuildRequires: perl
BuildRequires: perl(Module::Build)
# Module Runtime
BuildRequires: perl(B::Keywords) >= 1.05
BuildRequires: perl(base)
BuildRequires: perl(Carp)
BuildRequires: perl(charnames)
BuildRequires: perl(Config::Tiny) >= 2
BuildRequires: perl(English)
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(IO::String)
BuildRequires: perl(List::MoreUtils)
BuildRequires: perl(Module::Pluggable)
BuildRequires: perl(PPI) >= 1.117
BuildRequires: perl(List::Util)
BuildRequires: perl(overload)
BuildRequires: perl(Pod::PlainText)
BuildRequires: perl(PPI) >= 1.118
BuildRequires: perl(PPI::Document)
BuildRequires: perl(PPI::Document::File)
BuildRequires: perl(PPI::Token::Whitespace)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(strict)
BuildRequires: perl(String::Format) >= 1.13
BuildRequires: perl(warnings)
# Script Runtime
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(Pod::Usage)
# Test Suite
BuildRequires: perl(lib)
BuildRequires: perl(PPI::Cache)
BuildRequires: perl(Test::More)
# Optional Tests (Devel::EnforceEncapsulation not available in EPEL-5)
BuildRequires: perl(Test::Memory::Cycle)
# Author Tests
BuildRequires: perl(File::Which)
BuildRequires: perl(Test::Kwalitee)
BuildRequires: perl(Test::Perl::Critic)
BuildRequires: perl(Test::Pod) >= 1.00
BuildRequires: perl(Test::Pod::Coverage) >= 1.04
BuildRequires: perl(Test::Spelling), aspell-en
# Dependencies
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
# Optional Functionality
BuildRequires: perl(ExtUtils::Manifest)
BuildRequires: perl(File::HomeDir)
BuildRequires: perl(Module::Pluggable) >= 3.1
BuildRequires: perl(Perl::Tidy)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(Module::Pluggable)
Requires(hint): perl(Perl::Tidy)
BuildRequires: perl(Term::ANSIColor)
Requires: perl(ExtUtils::Manifest)
Requires: perl(File::HomeDir)
Requires: perl(Module::Pluggable) >= 3.1
Requires: perl(Perl::Tidy)
Requires: perl(Term::ANSIColor)
%description
Perl::Critic is an extensible framework for creating and applying coding
@ -35,39 +82,85 @@ even support Policies that contradict Conway. You can enable, disable,
and customize those Polices through the Perl::Critic interface. You can
also create new Policy modules that suit your own tastes.
%prep
%setup -q -n Perl-Critic-%{version}
# Don't rely on the behavior of all() when the list is empty (CPAN RT#63816)
%patch0
# Fix expected failure count for multiple glob test in
# BuiltinFunctions::RequireGlobFunction, changed with later version of PPI
# (CPAN RT#30139)
%patch1
%build
%{__perl} Build.PL installdirs=vendor
perl Build.PL --installdirs=vendor
./Build
%install
rm -rf $RPM_BUILD_ROOT
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
chmod -R u+w $RPM_BUILD_ROOT/*
rm -rf %{buildroot}
./Build install --destdir=%{buildroot} --create_packlist=0
%{_fixperms} %{buildroot}
%check
./Build test
LANG=en_US TEST_AUTHOR=1 ./Build test
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc Changes LICENSE README TODO.pod
%{_bindir}/*
%{_bindir}/perlcritic
%{perl_vendorlib}/Perl/
%{_mandir}/man1/*.1*
%{_mandir}/man3/*.3pm*
%{_mandir}/man1/perlcritic.1*
%{_mandir}/man3/Perl::Critic*.3*
%changelog
* Thu Jan 21 2016 Paul Howarth <paul@city-fan.org> - 1.05-2
- Don't rely on the behavior of all() when the list is empty (CPAN RT#63816)
- Fix expected failure count for multiple glob test in
BuiltinFunctions::RequireGlobFunction, changed with later version of PPI
(CPAN RT#30139)
- Fix license tag
- Fix source URL to point to MetaCPAN, where it can still be found
- Classify buildreqs by usage
- Run tests with LANG=en_US so spell check works properly
- Drop %%defattr, redundant since rpm 4.4
- Don't use macros for commands
- Make %%files list more explicit
- Use %%{_fixperms} macro rather than our own chmod incantation
* Tue Mar 20 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.05-1
- Update to 1.05.
* Thu Feb 15 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.03-1
- Update to 1.03.
* Fri Jan 26 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.01-2
- Bumping release (forgot to commit sources and .cvsignore changes).
* Fri Jan 26 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.01-1
- Update to 1.01.
- New build requirement: perl(Test::Memory::Cycle).
* Thu Jan 25 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.23-2
- perl(Set::Scalar) is no longer required.
* Wed Jan 24 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.23-1
- Update to 0.23.
- New requirement: perl(B::Keywords).
- Author tests coverage improved.
* Sun Dec 17 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.22-2
- Enabled author tests.
- BR perl(HomeDir).
* Sun Dec 17 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.22-1
- Update to 0.22.
* Sat Nov 11 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.21-1
- Update to 0.21.
- New BR: perl(Set::Scalar).
* Sat Sep 16 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.2-1
- First build.

View File

@ -1 +1 @@
a31ab7c92cdb0501c1a3e298495f61c5 Perl-Critic-0.2.tar.gz
9f0cddca8c4279f94687e2b6822aefba Perl-Critic-1.05.tar.gz