Modernize a spec file

I shuffled some dependencies.
This commit is contained in:
Petr Písař 2020-01-31 12:49:46 +01:00
parent 2f4a28ee28
commit d302cdab4b
2 changed files with 64 additions and 58 deletions

View File

@ -1,2 +0,0 @@
from Config import *
addFilter("spelling-error .* toolkits");

View File

@ -1,38 +1,41 @@
Name: perl-POE
Version: 1.367
Release: 22%{?dist}
Summary: POE - portable multitasking and networking framework for Perl
# Perform network tests
%bcond_without perl_POE_enables_network_test
# Perform optional tests
%bcond_without perl_POE_enables_optional_test
License: GPL+ or Artistic
URL: https://metacpan.org/release/POE
Source0: https://cpan.metacpan.org/authors/id/R/RC/RCAPUTO/POE-%{version}.tar.gz
Name: perl-POE
Version: 1.367
Release: 22%{?dist}
Summary: Portable multitasking and networking framework for event loops
License: GPL+ or Artistic
URL: https://metacpan.org/release/POE
Source0: https://cpan.metacpan.org/authors/id/R/RC/RCAPUTO/POE-%{version}.tar.gz
# 1/2 Adapt to changes in Perl 5.31.5, RT#130664, in upstream after 1.367
Patch0: POE-1.367-RT-130664-test-failures-with-v5.31.5.patch
Patch0: POE-1.367-RT-130664-test-failures-with-v5.31.5.patch
# 2/2 Adapt to changes in Perl 5.31.5, RT#130664, in upstream after 1.367
Patch1: POE-1.367-Corrected-previous-commit-as-per-tonyc-s-suggestion.patch
BuildArch: noarch
# Build
BuildRequires: perl-interpreter
Patch1: POE-1.367-Corrected-previous-commit-as-per-tonyc-s-suggestion.patch
BuildArch: noarch
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(Carp)
BuildRequires: perl(Config)
BuildRequires: perl(Exporter)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(File::Spec) >= 0.87
# XXX: BuildRequires: perl(Getopt::Long)
# Getopt::Long not used
BuildRequires: perl(lib)
BuildRequires: perl(Socket) >= 1.7
BuildRequires: perl(strict)
BuildRequires: perl(vars)
BuildRequires: perl(warnings)
# Runtime
# Run-time:
BuildRequires: perl(base)
BuildRequires: perl(bytes)
BuildRequires: perl(constant)
# XXX: BuildRequires: perl(Compress::Zlib) >= 1.33
# XXX: BuildRequires: perl(Curses) >= 1.08
# Curses 1.08 not used at tests
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(Errno) >= 1.09
BuildRequires: perl(Exporter)
BuildRequires: perl(Fcntl)
BuildRequires: perl(FileHandle)
BuildRequires: perl(HTTP::Date)
@ -45,30 +48,43 @@ BuildRequires: perl(IO::Poll) >= 0.01
BuildRequires: perl(IO::Pty)
BuildRequires: perl(IO::Tty) >= 1.08
BuildRequires: perl(POSIX) >= 1.02
# XXX: BuildRequires: perl(Scalar::Util)
# XXX: BuildRequires: perl(Socket6)
# XXX: BuildRequires: perl(Socket::GetAddrInfo)
BuildRequires: perl(Scalar::Util)
# Socket6 not needed with current Socket
# Socket::GetAddrInfo not needed with current Socket
# Storable || FreezeThaw || YAML
BuildRequires: perl(Storable) >= 2.26
BuildRequires: perl(Symbol)
BuildRequires: perl(Sys::Hostname)
# XXX: BuildRequires: perl(Storable) >= 2.26
# XXX: BuildRequires: perl(Term::Cap) >= 1.10
# XXX: BuildRequires: perl(Term::ReadKey) >= 2.21
BuildRequires: perl(Term::Cap) >= 1.10
BuildRequires: perl(Term::ReadKey) >= 2.21
# Time::Hires loaded from lib/POE/Resource/Clock.pm
BuildRequires: perl(Time::HiRes) >= 1.59
BuildRequires: perl(URI) >= 1.30
# Tests only
# Win32* not needed
# Optional run-time:
BuildRequires: perl(Compress::Zlib) >= 1.33
# POE::XS::Queue::Array not needed, to exhibit a default implementation
# Tests:
BuildRequires: perl(File::Temp)
BuildRequires: perl(IO::File)
BuildRequires: perl(lib)
%if %{with perl_POE_enables_network_test}
BuildRequires: perl(List::Util)
%endif
BuildRequires: perl(Test::More)
BuildRequires: perl(Tie::Handle)
BuildRequires: perl(Time::HiRes) >= 1.59
# Optional tests only
%if 0%{!?perl_bootstrap:1}
%if %{with perl_POE_enables_optional_test}
# Optional tests:
%if !%{defined perl_bootstrap}
BuildRequires: perl(POE::Test::Loops) >= 1.360
%endif
BuildRequires: perl(YAML)
%endif
Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))
Requires: perl(bytes)
Requires: perl(Compress::Zlib) >= 1.33
Recommends: perl(Compress::Zlib) >= 1.33
Requires: perl(Curses) >= 1.08
Requires: perl(Data::Dumper)
Requires: perl(Errno) >= 1.09
Requires: perl(File::Spec) >= 0.87
@ -76,68 +92,60 @@ Requires: perl(IO::Handle) >= 1.27
Requires: perl(IO::Pipely) >= 0.005
Requires: perl(IO::Pty)
Requires: perl(IO::Tty) >= 1.08
# XXX: Requires: perl(POE::XS::Queue::Array)
Suggests: perl(POE::XS::Queue::Array)
Requires: perl(POSIX) >= 1.02
Requires: perl(Socket) >= 1.7
# XXX: Requires: perl(Socket6)
# XXX: Requires: perl(Socket::GetAddrInfo)
Requires: perl(Storable) >= 2.26
Requires: perl(Term::Cap) >= 1.10
Requires: perl(Term::ReadKey) >= 2.21
Requires: perl(Time::HiRes) >= 1.59
%{?perl_default_filter}
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Errno\\)$
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(File::Spec\\)$
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(IO::Handle\\)$
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(IO::Pipely\\)$
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(POSIX\\)$
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Socket\\)$
# Filter under-specified dependencies
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((Curses|Errno|File::Spec|IO::Handle|IO::Pipely|IO::Pty|POSIX|Socket|Term::Cap|Term::ReadKey)\\)$
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(POE::Kernel\\)$
%description
POE is a framework for cooperative, event driven multitasking in Perl.
Other languages have similar frameworks. Python has Twisted. TCL has "the
event loop".
POE originally was developed as the core of a persistent object server and
run-time environment. It has evolved into a general purpose multitasking
and networking framework, encompassing and providing a consistent interface
to other event loops such as Event and the Tk and GTK toolkits.
POE is written in layers, each building upon the previous. It's therefore
possible to use POE at varying levels of abstraction.
POE is a framework for cooperative, event driven multitasking in Perl. It
provides a unified interface for several event loops, including select(),
IO::Poll, Glib, Gtk, Tk, Wx, and Gtk2. Many of these event loop interfaces
were written by others, with the help of POE::Test::Loops.
%prep
%setup -q -n POE-%{version}
%patch0 -p1
%patch1 -p1
chmod -c -x examples/*
find t/ -type f -exec chmod -c -x {} +
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 --default
make %{?_smp_mflags}
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 --default
%{make_build}
%install
make pure_install DESTDIR=%{buildroot}
%{make_install}
%{_fixperms} %{buildroot}/*
%check
# yah. don't do the network tests
%{?!_with_network_tests: rm run_network_tests }
%if !%{with perl_POE_enables_network_test}
rm run_network_tests
%endif
# note that there are currently a number of tests that throw errors, but do
# not fail nor cause the build/suite to fail. For now just please be aware
# that there will be some noisy output as the tests are run.
# Reported upstream at http://rt.cpan.org/Public/Bug/Display.html?id=19878
unset AUTOMATED_TESTING CONTENT_LENGTH CONTENT_TYPE POE_ASSERT_USAGE \
POE_CATCH_EXCEPTIONS POE_EVENT_LOOP POE_IMPLEMENTATION POE_USE_HIRES \
POE_USE_SIGNAL_PIPE QUERY_STRING RELEASE_TESTING REQUEST_METHOD
make test
%files
%doc CHANGES HISTORY README examples/ TODO
%doc CHANGES examples HISTORY README TODO
%{perl_vendorlib}/*
%{_mandir}/man3/*.3*
%changelog
* Fri Jan 31 2020 Petr Pisar <ppisar@redhat.com> - 1.367-22
- Adapt to changes in Perl 5.31.5
- Revise dependenices
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.367-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild