r: build with openblas
This commit is contained in:
parent
bcc2015e04
commit
f9325e5e63
1 changed files with 4 additions and 16 deletions
20
Formula/r.rb
20
Formula/r.rb
|
@ -3,6 +3,7 @@ class R < Formula
|
|||
homepage "https://www.r-project.org/"
|
||||
url "https://cran.r-project.org/src/base/R-3/R-3.5.2.tar.gz"
|
||||
sha256 "e53d8c3cf20f2b8d7a9c1631b6f6a22874506fb392034758b3bb341c586c5b62"
|
||||
revision 1
|
||||
|
||||
bottle do
|
||||
sha256 "08120ed5b37e5cf4b067e03ba8cd90bd03c6c4af66d20ab96be3abe2658a4a63" => :mojave
|
||||
|
@ -15,11 +16,10 @@ class R < Formula
|
|||
depends_on "gettext"
|
||||
depends_on "jpeg"
|
||||
depends_on "libpng"
|
||||
depends_on "openblas"
|
||||
depends_on "pcre"
|
||||
depends_on "readline"
|
||||
depends_on "xz"
|
||||
depends_on :java => :optional
|
||||
depends_on "openblas" => :optional
|
||||
|
||||
# needed to preserve executable permissions on files without shebangs
|
||||
skip_clean "lib/R/bin"
|
||||
|
@ -46,22 +46,10 @@ class R < Formula
|
|||
"--with-lapack",
|
||||
"--enable-R-shlib",
|
||||
"SED=/usr/bin/sed", # don't remember Homebrew's sed shim
|
||||
"--disable-java",
|
||||
"--with-blas=-L#{Formula["openblas"].opt_lib} -lopenblas",
|
||||
]
|
||||
|
||||
if build.with? "openblas"
|
||||
args << "--with-blas=-L#{Formula["openblas"].opt_lib} -lopenblas"
|
||||
ENV.append "LDFLAGS", "-L#{Formula["openblas"].opt_lib}"
|
||||
else
|
||||
args << "--with-blas=-framework Accelerate"
|
||||
ENV.append_to_cflags "-D__ACCELERATE__" if ENV.compiler != :clang
|
||||
end
|
||||
|
||||
if build.with? "java"
|
||||
args << "--enable-java"
|
||||
else
|
||||
args << "--disable-java"
|
||||
end
|
||||
|
||||
# Help CRAN packages find gettext and readline
|
||||
["gettext", "readline"].each do |f|
|
||||
ENV.append "CPPFLAGS", "-I#{Formula[f].opt_include}"
|
||||
|
|
Loading…
Reference in a new issue