class Fossil < Formula desc "Distributed software configuration management" homepage "https://www.fossil-scm.org/" url "https://www.fossil-scm.org/index.html/uv/fossil-src-2.1.tar.gz" sha256 "85dcdf10d0f1be41eef53839c6faaa73d2498a9a140a89327cfb092f23cfef05" head "https://www.fossil-scm.org/", :using => :fossil bottle do cellar :any sha256 "ba7af996bf347700d072c2d12ff80fb548a312cb205635c77fa5a25b85448bb9" => :sierra sha256 "f505f985e13963eb1bd6b30d849347d28942725d99810fa20174c313146421a6" => :el_capitan sha256 "e9dcaca9bc3f6535f574e0f537bb66f56e289d2fba46d2c7b9859cda0c4d45d6" => :yosemite end option "without-json", "Build without 'json' command support" option "without-tcl", "Build without the tcl-th1 command bridge" depends_on "openssl" depends_on :osxfuse => :optional def install args = [ # fix a build issue, recommended by upstream on the mailing-list: # https://permalink.gmane.org/gmane.comp.version-control.fossil-scm.user/22444 "--with-tcl-private-stubs=1", ] args << "--json" if build.with? "json" if MacOS::CLT.installed? && build.with?("tcl") args << "--with-tcl" else args << "--with-tcl-stubs" end if build.with? "osxfuse" ENV.prepend "CFLAGS", "-I/usr/local/include/osxfuse" else args << "--disable-fusefs" end system "./configure", *args system "make" bin.install "fossil" end test do system "#{bin}/fossil", "init", "test" end end