speed up perl scripts by running them persistently

This commit is contained in:
jakob 2002-11-10 19:57:04 +00:00
parent 8d4cba164b
commit 1bb7fae755
7 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1,34 @@
# $OpenBSD: Makefile,v 1.1.1.1 2002/11/10 19:57:04 jakob Exp $
COMMENT= "speed up perl scripts by running them persistently"
VERSION= 2.21
DISTNAME= CGI-SpeedyCGI-${VERSION}
PKGNAME= p5-CGI-SpeedyCGI-${VERSION}
CATEGORIES= www perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=CGI/}
HOMEPAGE= http://daemoninc.com/SpeedyCGI/
MAINTAINER= Jakob Schlyter <jakob@openbsd.org>
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
NO_REGRESS= Yes
CONFIGURE_STYLE= perl
post-build:
@sed 's,!!PREFIX!!,${PREFIX},' \
< ${FILESDIR}/mod_speedycgi-enable \
> ${WRKBUILD}/mod_speedycgi-enable
post-install:
${INSTALL_SCRIPT} ${WRKBUILD}/mod_speedycgi-enable ${PREFIX}/sbin
${INSTALL_DATA} ${WRKSRC}/mod_speedycgi/mod_speedycgi.so ${PREFIX}/lib
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (CGI-SpeedyCGI-2.21.tar.gz) = ff43eaa899c5ff38f208ed692ab12bb4
RMD160 (CGI-SpeedyCGI-2.21.tar.gz) = 9bf363b46dbdb872f2922ed10ecfabef8f024e73
SHA1 (CGI-SpeedyCGI-2.21.tar.gz) = ff57ffc5c935cee0eec9c1a2e725e7e6ed1233e2

View File

@ -0,0 +1,18 @@
#!/bin/sh
#
# $OpenBSD: mod_speedycgi-enable,v 1.1.1.1 2002/11/10 19:57:04 jakob Exp $
MODULE=!!PREFIX!!/lib/mod_speedycgi.so
if [ `id -u` -ne 0 ]; then
echo "You must be root to run this script."
exit
fi
if [ ! -f ${MODULE} ]; then
echo "Cannot find mod_speedycgi module (${MODULE})"
exit 1
else
echo "Enabling SpeedyCGI module..."
/usr/sbin/apxs -i -a -n speedycgi ${MODULE}
fi

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-Makefile_PL,v 1.1.1.1 2002/11/10 19:57:04 jakob Exp $
--- Makefile.PL.orig Wed Sep 18 08:21:06 2002
+++ Makefile.PL Sun Nov 10 16:03:21 2002
@@ -16,11 +16,11 @@ requires a working copy of "apxs" in you
support, and additional Apache configuration.
END
-print "Compile mod_speedycgi (default no)? ";
+#print "Compile mod_speedycgi (default no)? ";
my @dirs = qw(src speedy_backend speedy);
my $macro = $write_makefile_common{macro};
-if (<STDIN> =~ /y/i) {
+if (1) {
die "ERROR: Could not find a working copy of 'apxs' in your path.\n"
unless $macro->{APACHE_APXS_WORKS};
print "Compiling for Apache version $macro->{APACHE_VERSION}\n";

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-mod_speedycgi_Makefile_tmpl,v 1.1.1.1 2002/11/10 19:57:04 jakob Exp $
--- mod_speedycgi/Makefile.tmpl.orig Sun Nov 10 16:03:32 2002
+++ mod_speedycgi/Makefile.tmpl Sun Nov 10 16:03:40 2002
@@ -37,7 +37,6 @@ $(SHARED_OBJ_TARGET): $(SRC_CFILES) $(H_
# install the shared object file into Apache
install: all
- $(APXS) -i -a -n 'speedycgi' $(SHARED_OBJ_TARGET)
# cleanup
clean:

View File

@ -0,0 +1,12 @@
SpeedyCGI is a way to run perl scripts persistently, which can make them
run much more quickly.
After the script is initially run, instead of exiting, the perl
interpreter is kept running. During subsequent runs, this interpreter is
used to handle new executions instead of starting a new perl interpreter
each time. A very fast frontend program, written in C, is executed for
each request. This fast frontend then contacts the persistent Perl
process, which is usually already running, to do the work and return the
results.
WWW: ${HOMEPAGE}

View File

@ -0,0 +1,7 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2002/11/10 19:57:04 jakob Exp $
bin/speedy
bin/speedy_backend
lib/mod_speedycgi.so
sbin/mod_speedycgi-enable
${P5SITE}/CGI/SpeedyCGI.pm
@dirrm ${P5ARCH}/auto/CGI/SpeedyCGI