diff --git a/Formula/c-blosc.rb b/Formula/c-blosc.rb new file mode 100644 index 0000000000..6839729baf --- /dev/null +++ b/Formula/c-blosc.rb @@ -0,0 +1,25 @@ +class CBlosc < Formula + desc "Blocking, shuffling and loss-less compression library" + homepage "http://blosc.org/" + url "https://github.com/Blosc/c-blosc/archive/v1.14.4.tar.gz" + sha256 "42a85de871d142cdc89b607a90cceeb0eab60d995f6fae8d44aae397ab414002" + + depends_on "cmake" => :build + + def install + system "cmake", ".", *std_cmake_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<~EOS + #include + int main() { + blosc_init(); + return 0; + } + EOS + system ENV.cc, "test.cpp", "-I#{include}", "-L#{lib}", "-lblosc", "-o", "test" + system "./test" + end +end