perl-Coro-vl.spec 6.9 KB

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