Changeset 21435


Ignore:
Timestamp:
Jan 25, 2007, 5:06:32 AM (13 years ago)
Author:
markd@…
Message:

Fixed Apache 2 support. Make Apache 2 the default now.

Location:
trunk/dports/perl/p5-cgi-speedycgi
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/perl/p5-cgi-speedycgi/Portfile

    r21422 r21435  
    44PortGroup                       perl5 1.0
    55perl5.setup                     CGI-SpeedyCGI 2.22
    6 
    7 maintainers                     nomaintainer@macports.org
     6revision                        1
     7maintainers                     markd@macports.org
    88description                     Speed up perl CGI scripts by running them persistently
    99long_description                SpeedyCGI is a way to run perl scripts persistently, \
     
    2020                                patch-src--SpeedyMake.pl \
    2121                                patch-src_speedy_main.c \
     22                                patch-mod_speedycgi-Makefile.tmpl \
    2223                                patch-src-speedy_perl.h
    2324
    24 variant apache2 {
    25         depends_lib-append      port:apache2
     25depends_lib                     port:apache2
     26
     27variant apple_apache {
     28        depends_lib-delete      port:apache2
     29        patchfiles-delete       patch-mod_speedycgi-Makefile.tmpl
    2630}
    2731
    2832post-patch {
    29 if { [variant_isset apache2]} {
     33if { [variant_isset apple_apache]} {
     34# Do nothing
     35
     36} else {
     37# Patch for MacPorts Apache 2
    3038        reinplace "s|apxs -q|${prefix}/apache2/bin/apxs -q|g" \
    3139                ${worksrcpath}/src/SpeedyMake.pl \
    3240                ${worksrcpath}/Makefile.PL
    33 }
     41
     42        reinplace "s|__PREFIX__|${prefix}|g" \
     43                ${worksrcpath}/mod_speedycgi/Makefile.tmpl \
     44        }
    3445}
    3546
    3647post-destroot {
    3748        xinstall -m 4755 ${worksrcpath}/speedy/speedy ${destroot}${prefix}/bin/speedy_suidperl
     49        xinstall -m 755 -d ${destroot}${prefix}/share/doc/speedycgi
     50        eval xinstall -m 644 [glob ${worksrcpath}/docs/*] ${destroot}${prefix}/share/doc/speedycgi
     51        xinstall -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/speedycgi
     52
     53if { [variant_isset apple_apache]} {
     54# Install module for Apple's Apache 1 outside of ${prefix} and let user copy it.
     55        xinstall -m 644 ${worksrcpath}/mod_speedycgi/mod_speedycgi.so ${destroot}${prefix}/share/doc/speedycgi
     56
     57} else {
     58# Install module for MacPorts Apache2
     59        xinstall -m 755 -d ${destroot}${prefix}/apache2/modules
     60        xinstall -m 644 ${worksrcpath}/mod_speedycgi2/.libs/mod_speedycgi.so \
     61                ${destroot}${prefix}/apache2/modules
     62        }
    3863}
     64
     65post-activate {
     66if { [variant_isset apple_apache]} {
     67
     68ui_msg "\n
     69#### To complete SpeedyCGI installation ####
     70
     711) Copy mod_speedycgi.so and enable it in httpd.conf
     72
     73-Copy ${prefix}/share/doc/speedycgi/mod_speedycgi.so to /usr/libexec/httpd
     74
     75-Edit Apple's Apache 1 /etc/httpd/httpd.conf and add these lines.
     76        LoadModule speedycgi_module modules/mod_speedycgi.so
     77        AddModule mod_speedycgi.c \n"
     78
     79} else {
     80
     81ui_msg "\n
     82#### To complete SpeedyCGI installation ####
     83
     841) Enable mod_speedycgi.so in httpd.conf
     85
     86-Edit MacPorts Apache 2 ${prefix}/apache2/conf/httpd.conf and add this line.
     87        LoadModule speedycgi_module modules/mod_speedycgi.so \n"
     88        }
     89
     90ui_msg "\n
     912) Set path and handler information for SpeedyCGI.
     92
     93-Set paths in httpd.conf; for Apple's Apache use path /Library/WebServer/CGI-Executables
     94
     95        Alias /speedy/ ${prefix}/apache2/cgi-bin/
     96            <Location /speedy>
     97                SetHandler speedycgi-script
     98                Options ExecCGI
     99                allow from all
     100            </Location>
     101
     102-Add a handler to httpd.conf near the top.
     103
     104        AddHandler speedycgi-script .speedy
     105            <Location />
     106                Options ExecCGI
     107            </Location>
     108\n"
     109}
Note: See TracChangeset for help on using the changeset viewer.