Add p5-forks 0.20, drop-in replacement for Perl threads using fork().

PR:		ports/104325
Submitted by:	Cheng-Lung Sung <clsung at FreeBSD.org>
This commit is contained in:
Cheng-Lung Sung 2006-11-07 03:01:32 +00:00
parent e302ecc036
commit 0d696a9e80
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=176672
5 changed files with 74 additions and 0 deletions

View File

@ -1517,6 +1517,7 @@
SUBDIR += p5-base
SUBDIR += p5-capitalization
SUBDIR += p5-enum
SUBDIR += p5-forks
SUBDIR += p5-iCal-Parser
SUBDIR += p5-mixin
SUBDIR += p5-orz

39
devel/p5-forks/Makefile Normal file
View File

@ -0,0 +1,39 @@
# New ports collection makefile for: p5-forks
# Date created: 2006-10-12
# Whom: Cheng-Lung Sung <clsung@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= forks
PORTVERSION= 0.20
CATEGORIES= devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= ../../authors/id/R/RY/RYBSKEJ
PKGNAMEPREFIX= p5-
MAINTAINER= clsung@FreeBSD.org
COMMENT= Drop-in replacement for Perl threads using fork()
RUN_DEPENDS= ${SITE_PERL}/reaper.pm:${PORTSDIR}/devel/p5-reaper
BUILD_DEPENDS= ${RUN_DEPENDS}
PERL_CONFIGURE= yes
MAN3= forks.3 forks::shared.3 \
threads::shared::array.3 \
threads::shared::handle.3 \
threads::shared::hash.3 \
threads::shared::scalar.3
.include <bsd.port.pre.mk>
.if ${PERL_LEVEL} < 500600
IGNORE= requires perl 5.6.0 or later. Install lang/perl5.8 then try again
.endif
.if ${PERL_LEVEL} < 500702
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Scalar/Util.pm:${PORTSDIR}/lang/p5-Scalar-List-Utils
.endif
.include <bsd.port.post.mk>

3
devel/p5-forks/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (forks-0.20.tar.gz) = 6127fa9c45428ead0d74df2eec9b3854
SHA256 (forks-0.20.tar.gz) = 1f8575054aa148fd341a381dfd98b0d368d1d976699c8540c435911206198c0d
SIZE (forks-0.20.tar.gz) = 70254

18
devel/p5-forks/pkg-descr Normal file
View File

@ -0,0 +1,18 @@
The "forks" pragma allows a developer to use threads without having to
have a threaded perl, or to even run 5.8.0 or higher. There were a number
of goals that I am trying to reach with this implementation.
The standard Perl 5.8.0 threads implementation is very memory consuming,
which makes it basically impossible to use in a production environment,
particularly with mod_perl and Apache. Because of the use of the standard
Unix fork() capabilities, most operating systems will be able to use the
Copy-On-Write (COW) memory sharing capabilities (whereas with the standard
Perl 5.8.0 threads implementation, this is thwarted by the Perl interpreter
cloning process that is used to create threads). The memory savings have
been confirmed.
You should be able to run threaded applications unchanged by simply making
sure that the "forks" and "forks::shared" modules are loaded,
e.g. by specifying them on the command line.
WWW: http://search.cpan.org/dist/forks/

13
devel/p5-forks/pkg-plist Normal file
View File

@ -0,0 +1,13 @@
%%SITE_PERL%%/%%PERL_ARCH%%/auto/forks/.packlist
%%SITE_PERL%%/%%PERL_ARCH%%/auto/forks/forks.bs
%%SITE_PERL%%/%%PERL_ARCH%%/auto/forks/forks.so
%%SITE_PERL%%/%%PERL_ARCH%%/forks.pm
%%SITE_PERL%%/%%PERL_ARCH%%/forks/shared.pm
%%SITE_PERL%%/%%PERL_ARCH%%/threads/shared/array.pm
%%SITE_PERL%%/%%PERL_ARCH%%/threads/shared/handle.pm
%%SITE_PERL%%/%%PERL_ARCH%%/threads/shared/hash.pm
%%SITE_PERL%%/%%PERL_ARCH%%/threads/shared/scalar.pm
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/forks
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/forks
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/threads/shared
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/threads