e704e1f
# Enable PPIx::Regexp optional feature
e704e1f
%bcond_without perl_PPIx_QuoteLike_enables_PPIx_Regexp
e704e1f
1ed8d8d
Name:           perl-PPIx-QuoteLike
13a075b
Version:        0.023
c8dffe6
Release:        6%{?dist}
1ed8d8d
Summary:        Parse Perl string literals and string-literal-like things
418809f
License:        GPL-1.0-or-later OR Artistic-1.0-Perl
1ed8d8d
URL:            https://metacpan.org/release/PPIx-QuoteLike
1ed8d8d
Source0:        https://cpan.metacpan.org/authors/id/W/WY/WYANT/PPIx-QuoteLike-%{version}.tar.gz
1ed8d8d
BuildArch:      noarch
17e4619
BuildRequires:  coreutils
1ed8d8d
BuildRequires:  make
1ed8d8d
BuildRequires:  perl-generators
1ed8d8d
BuildRequires:  perl-interpreter
1ed8d8d
# Build.PL and inc/My/Module/Build.pm not used
1ed8d8d
BuildRequires:  perl(:VERSION) >= 5.6
1ed8d8d
BuildRequires:  perl(Carp)
1ed8d8d
BuildRequires:  perl(Config)
1ed8d8d
BuildRequires:  perl(constant)
1ed8d8d
BuildRequires:  perl(Exporter)
1ed8d8d
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
1ed8d8d
BuildRequires:  perl(lib)
1ed8d8d
BuildRequires:  perl(strict)
1ed8d8d
# Test::Without::Module not helpful
1ed8d8d
BuildRequires:  perl(warnings)
1ed8d8d
# Run-time:
1ed8d8d
BuildRequires:  perl(base)
1ed8d8d
BuildRequires:  perl(Encode)
1ed8d8d
BuildRequires:  perl(List::Util)
5ce4c67
BuildRequires:  perl(PPI::Document) >= 1.238
5ce4c67
BuildRequires:  perl(PPI::Dumper) >= 1.238
1ed8d8d
BuildRequires:  perl(re)
164ade7
BuildRequires:  perl(Readonly)
1ed8d8d
BuildRequires:  perl(Scalar::Util)
e704e1f
%if %{with perl_PPIx_QuoteLike_enables_PPIx_Regexp}
1ed8d8d
# Optional run-time:
a185a73
# Author states there is a build-cycle with PPIx::Regexp, but I cannot see
1ed8d8d
# any.
1ed8d8d
BuildRequires:  perl(PPIx::Regexp)
e704e1f
%endif
1ed8d8d
# Tests:
e704e1f
BuildRequires:  perl(charnames)
e704e1f
BuildRequires:  perl(open)
1ed8d8d
BuildRequires:  perl(Test::More) >= 0.88
5ce4c67
Requires:       perl(PPI::Document) >= 1.238
5ce4c67
Requires:       perl(PPI::Dumper) >= 1.238
e704e1f
%if %{with perl_PPIx_QuoteLike_enables_PPIx_Regexp}
1ed8d8d
Recommends:     perl(PPIx::Regexp)
e704e1f
%endif
1ed8d8d
1ed8d8d
# Remove under-specified dependencies
1ed8d8d
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((PPI::Document|PPI::Dumper)\\)$
1ed8d8d
1ed8d8d
%description
1ed8d8d
This Perl class parses Perl string literals and things that are reasonably
1ed8d8d
like string literals. Its real reason for being is to find interpolated
1ed8d8d
variables for Perl::Critic policies and similar code.
1ed8d8d
2ffb0cd
%package tests
2ffb0cd
Summary:        Tests for %{name}
2ffb0cd
Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
2ffb0cd
Requires:       perl-Test-Harness
2ffb0cd
Requires:       perl(open)
5ce4c67
Requires:       perl(PPI::Document) >= 1.238
2ffb0cd
2ffb0cd
%description tests
2ffb0cd
Tests from %{name}. Execute them
2ffb0cd
with "%{_libexecdir}/%{name}/test".
2ffb0cd
1ed8d8d
%prep
1ed8d8d
%setup -q -n PPIx-QuoteLike-%{version}
879a815
# Fix shell bang and permissions
879a815
for F in eg/{pqldump,variables}; do
879a815
    perl -MConfig -p -i -e 's{\A#!/usr/bin/env perl\b}{$Config{startperl}}' \
