homebrew-core/Formula/ragel.rb
BrewTestBot 84d4a90a71 ragel: add 6.9 bottle.
Closes Homebrew/homebrew#33130.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-10-13 21:38:20 +01:00

42 lines
1.1 KiB
Ruby

require "formula"
class Ragel < Formula
homepage "http://www.colm.net/ragel/"
url "http://www.colm.net/wp-content/uploads/2014/10/ragel-6.9.tar.gz"
sha1 "70a7fe77aee8423be610fa14c3fa1f96b3119e1d"
bottle do
cellar :any
sha1 "9cde046f905a7f9d31158860974209c6dbaa3576" => :mavericks
sha1 "d5a7d2e3cd213a466dd5ed3681f9e5bc04745353" => :mountain_lion
sha1 "0394a21200234fe66535505ae8ab7cdfdc354f84" => :lion
end
resource "pdf" do
url "http://www.colm.net/wp-content/uploads/2014/10/ragel-guide-6.9.pdf"
sha1 "a8a83fe879d72acc2376f72fad172ac6b098e794"
end
def install
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make", "install"
doc.install resource("pdf")
end
test do
testfile = testpath/"rubytest.rl"
testfile.write <<-EOS.undent
%%{
machine homebrew_test;
main := ( 'h' @ { puts "homebrew" }
| 't' @ { puts "test" }
)*;
}%%
data = 'ht'
%% write data;
%% write init;
%% write exec;
EOS
system "ragel", "-Rs", testfile
end
end