[5803] | 1 | Name: perl-Coro |
---|
| 2 | Version: 6.07 |
---|
| 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 | * Fri Mar 02 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 6.07-1 |
---|
| 147 | - initial build for Vine Linux |
---|
| 148 | |
---|
| 149 | * Tue Feb 21 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 6.07-3 |
---|
| 150 | - Add patch to fix build on ARM. RHBZ 750805 |
---|
| 151 | |
---|
| 152 | * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.07-2 |
---|
| 153 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
---|
| 154 | |
---|
| 155 | * Fri Dec 09 2011 Petr Pisar <ppisar@redhat.com> - 6.07-1 |
---|
| 156 | - 6.07 bump |
---|
| 157 | |
---|
| 158 | * Thu Nov 03 2011 Nicolas Chauvet <kwizart@gmail.com> - 6.06-2 |
---|
| 159 | - Fix ucontext on ARM - rhbz750805 |
---|
| 160 | |
---|
| 161 | * Fri Aug 12 2011 Petr Sabata <contyk@redhat.com> - 6.06-1 |
---|
| 162 | - 6.06 bump |
---|
| 163 | |
---|
| 164 | * Fri Aug 05 2011 Petr Sabata <contyk@redhat.com> - 6.05-1 |
---|
| 165 | - 6.05 bump |
---|
| 166 | |
---|
| 167 | * Thu Aug 04 2011 Petr Sabata <contyk@redhat.com> - 6.04-1 |
---|
| 168 | - 6.04 bump |
---|
| 169 | |
---|
| 170 | * Fri Jul 29 2011 Petr Pisar <ppisar@redhat.com> - 6.02-1 |
---|
| 171 | - 6.02 bump |
---|
| 172 | - Major version 6 breaks compatibility: Unreferenced coro objects will now be |
---|
| 173 | destroyed and cleaned up automatically (e.g. async { schedule }). |
---|
| 174 | |
---|
| 175 | * Tue Jun 21 2011 Marcela Mašláňová <mmaslano@redhat.com> - 5.372-4 |
---|
| 176 | - Perl mass rebuild |
---|
| 177 | |
---|
| 178 | * Fri Apr 08 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 5.372-3 |
---|
| 179 | - Added explicit versionned Requires: on perl(EV) |
---|
| 180 | - Removed automatically added unversionned Requires: on perl(EV) |
---|
| 181 | |
---|
| 182 | * Thu Apr 07 2011 Mathieu Bridon <bochecha@fedoraproject.org> - 5.372-2 |
---|
| 183 | - Rebuild with EV support. |
---|
| 184 | |
---|
| 185 | * Mon Mar 07 2011 Petr Pisar <ppisar@redhat.com> - 5.372-1 |
---|
| 186 | - 5.372 bump |
---|
| 187 | |
---|
| 188 | * Mon Feb 21 2011 Petr Pisar <ppisar@redhat.com> - 5.37-1 |
---|
| 189 | - 5.37 bump |
---|
| 190 | - Fix State.xs syntax (RT#65991) |
---|
| 191 | - Version unversioned Provides |
---|
| 192 | |
---|
| 193 | * Mon Feb 14 2011 Petr Pisar <ppisar@redhat.com> - 5.26-1 |
---|
| 194 | - 5.26 bump |
---|
| 195 | |
---|
| 196 | * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.25-4 |
---|
| 197 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
---|
| 198 | |
---|
| 199 | * Fri Jan 21 2011 Mathieu Bridon <bochecha@fedoraproject.org> 5.25-3 |
---|
| 200 | - Allow building on systems without %%fix_shbang_line macro (needed for EL6) |
---|
| 201 | |
---|
| 202 | * Mon Jan 10 2011 Dan Horák <dan[at]danny.cz> 5.25-2 |
---|
| 203 | - use ucontext backend on non-x86 |
---|
| 204 | |
---|
| 205 | * Tue Jan 04 2011 Petr Pisar <ppisar@redhat.com> 5.25-1 |
---|
| 206 | - 5.25 import |
---|
| 207 | - Disable perl(EV) support as it's not packaged yet |
---|