forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
atlas.rb
41 lines (33 loc) · 1.52 KB
/
atlas.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
require 'formula'
class Atlas < Formula
homepage 'http://math-atlas.sourceforge.net/'
url 'http://sourceforge.net/projects/math-atlas/files/Stable/3.10.0/atlas3.10.0.tar.bz2'
sha1 '085e8219d01626485079b785309d4d6502ab1ac0'
# Even though atlas is built with --nof77 the check step will fail unless gcc47 is
# built with fortran.
depends_on "homebrew/versions/gcc47" => "enable-fortran"
def install
ENV.j1 # Atlas does its own parallel build
system "mkdir -p BUILD"
cd "BUILD"
# pull in netlib LAPACK because the default Apple LAPACK doesn't include
system "curl", "-C", "-", "-o", "lapack-3.4.2.tgz", "http://www.netlib.org/lapack/lapack-3.4.2.tgz"
# DO NOT use the brew-recommended form of system with arguments separated by commas that avoids
# a subshell.
# For whatever reason this configure only succeeds if run in a subshell.
# The combination of flags below was generated by the MacPorts portfile for atlas...if this
# breaks in the future, check there. Find it with: brew -S --macports atlas
system "../configure " +
"--nof77 " +
"--with-netlib-lapack-tarfile=" + pwd() + "/lapack-3.4.2.tgz " +
"--prefix=#{prefix} " +
"--dylibs " +
"-O 12 -v 5 -A 26 -V 448 -Si omp 0 " +
"-C acg #{HOMEBREW_PREFIX}/bin/gcc-4.7 " +
"-F acg '-fomit-frame-pointer -mfpmath=sse -O3 -fno-schedule-insns2 -fPIC -msse4.2' " +
"-b 64 -D c -DPentiumCPS=2300"
system "make build"
system "make check"
system "make install"
end
end