# $Id: Portfile 50980 2009-05-14 19:41:55Z and.damore@macports.org $ PortSystem 1.0 PortGroup perl5 1.0 perl5.setup CGI-SpeedyCGI 2.22 revision 2 maintainers markd 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 \ can be made to to run persistently by changing the \ interpreter line at the top of a script from: \ '#!/_prefix_/bin/perl' to '#!/_prefix_/bin/speedy' platforms darwin checksums md5 2f80df78874e3efa80f180923c4967a1 patchfiles patch-Makefile.PL \ patch-mod_speedycgi2.c \ patch-src--SpeedyMake.pl \ patch-src_speedy_main.c \ patch-mod_speedycgi-Makefile.tmpl \ patch-src-speedy_perl.h depends_lib port:apache2 variant apple_apache { depends_lib-delete port:apache2 patchfiles-delete patch-mod_speedycgi-Makefile.tmpl } post-patch { 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 outside of ${prefix} and let user copy it. xinstall -m 644 ${worksrcpath}/mod_speedycgi2/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 #### 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 /etc/apache2/httpd.conf and add these lines. LoadModule speedycgi_module libexec/httpd/mod_speedycgi.so AddModule mod_speedycgi.c \n" } else { ui_msg "\n #### To complete SpeedyCGI installation #### 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 See ${prefix}/share/doc/speedycgi/README for further details. \n" }