forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsextractor.rb
56 lines (46 loc) · 2.07 KB
/
sextractor.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
require "formula"
class Sextractor < Formula
homepage "http://www.astromatic.net/software/sextractor"
url "http://www.astromatic.net/download/sextractor/sextractor-2.8.6.tar.gz"
sha1 "103ac2d51d9bae9fcbc5dda3031d82cd127f8250"
depends_on "fftw"
depends_on "autoconf" => :build
option "without-check", "Disable build-time checking (not recommended); running check will take 5-10 minutes"
# patch the macro file for autoconf to test for functionality of Accelerate lib
patch :p1 do
url "https://gist.githubusercontent.com/mwcraig/9540830/raw/19a0284f9d02092b7159e1bae2cdcafdb9282ef1/acx_atlas.m4.diff"
sha1 "1a36d08776d646630645058dadebad1edb69bff0"
end
# lm.h patch
patch :p1 do
url "https://gist.githubusercontent.com/mwcraig/9540846/raw/8949f238c911aa8e6b4553d7fcc9f0c2fcbb35d0/lm.h.diff"
sha1 "1a36d08776d646630645058dadebad1edb69bff0"
end
# Add definition of pre-processor macro and modify GEMM call to match Accelerate
patch :p1 do
url "https://gist.githubusercontent.com/mwcraig/9540872/raw/2069659ba5699f065044a2acbbd4538f96a28533/misc_core.c.diff"
sha1 "1a36d08776d646630645058dadebad1edb69bff0"
end
# include BLAS header file
patch :p1 do
url "https://gist.githubusercontent.com/mwcraig/9540885/raw/5372b5b7c4a716dcb5c1eedc473a82d3a07694aa/misc.c.diff"
sha1 "1a36d08776d646630645058dadebad1edb69bff0"
end
# set BLAS prefix/suffix for Accelerate
patch :p1 do
url "https://gist.githubusercontent.com/mwcraig/9540929/raw/af0485c4a4f83a5f49c679eafd622adbf4a90a3e/misc.h.diff"
sha1 "1a36d08776d646630645058dadebad1edb69bff0"
end
# change name/arguments of LAPACK functions from ATLAS to Accelerate, and add include file
patch :p1 do
url "https://gist.githubusercontent.com/mwcraig/9540907/raw/92e8af0e68cac2b1928545a9a1222752cf8440b1/pattern.c.diff"
sha1 "1a36d08776d646630645058dadebad1edb69bff0"
end
def install
system "autoconf"
system "./configure", "--prefix=#{prefix}", "--without-atlas"
system "make"
system "make", "check" if build.with? "check"
system "make", "install"
end
end