uswgi: simplify option handling

This commit is contained in:
Jack Nagel 2014-09-25 15:27:01 -05:00
parent eae965bf76
commit 818ef34aad

View file

@ -45,15 +45,8 @@ class Uwsgi < Formula
def install
%w{CFLAGS LDFLAGS}.each { |e| ENV.append e, "-arch #{MacOS.preferred_arch}" }
json = "yajl"
if build.with? "jansson"
json = "jansson"
end
yaml = "embedded"
if build.with? "libyaml"
yaml = "libyaml"
end
json = build.with?("jansson") ? "jansson" : "yajl"
yaml = build.with?("libyaml") ? "libyaml" : "embedded"
(buildpath/"buildconf/brew.ini").write <<-EOS.undent
[uwsgi]