aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2012-10-28 12:29:50 -0700
committerAdam Vandenberg2012-10-28 12:29:50 -0700
commit052abb8cde7a81da7cb8ef4ae481482d7e5af268 (patch)
tree56a03c4750dad01f1f372e6c839093566d5d7189
parent08deb7268d30d124b96b77e726345e7ac733ffff (diff)
downloadhomebrew-052abb8cde7a81da7cb8ef4ae481482d7e5af268.tar.bz2
uwsgi: add universal pcre requirement
Closes #15715.
-rw-r--r--Library/Formula/uwsgi.rb22
1 files changed, 21 insertions, 1 deletions
diff --git a/Library/Formula/uwsgi.rb b/Library/Formula/uwsgi.rb
index 733ce7e5a..5c2d68790 100644
--- a/Library/Formula/uwsgi.rb
+++ b/Library/Formula/uwsgi.rb
@@ -1,11 +1,31 @@
require 'formula'
+class UniversalPcre < Requirement
+ 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
+
+ def fatal?
+ true
+ end
+
+ def satisfied?
+ f = Formula.factory('pcre')
+ f.installed? && archs_for_command(f.lib/'libpcre.dylib').universal?
+ end
+end
+
class Uwsgi < Formula
homepage 'http://projects.unbit.it/uwsgi/'
url 'http://projects.unbit.it/downloads/uwsgi-1.2.6.tar.gz'
sha1 '61996a4bc7d745dc3ed849c78310c4e1c5c70ee1'
- depends_on 'pcre' # needs a universal build
+ depends_on UniversalPcre.new
+ depends_on 'pcre'
def install
# Find the arch for the Python we are building against.