Fix t/07_perlcritic.t for @INC without '.' (GH#738)
Also: drop legacy Group: tags
This commit is contained in:
parent
82b1ac4509
commit
9054d02e2e
|
@ -0,0 +1,36 @@
|
|||
From 62b12906e6d9afad570ec29716e3ef4d9bd1aa3f Mon Sep 17 00:00:00 2001
|
||||
From: Andy Lester <andy@petdance.com>
|
||||
Date: Wed, 17 May 2017 23:05:50 -0500
|
||||
Subject: [PATCH] Use absolute paths so that lack of . in @INC should still
|
||||
work. Also remove a comment about a now-deleted file.
|
||||
|
||||
---
|
||||
t/07_perlcritic.t | 8 ++------
|
||||
1 file changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/t/07_perlcritic.t b/t/07_perlcritic.t
|
||||
index 37aa4a1d..a4a13350 100644
|
||||
--- a/t/07_perlcritic.t
|
||||
+++ b/t/07_perlcritic.t
|
||||
@@ -14,19 +14,15 @@ our $VERSION = '1.126';
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
-my $perlcritic = File::Spec->catfile( qw(blib script perlcritic) );
|
||||
+my $perlcritic = File::Spec->rel2abs( File::Spec->catfile( qw( blib script perlcritic ) ) );
|
||||
if (not -e $perlcritic) {
|
||||
- $perlcritic = File::Spec->catfile( qw(bin perlcritic) )
|
||||
+ $perlcritic = File::Spec->rel2abs( File::Spec->catfile( qw( bin perlcritic ) ) );
|
||||
}
|
||||
|
||||
require_ok($perlcritic);
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
-# ensure we return true if this test is loaded by
|
||||
-# t/07_perlcritic.t_without_optional_dependencies.t
|
||||
-1;
|
||||
-
|
||||
# Local Variables:
|
||||
# mode: cperl
|
||||
# cperl-indent-level: 4
|
|
@ -1,11 +1,11 @@
|
|||
Name: perl-Perl-Critic
|
||||
Version: 1.126
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: Critique Perl source code for best-practices
|
||||
Group: Development/Libraries
|
||||
License: GPL+ or Artistic
|
||||
URL: http://search.cpan.org/dist/Perl-Critic/
|
||||
Source0: http://search.cpan.org/CPAN/authors/id/T/TH/THALJEF/Perl-Critic-%{version}.tar.gz
|
||||
Patch0: https://github.com/Perl-Critic/Perl-Critic/commit/62b12906.patch
|
||||
BuildArch: noarch
|
||||
|
||||
# Build process
|
||||
|
@ -19,7 +19,7 @@ BuildRequires: perl(Module::Build) >= 0.42
|
|||
BuildRequires: perl(Task::Weaken)
|
||||
|
||||
# Module requirements
|
||||
%if ! (0%{?rhel} >= 7)
|
||||
%if ! (0%{?rhel:1})
|
||||
BuildRequires: aspell-en
|
||||
%endif
|
||||
BuildRequires: perl(B::Keywords) >= 1.05
|
||||
|
@ -73,7 +73,7 @@ BuildRequires: perl(Devel::EnforceEncapsulation)
|
|||
BuildRequires: perl(Perl::Critic::Policy::Editor::RequireEmacsFileVariables)
|
||||
BuildRequires: perl(Perl::Critic::Policy::ErrorHandling::RequireUseOfExceptions)
|
||||
BuildRequires: perl(Perl::Critic::Policy::Miscellanea::RequireRcsKeywords)
|
||||
%if ! (0%{?rhel} >= 7)
|
||||
%if ! (0%{?rhel:1})
|
||||
BuildRequires: perl(Test::Kwalitee) >= 1.15
|
||||
%endif
|
||||
BuildRequires: perl(Test::Perl::Critic)
|
||||
|
@ -84,7 +84,7 @@ BuildRequires: perl(Test::Without::Module)
|
|||
|
||||
# Optional/not automatically detected runtime dependencies
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
%if ! (0%{?rhel} >= 7)
|
||||
%if ! (0%{?rhel:1})
|
||||
Requires: aspell
|
||||
%endif
|
||||
Requires: perl(File::HomeDir)
|
||||
|
@ -107,9 +107,8 @@ also create new Policy modules that suit your own tastes.
|
|||
|
||||
%package -n perl-Test-Perl-Critic-Policy
|
||||
Summary: A framework for testing your custom Policies
|
||||
Group: Development/Libraries
|
||||
License: GPL+ or Artistic
|
||||
Requires: perl(Test::Builder) >= 0.82
|
||||
Requires: perl(Test::Builder) >= 0.92
|
||||
|
||||
%description -n perl-Test-Perl-Critic-Policy
|
||||
This module provides a framework for function-testing your custom
|
||||
|
@ -120,6 +119,9 @@ of Perl code were mixed directly in the test script. That sucked.
|
|||
%prep
|
||||
%setup -q -n Perl-Critic-%{version}
|
||||
|
||||
# Fix t/07_perlcritic.t for @INC without '.' (GH#738)
|
||||
%patch0 -p1
|
||||
|
||||
# Drop exec bits from samples/docs to avoid dependency bloat
|
||||
find tools examples -type f -exec chmod -c -x {} ';'
|
||||
|
||||
|
@ -129,7 +131,7 @@ perl Build.PL --installdirs=vendor
|
|||
|
||||
%install
|
||||
./Build install --destdir=%{buildroot} --create_packlist=0
|
||||
%{_fixperms} %{buildroot}
|
||||
%{_fixperms} -c %{buildroot}
|
||||
|
||||
%check
|
||||
LC_ALL=en_US ./Build %{!?perl_bootstrap:author}test
|
||||
|
@ -151,6 +153,10 @@ LC_ALL=en_US ./Build %{!?perl_bootstrap:author}test
|
|||
%{_mandir}/man3/Test::Perl::Critic::Policy.3*
|
||||
|
||||
%changelog
|
||||
* Wed May 24 2017 Paul Howarth <paul@city-fan.org> - 1.126-6
|
||||
- Fix t/07_perlcritic.t for @INC without '.' (GH#738)
|
||||
- Drop legacy Group: tags
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.126-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue