# Workaround for "ERROR: Cannot copy 'SemaphoreSet.pm' to '../blib/lib/Coro/SemaphoreSet.pm': Permission denied": %global _smp_ncpus_max 4 %define upstream_name Coro %define upstream_version 6.57 #define _without_check 1 Name: perl-%{upstream_name} Version: %perl_convert_version %upstream_version Release: %mkrel 7 Epoch: 3 Summary: Coroutine process abstraction License: GPL+ or Artistic Group: Development/Perl Url: https://metacpan.org/release/%{upstream_name} Source0: https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/%{upstream_name}-%{upstream_version}.tar.gz Patch0: %{name}-5.25-ucontext-default.patch BuildRequires: perl(AnyEvent) >= 5.0.0 BuildRequires: perl(Canary::Stability) BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Guard) >= 0.500.0 BuildRequires: perl(Scalar::Util) BuildRequires: perl(Storable) >= 2.150.0 BuildRequires: perl(common::sense) BuildRequires: perl-devel Obsoletes: perl-Coro-EV <= 2:6.330.0 Obsoletes: perl-Coro-AnyEvent <= 2:6.330.0 Obsoletes: perl-Coro-BDB <= 2:6.330.0 # Export correct required versions Requires: perl(AnyEvent) >= 7 Requires: perl(AnyEvent::AIO) >= 1 Requires: perl(AnyEvent::BDB) >= 1 Requires: perl(EV) >= 4 Requires: perl(Event) >= 1.08 Requires: perl(Guard) >= 0.5 Requires: perl(Storable) >= 2.15 %{?perl_default_filter} %global __requires_exclude perl\\(Exporter::\\)|perl\\(Coro::Socket::\\) # Filter underspecified dependencies %global __requires_exclude %{?__requires_exclude:__requires_exclude|}^perl\\(AnyEvent\\)$ %global __requires_exclude %__requires_exclude|^perl\\(AnyEvent\\) >= 4.800001$ %global __requires_exclude %__requires_exclude|^perl\\(Guard\\)$ %global __requires_exclude %__requires_exclude|^perl\\(Storable\\)$ %global __provides_exclude %{?__provides_exclude:__provides_exclude|}^perl\\(Coro\\)$ %description This module collection manages continuations in general, most often in the form of cooperative threads (also called coros, or simply "coro" in the documentation). They are similar to kernel threads but don't (in general) run in parallel at the same time even on SMP machines. The specific flavor of thread offered by this module also guarantees you that it will not switch between threads unless necessary, at easily-identified points in your program, so locking and parallel access are rarely an issue, making thread programming much safer and easier than using other thread models. %prep %setup -q -n %{upstream_name}-%{upstream_version} %ifnarch %{ix86} x86_64 %{arm} # use ucontext backend on non-x86 (setjmp didn't work on s390(x)) %patch -P 0 -p1 -b .ucontext-default %endif # Correct shebangs for F in Coro/jit-*.pl; do perl -i -ne 'print $_ unless m{\A#!}' "$F" chmod -x "$F" done # remove failing test - http://rt.cpan.org/Ticket/Display.html?id=32475 rm EV/t/01_unblock.t %build # Disable FORTIFY_SOURCE on ARM as it breaks setjmp - RHBZ 750805 %ifarch %{arm} RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0" %endif # Interactive configuration. Use default values. perl Makefile.PL INSTALLDIRS=vendor