aboutsummaryrefslogtreecommitdiffstats
path: root/www/p5-PLP
diff options
context:
space:
mode:
authorbarner <barner@FreeBSD.org>2005-03-12 06:23:27 +0800
committerbarner <barner@FreeBSD.org>2005-03-12 06:23:27 +0800
commit435b8f2fe6152c0eaa88ee96d38c1333ff90fc2c (patch)
treeb438a8e3417ddafee72ec22d4ee4a85ca2903722 /www/p5-PLP
parent1b702e0f92d120a19fb5e8dfc461c5d189d9f01e (diff)
downloadfreebsd-ports-graphics-435b8f2fe6152c0eaa88ee96d38c1333ff90fc2c.tar.gz
freebsd-ports-graphics-435b8f2fe6152c0eaa88ee96d38c1333ff90fc2c.tar.zst
freebsd-ports-graphics-435b8f2fe6152c0eaa88ee96d38c1333ff90fc2c.zip
Add p5-PLP 3.18, a simple Perl embedder superficially resembling PHP.
PR: ports/67095 Submitted by: Christopher Nehren <apeiron@comcast.net> Approved by: arved (mentor)
Diffstat (limited to 'www/p5-PLP')
-rw-r--r--www/p5-PLP/Makefile56
-rw-r--r--www/p5-PLP/distinfo2
-rw-r--r--www/p5-PLP/files/extra-patch-mod_perl2.pm53
-rw-r--r--www/p5-PLP/pkg-descr12
-rw-r--r--www/p5-PLP/pkg-plist12
5 files changed, 135 insertions, 0 deletions
diff --git a/www/p5-PLP/Makefile b/www/p5-PLP/Makefile
new file mode 100644
index 00000000000..57314419844
--- /dev/null
+++ b/www/p5-PLP/Makefile
@@ -0,0 +1,56 @@
+# New ports collection makefile for: PLP
+# Date created: Sun May 23 13:27:20 EDT 2004
+# Whom: Christopher Nehren <apeiron@comcast.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= PLP
+PORTVERSION= 3.18
+CATEGORIES= www perl5
+MASTER_SITES= http://plp.juerd.nl/files/
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= apeiron@comcast.net
+COMMENT= A simple Perl embedder superficially resembling PHP
+
+PERL_CONFIGURE= yes
+
+MAN3= PLP.3 PLP::FAQ.3 PLP::Fields.3 PLP::Functions.3 PLP::HowTo.3 \
+ PLP::Tie::Delay.3 PLP::Tie::Headers.3 PLP::Tie::Print.3
+
+.if defined(WITH_MOD_PERL)
+.if ${WITH_MOD_PERL} == 1
+RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/mod_perl.pm:${PORTSDIR}/www/mod_perl
+.elif ${WITH_MOD_PERL} == 2
+RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Apache2/mod_perl.pm:${PORTSDIR}/www/mod_perl2
+EXTRA_PATCHES= ${PATCHDIR}/extra-patch-mod_perl2.pm
+.else
+IGNORE= WITH_MOD_PERL must be either '1' or '2', or undefined
+.endif
+.endif
+
+.include <bsd.port.pre.mk>
+
+pre-fetch:
+ @${ECHO_CMD}
+.if defined(WITH_MOD_PERL)
+.if ${WITH_MOD_PERL} == 1
+ @${ECHO_CMD} "Enabling mod_perl 1.x support."
+.elif ${WITH_MOD_PERL} == 2
+ @${ECHO_CMD} "Be aware that the patch to make PLP function with mod_perl 2 is"
+ @${ECHO_CMD} "both unofficial and unsupported. It requires mod_perl 2's mod_perl 1"
+ @${ECHO_CMD} "compatibility interface. In using mod_perl 2 you are assumed to know"
+ @${ECHO_CMD} "what you are doing."
+.endif
+.else
+ @${ECHO_CMD} "This port supports either mod_perl 1 or mod_perl 2 (with an"
+ @${ECHO_CMD} "experimental patch and mod_perl 2's compat interface)."
+ @${ECHO_CMD} "mod_perl is not required for PLP to function, but you"
+ @${ECHO_CMD} "can expect a 50-200% speed increase with mod_perl support."
+ @${ECHO_CMD}
+ @${ECHO_CMD} " WITH_MOD_PERL=1 Enables mod_perl 1.x support"
+ @${ECHO_CMD} " WITH_MOD_PERL=2 Enables unofficial, experimental mod_perl 2.x support"
+.endif
+ @${ECHO_CMD}
+.include <bsd.port.post.mk>
diff --git a/www/p5-PLP/distinfo b/www/p5-PLP/distinfo
new file mode 100644
index 00000000000..e334c73e373
--- /dev/null
+++ b/www/p5-PLP/distinfo
@@ -0,0 +1,2 @@
+MD5 (PLP-3.18.tar.gz) = 2d3ad7ecfa0f437fa4e2e0074e9af07e
+SIZE (PLP-3.18.tar.gz) = 18788
diff --git a/www/p5-PLP/files/extra-patch-mod_perl2.pm b/www/p5-PLP/files/extra-patch-mod_perl2.pm
new file mode 100644
index 00000000000..3258fa4eca4
--- /dev/null
+++ b/www/p5-PLP/files/extra-patch-mod_perl2.pm
@@ -0,0 +1,53 @@
+--- PLP.pm.orig Fri Oct 18 15:47:07 2002
++++ PLP.pm Tue Jun 1 15:49:07 2004
+@@ -131,7 +131,12 @@
+
+ # This is the mod_perl handler.
+ sub handler {
+- require Apache::Constants;
++ if($ENV{'mod_perl2_compat'} eq 'on') {
++ use Apache::Const -compile => qw(OK);
++ }
++ else {
++ require Apache::Constants;
++ }
+ clean();
+ if (my $ret = mod_perl_init($_[0])) {
+ return $ret;
+@@ -139,7 +144,12 @@
+ #S start($_[0]);
+ start();
+ no strict 'subs';
+- return Apache::Constants::OK();
++ if($ENV{'mod_perl2_compat'} eq 'on') {
++ return Apache::Const::OK;
++ }
++ else {
++ return Apache::Constants::OK();
++ }
+ }
+
+ # mod_perl initializer: returns 0 on success, Apache error code on failure
+@@ -151,10 +161,20 @@
+ $ENV{PLP_FILENAME} = my $filename = $r->filename;
+
+ unless (-f $filename) {
+- return Apache::Constants::NOT_FOUND();
++ if($ENV{'mod_perl2_compat'} eq 'on') {
++ return Apache::Const::NOT_FOUND();
++ }
++ else {
++ return Apache::Constants::NOT_FOUND();
++ }
+ }
+ unless (-r _) {
+- return Apache::Constants::FORBIDDEN();
++ if($ENV{'mod_perl2_compat'} eq 'on') {
++ return Apache::Const::FORBIDDEN();
++ }
++ else {
++ return Apache::Constants::FORBIDDEN();
++ }
+ }
+
+ $ENV{PLP_NAME} = $r->uri;
diff --git a/www/p5-PLP/pkg-descr b/www/p5-PLP/pkg-descr
new file mode 100644
index 00000000000..b879ecbecd9
--- /dev/null
+++ b/www/p5-PLP/pkg-descr
@@ -0,0 +1,12 @@
+PLP is yet another Perl embedder, primarily for HTML documents. Unlike with
+other Perl embedders, there is no need to learn a meta-syntax or object
+model: one can just use the normal Perl constructs. PLP runs under mod_perl
+for speeds comparable to those of PHP, but can also be run as a CGI script.
+
+Note that while unofficial, experimental, and not supported, I (PLP's
+maintainer) have been using the patch for mod_perl 2 functionality for about a
+year's time on servers which are always online. I have yet to encounter any
+problems. If you do encounter any, please send a report to me first and I'll do
+what I can to see if it's a bug in PLP or a bug in the mod_perl 2 patch.
+
+WWW: http://plp.juerd.nl/
diff --git a/www/p5-PLP/pkg-plist b/www/p5-PLP/pkg-plist
new file mode 100644
index 00000000000..e6614e94781
--- /dev/null
+++ b/www/p5-PLP/pkg-plist
@@ -0,0 +1,12 @@
+%%SITE_PERL%%/PLP.pm
+%%SITE_PERL%%/PLP/FAQ.pod
+%%SITE_PERL%%/PLP/Fields.pm
+%%SITE_PERL%%/PLP/Functions.pm
+%%SITE_PERL%%/PLP/HowTo.pod
+%%SITE_PERL%%/PLP/Tie/Delay.pm
+%%SITE_PERL%%/PLP/Tie/Headers.pm
+%%SITE_PERL%%/PLP/Tie/Print.pm
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/PLP/.packlist
+@dirrm %%SITE_PERL%%/PLP/Tie
+@dirrm %%SITE_PERL%%/PLP
+@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/PLP