forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cdo.rb
33 lines (26 loc) · 878 Bytes
/
cdo.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require 'formula'
class Cdo < Formula
homepage 'https://code.zmaw.de/projects/cdo'
url 'https://code.zmaw.de/attachments/download/5824/cdo-1.6.1.tar.gz'
sha1 'b88d11f8de455b78273cdcde507a85546fc3bc19'
option 'enable-grib2', 'Compile Fortran bindings'
depends_on 'netcdf'
depends_on 'hdf5'
depends_on 'grib-api' 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