Skip to content

Commit ee4eab6

Browse files
authored
Add leveldb version 1.22
0 parents  commit ee4eab6

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Diff for: leveldb.rb

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
class Leveldb < Formula
2+
desc "Key-value storage library with ordered mapping"
3+
homepage "https://github.com/google/leveldb/"
4+
url "https://github.com/google/leveldb/archive/1.22.tar.gz"
5+
sha256 "55423cac9e3306f4a9502c738a001e4a339d1a38ffbee7572d4a07d5d63949b2"
6+
license "BSD-3-Clause"
7+
8+
bottle do
9+
sha256 cellar: :any, big_sur: "410c6f27c9bf8381020c866be9c45e84a41bcb61161061e8219710bb7a5aff0d"
10+
sha256 cellar: :any, catalina: "908fb99544bbc0906134bc9677fbd91c6948324c4de6cd1315fc7e5e6f6634cc"
11+
sha256 cellar: :any, mojave: "22e4a129bedd5030525f749a5b5ec978bf6da0a9b0625fe829da482a5ab85755"
12+
sha256 cellar: :any, high_sierra: "b1cf697cad28caac418d2e0ef49bc90863f389402185d3cc0f1f7079516d02c2"
13+
sha256 cellar: :any, sierra: "810dbeba5e3f7d72d4772b9eff4d9022a1240c0abc6235afbd343c199741e6f7"
14+
end
15+
16+
depends_on "cmake" => :build
17+
depends_on "gperftools"
18+
depends_on "snappy"
19+
20+
def install
21+
mkdir "build" do
22+
system "cmake", "..", *std_cmake_args, "-DBUILD_SHARED_LIBS=ON"
23+
system "make", "install"
24+
bin.install "leveldbutil"
25+
26+
system "make", "clean"
27+
system "cmake", "..", *std_cmake_args, "-DBUILD_SHARED_LIBS=OFF"
28+
system "make"
29+
lib.install "libleveldb.a"
30+
end
31+
end
32+
33+
test do
34+
assert_match "dump files", shell_output("#{bin}/leveldbutil 2>&1", 1)
35+
end
36+
end

0 commit comments

Comments
 (0)