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

Last change on this file since 63556 was 63556, checked in by markd@…, 10 years ago

Closes #23549. Set use_parallel_build to no to fix build problems on Snow Leopard.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1# $Id: Portfile 63556 2010-02-08 16:00:18Z markd@macports.org $
2
3PortSystem                      1.0
4PortGroup                       perl5 1.0
5perl5.setup                     CGI-SpeedyCGI 2.22
6revision                        3
7maintainers                     markd
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
17use_parallel_build              no
18
19patchfiles                      patch-Makefile.PL \
20                                patch-mod_speedycgi2.c \
21                                patch-src--SpeedyMake.pl \
22                                patch-src_speedy_main.c \
23                                patch-mod_speedycgi-Makefile.tmpl \
24                                patch-src-speedy_perl.h
25
26depends_lib                     port:apache2
27
28variant apple_apache {
29        depends_lib-delete      port:apache2
30        patchfiles-delete       patch-mod_speedycgi-Makefile.tmpl
31}
32
33post-patch {
34if { [variant_isset apple_apache]} {
35# Do nothing
36
37} else {
38# Patch for MacPorts Apache 2
39        reinplace "s|apxs -q|${prefix}/apache2/bin/apxs -q|g" \
40                ${worksrcpath}/src/SpeedyMake.pl \
41                ${worksrcpath}/Makefile.PL
42
43        reinplace "s|__PREFIX__|${prefix}|g" \
44                ${worksrcpath}/mod_speedycgi/Makefile.tmpl \
45        }
46}
47
48post-destroot {
49        xinstall -m 4755 ${worksrcpath}/speedy/speedy ${destroot}${prefix}/bin/speedy_suidperl
50        xinstall -m 755 -d ${destroot}${prefix}/share/doc/speedycgi
51        eval xinstall -m 644 [glob ${worksrcpath}/docs/*] ${destroot}${prefix}/share/doc/speedycgi
52        xinstall -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/speedycgi
53
54if { [variant_isset apple_apache]} {
55# Install module for Apple's Apache outside of ${prefix} and let user copy it.
56        xinstall -m 644 ${worksrcpath}/mod_speedycgi2/mod_speedycgi.so ${destroot}${prefix}/share/doc/speedycgi
57
58} else {
59# Install module for MacPorts Apache2
60        xinstall -m 755 -d ${destroot}${prefix}/apache2/modules
61        xinstall -m 644 ${worksrcpath}/mod_speedycgi2/.libs/mod_speedycgi.so \
62                ${destroot}${prefix}/apache2/modules
63        }
64}
65
66post-activate {
67if { [variant_isset apple_apache]} {
68
69ui_msg "\n
70#### To complete SpeedyCGI installation ####
71
72Copy mod_speedycgi.so and enable it in httpd.conf
73
74-Copy ${prefix}/share/doc/speedycgi/mod_speedycgi.so to /usr/libexec/httpd
75
76-Edit Apple's Apache /etc/apache2/httpd.conf and add these lines.
77        LoadModule speedycgi_module libexec/httpd/mod_speedycgi.so
78        AddModule mod_speedycgi.c \n"
79
80} else {
81
82ui_msg "\n
83#### To complete SpeedyCGI installation ####
84
85Enable mod_speedycgi.so in httpd.conf
86
87-Edit MacPorts Apache 2 ${prefix}/apache2/conf/httpd.conf and add this line.
88        LoadModule speedycgi_module modules/mod_speedycgi.so \n"
89        }
90
91ui_msg "\n
92See ${prefix}/share/doc/speedycgi/README for further details.
93\n"
94}
Note: See TracBrowser for help on using the repository browser.