diff --git a/Formula/mdds.rb b/Formula/mdds.rb new file mode 100644 index 0000000000..e8009982c4 --- /dev/null +++ b/Formula/mdds.rb @@ -0,0 +1,27 @@ +class Mdds < Formula + desc "multi-dimensional data structure and indexing algorithm" + homepage "https://gitlab.com/mdds/mdds" + url "http://kohei.us/files/mdds/src/mdds_1.0.0.tar.bz2" + sha256 "ef8abc1236b54c7ca16ae1ee38abfb9cdbc5d1e6a2427c65b92b8c1003e3bf56" + + depends_on "boost" + needs :cxx11 + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<-EOS.undent + #include + int main() { + mdds::flat_segment_tree fst(0, 4, 8); + } + EOS + system ENV.cxx, "test.cpp", "-o", "test", + "-std=c++11", + "-I#{include}/mdds-1.0" + system "./test" + end +end