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