forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ann.rb
26 lines (22 loc) · 910 Bytes
/
ann.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
class Ann < Formula
homepage "http://www.cs.umd.edu/~mount/ANN/"
url "http://www.cs.umd.edu/~mount/ANN/Files/1.1.2/ann_1.1.2.zip"
sha256 "1b54b58ae697202a09d793de51ee9200fe1d5c39def78d9e8f5c0d08e48afaf5"
bottle do
cellar :any
sha256 "1af4c7a1d3aa264cd62565687859432a872b404962cd22f250e5bedf08d8c8d0" => :yosemite
sha256 "101435719a743112bc700a56abb483a107ed3dfcba12313ec790db72de9c59a9" => :mavericks
sha256 "67e681a734fcdd3d4fb1ac79f86cabdd29b4370ea90ddd441e4ad4fc4663c7e9" => :mountain_lion
end
def install
# Fix for Mountain Lion / Mavericks make error
inreplace "ann2fig/ann2fig.cpp", "main", "int main" if MacOS.version >= :mountain_lion
system "make", "macosx-g++"
prefix.install "bin", "lib", "sample", "doc", "include"
end
test do
cd "#{prefix}/sample" do
system "#{bin}/ann_sample", "-df", "data.pts", "-qf", "query.pts"
end
end
end