source: trunk/dports/perl/p5-cgi-speedycgi/Portfile @ 21494

Last change on this file since 21494 was 21494, checked in by eridius@…, 13 years ago

Massive update to svn properties on files:
All patchfiles have svn:eol-style removed.
All files that are not in fact able to be executed have svn:executable removed
All binary files have svn:eol-style removed (and are probably corrupt)
All binary files have svn:mime-type set to application/octet-stream
All files which are not patchfiles or binary files have svn:eol-style set to native
All Portfiles have svn:eol-style set to native and svn:executable removed

  • Property svn:eol-style set to native
File size: 3.3 KB
Line 
1 # $Id: Portfile 20367 2006-11-02 18:31:04Z blair@macports.org $
2
3PortSystem                      1.0
4PortGroup                       perl5 1.0
5perl5.setup                     CGI-SpeedyCGI 2.22
6revision                        1
7maintainers                     markd@macports.org
8description                     Speed up perl CGI scripts by running them persistently
9long_description                SpeedyCGI is a way to run perl scripts persistently, \
10                                which can make them run much more quickly. A script \
11                                can be made to to run persistently by changing the \
12                                interpreter line at the top of a script from: \
13                                  '#!/_prefix_/bin/perl' to '#!/_prefix_/bin/speedy'
14
15platforms                       darwin
16checksums                       md5 2f80df78874e3efa80f180923c4967a1
17
18patchfiles                      patch-Makefile.PL \
19                                patch-mod_speedycgi2.c \
20                                patch-src--SpeedyMake.pl \
21                                patch-src_speedy_main.c \
22                                patch-mod_speedycgi-Makefile.tmpl \
23                                patch-src-speedy_perl.h
24
25depends_lib                     port:apache2
26
27variant apple_apache {
28        depends_lib-delete      port:apache2
29        patchfiles-delete       patch-mod_speedycgi-Makefile.tmpl
30}
31
32post-patch {
33if { [variant_isset apple_apache]} {
34# Do nothing
35
36} else {
37# Patch for MacPorts Apache 2
38        reinplace "s|apxs -q|${prefix}/apache2/bin/apxs -q|g" \
39                ${worksrcpath}/src/SpeedyMake.pl \
40                ${worksrcpath}/Makefile.PL
41
42        reinplace "s|__PREFIX__|${prefix}|g" \
43                ${worksrcpath}/mod_speedycgi/Makefile.tmpl \
44        }
45}
46
47post-destroot {
48        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        }
63}
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 TracBrowser for help on using the repository browser.