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