diff options
| author | Yueh-Hsuan Chiang | 2014-09-18 16:56:18 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2014-09-29 18:29:50 -0700 |
| commit | 8ad2baa4333aa55ea19006359a523cfd28a9e2af (patch) | |
| tree | 63299314a9a7334da1cf8af135a2991cd13da10f /Library/Formula | |
| parent | 6d272cf6979ac6f44e8df248e47e4f0399178260 (diff) | |
| download | homebrew-8ad2baa4333aa55ea19006359a523cfd28a9e2af.tar.bz2 | |
rocksdb 3.5 (new formula)
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/rocksdb.rb | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Library/Formula/rocksdb.rb b/Library/Formula/rocksdb.rb new file mode 100644 index 000000000..a089ecf8d --- /dev/null +++ b/Library/Formula/rocksdb.rb @@ -0,0 +1,43 @@ +require "formula" + +class Rocksdb < Formula + homepage "http://rocksdb.org" + url "https://github.com/facebook/rocksdb/archive/3.5.fb.tar.gz" + sha1 "f8bd52914835a0839548eaca7f755128ed759991" + version "3.5" + + needs :cxx11 + depends_on "snappy" + depends_on "lz4" + + def install + ENV.cxx11 + system "make", "clean" + system "make", "static_lib" + system "make", "shared_lib" + system "make", "install", "INSTALL_PATH=#{prefix}" + end + + test do + (testpath/"test.cpp").write <<-EOS.undent + #include <assert.h> + #include <rocksdb/options.h> + #include <rocksdb/memtablerep.h> + using namespace rocksdb; + int main() { + Options options; + options.memtable_factory.reset( + NewHashSkipListRepFactory(16)); + return 0; + } + EOS + + system ENV.cxx, "test.cpp", "-o", "db_test", "-v", "-std=c++11", + "-stdlib=libc++", + "-lstdc++", + "-lrocksdb", + "-lz", "-lbz2", + "-lsnappy", "-llz4" + system "./db_test" + end +end |
