homebrew-core/Formula/uwsgi.rb
Sigurd Høgsbro 93135edab5 uwsgi 1.0.1
Closes Homebrew/homebrew#9465.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-06 23:15:51 -06:00

31 lines
890 B
Ruby

require 'formula'
class Uwsgi < Formula
url 'http://projects.unbit.it/downloads/uwsgi-1.0.1.tar.gz'
homepage 'http://projects.unbit.it/uwsgi/'
md5 '6f0a92bc148c1e359638e1ea45199d3b'
def install
# Find the arch for the Python we are building against.
# We remove 'ppc' support, so we can pass Intel-optimized CFLAGS.
archs = archs_for_command("python")
archs.remove_ppc!
flags = archs.as_arch_flags
ENV.append 'CFLAGS', flags
ENV.append 'LDFLAGS', flags
inreplace 'uwsgiconfig.py', "PYLIB_PATH = ''", "PYLIB_PATH = '#{%x[python-config --ldflags].chomp[/-L(.*?) -l/, 1]}'"
system "python uwsgiconfig.py --build"
bin.install "uwsgi"
end
def caveats
<<-EOS.undent
NOTE: "brew install -v uwsgi" will fail!
You must install in non-verbose mode for this to succeed.
Patches to fix this are welcome.
EOS
end
end