summaryrefslogtreecommitdiff
path: root/www/ap-perl
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>1998-12-04 00:10:57 +0000
committertv <tv@pkgsrc.org>1998-12-04 00:10:57 +0000
commit541cd72ab7e8468e7ac3ddaa672f8a1d78287e2d (patch)
tree4f7046d129cd0d4209cccaf1ae803f2160a7767a /www/ap-perl
parent760e827f780d43a131bdf094a6a3f6c94c827bf1 (diff)
downloadpkgsrc-541cd72ab7e8468e7ac3ddaa672f8a1d78287e2d.tar.gz
Add ap-perl-1.16, the pkgification of mod_perl as a dynamic shared object.
Supports CGI running via a no-overhead Perl interpreter embedded into httpd, httpd.conf configuration in Perl, and even embedding Perl into XSSI documents via <!--#perl sub=""--> (without modifying mod_include).
Diffstat (limited to 'www/ap-perl')
-rw-r--r--www/ap-perl/Makefile44
-rw-r--r--www/ap-perl/files/httpd.conf.add19
-rw-r--r--www/ap-perl/files/md53
-rw-r--r--www/ap-perl/patches/patch-aa13
-rw-r--r--www/ap-perl/patches/patch-ab74
-rw-r--r--www/ap-perl/pkg/COMMENT1
-rw-r--r--www/ap-perl/pkg/DESCR10
-rw-r--r--www/ap-perl/pkg/MESSAGE9
-rw-r--r--www/ap-perl/pkg/PLIST117
9 files changed, 290 insertions, 0 deletions
diff --git a/www/ap-perl/Makefile b/www/ap-perl/Makefile
new file mode 100644
index 00000000000..33111e687d1
--- /dev/null
+++ b/www/ap-perl/Makefile
@@ -0,0 +1,44 @@
+# $NetBSD: Makefile,v 1.1.1.1 1998/12/04 00:10:57 tv Exp $
+#
+
+DISTNAME= mod_perl-1.16
+PKGNAME= ap-perl-1.16
+CATEGORIES= www perl5
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
+MASTER_SITE_SUBDIR= Apache
+
+MAINTAINER= tv@netbsd.org
+HOMEPAGE= http://perl.apache.org/
+
+DEPENDS= libperl-5.00404:../../lang/libperl \
+ apache-1.3.3.1:../../www/apache
+
+post-extract:
+ @${LN} -sf ../../../Apache/typemap ${WRKSRC}/src/modules/perl/
+ @${LN} -sf ${PREFIX}/include/httpd ${WRKSRC}/include
+ @for module in Connection File Log ModuleConfig PerlRunXS Tie URI \
+ Util Server; do \
+ ${LN} -sf ../src/modules/perl/$$module.xs ${WRKSRC}/$$module/; \
+ done
+
+do-configure:
+ @${RM} -f ${WRKSRC}/lib/Apache/src.pm.orig
+ @cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} NO_HTTPD=1 \
+ APACHE_PREFIX=${PREFIX} ${PREFIX}/bin/perl Makefile.PL
+
+post-build:
+ @cd ${WRKSRC}/src/modules/perl && \
+ ${MAKE} PERL=${PREFIX}/bin/perl STATIC_EXTS="Apache Apache::Constants" \
+ Apache.c Constants.c perlxsi.c && \
+ PERLLIBDIR=`${PREFIX}/bin/perl -MConfig -e 'print $$Config{archlibexp}'` && \
+ ${PREFIX}/sbin/apxs -c -o mod_perl.so -I$$PERLLIBDIR/CORE -DMOD_PERL \
+ Apache.c Constants.c [mop]*.c $$PERLLIBDIR/DynaLoader_pic.o
+
+post-install:
+ @cd ${WRKSRC}/src/modules/perl && ${PREFIX}/sbin/apxs -i mod_perl.so
+ ${INSTALL_DATA} ${WRKSRC}/htdocs/manual/mod/mod_perl.html \
+ ${PREFIX}/share/httpd/htdocs/manual/mod/
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mod_perl
+ ${INSTALL_DATA} ${FILESDIR}/httpd.conf.add ${PREFIX}/share/doc/mod_perl/
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/www/ap-perl/files/httpd.conf.add b/www/ap-perl/files/httpd.conf.add
new file mode 100644
index 00000000000..806a313a0c6
--- /dev/null
+++ b/www/ap-perl/files/httpd.conf.add
@@ -0,0 +1,19 @@
+# $NetBSD: httpd.conf.add,v 1.1.1.1 1998/12/04 00:10:57 tv Exp $
+#
+# The following should be added to the DSO (Dynamic Shared Object) portion
+# of your httpd.conf file. Uncomment the appropriate libperl.so line, and
+# add to httpd.conf. Starting the server should yield "mod_perl" in the
+# version string logged to error_log.
+#
+
+LoadFile !libm.so
+# for a.out systems:
+#LoadFile /usr/pkg/lib/perl5/alpha-netbsd/5.00404/CORE/libperl.so.4.4
+# for ELF systems:
+#LoadFile /usr/pkg/lib/perl5/alpha-netbsd/5.00404/CORE/libperl.so
+LoadModule perl_module lib/httpd/mod_perl.so
+AddModule mod_perl.c
+
+#
+# End mod_perl added section
+#
diff --git a/www/ap-perl/files/md5 b/www/ap-perl/files/md5
new file mode 100644
index 00000000000..4f140b50670
--- /dev/null
+++ b/www/ap-perl/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 1998/12/04 00:10:57 tv Exp $
+
+MD5 (mod_perl-1.16.tar.gz) = 0ef261732f91bdefa655e98d9d51d5d2
diff --git a/www/ap-perl/patches/patch-aa b/www/ap-perl/patches/patch-aa
new file mode 100644
index 00000000000..4ff8535446a
--- /dev/null
+++ b/www/ap-perl/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 1998/12/04 00:10:57 tv Exp $
+
+--- lib/Apache/src.pm.orig Thu Oct 1 13:55:29 1998
++++ lib/Apache/src.pm Thu Dec 3 15:32:42 1998
+@@ -184,7 +184,7 @@
+ my $src = $self->dir;
+ my $main = $self->main;
+ my $os = $Is_Win32 ? "win32" : "unix";
+- my @inc = ("-I$src", "-I$src/modules/perl", "-I$main");
++ my @inc = ("-I../include", "-I../src/modules/perl -DMOD_PERL");
+ for ("src/regex", "$src/os/$os") {
+ push @inc, "-I$_" if -d $_;
+ }
diff --git a/www/ap-perl/patches/patch-ab b/www/ap-perl/patches/patch-ab
new file mode 100644
index 00000000000..a0bac5685ee
--- /dev/null
+++ b/www/ap-perl/patches/patch-ab
@@ -0,0 +1,74 @@
+$NetBSD: patch-ab,v 1.1.1.1 1998/12/04 00:10:57 tv Exp $
+
+--- src/modules/perl/mod_perl.c.orig Wed Sep 30 23:13:14 1998
++++ src/modules/perl/mod_perl.c Thu Dec 3 17:30:09 1998
+@@ -58,6 +58,57 @@
+
+ #define CORE_PRIVATE
+ #include "mod_perl.h"
++#include <ap_include_extern.h>
++
++/* --- ripped from mod_include.c --- */
++/*
++ * sub key may be anything a Perl*Handler can be:
++ * subroutine name, package name (defaults to package::handler),
++ * Class->method call or anoymous sub {}
++ *
++ * Child <!--#perl sub="sub {print $$}" --> accessed
++ * <!--#perl sub="sub {print ++$Access::Cnt }" --> times. <br>
++ *
++ * <!--#perl arg="one" sub="mymod::includer" -->
++ *
++ * -Doug MacEachern
++ */
++
++static int handle_perl(FILE *in, request_rec *r, const char *error)
++{
++ char tag[MAX_STRING_LEN];
++ char parsed_string[MAX_STRING_LEN];
++ char *tag_val;
++ SV *sub = Nullsv;
++ AV *av = newAV();
++
++ if (!(ap_allow_options(r) & OPT_INCLUDES)) {
++ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
++ "httpd: #perl SSI disallowed by IncludesNoExec in %s",
++ r->filename);
++ return DECLINED;
++ }
++ while (1) {
++ if (!(tag_val = ap_include_get_tag(r->pool, in, tag, sizeof(tag), 1))) {
++ break;
++ }
++ if (strnEQ(tag, "sub", 3)) {
++ sub = newSVpv(tag_val, 0);
++ }
++ else if (strnEQ(tag, "arg", 3)) {
++ ap_include_parse_string(r, tag_val, parsed_string, sizeof(parsed_string), 0);
++ av_push(av, newSVpv(parsed_string, 0));
++ }
++ else if (strnEQ(tag, "done", 4)) {
++ break;
++ }
++ }
++ perl_stdout2client(r);
++ perl_setup_env(r);
++ perl_call_handler(sub, r, av);
++ return OK;
++}
++/* --- end from mod_include.c --- */
+
+ #ifdef WIN32
+ void *mod_perl_mutex = &mod_perl_mutex;
+@@ -486,6 +537,11 @@
+ #endif
+ ap_add_version_component(MOD_PERL_STRING_VERSION);
+ #endif
++
++ if (ap_include_register_extern("perl", handle_perl)) {
++ fprintf(stderr, "mod_perl: Cannot register XSSI handler\n");
++ exit(1);
++ }
+
+ #ifndef WIN32
+ argv[0] = server_argv0;
diff --git a/www/ap-perl/pkg/COMMENT b/www/ap-perl/pkg/COMMENT
new file mode 100644
index 00000000000..7dc7218be1a
--- /dev/null
+++ b/www/ap-perl/pkg/COMMENT
@@ -0,0 +1 @@
+Module that embeds a Perl interpreter into Apache
diff --git a/www/ap-perl/pkg/DESCR b/www/ap-perl/pkg/DESCR
new file mode 100644
index 00000000000..58ad3efcc29
--- /dev/null
+++ b/www/ap-perl/pkg/DESCR
@@ -0,0 +1,10 @@
+The Apache/Perl integration project brings together the full power of the
+Perl programming language and the Apache HTTP server. This is achieved by
+linking the Perl runtime library into the server and providing an object
+oriented Perl interface to the server's C language API.
+
+These pieces are seamlessly glued together by the `mod_perl' server
+plugin, making it is possible to write Apache modules entirely in Perl.
+In addition, the persistent interpreter embedded in the server avoids the
+overhead of starting an external interpreter program and the additional
+Perl start-up (compile) time.
diff --git a/www/ap-perl/pkg/MESSAGE b/www/ap-perl/pkg/MESSAGE
new file mode 100644
index 00000000000..5e5ef57d360
--- /dev/null
+++ b/www/ap-perl/pkg/MESSAGE
@@ -0,0 +1,9 @@
+=============================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 1998/12/04 00:10:57 tv Exp $
+
+In order to enable mod_perl in your Apache installation, you need to refer
+to $PREFIX/share/doc/mod_perl/httpd.conf.add ($PREFIX is typically
+/usr/pkg), which must be added to your httpd.conf. The directives in that
+file load and set up the Perl shared library and mod_perl module.
+
+=============================================================================
diff --git a/www/ap-perl/pkg/PLIST b/www/ap-perl/pkg/PLIST
new file mode 100644
index 00000000000..e554491f174
--- /dev/null
+++ b/www/ap-perl/pkg/PLIST
@@ -0,0 +1,117 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 1998/12/04 00:10:57 tv Exp $
+lib/httpd/mod_perl.so
+lib/perl5/man/man3/Apache.3
+lib/perl5/man/man3/Apache::Constants.3
+lib/perl5/man/man3/Apache::Debug.3
+lib/perl5/man/man3/Apache::ExtUtils.3
+lib/perl5/man/man3/Apache::Include.3
+lib/perl5/man/man3/Apache::Log.3
+lib/perl5/man/man3/Apache::Options.3
+lib/perl5/man/man3/Apache::PerlRun.3
+lib/perl5/man/man3/Apache::PerlRunXS.3
+lib/perl5/man/man3/Apache::PerlSections.3
+lib/perl5/man/man3/Apache::RedirectLogFix.3
+lib/perl5/man/man3/Apache::Registry.3
+lib/perl5/man/man3/Apache::RegistryLoader.3
+lib/perl5/man/man3/Apache::Resource.3
+lib/perl5/man/man3/Apache::SIG.3
+lib/perl5/man/man3/Apache::SizeLimit.3
+lib/perl5/man/man3/Apache::StatINC.3
+lib/perl5/man/man3/Apache::Status.3
+lib/perl5/man/man3/Apache::Symbol.3
+lib/perl5/man/man3/Apache::Tie.3
+lib/perl5/man/man3/Apache::URI.3
+lib/perl5/man/man3/Apache::Util.3
+lib/perl5/man/man3/Apache::httpd_conf.3
+lib/perl5/man/man3/Apache::src.3
+lib/perl5/man/man3/Bundle::Apache.3
+lib/perl5/man/man3/cgi_to_mod_perl.3
+lib/perl5/man/man3/mod_perl.3
+lib/perl5/man/man3/mod_perl_cvs.3
+lib/perl5/man/man3/mod_perl_method_handlers.3
+lib/perl5/man/man3/mod_perl_traps.3
+lib/perl5/man/man3/mod_perl_tuning.3
+lib/perl5/site_perl/Apache.pm
+lib/perl5/site_perl/Apache/Connection.pm
+lib/perl5/site_perl/Apache/Constants.pm
+lib/perl5/site_perl/Apache/Constants/Exports.pm
+lib/perl5/site_perl/Apache/Debug.pm
+lib/perl5/site_perl/Apache/ExtUtils.pm
+lib/perl5/site_perl/Apache/FakeRequest.pm
+lib/perl5/site_perl/Apache/File.pm
+lib/perl5/site_perl/Apache/Include.pm
+lib/perl5/site_perl/Apache/Log.pm
+lib/perl5/site_perl/Apache/ModuleConfig.pm
+lib/perl5/site_perl/Apache/MyConfig.pm
+lib/perl5/site_perl/Apache/Opcode.pm
+lib/perl5/site_perl/Apache/Options.pm
+lib/perl5/site_perl/Apache/PerlRun.pm
+lib/perl5/site_perl/Apache/PerlRunXS.pm
+lib/perl5/site_perl/Apache/PerlSections.pm
+lib/perl5/site_perl/Apache/RedirectLogFix.pm
+lib/perl5/site_perl/Apache/Registry.pm
+lib/perl5/site_perl/Apache/RegistryBB.pm
+lib/perl5/site_perl/Apache/RegistryLoader.pm
+lib/perl5/site_perl/Apache/RegistryNG.pm
+lib/perl5/site_perl/Apache/Resource.pm
+lib/perl5/site_perl/Apache/SIG.pm
+lib/perl5/site_perl/Apache/Server.pm
+lib/perl5/site_perl/Apache/SizeLimit.pm
+lib/perl5/site_perl/Apache/StatINC.pm
+lib/perl5/site_perl/Apache/Status.pm
+lib/perl5/site_perl/Apache/Symbol.pm
+lib/perl5/site_perl/Apache/Tie.pm
+lib/perl5/site_perl/Apache/URI.pm
+lib/perl5/site_perl/Apache/Util.pm
+lib/perl5/site_perl/Apache/httpd_conf.pm
+lib/perl5/site_perl/Apache/src.pm
+lib/perl5/site_perl/Apache/test.pm
+lib/perl5/site_perl/Bundle/Apache.pm
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Connection/Connection.bs
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Connection/Connection.so
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/File/File.bs
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/File/File.so
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Log/Log.bs
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Log/Log.so
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/ModuleConfig/ModuleConfig.bs
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/ModuleConfig/ModuleConfig.so
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/PerlRunXS/PerlRunXS.bs
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/PerlRunXS/PerlRunXS.so
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Server/Server.bs
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Server/Server.so
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Symbol/Symbol.bs
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Symbol/Symbol.so
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Tie/Tie.bs
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Tie/Tie.so
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/URI/URI.bs
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/URI/URI.so
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Util/Util.bs
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Util/Util.so
+lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/mod_perl/.packlist
+lib/perl5/site_perl/cgi_to_mod_perl.pod
+lib/perl5/site_perl/mod_perl.pm
+lib/perl5/site_perl/mod_perl.pod
+lib/perl5/site_perl/mod_perl_cvs.pod
+lib/perl5/site_perl/mod_perl_hooks.pm
+lib/perl5/site_perl/mod_perl_hooks.pm.PL
+lib/perl5/site_perl/mod_perl_method_handlers.pod
+lib/perl5/site_perl/mod_perl_traps.pod
+lib/perl5/site_perl/mod_perl_tuning.pod
+share/httpd/htdocs/manual/mod/mod_perl.html
+share/doc/mod_perl/httpd.conf.add
+@dirrm lib/perl5/site_perl/Apache
+@dirrm lib/perl5/site_perl/Bundle
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Connection
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Constants
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/File
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Log
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/ModuleConfig
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/PerlRunXS
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Server
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Symbol
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Tie
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/URI
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache/Util
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/Apache
+@dirrm lib/perl5/site_perl/${MACHINE_ARCH}-netbsd/auto/mod_perl
+@dirrm share/doc/mod_perl