hyperscan 4.0.1 (new formula)

Closes Homebrew/homebrew#48741
This commit is contained in:
Flier Lu 2016-02-02 18:59:57 +08:00 committed by Andrew Janke
parent 2aedb8d950
commit 0fc6663eab

32
Formula/hyperscan.rb Normal file
View file

@ -0,0 +1,32 @@
class Hyperscan < Formula
desc "High-performance regular expression matching library"
homepage "https://01.org/hyperscan"
url "https://github.com/01org/hyperscan/archive/v4.0.1.tar.gz"
sha256 "ae6619baa3da78361b09d22c155b1406b17890009d93ed60445381eb03016b76"
depends_on "boost" => :build
depends_on "python" => :build
depends_on "ragel" => :build
depends_on "cmake" => :build
def install
mkdir "build" do
system "cmake", "..", *std_cmake_args
system "make", "install"
end
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <stdio.h>
#include <hs/hs.h>
int main()
{
printf("hyperscan v%s", hs_version());
return 0;
}
EOS
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lhs", "-o", "test"
system "./test"
end
end