43 lines
1.5 KiB
Ruby
43 lines
1.5 KiB
Ruby
class Gromacs < Formula
|
|
desc "Versatile package for molecular dynamics calculations"
|
|
homepage "http://www.gromacs.org/"
|
|
url "https://ftp.gromacs.org/pub/gromacs/gromacs-2018.3.tar.gz"
|
|
sha256 "4423a49224972969c52af7b1f151579cea6ab52148d8d7cbae28c183520aa291"
|
|
|
|
bottle do
|
|
sha256 "7e7a91d9324d2eea4c6095a7b469c9b59a103d3e7a564e16f7f647f084c82433" => :mojave
|
|
sha256 "ecef5c12a18508f6f7a0b6273f606680121f5a2ddc9df2c792cbbbd4ff9463cf" => :high_sierra
|
|
sha256 "da427af1b26005972c484923bd199ee0fb642096123ed7a1ca5b00916d0353ff" => :sierra
|
|
sha256 "9096c516ac4cb6cb3e21cf07d1ddbe1e2647ae92c031f2c8d2330ee72a6bfbc0" => :el_capitan
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "fftw"
|
|
depends_on "gsl"
|
|
|
|
def install
|
|
inreplace "scripts/CMakeLists.txt", "CMAKE_INSTALL_BINDIR",
|
|
"CMAKE_INSTALL_DATADIR"
|
|
|
|
mkdir "build" do
|
|
system "cmake", "..", *std_cmake_args, "-DGMX_GSL=ON"
|
|
system "make"
|
|
ENV.deparallelize { system "make", "install" }
|
|
end
|
|
|
|
bash_completion.install "build/scripts/GMXRC" => "gromacs-completion.bash"
|
|
bash_completion.install "#{bin}/gmx-completion-gmx.bash" => "gmx-completion-gmx.bash"
|
|
bash_completion.install "#{bin}/gmx-completion.bash" => "gmx-completion.bash"
|
|
zsh_completion.install "build/scripts/GMXRC.zsh" => "_gromacs"
|
|
end
|
|
|
|
def caveats; <<~EOS
|
|
GMXRC and other scripts installed to:
|
|
#{HOMEBREW_PREFIX}/share/gromacs
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/gmx", "help"
|
|
end
|
|
end
|