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