perl-Syntax-Keyword-Dynamic.../perl-Syntax-Keyword-Dynamic...

180 lines
6.6 KiB
RPMSpec
Raw Normal View History

%define perl_bootstrap 1
2020-07-28 07:27:13 +00:00
# Enable debugging with Devel::MAT
%bcond_with perl_Syntax_Keyword_Dynamically_enables_Devel_MAT
# Perform optional tests
%bcond_without perl_Syntax_Keyword_Dynamically_enables_optional_test
Name: perl-Syntax-Keyword-Dynamically
Version: 0.09
Release: 1%{?dist}
2020-07-28 07:27:13 +00:00
Summary: Dynamically change the value of a variable
License: GPL+ or Artistic
URL: https://metacpan.org/release/Syntax-Keyword-Dynamically
Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Syntax-Keyword-Dynamically-%{version}.tar.gz
BuildRequires: coreutils
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl-interpreter
2021-05-03 09:22:43 +00:00
BuildRequires: perl(:VERSION) >= 5
2020-07-28 07:27:13 +00:00
%if %{with perl_Syntax_Keyword_Dynamically_enables_Devel_MAT}
BuildRequires: perl(Devel::MAT::Dumper::Helper)
%endif
BuildRequires: perl(ExtUtils::CBuilder)
BuildRequires: perl(Module::Build)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
2021-05-03 09:22:43 +00:00
BuildRequires: perl(XS::Parse::Keyword::Builder)
2020-07-28 07:27:13 +00:00
# Run-time:
BuildRequires: perl(:VERSION) >= 5.14
BuildRequires: perl(Carp)
2021-05-03 09:22:43 +00:00
# lib/Syntax/Keyword/Dynamically.xs includes XSParseKeyword.h generated by
# XS::Parse::Keyword::Builder which loads XS::Parse::Keyword of version
# specified by boot_xs_parse_keyword() argument in Dynamically.xs
BuildRequires: perl(XS::Parse::Keyword)
2020-07-28 07:27:13 +00:00
BuildRequires: perl(XSLoader)
# Tests:
BuildRequires: perl(Test::More) >= 0.88
%if %{with perl_Syntax_Keyword_Dynamically_enables_optional_test} && !%{defined perl_bootstrap}
# A cycle: perl-Future-AsyncAwait → perl-Syntax-Keyword-Dynamically
# Optional tests:
BuildRequires: perl(Future)
BuildRequires: perl(Future::AsyncAwait) >= 0.31
BuildRequires: perl(Object::Pad) >= 0.15
BuildRequires: perl(Sentinel)
BuildRequires: perl(Test::Pod) >= 1
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
2021-05-03 09:22:43 +00:00
# lib/Syntax/Keyword/Dynamically.xs includes XSParseKeyword.h generated by
# XS::Parse::Keyword::Builder which loads XS::Parse::Keyword of version
# specified by boot_xs_parse_keyword() argument in Dynamically.xs
Requires: perl(XS::Parse::Keyword)
%if %{defined perl_XS_Parse_Keyword_ABI}
# XS::Parse::Keyword maintains multiple ABIs whose compatibility is checked at
# run-time by S_boot_xs_parse_keyword() compiled into this package.
# The ABI is defined in XSPARSEKEYWORD_ABI_VERSION of XSParseKeyword.h
Requires: %{perl_XS_Parse_Keyword_ABI}
%endif
2020-07-28 07:27:13 +00:00
2021-05-03 09:35:29 +00:00
# Remove under-specified dependencies
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Test::More\\)$
2020-07-28 07:27:13 +00:00
%description
This Perl module provides a syntax plugin that implements a single keyword,
dynamically, which alters the behavior of a scalar assignment operation.
Syntactically and semantically it is similar to the built-in Perl keyword
local, but is implemented somewhat differently to give two key advantages over
regular local: You can dynamically assign to left-value functions and
accessors, and you can dynamically assign to regular lexical variables.
2021-05-03 09:35:29 +00:00
%package tests
Summary: Tests for %{name}
BuildArch: noarch
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: perl-Test-Harness
Requires: perl(Test::More) >= 0.88
%if %{with perl_Syntax_Keyword_Dynamically_enables_optional_test} && !%{defined perl_bootstrap}
# A cycle: perl-Future-AsyncAwait → perl-Syntax-Keyword-Dynamically
2021-06-01 10:44:35 +00:00
Requires: perl(Future)
Requires: perl(Future::AsyncAwait) >= 0.31
Requires: perl(Object::Pad) >= 0.15
Requires: perl(Sentinel)
2021-05-03 09:35:29 +00:00
%endif
%description tests
Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".
2020-07-28 07:27:13 +00:00
%prep
%setup -q -n Syntax-Keyword-Dynamically-%{version}
%if !%{with perl_Syntax_Keyword_Dynamically_enables_optional_test} || %{defined perl_bootstrap}
for F in t/80await+dynamically.t t/80dynamically+Object-Pad.t \
t/80dynamically+Sentinel.t t/81async-method+dynamically.t t/99pod.t
do
rm "$F"
perl -i -ne 'print $_ unless m{^\Q'"$F"'\E}' MANIFEST
done
%endif
2021-05-03 09:35:29 +00:00
chmod +x t/*.t
2020-07-28 07:27:13 +00:00
%build
perl Build.PL --installdirs=vendor --optimize="$RPM_OPT_FLAGS"
./Build
%install
2021-06-01 10:44:35 +00:00
./Build install --destdir=%{buildroot} --create_packlist=0
find %{buildroot} -type f -name '*.bs' -size 0 -delete
%{_fixperms} %{buildroot}/*
2021-05-03 09:35:29 +00:00
# Install tests
mkdir -p %{buildroot}%{_libexecdir}/%{name}
cp -a t %{buildroot}%{_libexecdir}/%{name}
%if %{with perl_Syntax_Keyword_Dynamically_enables_optional_test} && !%{defined perl_bootstrap}
rm %{buildroot}%{_libexecdir}/%{name}/t/99pod.t
%endif
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
#!/bin/sh
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
EOF
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
2020-07-28 07:27:13 +00:00
%check
2021-05-03 09:35:29 +00:00
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
2020-07-28 07:27:13 +00:00
./Build test
%files
%license LICENSE
%doc Changes README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Syntax*
%{_mandir}/man3/*
2021-05-03 09:35:29 +00:00
%files tests
%{_libexecdir}/%{name}
2020-07-28 07:27:13 +00:00
%changelog
* Thu Aug 26 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.09-1
- 0.09 bump; Bootstrap against perl-XS-Parse-Keyword-0.13
* Tue Aug 17 2021 Petr Pisar <ppisar@redhat.com> - 0.08-9
- Finish bootstrap against perl-XS-Parse-Keyword-0.12 (bug #1994077)
* Tue Aug 17 2021 Petr Pisar <ppisar@redhat.com> - 0.08-8
- Bootstrap against perl-XS-Parse-Keyword-0.12 (bug #1994077)
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.08-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 02 2021 Petr Pisar <ppisar@redhat.com> - 0.08-6
- Rebuild against perl-XS-Parse-Keyword-0.06 (bug #1966787)
* Tue Jun 01 2021 Petr Pisar <ppisar@redhat.com> - 0.08-5
- Finish bootstrapping against XS-Parse-Keyword-0.04 (CPAN RT#136611)
2021-06-01 10:44:35 +00:00
* Tue Jun 01 2021 Petr Pisar <ppisar@redhat.com> - 0.08-4
- Rebuild against XS-Parse-Keyword-0.04 (CPAN RT#136611)
* Mon May 24 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.08-3
- Perl 5.34 re-rebuild of bootstrapped packages
2021-05-21 22:27:26 +00:00
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.08-2
- Perl 5.34 rebuild
2021-05-03 09:22:43 +00:00
* Mon May 03 2021 Petr Pisar <ppisar@redhat.com> - 0.08-1
- 0.08 bump
2021-05-03 09:35:29 +00:00
- Package the tests
2021-05-03 09:22:43 +00:00
2021-02-03 14:20:36 +00:00
* Wed Feb 03 2021 Petr Pisar <ppisar@redhat.com> - 0.07-1
- 2.07 bump
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.06-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
2020-11-03 12:26:53 +00:00
* Tue Nov 03 2020 Petr Pisar <ppisar@redhat.com> - 0.06-1
- 0.06 bump
2020-07-28 13:52:52 +00:00
* Tue Jul 28 2020 Petr Pisar <ppisar@redhat.com> - 0.05-2
- Finish a bootstrap
2020-07-28 07:27:13 +00:00
* Wed Jul 22 2020 Petr Pisar <ppisar@redhat.com> 0.05-1
- Specfile autogenerated by cpanspec 1.78.