715684
# Because encoding sub-package has an independent version, version macro gets
715684
# redefined.
715684
%global cpan_version 3.08
715684
Name:           perl-Encode
715684
Epoch:          4
715684
Version:        %{cpan_version}
715684
# Keep increasing release number even when rebasing version because
715684
# perl-encoding sub-package has independent version which does not change
715684
# often and consecutive builds would clash on perl-encoding NEVRA. This is the
715684
# same case as in perl.spec.
715684
Release:        461%{?dist}
715684
Summary:        Character encodings in Perl
715684
# ucm:          UCD
715684
# bin/encguess: Artistic 2.0
715684
# other files:  GPL+ or Artistic
715684
License:        (GPL+ or Artistic) and Artistic 2.0 and UCD
715684
URL:            https://metacpan.org/release/Encode
715684
Source0:        https://cpan.metacpan.org/authors/id/D/DA/DANKOGAI/Encode-%{cpan_version}.tar.gz
715684
# Encode.pm does not load code from outside expected @INC (rhbz#1991539, CVE-2021-36770)
715684
Patch0:         Encode-3.12-mitigate-INC-pollution-when-loading-ConfigLocal.patch
715684
# Fix memory leak in function encode_method()
715684
Patch1:         Encode-3.14-Fix-memory-leak-in-function-encode_method.patch
715684
BuildRequires:  findutils
715684
BuildRequires:  gcc
715684
BuildRequires:  make
715684
BuildRequires:  perl-devel
715684
BuildRequires:  perl-generators
715684
BuildRequires:  perl-interpreter
715684
BuildRequires:  perl(Config)
715684
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
715684
BuildRequires:  perl(File::Spec)
715684
BuildRequires:  perl(File::Spec::Functions)
715684
BuildRequires:  perl(strict)
715684
BuildRequires:  perl(warnings)
715684
# enc2xs is run at build-time
715684
# Run-time:
715684
BuildRequires:  perl(bytes)
715684
BuildRequires:  perl(Carp)
715684
BuildRequires:  perl(constant)
715684
BuildRequires:  perl(Exporter) >= 5.57
715684
BuildRequires:  perl(File::Basename)
715684
BuildRequires:  perl(File::Find)
715684
BuildRequires:  perl(Filter::Util::Call)
715684
BuildRequires:  perl(Getopt::Long)
715684
BuildRequires:  perl(Getopt::Std)
715684
# I18N::Langinfo is optional
715684
BuildRequires:  perl(MIME::Base64)
715684
BuildRequires:  perl(overload)
715684
BuildRequires:  perl(parent) >= 0.221
715684
# PerlIO::encoding is optional
715684
# POSIX is optional
715684
BuildRequires:  perl(re)
715684
BuildRequires:  perl(Storable)
715684
BuildRequires:  perl(utf8)
715684
BuildRequires:  perl(vars)
715684
BuildRequires:  perl(XSLoader)
715684
# Tests:
715684
# Benchmark not used
715684
BuildRequires:  perl(blib)
715684
BuildRequires:  perl(charnames)
715684
BuildRequires:  perl(File::Compare)
715684
BuildRequires:  perl(File::Copy)
715684
BuildRequires:  perl(FileHandle)
715684
BuildRequires:  perl(FindBin)
715684
BuildRequires:  perl(IO::Select)
715684
BuildRequires:  perl(IPC::Open3)
715684
# IPC::Run not used
715684
# JSON::PP not used
715684
BuildRequires:  perl(lib)
715684
BuildRequires:  perl(open)
715684
BuildRequires:  perl(Scalar::Util)
715684
BuildRequires:  perl(Symbol)
715684
BuildRequires:  perl(Test::More)
715684
BuildRequires:  perl(Tie::Scalar)
715684
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
715684
Requires:       perl(parent) >= 0.221
715684
715684
%{?perl_default_filter}
715684
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\((Encode::ConfigLocal|MY)\\)
715684
715684
# Filter under-specified dependencies
715684
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((Exporter|parent)\\)$
715684
715684
%description
715684
The Encode module provides the interface between Perl strings and the rest
715684
of the system. Perl strings are sequences of characters.
715684
715684
%package -n perl-encoding
715684
Summary:        Write your Perl script in non-ASCII or non-UTF-8
715684
Version:        3.00
715684
License:        GPL+ or Artistic
715684
# Keeping this sub-package arch-specific because it installs files into
715684
# arch-specific directories.
715684
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
715684
Requires:       perl(Carp)
715684
# Config not needed on perl ≥ 5.008
715684
# Consider Filter::Util::Call as mandatory, bug #1165183, CPAN RT#100427
715684
Requires:       perl(Filter::Util::Call)
715684
# I18N::Langinfo is optional
715684
Suggests:       perl(PerlIO::encoding)
715684
Requires:       perl(utf8)
715684
Conflicts:      perl-Encode < 2:2.64-2
715684
715684
%description -n perl-encoding
715684
With the encoding pragma, you can write your Perl script in any encoding you
715684
like (so long as the Encode module supports it) and still enjoy Unicode
715684
support.
715684
715684
However, this encoding module is deprecated under perl 5.18. It uses
715684
a mechanism provided by perl that is deprecated under 5.18 and higher, and may
715684
be removed in a future version.
715684
715684
The easiest and the best alternative is to write your script in UTF-8.
715684
715684
# To mirror files from perl-devel (bug #456534)
715684
# Keep architecture specific because files go into vendorarch
715684
%package devel
715684
Summary:        Perl Encode Module Generator
715684
Version:        %{cpan_version}
715684
License:        (GPL+ or Artistic) and UCD
715684
Requires:       %{name}%{?_isa} = %{epoch}:%{cpan_version}-%{release}
715684
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
715684
Recommends:     perl-devel%{?_isa}
715684
Requires:       perl(Encode)
715684
715684
%description devel
715684
enc2xs builds a Perl extension for use by Encode from either Unicode Character
715684
Mapping files (.ucm) or Tcl Encoding Files (.enc). You can use enc2xs to add
715684
your own encoding to perl. No knowledge of XS is necessary.
715684
715684
715684
%prep
715684
%setup -q -n Encode-%{cpan_version}
715684
%patch0 -p1
715684
%patch1 -p1
715684
715684
%build
715684
# Additional scripts can be installed by appending MORE_SCRIPTS, UCM files by
715684
# INSTALL_UCM.
715684
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 \
715684
    OPTIMIZE="$RPM_OPT_FLAGS"
