3424e4
# Run optional test
3424e4
%if ! (0%{?rhel})
3424e4
%bcond_without perl_constant_enables_optional_test
3424e4
%else
3424e4
%bcond_with perl_constant_enables_optional_test
3424e4
%endif
3424e4
3424e4
%global cpan_version 1.27
3424e4
3424e4
Name:           perl-constant
3424e4
Version:        1.33
3424e4
Release:        461%{?dist}
3424e4
Summary:        Perl pragma to declare constants
3424e4
License:        GPL+ or Artistic
3424e4
URL:            https://metacpan.org/release/constant
3424e4
Source0:        https://cpan.metacpan.org/authors/id/S/SA/SAPER/constant-%{cpan_version}.tar.gz
3424e4
# Update to 1.33
3424e4
Patch0:         constant-1.33-update.patch
3424e4
BuildArch:      noarch
3424e4
BuildRequires: make
3424e4
BuildRequires:  perl-interpreter
3424e4
BuildRequires:  perl-generators
3424e4
BuildRequires:  perl(ExtUtils::MakeMaker)
3424e4
BuildRequires:  perl(strict)
3424e4
# Run-time:
3424e4
BuildRequires:  perl(Carp)
3424e4
BuildRequires:  perl(vars)
3424e4
BuildRequires:  perl(warnings::register)
3424e4
# Tests:
3424e4
BuildRequires:  perl(Test::More)
3424e4
BuildRequires:  perl(utf8)
3424e4
BuildRequires:  perl(warnings)
3424e4
%if %{with perl_constant_enables_optional_test} && !%{defined perl_bootstrap}
3424e4
# Optional tests:
3424e4
BuildRequires:  perl(Test::Pod) >= 1.14
3424e4
BuildRequires:  perl(Test::Pod::Coverage) >= 1.04
3424e4
%endif
3424e4
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
3424e4
Requires:       perl(Carp)
3424e4
3424e4
%description
3424e4
This pragma allows you to declare constants at compile-time:
3424e4
3424e4
use constant PI => 4 * atan2(1, 1);
3424e4
3424e4
When you declare a constant such as "PI" using the method shown above,
3424e4
each machine your script runs upon can have as many digits of accuracy
3424e4
as it can use. Also, your program will be easier to read, more likely
3424e4
to be maintained (and maintained correctly), and far less likely to
3424e4
send a space probe to the wrong planet because nobody noticed the one
3424e4
equation in which you wrote 3.14195.
3424e4
3424e4
When a constant is used in an expression, Perl replaces it with its
3424e4
value at compile time, and may then optimize the expression further.
3424e4
In particular, any code in an "if (CONSTANT)" block will be optimized
3424e4
away if the constant is false.
3424e4
3424e4
%prep
3424e4
%setup -q -n constant-%{cpan_version}
3424e4
%patch0 -p1
3424e4
3424e4
%build
3424e4
perl Makefile.PL INSTALLDIRS=vendor
3424e4
make %{?_smp_mflags}
3424e4
3424e4
%install
3424e4
make pure_install DESTDIR=$RPM_BUILD_ROOT
3424e4
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
3424e4
%{_fixperms} $RPM_BUILD_ROOT/*
3424e4
3424e4
%check
3424e4
make test
3424e4
3424e4
%files
3424e4
%doc Changes eg README
3424e4
%{perl_vendorlib}/*
3424e4
%{_mandir}/man3/*
3424e4
3424e4
%changelog
3424e4
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.33-461
3424e4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
3424e4
  Related: rhbz#1991688
3424e4
3424e4
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.33-460
3424e4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
3424e4
3424e4
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.33-459
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
3424e4
3424e4
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.33-458
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
3424e4
3424e4
* Fri Jun 26 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-457
3424e4
- Perl 5.32 re-rebuild of bootstrapped packages
3424e4
3424e4
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-456
3424e4
- Increase release to favour standalone package
3424e4
3424e4
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.33-441
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
3424e4
3424e4
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.33-440
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
3424e4
3424e4
* Sun Jun 02 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-439
3424e4
- Perl 5.30 re-rebuild of bootstrapped packages
3424e4
3424e4
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-438
3424e4
- Increase release to favour standalone package
3424e4
3424e4
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.33-419
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
3424e4
3424e4
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.33-418
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
3424e4
3424e4
* Sun Jul 01 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-417
3424e4
- Perl 5.28 re-rebuild of bootstrapped packages
3424e4
3424e4
* Tue Jun 26 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-416
3424e4
- Increase release to favour standalone package
3424e4
3424e4
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.33-396
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3424e4
3424e4
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.33-395
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3424e4
3424e4
* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-394
3424e4
- Perl 5.26 re-rebuild of bootstrapped packages
3424e4
3424e4
* Sat Jun 03 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-393
3424e4
- Perl 5.26 rebuild
3424e4
3424e4
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.33-368
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
3424e4
3424e4
* Wed May 18 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-367
3424e4
- Perl 5.24 re-rebuild of bootstrapped packages
3424e4
3424e4
* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-365
3424e4
- Increase release to favour standalone package
3424e4
3424e4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.33-348
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
3424e4
3424e4
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.33-347
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
3424e4
3424e4
* Wed Jun 10 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-346
3424e4
- Perl 5.22 re-rebuild of bootstrapped packages
3424e4
3424e4
* Thu Jun 04 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-345
3424e4
- Increase release to favour standalone package
3424e4
3424e4
* Wed Jun 03 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-336
3424e4
- Perl 5.22 rebuild
3424e4
3424e4
* Mon May 04 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.33-335
3424e4
- Patched to provide the version 1.33 which is bundled in Perl 5.22
3424e4
3424e4
* Tue Sep 09 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.31-310
3424e4
- Patched to provide the version 1.31 which is bundled in Perl 5.20
3424e4
3424e4
* Mon Sep 08 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.27-295
3424e4
- Perl 5.20 re-rebuild of bootstrapped packages
3424e4
3424e4
* Wed Aug 27 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.27-294
3424e4
- Perl 5.20 rebuild
3424e4
3424e4
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.27-293
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
3424e4
3424e4
* Wed Aug 14 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1.27-292
3424e4
- Perl 5.18 re-rebuild of bootstrapped packages
3424e4
3424e4
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.27-291
3424e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
3424e4
3424e4
* Mon Jul 15 2013 Petr Pisar <ppisar@redhat.com> - 1.27-290
3424e4
- Increase release to favour standalone package
3424e4
3424e4
* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1.27-3
3424e4
- Link minimal build-root packages against libperl.so explicitly
3424e4
3424e4
* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1.27-2
3424e4
- Migrate to ExtUtils::MakeMaker
3424e4
- Do not run optional tests at boot-strap
3424e4
3424e4
* Thu Mar 21 2013 Petr Pisar <ppisar@redhat.com> - 1.27-1
3424e4
- Specfile autogenerated by cpanspec 1.78.