# Enable PPIx::Regexp optional feature
%bcond_without perl_PPIx_QuoteLike_enables_PPIx_Regexp

Summary:        Parse Perl string literals and string-literal-like things
Name:           perl-PPIx-QuoteLike
Version:        0.019
Release:        1%{?_dist_release}
Group:          programming
Vendor:         Project Vine
Distribution:   Vine Linux

License:        GPL+ or Artistic
URL:            https://metacpan.org/release/PPIx-QuoteLike
Source0:        https://cpan.metacpan.org/authors/id/W/WY/WYANT/PPIx-QuoteLike-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  make
BuildRequires:  perl >= 2:5.34.0
# Build.PL and inc/My/Module/Build.pm not used
BuildRequires:  perl(Carp)
BuildRequires:  perl(Config)
BuildRequires:  perl(constant)
BuildRequires:  perl(Exporter)
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(lib)
BuildRequires:  perl(strict)
# Test::Without::Module not helpful
BuildRequires:  perl(warnings)
# Run-time:
BuildRequires:  perl(base)
BuildRequires:  perl(Encode)
BuildRequires:  perl(List::Util)
BuildRequires:  perl(PPI::Document)
BuildRequires:  perl(PPI::Dumper)
BuildRequires:  perl(re)
BuildRequires:  perl(Scalar::Util)
%if %{with perl_PPIx_QuoteLike_enables_PPIx_Regexp}
# Optional run-time:
# Author states there is a build-cycle with PPIx::Regexp, but I cannot see
# any.
BuildRequires:  perl(PPIx::Regexp)
%endif
# Tests:
BuildRequires:  perl(charnames)
BuildRequires:  perl(open)
BuildRequires:  perl(Test::More)
Requires:       perl >= 2:5.34.0
Requires:       perl(PPI::Document)
Requires:       perl(PPI::Dumper)
%if %{with perl_PPIx_QuoteLike_enables_PPIx_Regexp}
Recommends:     perl(PPIx::Regexp)
%endif

%{?perl_default_filter}
# Remove under-specified dependencies
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((PPI::Document|PPI::Dumper)\\)$

%description
This Perl class parses Perl string literals and things that are reasonably
like string literals. Its real reason for being is to find interpolated
variables for Perl::Critic policies and similar code.


%prep
%setup -q -n PPIx-QuoteLike-%{version}
# Fix shell bang
perl -MConfig -p -i -e 's{\A#!/usr/bin/env perl\b}{$Config{startperl}}' \
    eg/pqldump
chmod -x eg/pqldump


%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
make %{?_smp_mflags}


%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
%{_fixperms} $RPM_BUILD_ROOT/*


%check
make test


%files
%license LICENSES/*
%doc Changes eg README
%{perl_vendorlib}/*
%{_mandir}/man3/*


%changelog
* Sat Nov 20 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.019-1
- new upstream release.
- built with perl-5.34.0.

* Sun May 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.006-4
- initial build for Vine Linux.

* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.006-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.006-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jul 10 2018 Petr Pisar <ppisar@redhat.com> - 0.006-1
- 0.006 bump

* Fri Jun 29 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.005-2
- Perl 5.28 rebuild

* Mon Jun 04 2018 Petr Pisar <ppisar@redhat.com> 0.005-1
- Specfile autogenerated by cpanspec 1.78.
