Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 May 2004 14:47:22 -0400 (EDT)
From:      Christopher Nehren <apeiron@comcast.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:    ports/67095: New port: www/p5-PLP: A Perl embedder somewhat like PHP
Message-ID:  <200405231847.i4NIlMAK094911@prophecy.dyndns.org>
Resent-Message-ID: <200405231850.i4NIoJca024196@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         67095
>Category:       ports
>Synopsis:       New port: www/p5-PLP: A Perl embedder somewhat like PHP
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 23 11:50:18 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Christopher Nehren
>Release:        FreeBSD 5.2.1-RELEASE-p6 i386
>Organization:
>Environment:
System: FreeBSD prophecy.dyndns.org 5.2.1-RELEASE-p6 FreeBSD 5.2.1-RELEASE-p6 #0: Mon May 10 22:34:33 EDT 2004 root@prophecy.dyndns.org:/usr/obj/usr/src/sys/PROPHECY i386


	
>Description:
PLP is a Perl embedder that allows one to embed Perl code directly into HTML
code. Superficially its syntax resembles PHP. It may be run under mod_perl for
speeds comparable to (and in some circumstances better than) PHP.

>How-To-Repeat:
	
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	p5-PLP
#	p5-PLP/Makefile
#	p5-PLP/pkg-descr
#	p5-PLP/pkg-plist
#	p5-PLP/distinfo
#	p5-PLP/files
#	p5-PLP/files/mod_perl2-PLP.pm
#
echo c - p5-PLP
mkdir -p p5-PLP > /dev/null 2>&1
echo x - p5-PLP/Makefile
sed 's/^X//' >p5-PLP/Makefile << 'END-of-p5-PLP/Makefile'
X# New ports collection makefile for:	PLP
X# Date created:				Sun May 23 13:27:20 EDT 2004
X# Whom:					Christopher Nehren <apeiron@comcast.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	PLP
XPORTVERSION=	3.18
XCATEGORIES=	www perl5
XMASTER_SITES=	http://plp.juerd.nl/files/
XPKGNAMEPREFIX=	p5-
X
XMAINTAINER=	apeiron@comcast.net
XCOMMENT=	A simple Perl embedder superficially resembling PHP
X
XPERL_CONFIGURE=	yes
X
XMAN3=		PLP.3 PLP::FAQ.3 PLP::Fields.3 PLP::Functions.3 PLP::HowTo.3 \
X		PLP::Tie::Delay.3 PLP::Tie::Headers.3 PLP::Tie::Print.3
X
X# This just adds the appropriate RUN_DEPENDS (and uses the patch if
X# WITH_MOD_PERL2 is defined). Maybe a bit superfluous, but the idea of
X# inadvertently deleting a required package on a production server isn't
X# something that I want to allow if I have any control over the situation.
X.if defined(WITH_MOD_PERL)
XRUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/mod_perl.pm:${PORTSDIR}/www/mod_perl
X.elif defined(WITH_MOD_PERL2)
XRUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/Apache2/mod_perl.pm:${PORTSDIR}/www/mod_perl2
XEXTRA_PATCHES=	${PATCHDIR}/mod_perl2-PLP.pm
X.endif
X
X.include <bsd.port.pre.mk>
X
Xpre-fetch:
X.if defined(WITH_MOD_PERL)
X	@${ECHO_MSG} "Enabling mod_perl 1.x support."
X.elif defined (WITH_MOD_PERL2)
X	@${ECHO_MSG} "Be aware that the patch to make PLP function with mod_perl 2 is"
X	@${ECHO_MSG} "both unofficial and unsupported. It requires mod_perl 2's mod_perl 1"
X	@${ECHO_MSG} "compatibility interface. In using mod_perl 2 you are assumed to know"
X	@${ECHO_MSG} "what you are doing."
X.else
X	@${ECHO_MSG} "This port supports either mod_perl 1 or mod_perl 2 (with an"
X	@${ECHO_MSG} "experimental patch and mod_perl 2's compat interface)."
X	@${ECHO_MSG} "mod_perl is not required for PLP to function, but you"
X	@${ECHO_MSG} "can expect a 50-200% speed increase with mod_perl support."
X	@${ECHO_MSG} "  WITH_MOD_PERL  Enables mod_perl 1.x support"
X	@${ECHO_MSG} "  WITH_MOD_PERL2 Enables unofficial, experimental mod_perl 2.x support"
X.endif
X
X.include <bsd.port.post.mk>
END-of-p5-PLP/Makefile
echo x - p5-PLP/pkg-descr
sed 's/^X//' >p5-PLP/pkg-descr << 'END-of-p5-PLP/pkg-descr'
XPLP is yet another Perl embedder, primarily for HTML documents. Unlike with
Xother Perl embedders, there is no need to learn a meta-syntax or object
Xmodel: one can just use the normal Perl constructs. PLP runs under mod_perl
Xfor speeds comparable to those of PHP, but can also be run as a CGI script.
END-of-p5-PLP/pkg-descr
echo x - p5-PLP/pkg-plist
sed 's/^X//' >p5-PLP/pkg-plist << 'END-of-p5-PLP/pkg-plist'
X%%SITE_PERL%%/PLP.pm
X%%SITE_PERL%%/PLP/FAQ.pod
X%%SITE_PERL%%/PLP/Fields.pm
X%%SITE_PERL%%/PLP/Functions.pm
X%%SITE_PERL%%/PLP/HowTo.pod
X%%SITE_PERL%%/PLP/Tie/Delay.pm
X%%SITE_PERL%%/PLP/Tie/Headers.pm
X%%SITE_PERL%%/PLP/Tie/Print.pm
X%%SITE_PERL%%/%%PERL_ARCH%%/auto/PLP/.packlist
X@dirrm %%SITE_PERL%%/PLP/Tie
X@dirrm %%SITE_PERL%%/PLP
X@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/PLP
END-of-p5-PLP/pkg-plist
echo x - p5-PLP/distinfo
sed 's/^X//' >p5-PLP/distinfo << 'END-of-p5-PLP/distinfo'
XMD5 (PLP-3.18.tar.gz) = 2d3ad7ecfa0f437fa4e2e0074e9af07e
XSIZE (PLP-3.18.tar.gz) = 18788
END-of-p5-PLP/distinfo
echo c - p5-PLP/files
mkdir -p p5-PLP/files > /dev/null 2>&1
echo x - p5-PLP/files/mod_perl2-PLP.pm
sed 's/^X//' >p5-PLP/files/mod_perl2-PLP.pm << 'END-of-p5-PLP/files/mod_perl2-PLP.pm'
X--- PLP.pm.orig	Fri Oct 18 15:47:07 2002
X+++ PLP.pm	Sat May 15 20:07:29 2004
X@@ -131,7 +131,12 @@
X 
X # This is the mod_perl handler.
X sub handler {
X-    require Apache::Constants;
X+    if($ENV{'mod_perl2_compat'} eq 'on') {
X+	    use Apache::Const -compile => qw(OK);
X+    }
X+    else {
X+	require Apache::Constants;
X+    }
X     clean();
X     if (my $ret = mod_perl_init($_[0])) {
X 	return $ret;
X@@ -139,7 +144,12 @@
X     #S start($_[0]);
X     start();
X     no strict 'subs';
X-    return Apache::Constants::OK();
X+    if($ENV{'mod_perl2_compat'} eq 'on') {
X+	    return Apache::Const::OK;
X+    }
X+    else {
X+	return Apache::Constants::OK();
X+    }
X }
X 
X # mod_perl initializer: returns 0 on success, Apache error code on failure
END-of-p5-PLP/files/mod_perl2-PLP.pm
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405231847.i4NIlMAK094911>