aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorTravis Tilley2012-02-26 04:58:30 -0500
committerMax Howell2012-02-26 13:23:44 +0000
commit9428e19a6ac9d1502bf14ea4cadc6a2236a6e673 (patch)
tree0c703840c5162a3b804a0fd91fec81bca35812e9 /Library/Formula
parent56046b541a0b7ba5e5992ba925f40413f59c92f9 (diff)
downloadhomebrew-9428e19a6ac9d1502bf14ea4cadc6a2236a6e673.tar.bz2
Fix Ragel formula when building with Clang
Closes #10498. Signed-off-by: Max Howell <max@methylblue.com> Made the clang patches only get applied if using clang and clang version <= 3.1. This may mean it breaks for 3.2 but we do this because we need to continue testing such things.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/ragel.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Formula/ragel.rb b/Library/Formula/ragel.rb
index a06377f8c..73186e883 100644
--- a/Library/Formula/ragel.rb
+++ b/Library/Formula/ragel.rb
@@ -11,6 +11,13 @@ class Ragel < Formula
md5 'f4423e0d8a6538dd4e61498fcfad3cec'
def install
+ if MacOS.default_compiler == :clang
+ # fix build with clang
+ inreplace ["aapl/avlcommon.h", "aapl/bstcommon.h", "aapl/bubblesort.h", "aapl/mergesort.h"], /([^:.])(compare)/, '\1this->\2'
+ # fix build with libc++
+ inreplace 'ragel/javacodegen.cpp', /setiosflags/, 'std::\&'
+ end
+
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make install"