homebrew-core/Formula/uwsgi.rb
Ali Asad Lotia 34624e61f2 uwsgi 1.0.3
Closes Homebrew/homebrew#10111.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-02-11 11:37:35 -08:00

23 lines
693 B
Ruby

require 'formula'
class Uwsgi < Formula
url 'http://projects.unbit.it/downloads/uwsgi-1.0.3.tar.gz'
homepage 'http://projects.unbit.it/uwsgi/'
md5 'dfbfd8776b9653f4e618aa64c6a7c740'
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
end