homebrew-core/Formula/raxml-ng.rb

50 lines
1.5 KiB
Ruby

class RaxmlNg < Formula
desc "RAxML Next Generation: faster, easier-to-use and more flexible"
homepage "https://sco.h-its.org/exelixis/web/software/raxml/"
url "https://github.com/amkozlov/raxml-ng.git",
tag: "0.9.0",
revision: "0a064e9a40f2e00828662795141659d946440c81"
license "AGPL-3.0"
bottle do
cellar :any
sha256 "3deb449ed9ce39343945ed4b003a8f0ed3caaf84cdd240e990f3a1262edaa1da" => :catalina
sha256 "5b99cd4e7bbc3b688dc32e73c728fc5ff9c1cd7f567e584523c418285de77cd0" => :mojave
sha256 "8e3e83381139bacde52257180a17a9928e6c9c0a833776b245925970570f1937" => :high_sierra
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "cmake" => :build
depends_on "libtool" => :build
depends_on "gmp"
depends_on "open-mpi"
uses_from_macos "bison" => :build
uses_from_macos "flex" => :build
resource "example" do
url "https://sco.h-its.org/exelixis/resource/download/hands-on/dna.phy"
sha256 "c2adc42823313831b97af76b3b1503b84573f10d9d0d563be5815cde0effe0c2"
end
def install
args = std_cmake_args + ["-DUSE_GMP=ON"]
mkdir "build" do
system "cmake", "..", *args
system "make", "install"
end
mkdir "build_mpi" do
ENV["CC"] = "mpicc"
ENV["CXX"] = "mpicxx"
system "cmake", "..", *args, "-DUSE_MPI=ON", "-DRAXML_BINARY_NAME=raxml-ng-mpi"
system "make", "install"
end
end
test do
testpath.install resource("example")
system "#{bin}/raxml-ng", "--msa", "dna.phy", "--start", "--model", "GTR"
end
end