homebrew-core/Formula/ragel.rb

28 lines
855 B
Ruby
Raw Normal View History

require 'formula'
2009-09-14 15:11:40 +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/'
url 'http://www.complang.org/ragel/ragel-6.7.tar.gz'
md5 'f4423e0d8a6538dd4e61498fcfad3cec'
2009-09-14 15:11:40 +00:00
def install
2012-02-26 14:06:03 +00:00
if ENV.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}"
2009-09-14 15:11:40 +00:00
system "make install"
# Install the prebuilt PDF documentation
RagelUserGuide.new.brew { doc.install Dir['*.pdf'] }
2009-09-14 15:11:40 +00:00
end
end