homebrew-core/Formula/re-flex.rb

30 lines
798 B
Ruby
Raw Normal View History

class ReFlex < Formula
desc "The regex-centric, fast and flexible scanner generator for C++"
homepage "https://www.genivia.com/doc/reflex/html"
url "https://github.com/Genivia/RE-flex/archive/reflex-1.0.12.tar.gz"
sha256 "75a1761d9a6fd3fee6454e3b6ec954efbad76ece9b68633a07ada977af4cd300"
depends_on "boost"
def install
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/"echo.l").write <<~'EOS'
%{
#include <stdio.h>
%}
%option noyywrap main
%%
.+ ECHO;
%%
EOS
system "#{bin}/reflex", "--flex", "echo.l"
assert_predicate testpath/"lex.yy.cpp", :exist?
end
end