parent
2aedb8d950
commit
0fc6663eab
1 changed files with 32 additions and 0 deletions
32
Formula/hyperscan.rb
Normal file
32
Formula/hyperscan.rb
Normal 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
|
Loading…
Reference in a new issue