homebrew-core/Formula/fcgi.rb

37 lines
927 B
Ruby
Raw Normal View History

require 'formula'
class Fcgi < Formula
homepage 'http://www.fastcgi.com/'
2012-08-10 22:32:14 +00:00
url 'http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz'
sha1 '2329404159e8b8315e524b9eaf1de763202c6e6a'
2012-08-10 22:32:14 +00:00
# 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
2014-03-18 21:51:41 +00:00
patch :DATA
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>