forked from ska-sa/homebrew-tap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tempo2.rb
36 lines (30 loc) · 976 Bytes
/
tempo2.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
class Tempo2 < Formula
homepage "http://www.atnf.csiro.au/research/pulsar/tempo2/"
url "https://downloads.sourceforge.net/tempo2/tempo2-2013.9.1.tar.gz"
sha256 "79dede8fcb4deb66789d6acffa775cfc27ed33412eb795c93aad4dbe054cd933"
depends_on :x11
depends_on :fortran
depends_on "pgplot"
depends_on "fftw"
depends_on "cfitsio"
depends_on "gsl"
def install
share.install "T2runtime"
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--with-tempo2-plug-dir=#{share}/T2runtime/plugins"
system "make", "install"
system "make", "plugins-install"
end
def caveats
s = <<-EOS.undent
Please set the TEMPO2 environment variable to:
export TEMPO2=#{share}/T2runtime
EOS
s
end
test do
system "TEMPO2=#{share}/T2runtime", bin/"tempo2", "-h", "||", "[", "$?", "==", "1", "]"
end
end