aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng-Lung Sung <clsung@FreeBSD.org>2006-11-07 03:01:32 +0000
committerCheng-Lung Sung <clsung@FreeBSD.org>2006-11-07 03:01:32 +0000
commit0d696a9e8084abbadbd046f33ed6953086a91db9 (patch)
treef90e5adfcdb61952800a4fa2bc630209f7fe7bd5
parente302ecc0362cec05456d0a42fa4d8338f30db684 (diff)
Notes
-rw-r--r--devel/Makefile1
-rw-r--r--devel/p5-forks/Makefile39
-rw-r--r--devel/p5-forks/distinfo3
-rw-r--r--devel/p5-forks/pkg-descr18
-rw-r--r--devel/p5-forks/pkg-plist13
5 files changed, 74 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index c6d0711da3ce..d5bf2c2a24a3 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -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
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