1 |
tv |
1423436 |
# Workaround for "ERROR: Cannot copy 'SemaphoreSet.pm' to '../blib/lib/Coro/SemaphoreSet.pm': Permission denied": |
2 |
|
|
%global _smp_ncpus_max 4 |
3 |
|
|
|
4 |
jquelin |
10266 |
%define upstream_name Coro |
5 |
tv |
1610197 |
%define upstream_version 6.57 |
6 |
jquelin |
36947 |
|
7 |
jquelin |
10266 |
#define _without_check 1 |
8 |
|
|
|
9 |
jquelin |
56509 |
Name: perl-%{upstream_name} |
10 |
jquelin |
10266 |
Version: %perl_convert_version %upstream_version |
11 |
tv |
2090830 |
Release: %mkrel 7 |
12 |
tv |
844609 |
Epoch: 3 |
13 |
jquelin |
10266 |
|
14 |
|
|
Summary: Coroutine process abstraction |
15 |
jquelin |
56509 |
License: GPL+ or Artistic |
16 |
|
|
Group: Development/Perl |
17 |
ovitters |
1574065 |
Url: https://metacpan.org/release/%{upstream_name} |
18 |
|
|
Source0: https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/%{upstream_name}-%{upstream_version}.tar.gz |
19 |
shlomif |
1253915 |
Patch0: %{name}-5.25-ucontext-default.patch |
20 |
jquelin |
10266 |
|
21 |
jquelin |
56509 |
BuildRequires: perl(AnyEvent) >= 5.0.0 |
22 |
shlomif |
1010575 |
BuildRequires: perl(Canary::Stability) |
23 |
jquelin |
56509 |
BuildRequires: perl(ExtUtils::MakeMaker) |
24 |
|
|
BuildRequires: perl(Guard) >= 0.500.0 |
25 |
|
|
BuildRequires: perl(Scalar::Util) |
26 |
|
|
BuildRequires: perl(Storable) >= 2.150.0 |
27 |
|
|
BuildRequires: perl(common::sense) |
28 |
jquelin |
603825 |
BuildRequires: perl-devel |
29 |
|
|
Obsoletes: perl-Coro-EV <= 2:6.330.0 |
30 |
|
|
Obsoletes: perl-Coro-AnyEvent <= 2:6.330.0 |
31 |
|
|
Obsoletes: perl-Coro-BDB <= 2:6.330.0 |
32 |
tv |
1161047 |
# Export correct required versions |
33 |
shlomif |
1253915 |
Requires: perl(AnyEvent) >= 7 |
34 |
|
|
Requires: perl(AnyEvent::AIO) >= 1 |
35 |
|
|
Requires: perl(AnyEvent::BDB) >= 1 |
36 |
|
|
Requires: perl(EV) >= 4 |
37 |
|
|
Requires: perl(Event) >= 1.08 |
38 |
|
|
Requires: perl(Guard) >= 0.5 |
39 |
|
|
Requires: perl(Storable) >= 2.15 |
40 |
tv |
1729807 |
|
41 |
|
|
%{?perl_default_filter} |
42 |
|
|
|
43 |
|
|
%global __requires_exclude perl\\(Exporter::\\)|perl\\(Coro::Socket::\\) |
44 |
|
|
# Filter underspecified dependencies |
45 |
|
|
%global __requires_exclude %{?__requires_exclude:__requires_exclude|}^perl\\(AnyEvent\\)$ |
46 |
|
|
%global __requires_exclude %__requires_exclude|^perl\\(AnyEvent\\) >= 4.800001$ |
47 |
|
|
%global __requires_exclude %__requires_exclude|^perl\\(Guard\\)$ |
48 |
|
|
%global __requires_exclude %__requires_exclude|^perl\\(Storable\\)$ |
49 |
|
|
%global __provides_exclude %{?__provides_exclude:__provides_exclude|}^perl\\(Coro\\)$ |
50 |
|
|
|
51 |
jquelin |
10266 |
%description |
52 |
tv |
1021645 |
This module collection manages continuations in general, most often in the |
53 |
|
|
form of cooperative threads (also called coros, or simply "coro" in the |
54 |
|
|
documentation). They are similar to kernel threads but don't (in general) run |
55 |
|
|
in parallel at the same time even on SMP machines. The specific flavor of |
56 |
|
|
thread offered by this module also guarantees you that it will not switch |
57 |
|
|
between threads unless necessary, at easily-identified points in your |
58 |
|
|
program, so locking and parallel access are rarely an issue, making thread |
59 |
|
|
programming much safer and easier than using other thread models. |
60 |
jquelin |
10266 |
|
61 |
|
|
%prep |
62 |
|
|
%setup -q -n %{upstream_name}-%{upstream_version} |
63 |
tv |
1021549 |
%ifnarch %{ix86} x86_64 %{arm} |
64 |
|
|
# use ucontext backend on non-x86 (setjmp didn't work on s390(x)) |
65 |
wally |
2094035 |
%patch -P 0 -p1 -b .ucontext-default |
66 |
tv |
1021549 |
%endif |
67 |
tv |
1729806 |
# Correct shebangs |
68 |
|
|
for F in Coro/jit-*.pl; do |
69 |
|
|
perl -i -ne 'print $_ unless m{\A#!}' "$F" |
70 |
|
|
chmod -x "$F" |
71 |
|
|
done |
72 |
jquelin |
37010 |
# remove failing test - http://rt.cpan.org/Ticket/Display.html?id=32475 |
73 |
|
|
rm EV/t/01_unblock.t |
74 |
jquelin |
10266 |
|
75 |
|
|
%build |
76 |
tv |
1021549 |
# Disable FORTIFY_SOURCE on ARM as it breaks setjmp - RHBZ 750805 |
77 |
|
|
%ifarch %{arm} |
78 |
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0" |
79 |
|
|
%endif |
80 |
tv |
1021642 |
|
81 |
tv |
1423438 |
# Interactive configuration. Use default values. |
82 |
guillomovitch |
1158918 |
perl Makefile.PL INSTALLDIRS=vendor </dev/null |
83 |
|
|
%make_build CFLAGS="%{optflags}" |
84 |
jquelin |
10266 |
|
85 |
tv |
1021643 |
%install |
86 |
|
|
%make_install |
87 |
|
|
|
88 |
jquelin |
10266 |
%check |
89 |
|
|
%{!?_without_check:make test} |
90 |
|
|
|
91 |
|
|
%files |
92 |
tv |
1021644 |
%license COPYING |
93 |
shlomif |
1253915 |
%doc COPYING Changes EV INSTALL META.json META.yml MYMETA.yml README eg |
94 |
jquelin |
602831 |
%{perl_vendorarch}/* |
95 |
tv |
1729806 |
%_mandir/man3/* |