update p5-Coro to 6.570
This commit is contained in:
parent
96a0722dcd
commit
ecba765bae
@ -1,30 +1,30 @@
|
||||
COMMENT = coroutines for perl
|
||||
|
||||
MODULES = cpan
|
||||
DISTNAME = Coro-6.511
|
||||
CATEGORIES = devel
|
||||
REVISION = 0
|
||||
DISTNAME = Coro-6.57
|
||||
PKGNAME = p5-Coro-6.570
|
||||
|
||||
# perl
|
||||
CATEGORIES = devel
|
||||
|
||||
# Perl
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
WANTLIB += c perl pthread
|
||||
WANTLIB = c perl
|
||||
|
||||
BUILD_DEPENDS = ${RUN_DEPENDS} \
|
||||
devel/p5-Canary-Stability
|
||||
RUN_DEPENDS = devel/p5-Event>=0.89 \
|
||||
devel/p5-AnyEvent>=5.00 \
|
||||
devel/p5-EV>=4.0 \
|
||||
devel/p5-common-sense \
|
||||
devel/p5-Guard>=0.5
|
||||
MODULES = cpan
|
||||
|
||||
# will use hand-made assembler on i386/amd64
|
||||
# can force it to use sjlj like on other platforms, to
|
||||
# check things work.
|
||||
BUILD_DEPENDS = ${RUN_DEPENDS} \
|
||||
devel/p5-Canary-Stability
|
||||
RUN_DEPENDS = devel/p5-AnyEvent>=5.00 \
|
||||
devel/p5-EV>=4.0 \
|
||||
devel/p5-Event>=1.08 \
|
||||
devel/p5-Guard>=0.5 \
|
||||
devel/p5-common-sense
|
||||
|
||||
# CONFIGURE_ENV = CORO_INTERFACE=s
|
||||
# The hand-made assembler on i386/amd64 fails due to MAP_STACK.
|
||||
# Force to use setjmp/longjmp/sigaltstack like on other platforms.
|
||||
CONFIGURE_ENV += CORO_INTERFACE=s
|
||||
|
||||
# The Coro JIT violates W^X, so we can't use it.
|
||||
CONFIGURE_ENV += CORO_JIT=n
|
||||
CONFIGURE_ENV += CORO_JIT=n
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (Coro-6.511.tar.gz) = fj7UjNs/N0LZSuOrPQiMOrgYxSH4aB2mxfZWvUmsU+o=
|
||||
SIZE (Coro-6.511.tar.gz) = 195173
|
||||
SHA256 (Coro-6.57.tar.gz) = GSjkgDNUDhHr9VBpht0QGveNJCHSEPllmSI7FdUXFMY=
|
||||
SIZE (Coro-6.57.tar.gz) = 198128
|
||||
|
26
devel/p5-Coro/patches/patch-Coro_AnyEvent_pm
Normal file
26
devel/p5-Coro/patches/patch-Coro_AnyEvent_pm
Normal file
@ -0,0 +1,26 @@
|
||||
Indirect Object Syntax
|
||||
|
||||
Outside of the file handle case, use of this syntax is discouraged as it
|
||||
can confuse the Perl interpreter. See below for more details.
|
||||
|
||||
Index: Coro/AnyEvent.pm
|
||||
--- Coro/AnyEvent.pm.orig
|
||||
+++ Coro/AnyEvent.pm
|
||||
@@ -217,7 +217,7 @@ AnyEvent::post_detect {
|
||||
# do the inefficient thing ourselves
|
||||
Coro::_set_readyhook \&_activity;
|
||||
|
||||
- $IDLE = new Coro sub {
|
||||
+ $IDLE = Coro->new( sub {
|
||||
my $_poll = AnyEvent->can ("_poll")
|
||||
|| AnyEvent->can ("one_event"); # AnyEvent < 6.0
|
||||
|
||||
@@ -225,7 +225,7 @@ AnyEvent::post_detect {
|
||||
$_poll->();
|
||||
Coro::schedule if Coro::nready;
|
||||
}
|
||||
- };
|
||||
+ } );
|
||||
$IDLE->{desc} = "[AnyEvent idle process]";
|
||||
|
||||
$Coro::idle = $IDLE;
|
17
devel/p5-Coro/patches/patch-Coro_Handle_pm
Normal file
17
devel/p5-Coro/patches/patch-Coro_Handle_pm
Normal file
@ -0,0 +1,17 @@
|
||||
Indirect Object Syntax
|
||||
|
||||
Outside of the file handle case, use of this syntax is discouraged as it
|
||||
can confuse the Perl interpreter. See below for more details.
|
||||
|
||||
Index: Coro/Handle.pm
|
||||
--- Coro/Handle.pm.orig
|
||||
+++ Coro/Handle.pm
|
||||
@@ -77,7 +77,7 @@ non-(coroutine-)blocking equivalent.
|
||||
=cut
|
||||
|
||||
sub unblock($) {
|
||||
- new_from_fh Coro::Handle $_[0]
|
||||
+ Coro::Handle->new_from_fh( $_[0] )
|
||||
}
|
||||
|
||||
=item $fh->writable, $fh->readable
|
17
devel/p5-Coro/patches/patch-Coro_Socket_pm
Normal file
17
devel/p5-Coro/patches/patch-Coro_Socket_pm
Normal file
@ -0,0 +1,17 @@
|
||||
Indirect Object Syntax
|
||||
|
||||
Outside of the file handle case, use of this syntax is discouraged as it
|
||||
can confuse the Perl interpreter. See below for more details.
|
||||
|
||||
Index: Coro/Socket.pm
|
||||
--- Coro/Socket.pm.orig
|
||||
+++ Coro/Socket.pm
|
||||
@@ -194,7 +194,7 @@ sub configure {
|
||||
$! = 0;
|
||||
|
||||
if ($self->connect ($_)) {
|
||||
- next unless writable $self;
|
||||
+ next unless $self->writable();
|
||||
$! = unpack "i", $self->getsockopt (SOL_SOCKET, SO_ERROR);
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
Description: fix for Coro with 5.24
|
||||
Origin: https://paste.debian.net/688072
|
||||
Bug-Debian: https://bugs.debian.org/838851
|
||||
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=114708
|
||||
Author: Anonymous
|
||||
Last-Update: 2016-09-25
|
||||
|
||||
--- Coro/State.xs.orig Sun Jun 26 14:44:30 2016
|
||||
+++ Coro/State.xs Sat Oct 15 13:38:04 2016
|
||||
@@ -1412,7 +1412,11 @@ runops_trace (pTHX)
|
||||
PUSHMARK (SP);
|
||||
PUSHs (&PL_sv_yes);
|
||||
PUSHs (fullname);
|
||||
+# if PERL_VERSION_ATLEAST(5,24,0)
|
||||
+ PUSHs (CxHASARGS (cx) ? sv_2mortal (newRV_inc (PL_curpad[0])) : &PL_sv_undef);
|
||||
+#else
|
||||
PUSHs (CxHASARGS (cx) ? sv_2mortal (newRV_inc ((SV *)cx->blk_sub.argarray)) : &PL_sv_undef);
|
||||
+#endif
|
||||
PUTBACK;
|
||||
cb = hv_fetch ((HV *)SvRV (coro_current), "_trace_sub_cb", sizeof ("_trace_sub_cb") - 1, 0);
|
||||
if (cb) call_sv (*cb, G_KEEPERR | G_EVAL | G_VOID | G_DISCARD);
|
17
devel/p5-Coro/patches/patch-Coro_Storable_pm
Normal file
17
devel/p5-Coro/patches/patch-Coro_Storable_pm
Normal file
@ -0,0 +1,17 @@
|
||||
Indirect Object Syntax
|
||||
|
||||
Outside of the file handle case, use of this syntax is discouraged as it
|
||||
can confuse the Perl interpreter. See below for more details.
|
||||
|
||||
Index: Coro/Storable.pm
|
||||
--- Coro/Storable.pm.orig
|
||||
+++ Coro/Storable.pm
|
||||
@@ -89,7 +89,7 @@ our @EXPORT = qw(thaw freeze nfreeze blocking_thaw blo
|
||||
|
||||
our $GRANULARITY = 0.01;
|
||||
|
||||
-my $lock = new Coro::Semaphore;
|
||||
+my $lock = Coro::Semaphore->new();
|
||||
|
||||
sub guard {
|
||||
$lock->guard
|
17
devel/p5-Coro/patches/patch-Coro_Util_pm
Normal file
17
devel/p5-Coro/patches/patch-Coro_Util_pm
Normal file
@ -0,0 +1,17 @@
|
||||
Indirect Object Syntax
|
||||
|
||||
Outside of the file handle case, use of this syntax is discouraged as it
|
||||
can confuse the Perl interpreter. See below for more details.
|
||||
|
||||
Index: Coro/Util.pm
|
||||
--- Coro/Util.pm.orig
|
||||
+++ Coro/Util.pm
|
||||
@@ -45,7 +45,7 @@ our $VERSION = 6.57;
|
||||
|
||||
our $MAXPARALLEL = 16; # max. number of parallel jobs
|
||||
|
||||
-my $jobs = new Coro::Semaphore $MAXPARALLEL;
|
||||
+my $jobs = Coro::Semaphore->new( $MAXPARALLEL );
|
||||
|
||||
sub _do_asy(&;@) {
|
||||
my $sub = shift;
|
65
devel/p5-Coro/patches/patch-Coro_pm
Normal file
65
devel/p5-Coro/patches/patch-Coro_pm
Normal file
@ -0,0 +1,65 @@
|
||||
Indirect Object Syntax
|
||||
|
||||
Outside of the file handle case, use of this syntax is discouraged as it
|
||||
can confuse the Perl interpreter. See below for more details.
|
||||
|
||||
Index: Coro.pm
|
||||
--- Coro.pm.orig
|
||||
+++ Coro.pm
|
||||
@@ -18,7 +18,7 @@ Coro - the only real threads in perl
|
||||
cede; # and again
|
||||
|
||||
# use locking
|
||||
- my $lock = new Coro::Semaphore;
|
||||
+ my $lock = Coro::Semaphore->new();
|
||||
my $locked;
|
||||
|
||||
$lock->down;
|
||||
@@ -426,25 +426,25 @@ See L<Coro::EV> or L<Coro::AnyEvent> for examples of u
|
||||
=cut
|
||||
|
||||
# ||= because other modules could have provided their own by now
|
||||
-$idle ||= new Coro sub {
|
||||
+$idle ||= Coro->new( sub {
|
||||
require Coro::Debug;
|
||||
die "FATAL: deadlock detected.\n"
|
||||
. Coro::Debug::ps_listing ();
|
||||
-};
|
||||
+} );
|
||||
|
||||
# this coro is necessary because a coro
|
||||
# cannot destroy itself.
|
||||
our @destroy;
|
||||
our $manager;
|
||||
|
||||
-$manager = new Coro sub {
|
||||
+$manager = Coro->new( sub {
|
||||
while () {
|
||||
_destroy shift @destroy
|
||||
while @destroy;
|
||||
|
||||
&schedule;
|
||||
}
|
||||
-};
|
||||
+} );
|
||||
$manager->{desc} = "[coro manager]";
|
||||
$manager->prio (PRIO_MAX);
|
||||
|
||||
@@ -1057,7 +1057,7 @@ our @unblock_queue;
|
||||
# to reduce pressure on the coro pool (because most callbacks
|
||||
# return immediately and can be reused) and because we cannot cede
|
||||
# inside an event callback.
|
||||
-our $unblock_scheduler = new Coro sub {
|
||||
+our $unblock_scheduler = Coro->new( sub {
|
||||
while () {
|
||||
while (my $cb = pop @unblock_queue) {
|
||||
&async_pool (@$cb);
|
||||
@@ -1069,7 +1069,7 @@ our $unblock_scheduler = new Coro sub {
|
||||
}
|
||||
schedule; # sleep well
|
||||
}
|
||||
-};
|
||||
+} );
|
||||
$unblock_scheduler->{desc} = "[unblock_sub scheduler]";
|
||||
|
||||
sub unblock_sub(&) {
|
23
devel/p5-Coro/patches/patch-EV_EV_pm
Normal file
23
devel/p5-Coro/patches/patch-EV_EV_pm
Normal file
@ -0,0 +1,23 @@
|
||||
Indirect Object Syntax
|
||||
|
||||
Outside of the file handle case, use of this syntax is discouraged as it
|
||||
can confuse the Perl interpreter. See below for more details.
|
||||
|
||||
Index: EV/EV.pm
|
||||
--- EV/EV.pm.orig
|
||||
+++ EV/EV.pm
|
||||
@@ -66,12 +66,12 @@ BEGIN {
|
||||
XSLoader::load __PACKAGE__, $VERSION;
|
||||
}
|
||||
|
||||
-our $IDLE = new Coro sub {
|
||||
+our $IDLE = Coro->new( sub {
|
||||
while () {
|
||||
&_loop_oneshot;
|
||||
Coro::schedule if Coro::nready;
|
||||
}
|
||||
-};
|
||||
+} );
|
||||
$IDLE->{desc} = "[EV idle thread]";
|
||||
|
||||
$Coro::idle = $IDLE;
|
23
devel/p5-Coro/patches/patch-Event_Event_pm
Normal file
23
devel/p5-Coro/patches/patch-Event_Event_pm
Normal file
@ -0,0 +1,23 @@
|
||||
Indirect Object Syntax
|
||||
|
||||
Outside of the file handle case, use of this syntax is discouraged as it
|
||||
can confuse the Perl interpreter. See below for more details.
|
||||
|
||||
Index: Event/Event.pm
|
||||
--- Event/Event.pm.orig
|
||||
+++ Event/Event.pm
|
||||
@@ -190,12 +190,12 @@ sub sweep {
|
||||
}
|
||||
|
||||
# very inefficient
|
||||
-our $IDLE = new Coro sub {
|
||||
+our $IDLE = Coro->new( sub {
|
||||
while () {
|
||||
Event::one_event;
|
||||
Coro::schedule if Coro::nready;
|
||||
}
|
||||
-};
|
||||
+} );
|
||||
$IDLE->{desc} = "[Event idle thread]";
|
||||
|
||||
$Coro::idle = $IDLE;
|
@ -27,11 +27,11 @@ ${P5ARCH}/Coro/jit-amd64-unix.pl
|
||||
${P5ARCH}/Coro/jit-x86-unix.pl
|
||||
${P5ARCH}/auto/Coro/
|
||||
${P5ARCH}/auto/Coro/EV/
|
||||
${P5ARCH}/auto/Coro/EV/EV.so
|
||||
@so ${P5ARCH}/auto/Coro/EV/EV.so
|
||||
${P5ARCH}/auto/Coro/Event/
|
||||
${P5ARCH}/auto/Coro/Event/Event.so
|
||||
@so ${P5ARCH}/auto/Coro/Event/Event.so
|
||||
${P5ARCH}/auto/Coro/State/
|
||||
${P5ARCH}/auto/Coro/State/State.so
|
||||
@so ${P5ARCH}/auto/Coro/State/State.so
|
||||
@man man/man3p/Coro.3p
|
||||
@man man/man3p/Coro::AIO.3p
|
||||
@man man/man3p/Coro::AnyEvent.3p
|
||||
|
Loading…
x
Reference in New Issue
Block a user