2c2eb4
# Because encoding sub-package has independent version, version macro gets
2c2eb4
# redefined.
2c2eb4
%global cpan_version 2.88
2c2eb4
Name:           perl-Encode
2c2eb4
Epoch:          4
2c2eb4
Version:        %{cpan_version}
2c2eb4
# Keep increasing release number even when rebasing version because
2c2eb4
# perl-encoding sub-package has independent version which does not change
2c2eb4
# often and consecutive builds would clash on perl-encoding NEVRA. This is the
2c2eb4
# same case as in perl.spec.
8010a4
Release:        7%{?dist}
2c2eb4
Summary:        Character encodings in Perl
2c2eb4
# ucm:          UCD
2c2eb4
# bin/encguess: Artistic 2.0
2c2eb4
# other files:  GPL+ or Artistic
2c2eb4
License:        (GPL+ or Artistic) and Artistic 2.0 and UCD
2c2eb4
Group:          Development/Libraries
2c2eb4
URL:            http://search.cpan.org/dist/Encode/
2c2eb4
Source0:        http://www.cpan.org/authors/id/D/DA/DANKOGAI/Encode-%{cpan_version}.tar.gz
2c2eb4
BuildRequires:  coreutils
2c2eb4
BuildRequires:  findutils
2c2eb4
BuildRequires:  gcc
2c2eb4
BuildRequires:  make
2c2eb4
BuildRequires:  perl
2c2eb4
BuildRequires:  perl-devel
2c2eb4
BuildRequires:  perl-generators
2c2eb4
BuildRequires:  perl(Config)
2c2eb4
BuildRequires:  perl(ExtUtils::MakeMaker)
2c2eb4
BuildRequires:  perl(File::Spec)
2c2eb4
BuildRequires:  perl(File::Spec::Functions)
2c2eb4
BuildRequires:  perl(strict)
2c2eb4
BuildRequires:  perl(warnings)
2c2eb4
# enc2xs is run at build-time
2c2eb4
# Run-time:
2c2eb4
BuildRequires:  perl(bytes)
2c2eb4
BuildRequires:  perl(Carp)
2c2eb4
BuildRequires:  perl(constant)
2c2eb4
BuildRequires:  perl(Exporter) >= 5.57
2c2eb4
BuildRequires:  perl(File::Basename)
2c2eb4
BuildRequires:  perl(File::Find)
2c2eb4
BuildRequires:  perl(Filter::Util::Call)
2c2eb4
BuildRequires:  perl(Getopt::Long)
2c2eb4
BuildRequires:  perl(Getopt::Std)
2c2eb4
# I18N::Langinfo is optional
2c2eb4
BuildRequires:  perl(MIME::Base64)
2c2eb4
BuildRequires:  perl(overload)
2c2eb4
BuildRequires:  perl(parent) >= 0.221
2c2eb4
# PerlIO::encoding is optional
2c2eb4
# POSIX is optional
2c2eb4
BuildRequires:  perl(re)
2c2eb4
# Storable is optional
2c2eb4
BuildRequires:  perl(utf8)
2c2eb4
BuildRequires:  perl(vars)
2c2eb4
BuildRequires:  perl(XSLoader)
2c2eb4
# Tests:
2c2eb4
# Benchmark not used
2c2eb4
BuildRequires:  perl(charnames)
2c2eb4
BuildRequires:  perl(File::Compare)
2c2eb4
BuildRequires:  perl(File::Copy)
2c2eb4
BuildRequires:  perl(FileHandle)
2c2eb4
BuildRequires:  perl(FindBin)
2c2eb4
BuildRequires:  perl(IO::Select)
2c2eb4
BuildRequires:  perl(IPC::Open3)
2c2eb4
# IPC::Run not used
2c2eb4
BuildRequires:  perl(lib)
2c2eb4
BuildRequires:  perl(Scalar::Util)
2c2eb4
BuildRequires:  perl(Symbol)
2c2eb4
BuildRequires:  perl(Test::More)
2c2eb4
BuildRequires:  perl(Tie::Scalar)
2c2eb4
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
2c2eb4
Requires:       perl(parent) >= 0.221
2c2eb4
2c2eb4
%{?perl_default_filter}
2c2eb4
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\((Encode::ConfigLocal|MY)\\)
2c2eb4
2c2eb4
# Filter under-specified dependencies
2c2eb4
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((Exporter|parent)\\)$
2c2eb4
2c2eb4
%description
2c2eb4
The Encode module provides the interface between Perl strings and the rest
2c2eb4
of the system. Perl strings are sequences of characters.
2c2eb4
2c2eb4
%package -n perl-encoding
2c2eb4
Summary:        Write your Perl script in non-ASCII or non-UTF-8
2c2eb4
Version:        2.19
2c2eb4
License:        GPL+ or Artistic
2c2eb4
Group:          Development/Libraries
2c2eb4
# Keeping this sub-package arch-specific because it installs files into
2c2eb4
# arch-specific directories.
2c2eb4
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
2c2eb4
Requires:       perl(Carp)
2c2eb4
# Config not needed on perl ≥ 5.008
2c2eb4
# Consider Filter::Util::Call as mandatory, bug #1165183, CPAN RT#100427
2c2eb4
Requires:       perl(Filter::Util::Call)
2c2eb4
# I18N::Langinfo is optional
2c2eb4
# PerlIO::encoding is optional
2c2eb4
Requires:       perl(utf8)
2c2eb4
Conflicts:      perl-Encode < 2:2.64-2
2c2eb4
2c2eb4
%description -n perl-encoding
2c2eb4
With the encoding pragma, you can write your Perl script in any encoding you
2c2eb4
like (so long as the Encode module supports it) and still enjoy Unicode
2c2eb4
support.
2c2eb4
2c2eb4
However, this encoding module is deprecated under perl 5.18. It uses
2c2eb4
a mechanism provided by perl that is deprecated under 5.18 and higher, and may
2c2eb4
be removed in a future version.
2c2eb4
2c2eb4
The easiest and the best alternative is to write your script in UTF-8.
2c2eb4
2c2eb4
# To mirror files from perl-devel (bug #456534)
2c2eb4
# Keep architecture specific because files go into vendorarch
2c2eb4
%package devel
2c2eb4
Summary:        Perl Encode Module Generator
2c2eb4
Version:        %{cpan_version}
2c2eb4
License:        (GPL+ or Artistic) and UCD
2c2eb4
Group:          Development/Libraries
2c2eb4
Requires:       %{name}%{?_isa} = %{epoch}:%{cpan_version}-%{release}
2c2eb4
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
2c2eb4
Recommends:     perl-devel%{?_isa}
2c2eb4
Requires:       perl(Encode)
2c2eb4
2c2eb4
%description devel
2c2eb4
enc2xs builds a Perl extension for use by Encode from either Unicode Character
2c2eb4
Mapping files (.ucm) or Tcl Encoding Files (.enc). You can use enc2xs to add
2c2eb4
your own encoding to perl. No knowledge of XS is necessary.
2c2eb4
2c2eb4
2c2eb4
%prep
2c2eb4
%setup -q -n Encode-%{cpan_version}
2c2eb4
2c2eb4
%build
2c2eb4
# Additional scripts can be installed by appending MORE_SCRIPTS, UCM files by
2c2eb4
# INSTALL_UCM.
2c2eb4
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
2c2eb4
make %{?_smp_mflags}
2c2eb4
2c2eb4
%install
2c2eb4
make pure_install DESTDIR=$RPM_BUILD_ROOT
2c2eb4
find $RPM_BUILD_ROOT -type f -name .packlist -delete
2c2eb4
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
2c2eb4
%{_fixperms} $RPM_BUILD_ROOT/*
2c2eb4
2c2eb4
%check
2c2eb4
make test
2c2eb4
2c2eb4
%files
2c2eb4
%doc AUTHORS Changes README
2c2eb4
%{_bindir}/encguess
2c2eb4
%{_bindir}/piconv
2c2eb4
%{perl_vendorarch}/auto/*
2c2eb4
%{perl_vendorarch}/Encode*
2c2eb4
%exclude %{perl_vendorarch}/Encode/*.e2x
2c2eb4
%exclude %{perl_vendorarch}/Encode/encode.h
2c2eb4
%{_mandir}/man1/encguess.*
2c2eb4
%{_mandir}/man1/piconv.*
2c2eb4
%{_mandir}/man3/Encode.*
2c2eb4
%{_mandir}/man3/Encode::*
2c2eb4
2c2eb4
%files -n perl-encoding
2c2eb4
%doc AUTHORS Changes README
2c2eb4
%{perl_vendorarch}/encoding.pm
2c2eb4
%{_mandir}/man3/encoding.*
2c2eb4
2c2eb4
%files devel
2c2eb4
%{_bindir}/enc2xs
2c2eb4
%{_mandir}/man1/enc2xs.*
2c2eb4
%{perl_vendorarch}/Encode/*.e2x
2c2eb4
%{perl_vendorarch}/Encode/encode.h
2c2eb4
2c2eb4
%changelog
8010a4
* Fri Mar 29 2019 Jitka Plesnikova <jplesnik@redhat.com> - 4:2.88-7
8010a4
- Rebuild with enable hardening (bug #1636329)
8010a4
2c2eb4
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4:2.88-6
2c2eb4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2c2eb4
2c2eb4
* Wed Nov 30 2016 Petr Pisar <ppisar@redhat.com> - 4:2.88-5
2c2eb4
- 2.88 bump
2c2eb4
2c2eb4
* Mon Oct 31 2016 Petr Pisar <ppisar@redhat.com> - 4:2.87-4
2c2eb4
- 2.87 bump
2c2eb4
2c2eb4
* Fri Sep 30 2016 Petr Pisar <ppisar@redhat.com> - 4:2.86-3
2c2eb4
- Fix Encode::encode_utf8(undef) to return undef (CPAN RT#116904)
2c2eb4
- Refuse non-shortests UTF-8 representations in strict mode
2c2eb4
- Fix panic when encoding undefined scalars
2c2eb4
2c2eb4
* Fri Sep 16 2016 Petr Pisar <ppisar@redhat.com> - 4:2.86-2
2c2eb4
- Add Artistic 2.0 into license tag because of encguess tool
2c2eb4
2c2eb4
* Thu Aug 11 2016 Jitka Plesnikova <jplesnik@redhat.com> - 4:2.86-1
2c2eb4
- 2.86 bump
2c2eb4
2c2eb4
* Tue Aug 09 2016 Jitka Plesnikova <jplesnik@redhat.com> - 4:2.85-1
2c2eb4
- 2.85 bump
2c2eb4
2c2eb4
* Tue Aug 02 2016 Jitka Plesnikova <jplesnik@redhat.com> - 4:2.84-11
2c2eb4
- Avoid loading optional modules from default . (CVE-2016-1238)
2c2eb4
2c2eb4
* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 4:2.84-10
2c2eb4
- Increase epoch to favour standalone package
2c2eb4
2c2eb4
* Mon Apr 18 2016 Petr Pisar <ppisar@redhat.com> - 3:2.84-9
2c2eb4
- Weak perl-Encode-devel dependency on perl-devel to Recommends level
2c2eb4
  (bug #1129443)
2c2eb4
2c2eb4
* Mon Apr 11 2016 Petr Pisar <ppisar@redhat.com> - 3:2.84-8
2c2eb4
- 2.84 bump
2c2eb4
2c2eb4
* Thu Mar 24 2016 Petr Pisar <ppisar@redhat.com> - 3:2.83-7
2c2eb4
- 2.83 bump
2c2eb4
2c2eb4
* Tue Feb 09 2016 Petr Pisar <ppisar@redhat.com> - 3:2.82-6
2c2eb4
- 2.82 bump
2c2eb4
2c2eb4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3:2.80-5
2c2eb4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2c2eb4
2c2eb4
* Mon Jan 25 2016 Petr Pisar <ppisar@redhat.com> - 3:2.80-4
2c2eb4
- 2.80 bump
2c2eb4
2c2eb4
* Fri Jan 22 2016 Petr Pisar <ppisar@redhat.com> - 3:2.79-3
2c2eb4
- 2.79 bump
2c2eb4
2c2eb4
* Thu Sep 24 2015 Petr Pisar <ppisar@redhat.com> - 3:2.78-2
2c2eb4
- 2.78 bump
2c2eb4
2c2eb4
* Wed Sep 16 2015 Petr Pisar <ppisar@redhat.com> - 3:2.77-1
2c2eb4
- 2.77 bump
2c2eb4
2c2eb4
* Fri Jul 31 2015 Petr Pisar <ppisar@redhat.com> - 3:2.76-2
2c2eb4
- Increase release number to have unique perl-encoding NEVRA
2c2eb4
2c2eb4
* Fri Jul 31 2015 Petr Pisar <ppisar@redhat.com> - 3:2.76-1
2c2eb4
- 2.76 bump
2c2eb4
2c2eb4
* Wed Jul 01 2015 Petr Pisar <ppisar@redhat.com> - 3:2.75-1
2c2eb4
- 2.75 bump
2c2eb4
2c2eb4
* Thu Jun 25 2015 Petr Pisar <ppisar@redhat.com> - 3:2.74-1
2c2eb4
- 2.74 bump
2c2eb4
2c2eb4
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3:2.73-3
2c2eb4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2c2eb4
2c2eb4
* Wed Jun 03 2015 Jitka Plesnikova <jplesnik@redhat.com> - 2:2.73-2
2c2eb4
- Perl 5.22 rebuild
2c2eb4
- Increase Epoch to favour standalone package
2c2eb4
2c2eb4
* Mon Apr 20 2015 Petr Pisar <ppisar@redhat.com> - 2:2.73-1
2c2eb4
- 2.73 bump
2c2eb4
2c2eb4
* Mon Mar 16 2015 Petr Pisar <ppisar@redhat.com> - 2:2.72-1
2c2eb4
- 2.72 bump
2c2eb4
2c2eb4
* Thu Mar 12 2015 Petr Pisar <ppisar@redhat.com> - 2:2.71-1
2c2eb4
- 2.71 bump
2c2eb4
2c2eb4
* Wed Mar 04 2015 Petr Pisar <ppisar@redhat.com> - 2:2.70-2
2c2eb4
- Correct license from (GPL+ or Artistic) to ((GPL+ or Artistic) and UCD)
2c2eb4
2c2eb4
* Thu Feb 05 2015 Petr Pisar <ppisar@redhat.com> - 2:2.70-1
2c2eb4
- 2.70 bump
2c2eb4
2c2eb4
* Fri Jan 23 2015 Petr Pisar <ppisar@redhat.com> - 2:2.68-1
2c2eb4
- 2.68 bump
2c2eb4
2c2eb4
* Fri Dec 05 2014 Petr Pisar <ppisar@redhat.com> - 2:2.67-1
2c2eb4
- 2.67 bump
2c2eb4
2c2eb4
* Wed Dec 03 2014 Petr Pisar <ppisar@redhat.com> - 2:2.66-1
2c2eb4
- 2.66 bump
2c2eb4
2c2eb4
* Tue Nov 18 2014 Petr Pisar <ppisar@redhat.com> - 2:2.64-2
2c2eb4
- Consider Filter::Util::Call dependency as mandatory (bug #1165183)
2c2eb4
- Sub-package encoding module
2c2eb4
2c2eb4
* Mon Nov 03 2014 Petr Pisar <ppisar@redhat.com> - 2:2.64-1
2c2eb4
- 2.64 bump
2c2eb4
2c2eb4
* Mon Oct 20 2014 Petr Pisar <ppisar@redhat.com> - 2:2.63-1
2c2eb4
- 2.63 bump
2c2eb4
2c2eb4
* Wed Sep 03 2014 Jitka Plesnikova <jplesnik@redhat.com> - 2:2.62-5
2c2eb4
- Increase Epoch to favour standalone package
2c2eb4
2c2eb4
* Tue Aug 26 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.62-4
2c2eb4
- Perl 5.20 rebuild
2c2eb4
2c2eb4
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.62-3
2c2eb4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
2c2eb4
2c2eb4
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.62-2
2c2eb4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2c2eb4
2c2eb4
* Mon Jun 02 2014 Petr Pisar <ppisar@redhat.com> - 1:2.62-1
2c2eb4
- 2.62 bump
2c2eb4
2c2eb4
* Wed Apr 30 2014 Petr Pisar <ppisar@redhat.com> - 1:2.60-1
2c2eb4
- 2.60 bump
2c2eb4
2c2eb4
* Mon Apr 14 2014 Petr Pisar <ppisar@redhat.com> - 1:2.59-1
2c2eb4
- 2.59 bump
2c2eb4
2c2eb4
* Mon Mar 31 2014 Petr Pisar <ppisar@redhat.com> - 1:2.58-1
2c2eb4
- 2.58 bump
2c2eb4
2c2eb4
* Fri Jan 03 2014 Petr Pisar <ppisar@redhat.com> - 1:2.57-1
2c2eb4
- 2.57 bump
2c2eb4
2c2eb4
* Mon Sep 16 2013 Petr Pisar <ppisar@redhat.com> - 1:2.55-1
2c2eb4
- 2.55 bump
2c2eb4
2c2eb4
* Mon Sep 02 2013 Petr Pisar <ppisar@redhat.com> - 1:2.54-1
2c2eb4
- 2.54 bump
2c2eb4
2c2eb4
* Wed Aug 21 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.52-1
2c2eb4
- 2.52 bump
2c2eb4
2c2eb4
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.51-7
2c2eb4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
2c2eb4
2c2eb4
* Fri Jul 26 2013 Petr Pisar <ppisar@redhat.com> - 1:2.51-6
2c2eb4
- Specify more dependencies
2c2eb4
2c2eb4
* Thu Jul 18 2013 Petr Pisar <ppisar@redhat.com> - 1:2.51-5
2c2eb4
- Put epoch into dependecny declaration
2c2eb4
2c2eb4
* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:2.51-4
2c2eb4
- Link minimal build-root packages against libperl.so explicitly
2c2eb4
2c2eb4
* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:2.51-3
2c2eb4
- Perl 5.18 rebuild
2c2eb4
2c2eb4
* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:2.51-2
2c2eb4
- Perl 5.18 rebuild
2c2eb4
2c2eb4
* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:2.51-1
2c2eb4
- Increase epoch to compete with perl.spec
2c2eb4
2c2eb4
* Fri May 17 2013 Petr Pisar <ppisar@redhat.com> - 2.51-2
2c2eb4
- Specify all dependencies
2c2eb4
2c2eb4
* Thu May 02 2013 Petr Pisar <ppisar@redhat.com> - 2.51-1
2c2eb4
- 2.51 bump
2c2eb4
2c2eb4
* Mon Apr 29 2013 Petr Pisar <ppisar@redhat.com> - 2.50-1
2c2eb4
- 2.50 bump (recoding does not launders taintedness)
2c2eb4
2c2eb4
* Tue Mar 05 2013 Petr Pisar <ppisar@redhat.com> - 2.49-1
2c2eb4
- 2.49 bump
2c2eb4
2c2eb4
* Mon Feb 18 2013 Petr Pisar <ppisar@redhat.com> - 2.48-1
2c2eb4
- 2.48 bump
2c2eb4
2c2eb4
* Thu Sep 20 2012 Petr Pisar <ppisar@redhat.com> 2.47-1
2c2eb4
- Specfile autogenerated by cpanspec 1.78.
2c2eb4
- Make devel sub-package architecture specific due to file location