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

Revision 12120, 6.9 KB checked in by tomop, 5 years ago (diff)

perl-5.26 and friends

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