rocksdb: make with-lite the default
Only dependent is osquery, which recommends the lite version
This commit is contained in:
parent
fe303b47e6
commit
6445d90c47
1 changed files with 7 additions and 4 deletions
|
@ -3,6 +3,7 @@ class Rocksdb < Formula
|
||||||
homepage "http://rocksdb.org"
|
homepage "http://rocksdb.org"
|
||||||
url "https://github.com/facebook/rocksdb/archive/v4.13.5.tar.gz"
|
url "https://github.com/facebook/rocksdb/archive/v4.13.5.tar.gz"
|
||||||
sha256 "3384655107f59a6ee9a52a54d0631d9ae96c722e411bafe6c4547ec4fc201534"
|
sha256 "3384655107f59a6ee9a52a54d0631d9ae96c722e411bafe6c4547ec4fc201534"
|
||||||
|
revision 1
|
||||||
|
|
||||||
bottle do
|
bottle do
|
||||||
cellar :any
|
cellar :any
|
||||||
|
@ -11,7 +12,7 @@ class Rocksdb < Formula
|
||||||
sha256 "a74163785a0356483520f8ae05f0453acbc05b3c179501f574d33de52c24c933" => :yosemite
|
sha256 "a74163785a0356483520f8ae05f0453acbc05b3c179501f574d33de52c24c933" => :yosemite
|
||||||
end
|
end
|
||||||
|
|
||||||
option "with-lite", "Build mobile/non-flash optimized lite version"
|
option "without-lite", "Don't build mobile/non-flash optimized lite version"
|
||||||
option "with-tools", "Build tools"
|
option "with-tools", "Build tools"
|
||||||
|
|
||||||
needs :cxx11
|
needs :cxx11
|
||||||
|
@ -22,7 +23,10 @@ class Rocksdb < Formula
|
||||||
def install
|
def install
|
||||||
ENV.cxx11
|
ENV.cxx11
|
||||||
ENV["PORTABLE"] = "1" if build.bottle?
|
ENV["PORTABLE"] = "1" if build.bottle?
|
||||||
ENV.append_to_cflags "-DROCKSDB_LITE=1" if build.with? "lite"
|
if build.with? "lite"
|
||||||
|
ENV.append_to_cflags "-DROCKSDB_LITE=1"
|
||||||
|
ENV["LIBNAME"] = "librocksdb_lite"
|
||||||
|
end
|
||||||
system "make", "clean"
|
system "make", "clean"
|
||||||
system "make", "static_lib"
|
system "make", "static_lib"
|
||||||
system "make", "shared_lib"
|
system "make", "shared_lib"
|
||||||
|
@ -48,7 +52,6 @@ class Rocksdb < Formula
|
||||||
using namespace rocksdb;
|
using namespace rocksdb;
|
||||||
int main() {
|
int main() {
|
||||||
Options options;
|
Options options;
|
||||||
options.memtable_factory.reset(NewHashSkipListRepFactory(16));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EOS
|
EOS
|
||||||
|
@ -56,7 +59,7 @@ class Rocksdb < Formula
|
||||||
system ENV.cxx, "test.cpp", "-o", "db_test", "-v",
|
system ENV.cxx, "test.cpp", "-o", "db_test", "-v",
|
||||||
"-std=c++11", "-stdlib=libc++", "-lstdc++",
|
"-std=c++11", "-stdlib=libc++", "-lstdc++",
|
||||||
"-lz", "-lbz2",
|
"-lz", "-lbz2",
|
||||||
"-L#{lib}", "-lrocksdb",
|
"-L#{lib}", "-lrocksdb_lite",
|
||||||
"-L#{Formula["snappy"].opt_lib}", "-lsnappy",
|
"-L#{Formula["snappy"].opt_lib}", "-lsnappy",
|
||||||
"-L#{Formula["lz4"].opt_lib}", "-llz4"
|
"-L#{Formula["lz4"].opt_lib}", "-llz4"
|
||||||
system "./db_test"
|
system "./db_test"
|
||||||
|
|
Loading…
Reference in a new issue