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