mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
Add p5-Coro, a collection of perl modules that bring coroutines to
perl5.
This commit is contained in:
parent
16d0a10427
commit
6d7f547b0a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=74076
@ -459,6 +459,7 @@
|
||||
SUBDIR += p5-Config-IniFiles
|
||||
SUBDIR += p5-Config-Setting
|
||||
SUBDIR += p5-ConfigReader
|
||||
SUBDIR += p5-Coro
|
||||
SUBDIR += p5-Curses
|
||||
SUBDIR += p5-Curses-Widgets
|
||||
SUBDIR += p5-DB_File-Lock
|
||||
|
47
devel/p5-Coro/Makefile
Normal file
47
devel/p5-Coro/Makefile
Normal file
@ -0,0 +1,47 @@
|
||||
# New ports collection makefile for: Coro
|
||||
# Date created: 27 Jan 2003
|
||||
# Whom: tobez
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= Coro
|
||||
PORTVERSION= 0.6
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
|
||||
MASTER_SITE_SUBDIR= Coro
|
||||
PKGNAMEPREFIX= p5-
|
||||
|
||||
MAINTAINER= tobez@FreeBSD.org
|
||||
|
||||
BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Event.pm:${PORTSDIR}/devel/p5-Event \
|
||||
${SITE_PERL}/${PERL_ARCH}/Scalar/Util.pm:${PORTSDIR}/lang/p5-Scalar-List-Utils
|
||||
RUN_DEPENDS= ${BUILD_DEPENDS}
|
||||
|
||||
SITE_PERL= ${PREFIX}/lib/perl5/site_perl/${PERL_VER}
|
||||
PERL_CONFIGURE= yes
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${PERL_LEVEL} < 500600
|
||||
BROKEN= "This port requires perl 5.6 or newer"
|
||||
.endif
|
||||
|
||||
MANPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
|
||||
MAN3= Coro.3 \
|
||||
Coro::Channel.3 \
|
||||
Coro::Cont.3 \
|
||||
Coro::Event.3 \
|
||||
Coro::Handle.3 \
|
||||
Coro::MakeMaker.3 \
|
||||
Coro::RWLock.3 \
|
||||
Coro::Semaphore.3 \
|
||||
Coro::SemaphoreSet.3 \
|
||||
Coro::Signal.3 \
|
||||
Coro::Socket.3 \
|
||||
Coro::Specific.3 \
|
||||
Coro::State.3 \
|
||||
Coro::Timer.3 \
|
||||
Coro::Util.3
|
||||
|
||||
.include <bsd.port.post.mk>
|
1
devel/p5-Coro/distinfo
Normal file
1
devel/p5-Coro/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (Coro-0.6.tar.gz) = 88f53f60471e04923845b06befd3403c
|
69
devel/p5-Coro/files/patch-Coro:Makefile.PL
Normal file
69
devel/p5-Coro/files/patch-Coro:Makefile.PL
Normal file
@ -0,0 +1,69 @@
|
||||
$FreeBSD$
|
||||
|
||||
--- Coro/Makefile.PL.orig Mon Jan 27 10:25:21 2003
|
||||
+++ Coro/Makefile.PL Mon Jan 27 10:27:04 2003
|
||||
@@ -24,62 +24,15 @@ if ($^O =~ /win32/i or $^O =~ /cygwin/)
|
||||
$iface = "s";
|
||||
}
|
||||
|
||||
-print <<EOF;
|
||||
-
|
||||
-Version 0.12 introduced C context sharing. This makes it possible to share
|
||||
-the C stack and context between many coroutines, resulting in memory
|
||||
-savings and slight speed gains, at the cost of potential (but mostly
|
||||
-theoretical) segfaults. On my Linux/x86 machine this decreased the size
|
||||
-of a new coroutine from 9k to 5k, but the savings are much more apparent
|
||||
-on machines without mmap or good memory management. This algorithm relies
|
||||
-on the non-fact that the same machine stack pointer indicates the same
|
||||
-function call nesting level, which usually works good enough but might
|
||||
-fail...
|
||||
-
|
||||
-The default (enabled) has been in-use on productions servers for some time
|
||||
-now, without any problem reports so far.
|
||||
-
|
||||
-EOF
|
||||
-
|
||||
-print "Do you want to enable C context sharing (y/n) [y]? ";
|
||||
-
|
||||
-if (<> !~ /^\s*n/i) {
|
||||
+if (1 || <> !~ /^\s*n/i) {
|
||||
print "\nExperimental context sharing enabled.\n\n";
|
||||
$DEFINE .= " -DCORO_LAZY_STACK";
|
||||
}
|
||||
|
||||
if ($iface) {
|
||||
- print <<EOF;
|
||||
-
|
||||
-Coro can use various ways to implement coroutines at the C level:
|
||||
-
|
||||
-u The unix ucontext functions are newer and not implemented in older
|
||||
- unices (or broken libc's like glibc-2.2.2 and below). They allow very
|
||||
- fast coroutine creation and fast switching, and, most importantly, are
|
||||
- very stable.
|
||||
-
|
||||
-s If the ucontext functions are not working or you don't want
|
||||
- to use them for other reasons you can try a workaround using
|
||||
- setjmp/longjmp/sigaltstack (also standard unix functions). Coroutine
|
||||
- creation is rather slow, but switching is very fast as well (often much
|
||||
- faster than with the ucontext functions). Unfortunately, glibc-2.1 and
|
||||
- below don't even feature a working sigaltstack.
|
||||
-
|
||||
-l Older GNU/Linux systems (glibc-2.1 and below) need this hack. Since it is
|
||||
- very linux-specific it is also quite fast for newer versions; when it
|
||||
- works, that is...
|
||||
-
|
||||
-i IRIX. For some reason, SGI really does not like to follow the unix
|
||||
- standard (does that surprise you?), so this workaround might be needed
|
||||
- (it's fast), although s and u should also work now.
|
||||
-
|
||||
-EOF
|
||||
-
|
||||
retry:
|
||||
- print "Use which implementation,\n",
|
||||
- "<s>etjmp/longjump, <u>context, <i>rix or <l>inux [$iface]? ";
|
||||
|
||||
- my $r = <>;
|
||||
+ my $r = "s" || <>;
|
||||
$iface = lc $1 if $r =~ /(\S)/;
|
||||
|
||||
if ($iface eq "u") {
|
1
devel/p5-Coro/pkg-comment
Normal file
1
devel/p5-Coro/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
Coro - coroutine process abstraction for perl
|
10
devel/p5-Coro/pkg-descr
Normal file
10
devel/p5-Coro/pkg-descr
Normal file
@ -0,0 +1,10 @@
|
||||
This module collection manages coroutines. Coroutines are similar to
|
||||
threads but don't run in parallel.
|
||||
|
||||
In this module, coroutines are defined as "callchain + lexical variables
|
||||
+ @_ + $_ + $@ + $^W + C stack), that is, a coroutine has it's own
|
||||
callchain, it's own set of lexicals and it's own set of perl's most
|
||||
important global variables.
|
||||
|
||||
Author: Marc Lehmann <pcg@goof.com>
|
||||
WWW: http://search.cpan.org/search?dist=Coro
|
26
devel/p5-Coro/pkg-plist
Normal file
26
devel/p5-Coro/pkg-plist
Normal file
@ -0,0 +1,26 @@
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Coro/Event/Event.so
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Coro/Event/Event.bs
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Coro/State/State.so
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Coro/State/State.bs
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Coro/.packlist
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/Cont.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/State.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/Channel.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/Semaphore.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/SemaphoreSet.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/RWLock.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/CoroAPI.h
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/Specific.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/Timer.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/MakeMaker.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/Signal.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/Handle.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/Util.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/Event.pm
|
||||
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro/Socket.pm
|
||||
@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Coro/Event
|
||||
@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Coro/State
|
||||
@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Coro
|
||||
@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/Coro
|
||||
@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/mach 2>/dev/null || true
|
Loading…
Reference in New Issue
Block a user