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: "1.0.0",
revision: "308ff5cc88d0785fce1308d5953d7b6a644e8cf8"
license "AGPL-3.0-or-later"
bottle do
cellar :any
sha256 "0902dc74193390a5769d57e566c686a0dfbe0336d44273be76cc38103551b5aa" => :catalina
sha256 "08286840feb5b0ef4a8f13717df0d62980e10fcf07c102ffd2722433087ed5b9" => :mojave
sha256 "358ce270c0607ad2985a02ab4a26a0d87439bf134611e0e6ed82251a50bef1d8" => :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