summaryrefslogtreecommitdiff
path: root/perl-POE.spec
blob: 024585f5c4369687b8cf915827cca33690b6f3ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Perform network tests
%bcond_without perl_POE_enables_network_test
# Perform optional tests
%bcond_without perl_POE_enables_optional_test
# first time build, we need perl_bootstrap to break circular deps
%global perl_bootstrap 1

Name:       perl-POE
Version:    1.370
Release:    1
Summary:    Portable multitasking and networking framework for event loops
License:    GPL-1.0-or-later OR Artistic-1.0-Perl
URL:        https://metacpan.org/release/POE
Source0:    https://cpan.metacpan.org/authors/id/B/BI/BINGOS/POE-%{version}.tar.gz
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
# Getopt::Long not used
BuildRequires:  perl(lib)
BuildRequires:  perl(Socket) >= 1.7
BuildRequires:  perl(strict)
BuildRequires:  perl(vars)
BuildRequires:  perl(warnings)
# Run-time:
BuildRequires:  perl(base)
BuildRequires:  perl(bytes)
BuildRequires:  perl(constant)
# Curses 1.08 not used at tests
BuildRequires:  perl(Data::Dumper)
BuildRequires:  perl(Errno) >= 1.09
BuildRequires:  perl(Fcntl)
BuildRequires:  perl(FileHandle)
BuildRequires:  perl(HTTP::Date)
BuildRequires:  perl(HTTP::Request)
BuildRequires:  perl(HTTP::Response)
BuildRequires:  perl(HTTP::Status)
BuildRequires:  perl(IO::Handle) >= 1.27
BuildRequires:  perl(IO::Pipely) >= 0.005
BuildRequires:  perl(IO::Poll) >= 0.01
BuildRequires:  perl(IO::Pty)
BuildRequires:  perl(IO::Tty) >= 1.08
BuildRequires:  perl(POSIX) >= 1.02
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)
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
# 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
%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(bytes)
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
Requires:       perl(IO::Handle) >= 1.27
Requires:       perl(IO::Pipely) >= 0.005
Requires:       perl(IO::Pty)
Requires:       perl(IO::Tty) >= 1.08
Suggests:       perl(POE::XS::Queue::Array)
Requires:       perl(POSIX) >= 1.02
Requires:       perl(Socket) >= 1.7
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}
# 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. 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}

%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 --default
%{make_build}

%install
%{make_install}
%{_fixperms} %{buildroot}/*

%check
%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 examples HISTORY README TODO
%{perl_vendorlib}/*
%{_mandir}/man3/*.3*

%changelog
* Fri Feb 10 2023 lichaoran <pkwarcraft@hotmail> - 1.370-1
- Init package