-
Notifications
You must be signed in to change notification settings - Fork 8
/
tempo2.rb
37 lines (31 loc) · 1 KB
/
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
37
class Tempo2 < Formula
desc 'A pulsar timing package'
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 "libx11" => :recommended
depends_on "gcc"
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