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