From 9428e19a6ac9d1502bf14ea4cadc6a2236a6e673 Mon Sep 17 00:00:00 2001 From: Travis Tilley Date: Sun, 26 Feb 2012 04:58:30 -0500 Subject: Fix Ragel formula when building with Clang Closes #10498. Signed-off-by: Max Howell 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.--- Library/Formula/ragel.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Library/Formula') 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" -- cgit v1.2.3