2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-14 15:11:40 +00:00
|
|
|
|
2012-02-07 23:45:56 +00:00
|
|
|
class RagelUserGuide < Formula
|
|
|
|
url 'http://www.complang.org/ragel/ragel-guide-6.7.pdf'
|
|
|
|
sha1 '6f3483fea075941c989ac37e6c49afabc7e181c0'
|
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Ragel < Formula
|
2009-09-14 15:11:40 +00:00
|
|
|
homepage 'http://www.complang.org/ragel/'
|
2012-02-07 23:45:56 +00:00
|
|
|
url 'http://www.complang.org/ragel/ragel-6.7.tar.gz'
|
2011-06-09 15:30:31 +00:00
|
|
|
md5 'f4423e0d8a6538dd4e61498fcfad3cec'
|
2009-09-14 15:11:40 +00:00
|
|
|
|
|
|
|
def install
|
2012-02-26 14:06:03 +00:00
|
|
|
if ENV.compiler == :clang
|
2012-02-26 09:58:30 +00:00
|
|
|
# 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
|
|
|
|
|
2010-10-23 19:15:38 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
|
2009-09-14 15:11:40 +00:00
|
|
|
system "make install"
|
2012-02-07 23:45:56 +00:00
|
|
|
|
|
|
|
# Install the prebuilt PDF documentation
|
|
|
|
RagelUserGuide.new.brew { doc.install Dir['*.pdf'] }
|
2009-09-14 15:11:40 +00:00
|
|
|
end
|
|
|
|
end
|