forked from rjocoleman/homebrew-apache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod_fastcgi.rb
31 lines (25 loc) · 1.08 KB
/
mod_fastcgi.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'formula'
class ModFastcgi < Formula
url 'http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz'
homepage 'http://www.fastcgi.com/'
sha1 '69c56548bf97040a61903b32679fe3e3b7d3c2d4'
def install
target_arch = MacOS.prefer_64_bit? ? "x86_64" : "i386"
system "cp Makefile.AP2 Makefile"
ENV.append_to_cflags "-mmacosx-version-min=#{MACOS_VERSION}"
ENV.append_to_cflags "-isysroot #{MacOS.sdk_path}"
ENV.append_to_cflags "-arch #{target_arch}"
system "make", "top_dir=/usr/share/httpd"
libexec.install '.libs/mod_fastcgi.so'
end
def caveats; <<-EOS.undent
NOTE: If you're having installation problems relating to a missing `cc` compiler and
`OSX10.8.xctoolchain` or `OSX10.9.xctoolchain`, read the "Troubleshooting" section
of https://github.com/Homebrew/homebrew-apache
You must manually edit /etc/apache2/httpd.conf to contain:
LoadModule fastcgi_module #{libexec}/mod_fastcgi.so
Upon restarting Apache, you should see the following message in the error log:
[notice] FastCGI: process manager initialized
EOS
end
end