diff options
| author | Adam Vandenberg | 2012-08-22 21:36:27 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-22 21:36:27 -0700 |
| commit | 13a62cc1d7dcba4576c177f6f9695347c02ba289 (patch) | |
| tree | eed5ddbb82dd17c71b5930eb2a72ad41c7e6e3c2 /Library/Formula | |
| parent | 0b79f38855a6b933860ab4e8bce11bb4d6469a68 (diff) | |
| download | homebrew-13a62cc1d7dcba4576c177f6f9695347c02ba289.tar.bz2 | |
cdo: use new dsl
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/cdo.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/Library/Formula/cdo.rb b/Library/Formula/cdo.rb index 1e98ed4a5..408f5024c 100644 --- a/Library/Formula/cdo.rb +++ b/Library/Formula/cdo.rb @@ -1,22 +1,15 @@ require 'formula' -def grib2? - ARGV.include? '--enable-grib2' -end - class Cdo < Formula homepage 'https://code.zmaw.de/projects/cdo' url 'https://code.zmaw.de/attachments/download/3605/cdo-1.5.6.1.tar.gz' - version '1.5.6.1' sha1 '180517a3c234a47e5e19ae15084bb2fe2bda2d06' + options 'enable-grib2', 'Compile Fortran bindings' + depends_on 'netcdf' depends_on 'hdf5' - depends_on 'grib-api' if grib2? - - def options - [['--enable-grib2', 'Compile Fortran bindings']] - end + depends_on 'grib-api' => :optional if build.include? 'enable-grib2' def install args = ["--disable-debug", "--disable-dependency-tracking", @@ -25,7 +18,7 @@ class Cdo < Formula "--with-hdf5=#{HOMEBREW_PREFIX}", "--with-szlib=#{HOMEBREW_PREFIX}"] - if grib2? + if build.include? 'enable-grib2' args << "--with-grib_api=#{HOMEBREW_PREFIX}" args << "--with-jasper=#{HOMEBREW_PREFIX}" end |
