diff options
author | clsung <clsung@FreeBSD.org> | 2006-11-07 11:01:32 +0800 |
---|---|---|
committer | clsung <clsung@FreeBSD.org> | 2006-11-07 11:01:32 +0800 |
commit | 175319627d882cc5a65518396a99704da3c21bd0 (patch) | |
tree | 364d09790fc17c7d86424b69c3fd61f326f2af0f /devel/p5-forks | |
parent | e4bf91630dddeb0c499dc1f75ccb0e447c05eda9 (diff) | |
download | freebsd-ports-gnome-175319627d882cc5a65518396a99704da3c21bd0.tar.gz freebsd-ports-gnome-175319627d882cc5a65518396a99704da3c21bd0.tar.zst freebsd-ports-gnome-175319627d882cc5a65518396a99704da3c21bd0.zip |
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>
Diffstat (limited to 'devel/p5-forks')
-rw-r--r-- | devel/p5-forks/Makefile | 39 | ||||
-rw-r--r-- | devel/p5-forks/distinfo | 3 | ||||
-rw-r--r-- | devel/p5-forks/pkg-descr | 18 | ||||
-rw-r--r-- | devel/p5-forks/pkg-plist | 13 |
4 files changed, 73 insertions, 0 deletions
diff --git a/devel/p5-forks/Makefile b/devel/p5-forks/Makefile new file mode 100644 index 000000000000..d617fd29245d --- /dev/null +++ b/devel/p5-forks/Makefile @@ -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> diff --git a/devel/p5-forks/distinfo b/devel/p5-forks/distinfo new file mode 100644 index 000000000000..4447856ddb95 --- /dev/null +++ b/devel/p5-forks/distinfo @@ -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 diff --git a/devel/p5-forks/pkg-descr b/devel/p5-forks/pkg-descr new file mode 100644 index 000000000000..1b744994ff95 --- /dev/null +++ b/devel/p5-forks/pkg-descr @@ -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/ diff --git a/devel/p5-forks/pkg-plist b/devel/p5-forks/pkg-plist new file mode 100644 index 000000000000..fcf03c09c91c --- /dev/null +++ b/devel/p5-forks/pkg-plist @@ -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 |