-
Notifications
You must be signed in to change notification settings - Fork 35
/
openblas-julia.rb
44 lines (36 loc) · 1.5 KB
/
openblas-julia.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
require 'formula'
class OpenblasJulia < Formula
homepage 'http://xianyi.github.com/OpenBLAS/'
url 'https://github.com/xianyi/OpenBLAS/archive/v0.2.20.tar.gz'
head 'https://github.com/xianyi/OpenBLAS.git', :branch => 'develop'
sha256 '5ef38b15d9c652985774869efd548b8e3e972e1e99475c673b25537ed7bcf394'
bottle do
root_url 'https://juliabottles.s3.amazonaws.com'
cellar :any
sha256 'b5ce47feaed363e89751a14d5bb0d5e53fa4edf670b9eb5cdbe491b78ab5d168' => :el_capitan
sha256 'ee7ac2970c35b32558ac80faf43e64aa54920407e5c3b2ce65daa6a799a6011d' => :sierra
end
depends_on "gcc"
keg_only 'Conflicts with openblas in homebrew-science.'
patch do
# Change file comments to work around clang 3.9 assembler bug
# https://github.com/xianyi/OpenBLAS/pull/982
url "https://raw.githubusercontent.com/Homebrew/formula-patches/9c8a1cc/openblas/openblas0.2.19.diff"
sha256 "3ddabb73abf3baa4ffba2648bf1d9387bbc6354f94dd34eeef942f1b3e25c29a"
end
option "target", "Manually override the CPU type detection and provide your own TARGET make variable (ignored when building a bottle in lieu of DYNAMIC_ARCH)"
def install
# Build up our list of build options
buildopts = []
if build.bottle?
buildopts << "DYNAMIC_ARCH=1"
else
# Ignore --target if building a bottle
if ARGV.value('target')
buildopts << "TARGET=#{ARGV.value('target')}"
end
end
system "make", "FC=#{ENV['FC']}", *buildopts
system "make", "PREFIX=#{prefix}", "install"
end
end