source: projects/specs/trunk/p/perl-Coro/perl-Coro-vl.spec @ 8649

Revision 8649, 6.7 KB checked in by iwaim, 10 years ago (diff)

perl-Coro 6.07-2

Line 
1Name:           perl-Coro
2Version:        6.07
3Release:        2%{?_dist_release}
4Summary:        The only real threads in perl
5License:        GPL+ or Artistic
6Group:          Development/Libraries
7URL:            http://search.cpan.org/dist/Coro/
8Source0:        http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/Coro-%{version}.tar.gz
9Patch0:         %{name}-5.25-ucontext-default.patch
10BuildRequires:  perl(AnyEvent) >= 5
11BuildRequires:  perl(common::sense)
12BuildRequires:  perl(ExtUtils::MakeMaker)
13BuildRequires:  perl(Guard) >= 0.5
14BuildRequires:  perl(Scalar::Util)
15BuildRequires:  perl(Storable) >= 2.15
16BuildRequires:  perl(Time::HiRes)
17# Recommended optional modules
18BuildRequires:  perl(AnyEvent::AIO) >= 1
19BuildRequires:  perl(AnyEvent::BDB) >= 1
20BuildRequires:  perl(BDB)
21# perl-EV not packaged
22BuildRequires:  perl(EV) >= 3
23BuildRequires:  perl(Event) >= 1.08
24BuildRequires:  perl(IO::AIO) >= 3.1
25Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
26# Export correct required versions
27Requires:       perl(AnyEvent) >= 5
28Requires:       perl(AnyEvent::AIO) >= 1
29Requires:       perl(AnyEvent::BDB) >= 1
30Requires:       perl(EV) >= 3
31Requires:       perl(Event) >= 1.08
32Requires:       perl(Guard) >= 0.5
33Requires:       perl(Storable) >= 2.15
34
35%description
36This module collection manages continuations in general, most often in the
37form of cooperative threads (also called coros, or simply "coro" in the
38documentation). They are similar to kernel threads but don't (in general) run
39in parallel at the same time even on SMP machines. The specific flavor of
40thread offered by this module also guarantees you that it will not switch
41between threads unless necessary, at easily-identified points in your
42program, so locking and parallel access are rarely an issue, making thread
43programming 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
53for F in Coro/jit-*.pl; do
54    sed -i -e '/^#!/d' "$F"
55    chmod -x "$F"
56done
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
63sed -i -e '/^#!/ s|.*|#!%{__perl}|' %wrong_shbangs
64%endif
65
66%if %{_dist_release} < "vl7"
67
68# Filter underspecified dependencies
69cat << \EOF > %{name}-prov
70#!/bin/sh
71%{__perl_provides} $* |\
72sed -e '/^perl(Coro)$/d'
73EOF
74
75%global __perl_provides %{_builddir}/Coro-%{version}/%{name}-prov
76chmod +x %{__perl_provides}
77
78
79cat << \EOF > %{name}-req
80#!/bin/sh
81%{__perl_requires} $* |\
82sed -e '/^perl(AnyEvent)$/d' |\
83sed -e '/^perl(AnyEvent >= 4.800001$/d' |\
84sed -e '/^perl(AnyEvent::AIO)$/d' |\
85sed -e '/^perl(AnyEvent::BDB)$/d' |\
86sed -e '/^perl(EV)$/d' |\
87sed -e '/^perl(Event)$/d' |\
88sed -e '/^perl(Guard)$/d' |\
89sed -e '/^perl(Storable)$/d'
90EOF
91
92%global __perl_requires %{_builddir}/Coro-%{version}/%{name}-req
93chmod +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}
118RPM_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
123make %{?_smp_mflags}
124
125%install
126make pure_install PERL_INSTALL_ROOT=%{buildroot}
127
128find %{buildroot} -type f -name .packlist -exec rm -f {} \;
129find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
130find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
131
132%{_fixperms} %{buildroot}/*
133
134%check
135make 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* Fri Jun 27 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 6.07-2
147- build with Perl 5.16
148
149* Fri Mar 02 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 6.07-1
150- initial build for Vine Linux
151
152* Tue Feb 21 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 6.07-3
153- Add patch to fix build on ARM. RHBZ 750805
154
155* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.07-2
156- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
157
158* Fri Dec 09 2011 Petr Pisar <ppisar@redhat.com> - 6.07-1
159- 6.07 bump
160
161* Thu Nov 03 2011 Nicolas Chauvet <kwizart@gmail.com> - 6.06-2
162- Fix ucontext on ARM - rhbz750805
163
164* Fri Aug 12 2011 Petr Sabata <contyk@redhat.com> - 6.06-1
165- 6.06 bump
166
167* Fri Aug 05 2011 Petr Sabata <contyk@redhat.com> - 6.05-1
168- 6.05 bump
169
170* Thu Aug 04 2011 Petr Sabata <contyk@redhat.com> - 6.04-1
171- 6.04 bump
172
173* Fri Jul 29 2011 Petr Pisar <ppisar@redhat.com> - 6.02-1
174- 6.02 bump
175- Major version 6 breaks compatibility: Unreferenced coro objects will now be
176  destroyed and cleaned up automatically (e.g. async { schedule }).
177
178* Tue Jun 21 2011 Marcela Mašláňová <mmaslano@redhat.com> - 5.372-4
179- Perl mass rebuild
180
181* Fri Apr 08 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 5.372-3
182- Added explicit versionned Requires: on perl(EV)
183- Removed automatically added unversionned Requires: on perl(EV)
184
185* Thu Apr 07 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 5.372-2
186- Rebuild with EV support.
187
188* Mon Mar 07 2011 Petr Pisar <ppisar@redhat.com> - 5.372-1
189- 5.372 bump
190
191* Mon Feb 21 2011 Petr Pisar <ppisar@redhat.com> - 5.37-1
192- 5.37 bump
193- Fix State.xs syntax (RT#65991)
194- Version unversioned Provides
195
196* Mon Feb 14 2011 Petr Pisar <ppisar@redhat.com> - 5.26-1
197- 5.26 bump
198
199* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.25-4
200- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
201
202* Fri Jan 21 2011 Mathieu Bridon <bochecha@fedoraproject.org> 5.25-3
203- Allow building on systems without %%fix_shbang_line macro (needed for EL6)
204
205* Mon Jan 10 2011 Dan Horák <dan[at]danny.cz> 5.25-2
206- use ucontext backend on non-x86
207
208* Tue Jan 04 2011 Petr Pisar <ppisar@redhat.com> 5.25-1
209- 5.25 import
210- Disable perl(EV) support as it's not packaged yet
Note: See TracBrowser for help on using the repository browser.