homebrew-core/Formula/uwsgi.rb
Jack Nagel 39ac055e6c uwsgi: only build for host architecture
superenv doesn't filter out the arch flags here because the build system
is invoked via python and not any build tool that we wrap. The result is
that uwsgi is always build universal, requiring that its deps are build
universal, which is really annoying.

Note that we may need to audit other things that use archs_for_command.
The solution here isn't perfect, but I don't know how to fix superenv to
handle this.

Fixes Homebrew/homebrew#18250.
Closes Homebrew/homebrew#18341.
2013-03-11 17:13:50 -05:00

18 lines
459 B
Ruby

require 'formula'
class Uwsgi < Formula
homepage 'http://projects.unbit.it/uwsgi/'
url 'http://projects.unbit.it/downloads/uwsgi-1.4.8.tar.gz'
sha1 '476f8c474c021f0c91160309c41ad601ca2f824b'
depends_on 'pcre'
depends_on 'libyaml'
def install
arch = MacOS.prefer_64_bit? ? 'x86_64' : 'i386'
%w{CFLAGS LDFLAGS}.each { |e| ENV.append e, "-arch #{arch}" }
system "python", "uwsgiconfig.py", "--build"
bin.install "uwsgi"
end
end