libbitcoin-database 3.3.0 (new formula)

This is libbitcoin-database, a high performance blockchain database.
This commit is contained in:
Sam Jones 2017-10-07 12:54:21 -04:00 committed by Alex Dunn
parent 6a04d3d4bb
commit 36cf98b555

View file

@ -0,0 +1,41 @@
class LibbitcoinDatabase < Formula
desc "Bitcoin High Performance Blockchain Database"
homepage "https://github.com/libbitcoin/libbitcoin-database"
url "https://github.com/libbitcoin/libbitcoin-database/archive/v3.3.0.tar.gz"
sha256 "b4d98199ac4629a9857c1eb8819fe8166525bf2dca9ed790a9bbe5dc9c9e9186"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
depends_on "libbitcoin"
def install
ENV.prepend_path "PKG_CONFIG_PATH", Formula["libbitcoin"].opt_libexec/"lib/pkgconfig"
system "./autogen.sh"
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/"test.cpp").write <<~EOS
#include <bitcoin/database.hpp>
using namespace libbitcoin::database;
using namespace libbitcoin::chain;
int main() {
static const transaction tx{ 0, 0, input::list{}, output::list{ output{} } };
unspent_outputs cache(42);
cache.add(tx, 0, 0, false);
assert(cache.size() == 1u);
return 0;
}
EOS
system ENV.cxx, "-std=c++11", "test.cpp",
"-lbitcoin", "-lbitcoin-database", "-lboost_system",
"-o", "test"
system "./test"
end
end