blob: f1ce33b85f51e78a0d2326ee834225b55bba0333 (
plain)
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
32
33
34
35
36
37
38
|
require 'formula'
class Fcgi < Formula
homepage 'http://www.fastcgi.com/'
url 'http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz'
sha1 '2329404159e8b8315e524b9eaf1de763202c6e6a'
# Fixes "dyld: Symbol not found: _environ"
# Affects programs linking this library. Reported at
# http://mailman.fastcgi.com/pipermail/fastcgi-developers/2009-January/000152.html
# https://trac.macports.org/browser/trunk/dports/www/fcgi/files/patch-libfcgi-fcgi_stdio.c.diff
def patches
DATA
end
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
end
end
__END__
--- a/libfcgi/fcgi_stdio.c
+++ b/libfcgi/fcgi_stdio.c
@@ -40,7 +40,12 @@
#ifndef _WIN32
+#if defined(__APPLE__)
+#include <crt_externs.h>
+#define environ (*_NSGetEnviron())
+#else
extern char **environ;
+#endif
#ifdef HAVE_FILENO_PROTO
#include <stdio.h>
|