[21435] trunk/dports/perl/p5-cgi-speedycgi
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jan 24 21:06:32 PST 2007
Revision: 21435
http://trac.macosforge.org/projects/macports/changeset/21435
Author: markd at macports.org
Date: 2007-01-24 21:06:32 -0800 (Wed, 24 Jan 2007)
Log Message:
-----------
Fixed Apache 2 support. Make Apache 2 the default now.
Modified Paths:
--------------
trunk/dports/perl/p5-cgi-speedycgi/Portfile
Added Paths:
-----------
trunk/dports/perl/p5-cgi-speedycgi/files/patch-mod_speedycgi-Makefile.tmpl
Modified: trunk/dports/perl/p5-cgi-speedycgi/Portfile
===================================================================
--- trunk/dports/perl/p5-cgi-speedycgi/Portfile 2007-01-25 02:23:03 UTC (rev 21434)
+++ trunk/dports/perl/p5-cgi-speedycgi/Portfile 2007-01-25 05:06:32 UTC (rev 21435)
@@ -3,8 +3,8 @@
PortSystem 1.0
PortGroup perl5 1.0
perl5.setup CGI-SpeedyCGI 2.22
-
-maintainers nomaintainer at macports.org
+revision 1
+maintainers markd at macports.org
description Speed up perl CGI scripts by running them persistently
long_description SpeedyCGI is a way to run perl scripts persistently, \
which can make them run much more quickly. A script \
@@ -19,20 +19,91 @@
patch-mod_speedycgi2.c \
patch-src--SpeedyMake.pl \
patch-src_speedy_main.c \
+ patch-mod_speedycgi-Makefile.tmpl \
patch-src-speedy_perl.h
-variant apache2 {
- depends_lib-append port:apache2
+depends_lib port:apache2
+
+variant apple_apache {
+ depends_lib-delete port:apache2
+ patchfiles-delete patch-mod_speedycgi-Makefile.tmpl
}
post-patch {
-if { [variant_isset apache2]} {
+if { [variant_isset apple_apache]} {
+# Do nothing
+
+} else {
+# Patch for MacPorts Apache 2
reinplace "s|apxs -q|${prefix}/apache2/bin/apxs -q|g" \
${worksrcpath}/src/SpeedyMake.pl \
${worksrcpath}/Makefile.PL
+
+ reinplace "s|__PREFIX__|${prefix}|g" \
+ ${worksrcpath}/mod_speedycgi/Makefile.tmpl \
+ }
}
-}
post-destroot {
xinstall -m 4755 ${worksrcpath}/speedy/speedy ${destroot}${prefix}/bin/speedy_suidperl
+ xinstall -m 755 -d ${destroot}${prefix}/share/doc/speedycgi
+ eval xinstall -m 644 [glob ${worksrcpath}/docs/*] ${destroot}${prefix}/share/doc/speedycgi
+ xinstall -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/speedycgi
+
+if { [variant_isset apple_apache]} {
+# Install module for Apple's Apache 1 outside of ${prefix} and let user copy it.
+ xinstall -m 644 ${worksrcpath}/mod_speedycgi/mod_speedycgi.so ${destroot}${prefix}/share/doc/speedycgi
+
+} else {
+# Install module for MacPorts Apache2
+ xinstall -m 755 -d ${destroot}${prefix}/apache2/modules
+ xinstall -m 644 ${worksrcpath}/mod_speedycgi2/.libs/mod_speedycgi.so \
+ ${destroot}${prefix}/apache2/modules
+ }
}
+
+post-activate {
+if { [variant_isset apple_apache]} {
+
+ui_msg "\n
+#### To complete SpeedyCGI installation ####
+
+1) Copy mod_speedycgi.so and enable it in httpd.conf
+
+-Copy ${prefix}/share/doc/speedycgi/mod_speedycgi.so to /usr/libexec/httpd
+
+-Edit Apple's Apache 1 /etc/httpd/httpd.conf and add these lines.
+ LoadModule speedycgi_module modules/mod_speedycgi.so
+ AddModule mod_speedycgi.c \n"
+
+} else {
+
+ui_msg "\n
+#### To complete SpeedyCGI installation ####
+
+1) Enable mod_speedycgi.so in httpd.conf
+
+-Edit MacPorts Apache 2 ${prefix}/apache2/conf/httpd.conf and add this line.
+ LoadModule speedycgi_module modules/mod_speedycgi.so \n"
+ }
+
+ui_msg "\n
+2) Set path and handler information for SpeedyCGI.
+
+-Set paths in httpd.conf; for Apple's Apache use path /Library/WebServer/CGI-Executables
+
+ Alias /speedy/ ${prefix}/apache2/cgi-bin/
+ <Location /speedy>
+ SetHandler speedycgi-script
+ Options ExecCGI
+ allow from all
+ </Location>
+
+-Add a handler to httpd.conf near the top.
+
+ AddHandler speedycgi-script .speedy
+ <Location />
+ Options ExecCGI
+ </Location>
+\n"
+}
Added: trunk/dports/perl/p5-cgi-speedycgi/files/patch-mod_speedycgi-Makefile.tmpl
===================================================================
--- trunk/dports/perl/p5-cgi-speedycgi/files/patch-mod_speedycgi-Makefile.tmpl (rev 0)
+++ trunk/dports/perl/p5-cgi-speedycgi/files/patch-mod_speedycgi-Makefile.tmpl 2007-01-25 05:06:32 UTC (rev 21435)
@@ -0,0 +1,17 @@
+--- mod_speedycgi/Makefile.tmpl.org 2003-10-06 21:03:48.000000000 -0700
++++ mod_speedycgi/Makefile.tmpl 2007-01-24 17:43:32.000000000 -0800
+@@ -24,11 +24,11 @@
+ ##
+
+ # the used tools
+-APXS=apxs
+-APACHECTL=apachectl
++APXS=__PREFIX__/apache2/bin/apxs
++APACHECTL=__PREFIX__/apache2/bin/apachectl
+
+ # additional defines, includes and libraries
+-INC=-I../src -I.
++INC=-I../src -I. -I__PREFIX__/include -I__PREFIX__/apache2/include -I__PREFIX__/include/apr-1
+
+ # compile the shared object file
+ $(SHARED_OBJ_TARGET): $(SRC_CFILES) $(H_FILES) ../src/*.h $(MOD_SPEEDYCGI_CMDS)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070124/6f8190a8/attachment.html
More information about the macports-changes
mailing list