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