homebrew-core/Formula/cdo.rb
Brett Koonce eea8ffc0aa cdo 1.5.8
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-11-30 20:39:55 -08:00

33 lines
891 B
Ruby

require 'formula'
class Cdo < Formula
homepage 'https://code.zmaw.de/projects/cdo'
url 'https://code.zmaw.de/attachments/download/4195/cdo-1.5.8.tar.gz'
sha1 '763f7175c230b6fc865ece1031a3c25887fc87ed'
option 'enable-grib2', 'Compile Fortran bindings'
depends_on 'netcdf'
depends_on 'hdf5'
depends_on 'grib-api' => :optional if build.include? 'enable-grib2'
def install
args = ["--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--with-netcdf=#{HOMEBREW_PREFIX}",
"--with-hdf5=#{HOMEBREW_PREFIX}",
"--with-szlib=#{HOMEBREW_PREFIX}"]
if build.include? 'enable-grib2'
args << "--with-grib_api=#{HOMEBREW_PREFIX}"
args << "--with-jasper=#{HOMEBREW_PREFIX}"
end
system "./configure", *args
system "make install"
end
def test
system "#{bin}/cdo", "-h"
end
end