diff options
| author | Michael C. Grant | 2014-03-21 17:22:51 -0500 |
|---|---|---|
| committer | Misty De Meo | 2014-03-24 18:08:45 -0700 |
| commit | 49b2ef11ad0613d7e4e37a882ab3cb039ced992d (patch) | |
| tree | cd0854560ad9839d20bbe29205720711595daca8 | |
| parent | 98aa2392d37a89f4c41fdb8f608b97f06b5d1c8d (diff) | |
| download | homebrew-49b2ef11ad0613d7e4e37a882ab3cb039ced992d.tar.bz2 | |
qrupdate, slicot: improved BLAS/LAPACK support
qrupdate.rb: added OpenBLAS option. Compiled with -ff2c flag for
-framework vecLib to ensure compatibility.
slicot.rb: removed all mention of BLAS/LAPACK, because only the static
library is built.
Closes #27773.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
| -rw-r--r-- | Library/Formula/qrupdate.rb | 18 | ||||
| -rw-r--r-- | Library/Formula/slicot.rb | 4 |
2 files changed, 15 insertions, 7 deletions
diff --git a/Library/Formula/qrupdate.rb b/Library/Formula/qrupdate.rb index 24153c33a..43b971aa8 100644 --- a/Library/Formula/qrupdate.rb +++ b/Library/Formula/qrupdate.rb @@ -6,16 +6,26 @@ class Qrupdate < Formula sha1 'f7403b646ace20f4a2b080b4933a1e9152fac526' depends_on :fortran - depends_on 'dotwrp' + depends_on "homebrew/science/openblas" => :optional def install ENV.j1 ENV['PREFIX'] = prefix + if build.with? 'openblas' + fflags = ENV.fcflags + lflags = "#{ENV.ldflags} -L#{Formula["openblas"].lib} -lopenblas" + else + # We're using the -ff2c flag here to avoid having to depend on dotwrp. + # Because qrupdate exports only subroutines, the resulting library is + # compatible with packages compiled with or without the -ff2c flag. + fflags = "#{ENV.fcflags} -ff2c" + lflags = "#{ENV.ldflags} -framework Accelerate" + end inreplace 'Makeconf' do |s| s.change_make_var! 'FC', ENV.fc - s.change_make_var! 'FFLAGS', ENV.fcflags - s.change_make_var! 'BLAS', "#{ENV.ldflags} -ldotwrp -framework Accelerate" - s.change_make_var! 'LAPACK', "#{ENV.ldflags} -ldotwrp -framework Accelerate" + s.change_make_var! 'FFLAGS', fflags + s.change_make_var! 'BLAS', lflags + s.change_make_var! 'LAPACK', "" end cd "./src" inreplace 'Makefile' do |s| diff --git a/Library/Formula/slicot.rb b/Library/Formula/slicot.rb index 578a19a0d..49277d596 100644 --- a/Library/Formula/slicot.rb +++ b/Library/Formula/slicot.rb @@ -14,19 +14,17 @@ class Slicot < Formula args = [ "FORTRAN=#{ENV.fc}", "LOADER=#{ENV.fc}", - "LAPACKLIB='-framework Accelerate'", ] slicotlibname = "libslicot_pic.a" system "make", "lib", "OPTS=-fPIC", "SLICOTLIB=../#{slicotlibname}", *args lib.install "#{slicotlibname}" - system "make", "clean" if build.with? "default-integer-8" + system "make", "clean" slicotlibname = "libslicot64_pic.a" system "make", "lib", "OPTS=-fPIC -fdefault-integer-8", "SLICOTLIB=../#{slicotlibname}", *args lib.install "#{slicotlibname}" - system "make", "clean" end end end |
