2010-09-21 10:26:01 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mongrel2 < Formula
|
2010-09-21 10:26:01 +00:00
|
|
|
homepage 'http://mongrel2.org/'
|
2013-07-16 03:43:34 +00:00
|
|
|
url 'https://github.com/zedshaw/mongrel2/archive/v1.8.1.tar.gz'
|
|
|
|
sha1 '11230cb59aa4834e017023c8f9b6519831d91767'
|
2012-10-06 03:15:31 +00:00
|
|
|
|
|
|
|
head 'https://github.com/zedshaw/mongrel2.git'
|
2010-09-21 10:26:01 +00:00
|
|
|
|
|
|
|
depends_on 'zeromq'
|
|
|
|
|
2013-11-24 20:48:48 +00:00
|
|
|
def patches
|
|
|
|
# allow mongrel2 to build against libzmq 4
|
|
|
|
[
|
|
|
|
"https://gist.github.com/minrk/7632116/raw/44d0ed09ecfc68a9f9d6a940c6367f703cd55c46/0001-add-zmq_compat-check-for-libzmq-4.patch"
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2010-09-21 10:26:01 +00:00
|
|
|
def install
|
2011-11-22 03:56:41 +00:00
|
|
|
# Build in serial. See:
|
2013-12-14 18:13:11 +00:00
|
|
|
# https://github.com/Homebrew/homebrew/issues/8719
|
2011-11-22 03:56:41 +00:00
|
|
|
ENV.j1
|
|
|
|
|
2011-01-22 18:07:20 +00:00
|
|
|
# Mongrel2 pulls from these ENV vars instead
|
|
|
|
ENV['OPTFLAGS'] = "#{ENV.cflags} #{ENV.cppflags}"
|
|
|
|
ENV['OPTLIBS'] = ENV.ldflags
|
|
|
|
|
2010-09-21 10:26:01 +00:00
|
|
|
system "make all"
|
2012-05-15 18:31:21 +00:00
|
|
|
system "make", "install", "PREFIX=#{prefix}"
|
2010-09-21 10:26:01 +00:00
|
|
|
end
|
|
|
|
end
|