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

231 lines
8.7 KiB
RPMSpec
Raw Permalink Normal View History

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
2023-09-22 08:56:18 +00:00
Version: 0.13
Release: 1%{?dist}
2020-07-28 07:27:13 +00:00
Summary: Dynamically change the value of a variable
2022-11-23 09:19:08 +00:00
License: GPL-1.0-or-later OR Artistic-1.0-Perl
2020-07-28 07:27:13 +00:00
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
2022-11-23 09:19:08 +00:00
BuildRequires: findutils
2020-07-28 07:27:13 +00:00
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}
2022-03-17 12:46:56 +00:00
BuildRequires: perl(Devel::MAT::Dumper::Helper) >= 0.44
2020-07-28 07:27:13 +00:00
%endif
BuildRequires: perl(ExtUtils::CBuilder)
2022-11-23 09:19:08 +00:00
%define Future_AsyncAwait_minver 0.60
BuildRequires: perl(Future::AsyncAwait::ExtensionBuilder) >= %{Future_AsyncAwait_minver}
2020-07-28 07:27:13 +00:00
BuildRequires: perl(Module::Build)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
BuildRequires: perl(XS::Parse::Keyword::Builder) >= 0.13
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) >= 0.13
2020-07-28 07:27:13 +00:00
BuildRequires: perl(XSLoader)
# Tests:
2023-03-06 11:35:14 +00:00
BuildRequires: perl(Test2::V0)
2020-07-28 07:27:13 +00:00
%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)
2022-11-23 09:19:08 +00:00
# Higher version from boot_future_asyncawait()
BuildRequires: perl(Future::AsyncAwait) >= %{Future_AsyncAwait_minver}
2023-09-22 08:56:18 +00:00
%define Object_Pad_minver 0.800
BuildRequires: perl(Object::Pad) >= %{Object_Pad_minver}
2020-07-28 07:27:13 +00:00
BuildRequires: perl(Sentinel)
BuildRequires: perl(Test::Pod) >= 1
%endif
2022-11-23 09:19:08 +00:00
# From boot_future_asyncawait() argument in lib/Syntax/Keyword/Dynamically.xs
Requires: perl(Future::AsyncAwait) >= %{Future_AsyncAwait_minver}
%if %{defined perl_Future_AsyncAwait_ABI}
2022-11-23 09:19:08 +00:00
# Future::AsyncAwait maintains multiple ABIs whose compatibility is checked at
# run-time.
Requires: %{perl_Future_AsyncAwait_ABI}
%endif
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) >= 0.13
%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
%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
%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
2023-09-22 08:56:18 +00:00
Requires: perl(Object::Pad) >= %{Object_Pad_minver}
2021-06-01 10:44:35 +00:00
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
2022-11-23 09:19:08 +00:00
%dir %{perl_vendorarch}/auto/Syntax
%dir %{perl_vendorarch}/auto/Syntax/Keyword
%{perl_vendorarch}/auto/Syntax/Keyword/Dynamically
%dir %{perl_vendorarch}/Syntax
%dir %{perl_vendorarch}/Syntax/Keyword
%{perl_vendorarch}/Syntax/Keyword/Dynamically.pm
%{_mandir}/man3/Syntax::Keyword::Dynamically.*
2020-07-28 07:27:13 +00:00
2021-05-03 09:35:29 +00:00
%files tests
%{_libexecdir}/%{name}
2020-07-28 07:27:13 +00:00
%changelog
2023-09-22 08:56:18 +00:00
* Fri Sep 22 2023 Petr Pisar <ppisar@redhat.com> - 0.13-1
- 0.13 bump
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jul 12 2023 Jitka Plesnikova <jplesnik@redhat.com> - 0.12-3
- Perl 5.38 re-rebuild of bootstrapped packages
2023-07-11 13:24:34 +00:00
* Tue Jul 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 0.12-2
- Perl 5.38 rebuild
2023-03-06 11:35:14 +00:00
* Mon Mar 06 2023 Petr Pisar <ppisar@redhat.com> - 0.12-1
- 0.12 bump
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
2022-11-23 09:19:08 +00:00
* Wed Nov 23 2022 Petr Pisar <ppisar@redhat.com> - 0.11-1
- 0.11 bump
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.10-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jun 03 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.10-4
- Perl 5.36 re-rebuild of bootstrapped packages
2022-05-31 20:13:49 +00:00
* Tue May 31 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.10-3
- Perl 5.36 rebuild
* Tue Mar 22 2022 Adam Williamson <awilliam@redhat.com> - 0.10-2
- Rebuild with no changes to fix update mess on F36
2022-03-17 12:46:56 +00:00
* Thu Mar 17 2022 Petr Pisar <ppisar@redhat.com> - 0.10-1
- 0.10 bump
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.09-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Aug 27 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.09-2
- Finish bootstrap against perl-XS-Parse-Keyword-0.13
* 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.