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