forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmbsystem.rb
38 lines (32 loc) · 1.07 KB
/
mbsystem.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
34
35
36
37
38
require "formula"
class Mbsystem < Formula
homepage "http://www.mbari.org/data/mbsystem/mb-cookbook/index.html"
url "ftp://ftp.ldeo.columbia.edu/pub/MB-System/mbsystem-5.4.2191.tar.gz"
sha1 "c8bda63009d07ce74a2b2a742637ab700a0f4236"
depends_on :x11
depends_on "gmt4"
depends_on "netcdf"
depends_on "proj"
depends_on "fftw"
depends_on "gv"
depends_on "lesstif"
option "without-levitus", "Don't install Levitus database (no mblevitus)"
option "without-check", "Disable build time checks (not recommended)"
resource "levitus" do
url "ftp://ftp.ldeo.columbia.edu/pub/MB-System/annual.gz"
sha1 "2dd876e3d4a56ac6502f7ff92156f072e54183e7"
end
def install
if build.with? 'levitus'
resource("levitus").stage do
mkdir_p "#{share}/mbsystem"
ln_s "annual", "#{share}/mbsystem/LevitusAnnual82.dat"
end
end
system "./configure", "--prefix=#{prefix}",
"--disable-static",
"--enable-shared"
system "make", "check" if build.with? 'check'
system "make", "install"
end
end