-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathipopt.rb
44 lines (39 loc) · 1.75 KB
/
ipopt.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'
require "#{File.dirname(__FILE__)}/libgfortran"
class Ipopt < Formula
homepage 'https://projects.coin-or.org/Ipopt'
url 'http://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.4.tgz'
sha256 '292afd952c25ec9fe6225041683dcbd3cb76e15a128764671927dbaf881c2e89'
revision 1
bottle do
root_url 'https://juliabottles.s3.amazonaws.com'
cellar :any
rebuild 2
sha256 "212196e3838345ed1e16c962514ddaf32c2e5a822f797f2af9b05cb130ec3d7a" => :sierra
sha256 "2d240f0c450c65ea0555844e117d8f10a1f565f8b732538dc023fe50404d7d71" => :el_capitan
sha256 "33c266d3fb148cb96a381baeee7d5edd368891cda1bd935da1e9f98c235efced" => :yosemite
end
# Need this snippet in every formula that has a runtime dependency on libgfortran
def post_install
fixup_libgfortran prefix
end
# Need to enable this when building the bottle, disable it when installing from bottles
depends_on "gcc" if Homebrew.args.build_bottle
depends_on 'staticfloat/juliadeps/libgfortran'
def install
system "cd ThirdParty/Blas; ./get.Blas"
system "cd ThirdParty/Blas; ./configure --prefix=#{prefix} --disable-shared --with-pic; make install"
system "cd ThirdParty/Lapack; ./get.Lapack"
system "cd ThirdParty/Lapack; ./configure --prefix=#{prefix} --disable-shared --with-pic; make install"
system "cd ThirdParty/ASL; ./get.ASL"
system "cd ThirdParty/Mumps; ./get.Mumps"
system "./configure", "--disable-dependency-tracking",
"--with-blas=#{prefix}/lib/libcoinblas.a",
"--with-lapack=#{prefix}/lib/libcoinlapack.a",
"--prefix=#{prefix}"
system "make"
system "make test"
ENV.deparallelize # make install fails in parallel.
system "make install"
end
end