forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastrometry.net.rb
51 lines (40 loc) · 1.26 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
require 'formula'
class AstrometryNet < Formula
homepage 'http://astrometry.net'
url 'http://astrometry.net/downloads/astrometry.net-0.44.tar.gz'
sha1 '0424cb17de9f19459af4d6589ec83f4a7b9b6b38'
head 'http://astrometry.net/svn/trunk/src/astrometry', :using => :svn
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'
# from pip
depends_on 'pyfits' => :python
depends_on 'numpy' => :python
# this formula includes python bindings
depends_on :python => :recommended
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)"
option 'without-py', "Don't try to build python code"
def install
ENV['INSTALL_DIR'] = "#{prefix}"
ENV['NETPBM_INC'] = "-I#{HOMEBREW_PREFIX}/include/netpbm"
ENV['NETPBM_LIB'] = "-L#{HOMEBREW_PREFIX}/lib -lnetpbm"
ENV['SYSTEM_GSL'] = "yes"
system "make"
if not build.include? 'without-extras'
system "make extra"
end
if not build.include? 'without-py'
system "make py"
end
system "make install"
end
def test
system "solve-field"
end
end