715684
%{make_build}
715684
715684
%install
715684
%{make_install}
715684
find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -delete
715684
%{_fixperms} $RPM_BUILD_ROOT/*
715684
715684
%check
715684
unset AUTHOR_TESTING ENC2XS_NO_COMMENTS ENC2XS_VERBOSE MAKEFLAGS PERL_CORE \
715684
    PERL_ENCODING PERL_ENCODE_DEBUG
715684
make test
715684
715684
%files
715684
%doc AUTHORS Changes README
715684
%{_bindir}/encguess
715684
%{_bindir}/piconv
715684
%{perl_vendorarch}/auto/*
715684
%{perl_vendorarch}/Encode*
715684
%exclude %{perl_vendorarch}/Encode/*.e2x
715684
%exclude %{perl_vendorarch}/Encode/encode.h
715684
%{_mandir}/man1/encguess.*
715684
%{_mandir}/man1/piconv.*
715684
%{_mandir}/man3/Encode.*
715684
%{_mandir}/man3/Encode::*
715684
715684
%files -n perl-encoding
715684
%doc AUTHORS Changes README
715684
%{perl_vendorarch}/encoding.pm
715684
%{_mandir}/man3/encoding.*
715684
715684
%files devel
715684
%{_bindir}/enc2xs
715684
%{_mandir}/man1/enc2xs.*
715684
%{perl_vendorarch}/Encode/*.e2x
715684
%{perl_vendorarch}/Encode/encode.h
715684
715684
%changelog
715684
* Sun Oct 10 2021 Jitka Plesnikova <jplesnik@redhat.com> - 4:3.08-461
715684
- Fix memory leak in function encode_method()
715684
- "Fix a memory leak on FB_CROAK" was reverted in Encode 3.15
715684
715684
* Wed Oct 06 2021 Jitka Plesnikova <jplesnik@redhat.com> - 4:3.08-460
715684
- Fix a memory leak on FB_CROAK, backported from Encode 3.13
715684
715684
* Mon Aug 09 2021 Jitka Plesnikova <jplesnik@redhat.com> - 4:3.08-459
715684
- Fix CVE-2021-36770 - mitigate @INC pollution when loading ConfigLocal
715684
715684
* Wed Dec 02 2020 Jitka Plesnikova <jplesnik@redhat.com> - 4:3.08-458
715684
- 3.08 bump
715684
715684
* Mon Jul 27 2020 Petr Pisar <ppisar@redhat.com> - 4:3.07-457
715684
- 3.07 bump
715684
715684
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 4:3.06-456
715684
- Increase release to favour standalone package
715684
715684
* Mon May 04 2020 Petr Pisar <ppisar@redhat.com> - 4:3.06-445
715684
- 3.06 bump
715684
715684
* Thu Mar 19 2020 Petr Pisar <ppisar@redhat.com> - 4:3.05-444
715684
- 3.05 bump
715684
715684
* Wed Mar 11 2020 Petr Pisar <ppisar@redhat.com> - 4:3.04-443
715684
- 3.04 bump
715684
715684
* Mon Mar 02 2020 Petr Pisar <ppisar@redhat.com> - 4:3.03-442
715684
- 3.03 bump
715684
715684
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4:3.02-441
715684
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
715684
715684
* Thu Jan 02 2020 Petr Pisar <ppisar@redhat.com> - 4:3.02-440
715684
- 3.02 bump
715684
715684
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4:3.01-439
715684
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
715684
715684
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 4:3.01-438
715684
- Increase release to favour standalone package
715684
715684
* Wed Mar 13 2019 Petr Pisar <ppisar@redhat.com> - 4:3.01-10
715684
- 3.01 bump
715684
715684
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4:3.00-9
715684
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
715684
715684
* Thu Jan 31 2019 Petr Pisar <ppisar@redhat.com> - 4:3.00-8
715684
- 3.00 bump
715684
715684
* Mon Jan 21 2019 Petr Pisar <ppisar@redhat.com> - 4:2.99-7
715684
- 2.99 bump
715684
715684
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4:2.98-6
715684
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
715684
715684
* Wed Jun 27 2018 Jitka Plesnikova <jplesnik@redhat.com> - 4:2.98-5
715684
- Perl 5.28 rebuild
715684
715684
* Mon Apr 23 2018 Petr Pisar <ppisar@redhat.com> - 4:2.98-4
715684
- 2.98 bump
715684
715684
* Wed Feb 21 2018 Petr Pisar <ppisar@redhat.com> - 4:2.97-3
715684
- 2.97 bump
715684
715684
* Mon Feb 19 2018 Petr Pisar <ppisar@redhat.com> - 4:2.96-2
715684
- Preserve a warning on Perl 5.26.1 (bug #1544345)
715684
715684
* Mon Feb 12 2018 Petr Pisar <ppisar@redhat.com> - 4:2.96-1
715684
- 2.96 bump
715684
715684
* Thu Feb 08 2018 Petr Pisar <ppisar@redhat.com> - 4:2.95-1
715684
- 2.95 bump
715684
715684
* Tue Jan 09 2018 Petr Pisar <ppisar@redhat.com> - 4:2.94-16
715684
- 2.94 bump
715684
715684
* Mon Oct 09 2017 Petr Pisar <ppisar@redhat.com> - 4:2.93-15
715684
- 2.93 bump
715684
715684
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4:2.92-14
715684
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
715684
715684
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4:2.92-13
715684
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
715684
715684
* Wed Jul 19 2017 Petr Pisar <ppisar@redhat.com> - 4:2.92-12
715684
- 2.92 bump
715684
715684
* Thu Jun 22 2017 Petr Pisar <ppisar@redhat.com> - 4:2.91-11
715684
- 2.91 bump
715684
715684
* Thu Jun 22 2017 Petr Pisar <ppisar@redhat.com> - 4:2.90-10
715684
- Fix "use parent q{Encode::Encoding}" (CPAN RT#122167)
715684
715684
* Mon Jun 12 2017 Petr Pisar <ppisar@redhat.com> - 4:2.90-9
715684
- 2.90 bump
715684
715684
* Sat Jun 03 2017 Jitka Plesnikova <jplesnik@redhat.com> - 4:2.89-8
715684
- Perl 5.26 rebuild
715684
715684
* Fri Apr 21 2017 Petr Pisar <ppisar@redhat.com> - 4:2.89-7
715684
- 2.89 bump
715684
715684
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4:2.88-6
715684
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
715684
715684
* Wed Nov 30 2016 Petr Pisar <ppisar@redhat.com> - 4:2.88-5
715684
- 2.88 bump
715684
715684
* Mon Oct 31 2016 Petr Pisar <ppisar@redhat.com> - 4:2.87-4
715684
- 2.87 bump
715684
715684
* Fri Sep 30 2016 Petr Pisar <ppisar@redhat.com> - 4:2.86-3
715684
- Fix Encode::encode_utf8(undef) to return undef (CPAN RT#116904)
715684
- Refuse non-shortests UTF-8 representations in strict mode
715684
- Fix panic when encoding undefined scalars
715684
715684
* Fri Sep 16 2016 Petr Pisar <ppisar@redhat.com> - 4:2.86-2
715684
- Add Artistic 2.0 into license tag because of encguess tool
715684
715684
* Thu Aug 11 2016 Jitka Plesnikova <jplesnik@redhat.com> - 4:2.86-1
715684
- 2.86 bump
715684
715684
* Tue Aug 09 2016 Jitka Plesnikova <jplesnik@redhat.com> - 4:2.85-1
715684
- 2.85 bump
715684
715684
* Tue Aug 02 2016 Jitka Plesnikova <jplesnik@redhat.com> - 4:2.84-11
715684
- Avoid loading optional modules from default . (CVE-2016-1238)
715684
715684
* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 4:2.84-10
715684
- Increase epoch to favour standalone package
715684
715684
* Mon Apr 18 2016 Petr Pisar <ppisar@redhat.com> - 3:2.84-9
715684
- Weak perl-Encode-devel dependency on perl-devel to Recommends level
715684
  (bug #1129443)
715684
715684
* Mon Apr 11 2016 Petr Pisar <ppisar@redhat.com> - 3:2.84-8
715684
- 2.84 bump
715684
715684
* Thu Mar 24 2016 Petr Pisar <ppisar@redhat.com> - 3:2.83-7
715684
- 2.83 bump
715684
715684
* Tue Feb 09 2016 Petr Pisar <ppisar@redhat.com> - 3:2.82-6
715684
- 2.82 bump
715684
715684
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3:2.80-5
715684
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
715684
715684
* Mon Jan 25 2016 Petr Pisar <ppisar@redhat.com> - 3:2.80-4
715684
- 2.80 bump
715684
715684
* Fri Jan 22 2016 Petr Pisar <ppisar@redhat.com> - 3:2.79-3
715684
- 2.79 bump
715684
715684
* Thu Sep 24 2015 Petr Pisar <ppisar@redhat.com> - 3:2.78-2
715684
- 2.78 bump
715684
715684
* Wed Sep 16 2015 Petr Pisar <ppisar@redhat.com> - 3:2.77-1
715684
- 2.77 bump
715684
715684
* Fri Jul 31 2015 Petr Pisar <ppisar@redhat.com> - 3:2.76-2
715684
- Increase release number to have unique perl-encoding NEVRA
715684
715684
* Fri Jul 31 2015 Petr Pisar <ppisar@redhat.com> - 3:2.76-1
715684
- 2.76 bump
715684
715684
* Wed Jul 01 2015 Petr Pisar <ppisar@redhat.com> - 3:2.75-1
715684
- 2.75 bump
715684
715684
* Thu Jun 25 2015 Petr Pisar <ppisar@redhat.com> - 3:2.74-1
715684
- 2.74 bump
715684
715684
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3:2.73-3
715684
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
715684
715684
* Wed Jun 03 2015 Jitka Plesnikova <jplesnik@redhat.com> - 2:2.73-2
715684
- Perl 5.22 rebuild
715684
- Increase Epoch to favour standalone package
715684
715684
* Mon Apr 20 2015 Petr Pisar <ppisar@redhat.com> - 2:2.73-1
715684
- 2.73 bump
715684
715684
* Mon Mar 16 2015 Petr Pisar <ppisar@redhat.com> - 2:2.72-1
715684
- 2.72 bump
715684
715684
* Thu Mar 12 2015 Petr Pisar <ppisar@redhat.com> - 2:2.71-1
715684
- 2.71 bump
715684
715684
* Wed Mar 04 2015 Petr Pisar <ppisar@redhat.com> - 2:2.70-2
715684
- Correct license from (GPL+ or Artistic) to ((GPL+ or Artistic) and UCD)
715684
715684
* Thu Feb 05 2015 Petr Pisar <ppisar@redhat.com> - 2:2.70-1
715684
- 2.70 bump
715684
715684
* Fri Jan 23 2015 Petr Pisar <ppisar@redhat.com> - 2:2.68-1
715684
- 2.68 bump
715684
715684
* Fri Dec 05 2014 Petr Pisar <ppisar@redhat.com> - 2:2.67-1
715684
- 2.67 bump
715684
715684
* Wed Dec 03 2014 Petr Pisar <ppisar@redhat.com> - 2:2.66-1
715684
- 2.66 bump
715684
715684
* Tue Nov 18 2014 Petr Pisar <ppisar@redhat.com> - 2:2.64-2
715684
- Consider Filter::Util::Call dependency as mandatory (bug #1165183)
715684
- Sub-package encoding module
715684
715684
* Mon Nov 03 2014 Petr Pisar <ppisar@redhat.com> - 2:2.64-1
715684
- 2.64 bump
715684
715684
* Mon Oct 20 2014 Petr Pisar <ppisar@redhat.com> - 2:2.63-1
715684
- 2.63 bump
715684
715684
* Wed Sep 03 2014 Jitka Plesnikova <jplesnik@redhat.com> - 2:2.62-5
715684
- Increase Epoch to favour standalone package
715684
715684
* Tue Aug 26 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.62-4
715684
- Perl 5.20 rebuild
715684
715684
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.62-3
715684
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
715684
715684
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.62-2
715684
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
715684
715684
* Mon Jun 02 2014 Petr Pisar <ppisar@redhat.com> - 1:2.62-1
715684
- 2.62 bump
715684
715684
* Wed Apr 30 2014 Petr Pisar <ppisar@redhat.com> - 1:2.60-1
715684
- 2.60 bump
715684
715684
* Mon Apr 14 2014 Petr Pisar <ppisar@redhat.com> - 1:2.59-1
715684
- 2.59 bump
715684
715684
* Mon Mar 31 2014 Petr Pisar <ppisar@redhat.com> - 1:2.58-1
715684
- 2.58 bump
715684
715684
* Fri Jan 03 2014 Petr Pisar <ppisar@redhat.com> - 1:2.57-1
715684
- 2.57 bump
715684
715684
* Mon Sep 16 2013 Petr Pisar <ppisar@redhat.com> - 1:2.55-1
715684
- 2.55 bump
715684
715684
* Mon Sep 02 2013 Petr Pisar <ppisar@redhat.com> - 1:2.54-1
715684
- 2.54 bump
715684
715684
* Wed Aug 21 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1:2.52-1
715684
- 2.52 bump
715684
715684
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.51-7
715684
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
715684
715684
* Fri Jul 26 2013 Petr Pisar <ppisar@redhat.com> - 1:2.51-6
715684
- Specify more dependencies
715684
715684
* Thu Jul 18 2013 Petr Pisar <ppisar@redhat.com> - 1:2.51-5
715684
- Put epoch into dependecny declaration
715684
715684
* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:2.51-4
715684
- Link minimal build-root packages against libperl.so explicitly
715684
715684
* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:2.51-3
715684
- Perl 5.18 rebuild
715684
715684
* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:2.51-2
715684
- Perl 5.18 rebuild
715684
715684
* Fri Jul 12 2013 Petr Pisar <ppisar@redhat.com> - 1:2.51-1
715684
- Increase epoch to compete with perl.spec
715684
715684
* Fri May 17 2013 Petr Pisar <ppisar@redhat.com> - 2.51-2
715684
- Specify all dependencies
715684
715684
* Thu May 02 2013 Petr Pisar <ppisar@redhat.com> - 2.51-1
715684
- 2.51 bump
715684
715684
* Mon Apr 29 2013 Petr Pisar <ppisar@redhat.com> - 2.50-1
715684
- 2.50 bump (recoding does not launders taintedness)
715684
715684
* Tue Mar 05 2013 Petr Pisar <ppisar@redhat.com> - 2.49-1
715684
- 2.49 bump
715684
715684
* Mon Feb 18 2013 Petr Pisar <ppisar@redhat.com> - 2.48-1
715684
- 2.48 bump
715684
715684
* Thu Sep 20 2012 Petr Pisar <ppisar@redhat.com> 2.47-1
715684
- Specfile autogenerated by cpanspec 1.78.
715684
- Make devel sub-package architecture specific due to file location