class Bitcoin < Formula desc "Decentralized, peer to peer payment network" homepage "https://bitcoin.org/" url "https://github.com/bitcoin/bitcoin/archive/v0.15.1.tar.gz" sha256 "e429d4f257f2b5b6d0caaf36ed1a5f5203e5918c57837efac00b0c322a1fef79" head "https://github.com/bitcoin/bitcoin.git" bottle do cellar :any sha256 "e0900bda0b5cca8dfefabda7e0cd41fedc4736e63a796e5ea0652936d8c22f38" => :high_sierra sha256 "7c8f5d953c3de4dc48f3928a29ab2fc405ab0d459d1b4038af6060f5382d835e" => :sierra sha256 "9b41218716c3b58491793303e5a877f5b83ed0051257d6970341e087536e428e" => :el_capitan end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build depends_on "pkg-config" => :build depends_on "berkeley-db@4" depends_on "boost" depends_on "libevent" depends_on "miniupnpc" depends_on "openssl" needs :cxx11 def install if MacOS.version == :el_capitan && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0" ENV.delete("SDKROOT") end system "./autogen.sh" system "./configure", "--disable-dependency-tracking", "--disable-silent-rules", "--with-boost-libdir=#{Formula["boost"].opt_lib}", "--prefix=#{prefix}" system "make", "install" end plist_options :manual => "bitcoind" def plist; <<~EOS Label #{plist_name} ProgramArguments #{opt_bin}/bitcoind RunAtLoad EOS end test do system "#{bin}/test_bitcoin" end end