1 | Name: perl-Coro |
---|
2 | Version: 6.41 |
---|
3 | Release: 1%{?_dist_release} |
---|
4 | Summary: The only real threads in perl |
---|
5 | License: GPL+ or Artistic |
---|
6 | Group: Development/Libraries |
---|
7 | URL: http://search.cpan.org/dist/Coro/ |
---|
8 | Source0: http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/Coro-%{version}.tar.gz |
---|
9 | Patch0: %{name}-5.25-ucontext-default.patch |
---|
10 | BuildRequires: perl(AnyEvent) >= 5 |
---|
11 | BuildRequires: perl(common::sense) |
---|
12 | BuildRequires: perl(ExtUtils::MakeMaker) |
---|
13 | BuildRequires: perl(Guard) >= 0.5 |
---|
14 | BuildRequires: perl(Scalar::Util) |
---|
15 | BuildRequires: perl(Storable) >= 2.15 |
---|
16 | BuildRequires: perl(Time::HiRes) |
---|
17 | # Recommended optional modules |
---|
18 | BuildRequires: perl(AnyEvent::AIO) >= 1 |
---|
19 | BuildRequires: perl(AnyEvent::BDB) >= 1 |
---|
20 | BuildRequires: perl(BDB) |
---|
21 | # perl-EV not packaged |
---|
22 | BuildRequires: perl(EV) >= 3 |
---|
23 | BuildRequires: perl(Event) >= 1.08 |
---|
24 | BuildRequires: perl(IO::AIO) >= 3.1 |
---|
25 | Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) |
---|
26 | # Export correct required versions |
---|
27 | Requires: perl(AnyEvent) >= 5 |
---|
28 | Requires: perl(AnyEvent::AIO) >= 1 |
---|
29 | Requires: perl(AnyEvent::BDB) >= 1 |
---|
30 | Requires: perl(EV) >= 3 |
---|
31 | Requires: perl(Event) >= 1.08 |
---|
32 | Requires: perl(Guard) >= 0.5 |
---|
33 | Requires: perl(Storable) >= 2.15 |
---|
34 | |
---|
35 | %description |
---|
36 | This module collection manages continuations in general, most often in the |
---|
37 | form of cooperative threads (also called coros, or simply "coro" in the |
---|
38 | documentation). They are similar to kernel threads but don't (in general) run |
---|
39 | in parallel at the same time even on SMP machines. The specific flavor of |
---|
40 | thread offered by this module also guarantees you that it will not switch |
---|
41 | between threads unless necessary, at easily-identified points in your |
---|
42 | program, so locking and parallel access are rarely an issue, making thread |
---|
43 | programming much safer and easier than using other thread models. |
---|
44 | |
---|
45 | |
---|
46 | %prep |
---|
47 | %setup -q -n Coro-%{version} |
---|
48 | # use ucontext backend on non-x86 (setjmp didn't work on s390(x)) |
---|
49 | %ifnarch %{ix86} x86_64 %{arm} |
---|
50 | %patch0 -p1 -b .ucontext-default |
---|
51 | %endif |
---|
52 | |
---|
53 | for F in Coro/jit-*.pl; do |
---|
54 | sed -i -e '/^#!/d' "$F" |
---|
55 | chmod -x "$F" |
---|
56 | done |
---|
57 | |
---|
58 | %global wrong_shbangs eg/myhttpd |
---|
59 | %if %{defined fix_shbang_line} |
---|
60 | %fix_shbang_line %wrong_shbangs |
---|
61 | %else |
---|
62 | # at least EL6 doesn't have the %%fix_shbang_line macro |
---|
63 | sed -i -e '/^#!/ s|.*|#!%{__perl}|' %wrong_shbangs |
---|
64 | %endif |
---|
65 | |
---|
66 | %if %{_dist_release} < "vl7" |
---|
67 | |
---|
68 | # Filter underspecified dependencies |
---|
69 | cat << \EOF > %{name}-prov |
---|
70 | #!/bin/sh |
---|
71 | %{__perl_provides} $* |\ |
---|
72 | sed -e '/^perl(Coro)$/d' |
---|
73 | EOF |
---|
74 | |
---|
75 | %global __perl_provides %{_builddir}/Coro-%{version}/%{name}-prov |
---|
76 | chmod +x %{__perl_provides} |
---|
77 | |
---|
78 | |
---|
79 | cat << \EOF > %{name}-req |
---|
80 | #!/bin/sh |
---|
81 | %{__perl_requires} $* |\ |
---|
82 | sed -e '/^perl(AnyEvent)$/d' |\ |
---|
83 | sed -e '/^perl(AnyEvent >= 4.800001$/d' |\ |
---|
84 | sed -e '/^perl(AnyEvent::AIO)$/d' |\ |
---|
85 | sed -e '/^perl(AnyEvent::BDB)$/d' |\ |
---|
86 | sed -e '/^perl(EV)$/d' |\ |
---|
87 | sed -e '/^perl(Event)$/d' |\ |
---|
88 | sed -e '/^perl(Guard)$/d' |\ |
---|
89 | sed -e '/^perl(Storable)$/d' |
---|
90 | EOF |
---|
91 | |
---|
92 | %global __perl_requires %{_builddir}/Coro-%{version}/%{name}-req |
---|
93 | chmod +x %{__perl_requires} |
---|
94 | |
---|
95 | %{?perl_default_filter} |
---|
96 | |
---|
97 | %else |
---|
98 | |
---|
99 | # RPM 4.9 style: |
---|
100 | # Filter underspecified dependencies |
---|
101 | %global __requires_exclude %{?__requires_exclude:__requires_exclude|}^perl\\(AnyEvent\\)$ |
---|
102 | %global __requires_exclude %__requires_exclude|^perl\\(AnyEvent\\) >= 4.800001$ |
---|
103 | %global __requires_exclude %__requires_exclude|^perl\\(AnyEvent::AIO\\)$ |
---|
104 | %global __requires_exclude %__requires_exclude|^perl\\(AnyEvent::BDB\\)$ |
---|
105 | %global __requires_exclude %__requires_exclude|^perl\\(EV\\)$ |
---|
106 | %global __requires_exclude %__requires_exclude|^perl\\(Event\\)$ |
---|
107 | %global __requires_exclude %__requires_exclude|^perl\\(Guard\\)$ |
---|
108 | %global __requires_exclude %__requires_exclude|^perl\\(Storable\\)$ |
---|
109 | %global __requires_exclude %__requires_exclude|^perl\\(Coro\\)$ |
---|
110 | %global __provides_exclude %{?__provides_exclude:__provides_exclude|}^perl\\(Coro\\)$ |
---|
111 | |
---|
112 | %endif |
---|
113 | |
---|
114 | |
---|
115 | %build |
---|
116 | # Disable FORTIFY_SOURCE on ARM as it breaks setjmp - RHBZ 750805 |
---|
117 | %ifarch %{arm} |
---|
118 | RPM_OPT_FLAGS=$(echo "${RPM_OPT_FLAGS}" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=0/g') |
---|
119 | %endif |
---|
120 | |
---|
121 | # Interractive configuration. Use default values. |
---|
122 | %{__perl} Makefile.PL INSTALLDIRS=perl OPTIMIZE="$RPM_OPT_FLAGS" </dev/null |
---|
123 | make %{?_smp_mflags} |
---|
124 | |
---|
125 | %install |
---|
126 | make pure_install PERL_INSTALL_ROOT=%{buildroot} |
---|
127 | |
---|
128 | find %{buildroot} -type f -name .packlist -exec rm -f {} \; |
---|
129 | find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; |
---|
130 | find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; |
---|
131 | |
---|
132 | %{_fixperms} %{buildroot}/* |
---|
133 | |
---|
134 | %check |
---|
135 | make test |
---|
136 | |
---|
137 | %files |
---|
138 | %defattr(-,root,root,-) |
---|
139 | %doc Changes COPYING README README.linux-glibc |
---|
140 | %doc doc/* eg |
---|
141 | %{perl_archlib}/auto/* |
---|
142 | %{perl_archlib}/Coro* |
---|
143 | %{_mandir}/man3/* |
---|
144 | |
---|
145 | %changelog |
---|
146 | * Mon Dec 1 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 6.41-1 |
---|
147 | - updated to 6.41 |
---|
148 | |
---|
149 | * Fri Jun 27 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 6.07-2 |
---|
150 | - build with Perl 5.16 |
---|
151 | |
---|
152 | * Fri Mar 02 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 6.07-1 |
---|
153 | - initial build for Vine Linux |
---|
154 | |
---|
155 | * Tue Feb 21 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 6.07-3 |
---|
156 | - Add patch to fix build on ARM. RHBZ 750805 |
---|
157 | |
---|
158 | * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.07-2 |
---|
159 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
---|
160 | |
---|
161 | * Fri Dec 09 2011 Petr Pisar <ppisar@redhat.com> - 6.07-1 |
---|
162 | - 6.07 bump |
---|
163 | |
---|
164 | * Thu Nov 03 2011 Nicolas Chauvet <kwizart@gmail.com> - 6.06-2 |
---|
165 | - Fix ucontext on ARM - rhbz750805 |
---|
166 | |
---|
167 | * Fri Aug 12 2011 Petr Sabata <contyk@redhat.com> - 6.06-1 |
---|
168 | - 6.06 bump |
---|
169 | |
---|
170 | * Fri Aug 05 2011 Petr Sabata <contyk@redhat.com> - 6.05-1 |
---|
171 | - 6.05 bump |
---|
172 | |
---|
173 | * Thu Aug 04 2011 Petr Sabata <contyk@redhat.com> - 6.04-1 |
---|
174 | - 6.04 bump |
---|
175 | |
---|
176 | * Fri Jul 29 2011 Petr Pisar <ppisar@redhat.com> - 6.02-1 |
---|
177 | - 6.02 bump |
---|
178 | - Major version 6 breaks compatibility: Unreferenced coro objects will now be |
---|
179 | destroyed and cleaned up automatically (e.g. async { schedule }). |
---|
180 | |
---|
181 | * Tue Jun 21 2011 Marcela Mašláňová <mmaslano@redhat.com> - 5.372-4 |
---|
182 | - Perl mass rebuild |
---|
183 | |
---|
184 | * Fri Apr 08 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 5.372-3 |
---|
185 | - Added explicit versionned Requires: on perl(EV) |
---|
186 | - Removed automatically added unversionned Requires: on perl(EV) |
---|
187 | |
---|
188 | * Thu Apr 07 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 5.372-2 |
---|
189 | - Rebuild with EV support. |
---|
190 | |
---|
191 | * Mon Mar 07 2011 Petr Pisar <ppisar@redhat.com> - 5.372-1 |
---|
192 | - 5.372 bump |
---|
193 | |
---|
194 | * Mon Feb 21 2011 Petr Pisar <ppisar@redhat.com> - 5.37-1 |
---|
195 | - 5.37 bump |
---|
196 | - Fix State.xs syntax (RT#65991) |
---|
197 | - Version unversioned Provides |
---|
198 | |
---|
199 | * Mon Feb 14 2011 Petr Pisar <ppisar@redhat.com> - 5.26-1 |
---|
200 | - 5.26 bump |
---|
201 | |
---|
202 | * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.25-4 |
---|
203 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
---|
204 | |
---|
205 | * Fri Jan 21 2011 Mathieu Bridon <bochecha@fedoraproject.org> 5.25-3 |
---|
206 | - Allow building on systems without %%fix_shbang_line macro (needed for EL6) |
---|
207 | |
---|
208 | * Mon Jan 10 2011 Dan Horák <dan[at]danny.cz> 5.25-2 |
---|
209 | - use ucontext backend on non-x86 |
---|
210 | |
---|
211 | * Tue Jan 04 2011 Petr Pisar <ppisar@redhat.com> 5.25-1 |
---|
212 | - 5.25 import |
---|
213 | - Disable perl(EV) support as it's not packaged yet |
---|