libbitcoin-protocol 3.5.0 (new formula)
This commit is contained in:
parent
245cba309a
commit
85a457b7bd
1 changed files with 39 additions and 0 deletions
39
Formula/libbitcoin-protocol.rb
Normal file
39
Formula/libbitcoin-protocol.rb
Normal file
|
@ -0,0 +1,39 @@
|
|||
class LibbitcoinProtocol < Formula
|
||||
desc "Bitcoin Blockchain Query Protocol"
|
||||
homepage "https://github.com/libbitcoin/libbitcoin-protocol"
|
||||
url "https://github.com/libbitcoin/libbitcoin-protocol/archive/v3.5.0.tar.gz"
|
||||
sha256 "9deac6908489e2d59fb9f89c895c49b00e01902d5fdb661f67d4dbe45b22af76"
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "libtool" => :build
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "libbitcoin"
|
||||
depends_on "zeromq"
|
||||
|
||||
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/protocol.hpp>
|
||||
int main() {
|
||||
libbitcoin::protocol::zmq::message instance;
|
||||
instance.enqueue();
|
||||
assert(!instance.empty());
|
||||
assert(instance.size() == 1u);
|
||||
}
|
||||
EOS
|
||||
system ENV.cxx, "-std=c++11", "test.cpp",
|
||||
"-lbitcoin", "-lbitcoin-protocol", "-lboost_system",
|
||||
"-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue