forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathastrometry-net.rb
66 lines (56 loc) · 2.24 KB
/
astrometry-net.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
class AstrometryNet < Formula
desc "Automatic identification of astronomical images"
homepage "http://astrometry.net"
url "http://astrometry.net/downloads/astrometry.net-0.69.tar.gz"
sha256 "6a445acfd4ff3c082eb56fcba22ee626b45a98665633710a6b1d4a3edef36f3f"
head "https://github.com/dstndstn/astrometry.net.git"
bottle do
cellar :any
sha256 "2750cf5d50d2d5cfb0e900fbd433d4f47e11065661d30f52818a341a8e23487b" => :sierra
sha256 "c588306f5377aa5fd061d1944846321b8977382a87c7cba6f0d0230e513af47a" => :el_capitan
sha256 "3d1f809ece4eafeb6729bc84f4ee6f75b0ad5e2fc68e1b6bd95164459a2506ca" => :yosemite
end
option "without-extras", "Don't try to build plotting code (actually it will still try, but homebrew won't halt the install if it fails)"
depends_on "swig" => :build
depends_on "pkg-config" => :build
depends_on "wget"
depends_on "netpbm"
depends_on "cairo"
depends_on "jpeg"
depends_on "libpng"
depends_on "wcslib"
depends_on "gsl"
depends_on "cfitsio"
# this formula includes python bindings
depends_on :python => :recommended
resource "numpy" do
url "https://files.pythonhosted.org/packages/e0/4c/515d7c4ac424ff38cc919f7099bf293dd064ba9a600e1e3835b3edefdb18/numpy-1.11.1.tar.gz"
sha256 "dc4082c43979cc856a2bf352a8297ea109ccb3244d783ae067eb2ee5b0d577cd"
end
resource "pyfits" do
url "https://files.pythonhosted.org/packages/45/98/d6d25932e6a82fa8456d38ab307bfb8945a1e1dd4e896730555e3b61cfc5/pyfits-3.4.tar.gz"
sha256 "ce0319cf6ef40846c5915202e4c8bd8d293ad85af4b14aa5a60fb285b7538c4b"
end
def install
ENV["INSTALL_DIR"] = prefix
ENV["NETPBM_INC"] = "-I#{Formula["netpbm"].opt_include}/netpbm"
ENV["NETPBM_LIB"] = "-L#{Formula["netpbm"].opt_lib} -lnetpbm"
ENV["SYSTEM_GSL"] = "yes"
if build.with? "python"
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
%w[numpy pyfits].each do |r|
resource(r).stage do
system "python", *Language::Python.setup_install_args(libexec)
end
end
end
system "make"
system "make", "py" if build.with? "python"
system "make", "extra" if build.with? "extras"
system "make", "test"
system "make", "install"
end
test do
system "#{bin}/solve-field"
end
end