/[packages]/cauldron/perl-Coro/current/SPECS/perl-Coro.spec
ViewVC logotype

Contents of /cauldron/perl-Coro/current/SPECS/perl-Coro.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2094035 - (show annotations) (download)
Sun Sep 8 08:07:42 2024 UTC (4 days, 20 hours ago) by wally
File size: 3385 byte(s)
replace deprecated %%patchN with '%%patch -P N' (SILENT)
1 # Workaround for "ERROR: Cannot copy 'SemaphoreSet.pm' to '../blib/lib/Coro/SemaphoreSet.pm': Permission denied":
2 %global _smp_ncpus_max 4
3
4 %define upstream_name Coro
5 %define upstream_version 6.57
6
7 #define _without_check 1
8
9 Name: perl-%{upstream_name}
10 Version: %perl_convert_version %upstream_version
11 Release: %mkrel 7
12 Epoch: 3
13
14 Summary: Coroutine process abstraction
15 License: GPL+ or Artistic
16 Group: Development/Perl
17 Url: https://metacpan.org/release/%{upstream_name}
18 Source0: https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/%{upstream_name}-%{upstream_version}.tar.gz
19 Patch0: %{name}-5.25-ucontext-default.patch
20
21 BuildRequires: perl(AnyEvent) >= 5.0.0
22 BuildRequires: perl(Canary::Stability)
23 BuildRequires: perl(ExtUtils::MakeMaker)
24 BuildRequires: perl(Guard) >= 0.500.0
25 BuildRequires: perl(Scalar::Util)
26 BuildRequires: perl(Storable) >= 2.150.0
27 BuildRequires: perl(common::sense)
28 BuildRequires: perl-devel
29 Obsoletes: perl-Coro-EV <= 2:6.330.0
30 Obsoletes: perl-Coro-AnyEvent <= 2:6.330.0
31 Obsoletes: perl-Coro-BDB <= 2:6.330.0
32 # Export correct required versions
33 Requires: perl(AnyEvent) >= 7
34 Requires: perl(AnyEvent::AIO) >= 1
35 Requires: perl(AnyEvent::BDB) >= 1
36 Requires: perl(EV) >= 4
37 Requires: perl(Event) >= 1.08
38 Requires: perl(Guard) >= 0.5
39 Requires: perl(Storable) >= 2.15
40
41 %{?perl_default_filter}
42
43 %global __requires_exclude perl\\(Exporter::\\)|perl\\(Coro::Socket::\\)
44 # Filter underspecified dependencies
45 %global __requires_exclude %{?__requires_exclude:__requires_exclude|}^perl\\(AnyEvent\\)$
46 %global __requires_exclude %__requires_exclude|^perl\\(AnyEvent\\) >= 4.800001$
47 %global __requires_exclude %__requires_exclude|^perl\\(Guard\\)$
48 %global __requires_exclude %__requires_exclude|^perl\\(Storable\\)$
49 %global __provides_exclude %{?__provides_exclude:__provides_exclude|}^perl\\(Coro\\)$
50
51 %description
52 This module collection manages continuations in general, most often in the
53 form of cooperative threads (also called coros, or simply "coro" in the
54 documentation). They are similar to kernel threads but don't (in general) run
55 in parallel at the same time even on SMP machines. The specific flavor of
56 thread offered by this module also guarantees you that it will not switch
57 between threads unless necessary, at easily-identified points in your
58 program, so locking and parallel access are rarely an issue, making thread
59 programming much safer and easier than using other thread models.
60
61 %prep
62 %setup -q -n %{upstream_name}-%{upstream_version}
63 %ifnarch %{ix86} x86_64 %{arm}
64 # use ucontext backend on non-x86 (setjmp didn't work on s390(x))
65 %patch -P 0 -p1 -b .ucontext-default
66 %endif
67 # Correct shebangs
68 for F in Coro/jit-*.pl; do
69 perl -i -ne 'print $_ unless m{\A#!}' "$F"
70 chmod -x "$F"
71 done
72 # remove failing test - http://rt.cpan.org/Ticket/Display.html?id=32475
73 rm EV/t/01_unblock.t
74
75 %build
76 # Disable FORTIFY_SOURCE on ARM as it breaks setjmp - RHBZ 750805
77 %ifarch %{arm}
78 RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0"
79 %endif
80
81 # Interactive configuration. Use default values.
82 perl Makefile.PL INSTALLDIRS=vendor </dev/null
83 %make_build CFLAGS="%{optflags}"
84
85 %install
86 %make_install
87
88 %check
89 %{!?_without_check:make test}
90
91 %files
92 %license COPYING
93 %doc COPYING Changes EV INSTALL META.json META.yml MYMETA.yml README eg
94 %{perl_vendorarch}/*
95 %_mandir/man3/*

  ViewVC Help
Powered by ViewVC 1.1.30