879a815
        "$F"
879a815
    chmod -x "$F"
879a815
done
2ffb0cd
# Help generators to recognize Perl scripts
2ffb0cd
for F in t/*.t; do
2ffb0cd
    perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
2ffb0cd
    chmod +x "$F"
2ffb0cd
done
1ed8d8d
1ed8d8d
%build
879a815
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
879a815
%{make_build}
1ed8d8d
1ed8d8d
%install
879a815
%{make_install}
efa0a33
%{_fixperms} -c %{buildroot}
efa0a33
2ffb0cd
# Install tests
2ffb0cd
mkdir -p %{buildroot}%{_libexecdir}/%{name}
2ffb0cd
cp -a t %{buildroot}%{_libexecdir}/%{name}
2ffb0cd
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
2ffb0cd
#!/bin/sh
2ffb0cd
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
2ffb0cd
EOF
2ffb0cd
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
1ed8d8d
1ed8d8d
%check
2ffb0cd
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
1ed8d8d
make test
1ed8d8d
1ed8d8d
%files
1ed8d8d
%license LICENSES/*
8ae0c9f
%doc Changes CONTRIBUTING eg README
efa0a33
%{perl_vendorlib}/PPIx/
efa0a33
%{_mandir}/man3/PPIx::QuoteLike*.3*
1ed8d8d
2ffb0cd
%files tests
2ffb0cd
%{_libexecdir}/%{name}
2ffb0cd
1ed8d8d
%changelog
c8dffe6
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.023-6
c8dffe6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
c8dffe6
e019b89
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.023-5
e019b89
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
e019b89
3a4742b
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.023-4
3a4742b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
3a4742b
cf885b3
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.023-3
cf885b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
cf885b3
418809f
* Sat Sep 17 2022 Paul Howarth <paul@city-fan.org> - 0.023-2
418809f
- Use SPDX-format license tag
418809f
13a075b
* Fri Sep 16 2022 Paul Howarth <paul@city-fan.org> - 0.023-1
13a075b
- Update to 0.023 (rhbz#2127475)
13a075b
  - Update discouragement notice for variables(), and add a TODO in
13a075b
    t/variables.t for why
13a075b
  - Correct normalization of ${^FOO} for PPI: if the caret is present the
13a075b
    braces are not removed
13a075b
96cf579
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.022-3
96cf579
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
96cf579
8fb5f2e
* Wed Jun 01 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.022-2
8fb5f2e
- Perl 5.36 rebuild
8fb5f2e
be8a541
* Sat Apr 16 2022 Paul Howarth <paul@city-fan.org> - 0.022-1
be8a541
- Update to 0.022
be8a541
  - Remove 'postderef' argument to new(); postfix dereference is always
be8a541
    recognized
be8a541
5ce4c67
* Sun Apr  3 2022 Paul Howarth <paul@city-fan.org> - 0.021-1
5ce4c67
- Update to 0.021
5ce4c67
  - Recognize postfix deref in '@{[ ... ]}' for determining minimum Perl
5ce4c67
    version; this recognizes all forms of postfix dereference, including ->%%*,
5ce4c67
    ->&*, and ->** (NOTE: for now, this remains a
5ce4c67
    PPIx::QuoteLike::Token::Interpolation)
5ce4c67
  - Require PPI 1.238 for postfix deref support, and prune code that dealt with
5ce4c67
    PPI's old behavior
5ce4c67
  - Postfix %%*, &*, and ** do not interpolate
5ce4c67
  - Correct perl_version_introduced() for interpolated postfix scalar deref
5ce4c67
edd51a1
* Tue Mar 22 2022 Adam Williamson <awilliam@redhat.com> - 0.020-2
edd51a1
- Rebuild with no changes to fix update mess on F36
edd51a1
9553698
* Thu Mar 17 2022 Paul Howarth <paul@city-fan.org> - 0.020-1
9553698
- Update to 0.020
9553698
  - Correct and optimize the computation of logical column position (the one
9553698
    that takes account of tabs)
9553698
524f044
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.019-2
524f044
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
524f044
8ae0c9f
* Tue Nov 16 2021 Paul Howarth <paul@city-fan.org> - 0.019-1
8ae0c9f
- Update to 0.019
8ae0c9f
  - Add CONTRIBUTING file
8ae0c9f
  - Try to quell weird Win32 test failures that seem to occur only in tests
8ae0c9f
    where I am using 'use open' to put the standard handles into UTF-8 mode;
8ae0c9f
    the fix (hopefully) is to do this to the Test::Harness handles at run time
8ae0c9f
    instead of to the standard handles at compile time
8ae0c9f
d7bfcfb
* Fri Oct 22 2021 Paul Howarth <paul@city-fan.org> - 0.018-1
d7bfcfb
- Update to 0.018
d7bfcfb
  - Argument postderef is now fatal
d7bfcfb
  - Correct generation of 'provides' metadata
d7bfcfb
666b07b
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.017-3
666b07b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
666b07b
c586f46
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.017-2
c586f46
- Perl 5.34 rebuild
c586f46
efa0a33
* Fri Apr 16 2021 Paul Howarth <paul@city-fan.org> - 0.017-1
efa0a33
- Update to 0.017
efa0a33
  - All uses of the postderef argument to new() now warn
efa0a33
- Fix permissions verbosely
efa0a33
- Make %%files list more explicit
efa0a33
dbc7dd1
* Fri Mar 26 2021 Petr Pisar <ppisar@redhat.com> - 0.016-1
dbc7dd1
- 0.016 bump
2ffb0cd
- Package tests
dbc7dd1
f75d53c
* Fri Feb 05 2021 Petr Pisar <ppisar@redhat.com> - 0.015-1
f75d53c
- 0.015 bump
f75d53c
48e4ed4
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-2
48e4ed4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
48e4ed4
64c02fb
* Thu Jan 14 2021 Petr Pisar <ppisar@redhat.com> - 0.014-1
64c02fb
- 0.014 bump
64c02fb
17e4619
* Fri Oct 09 2020 Petr Pisar <ppisar@redhat.com> - 0.013-1
17e4619
- 0.013 bump
17e4619
a2b2317
* Tue Jul 28 2020 Petr Pisar <ppisar@redhat.com> - 0.012-1
a2b2317
- 0.012 bump
a2b2317
3754b8c
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.011-2
3754b8c
- Perl 5.32 rebuild
3754b8c
164ade7
* Tue Mar 31 2020 Petr Pisar <ppisar@redhat.com> - 0.011-1
164ade7
- 0.011 bump
164ade7
f3d8c2e
* Mon Mar 09 2020 Petr Pisar <ppisar@redhat.com> - 0.010-1
f3d8c2e
- 0.010 bump
f3d8c2e
893f657
* Fri Feb 28 2020 Petr Pisar <ppisar@redhat.com> - 0.009-1
893f657
- 0.009 bump
893f657
a8d5a58
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.008-2
a8d5a58
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
a8d5a58
e4da36f
* Mon Aug 19 2019 Petr Pisar <ppisar@redhat.com> - 0.008-1
e4da36f
- 0.008 bump
e4da36f
7003839
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.007-2
7003839
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7003839
879a815
* Wed Jun 05 2019 Petr Pisar <ppisar@redhat.com> - 0.007-1
879a815
- 0.007 bump
879a815
9124cff
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.006-4
9124cff
- Perl 5.30 rebuild
9124cff
3b977a6
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.006-3
3b977a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
3b977a6
1bcfe2e
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.006-2
1bcfe2e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
1bcfe2e
a185a73
* Tue Jul 10 2018 Petr Pisar <ppisar@redhat.com> - 0.006-1
a185a73
- 0.006 bump
a185a73
f2cfb58
* Fri Jun 29 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.005-2
f2cfb58
- Perl 5.28 rebuild
f2cfb58
1ed8d8d
* Mon Jun 04 2018 Petr Pisar <ppisar@redhat.com> 0.005-1
1ed8d8d
- Specfile autogenerated by cpanspec 1.78.