diff options
| author | Jack Nagel | 2013-03-11 17:10:56 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-03-11 17:13:50 -0500 |
| commit | 7ab1de367c9a66f2e7945599492180870d107cc9 (patch) | |
| tree | 77322c5964843398ddca7b0105c5c3d544aa50b9 /Library | |
| parent | beb2a318170779062eae4b990211845d4c1e6fd6 (diff) | |
| download | homebrew-7ab1de367c9a66f2e7945599492180870d107cc9.tar.bz2 | |
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 #18250.
Closes #18341.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/uwsgi.rb | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/Library/Formula/uwsgi.rb b/Library/Formula/uwsgi.rb index 666700c5c..ba948fdba 100644 --- a/Library/Formula/uwsgi.rb +++ b/Library/Formula/uwsgi.rb @@ -1,39 +1,16 @@ require 'formula' -class UniversalPcre < Requirement - fatal true - - satisfy :build_env => false do - f = Formula.factory('pcre') - f.installed? && archs_for_command(f.lib/'libpcre.dylib').universal? - end - - def message; <<-EOS.undent - pcre must be build universal for uwsgi to work. - You will need to: - brew rm pcre - brew install --universal pcre - EOS - end -end - 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 UniversalPcre depends_on 'pcre' + depends_on 'libyaml' 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! - arch_flags = archs.as_arch_flags - - ENV.append 'CFLAGS', arch_flags - ENV.append 'LDFLAGS', arch_flags + 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" |
