51 lines
1.7 KiB
Ruby
51 lines
1.7 KiB
Ruby
class Qrupdate < Formula
|
|
desc "Fast updates of QR and Cholesky decompositions"
|
|
homepage "https://sourceforge.net/projects/qrupdate/"
|
|
url "https://downloads.sourceforge.net/project/qrupdate/qrupdate/1.2/qrupdate-1.1.2.tar.gz"
|
|
sha256 "e2a1c711dc8ebc418e21195833814cb2f84b878b90a2774365f0166402308e08"
|
|
revision 13
|
|
|
|
livecheck do
|
|
url :stable
|
|
regex(%r{url=.*?/qrupdate[._-]v?(\d+(?:\.\d+)+)\.t}i)
|
|
end
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "2b2464b06d3f39c68826319d7cf6f860e7fb4a90377ab5a70609e87c9706ffba" => :catalina
|
|
sha256 "f8979b51f613030bbafd0241c918457d26b4f7074ad4e43d50668d20b0ca87be" => :mojave
|
|
sha256 "85065f6d6e3362e53fd66118e11a4727faad0cbf01e5c2e8985bee2382123295" => :high_sierra
|
|
end
|
|
|
|
depends_on "gcc" # for gfortran
|
|
depends_on "openblas"
|
|
|
|
def install
|
|
# Parallel compilation not supported. Reported on 2017-07-21 at
|
|
# https://sourceforge.net/p/qrupdate/discussion/905477/thread/d8f9c7e5/
|
|
ENV.deparallelize
|
|
|
|
system "make", "lib", "solib",
|
|
"BLAS=-L#{Formula["openblas"].opt_lib} -lopenblas"
|
|
|
|
# Confuses "make install" on case-insensitive filesystems
|
|
rm "INSTALL"
|
|
|
|
# BSD "install" does not understand GNU -D flag.
|
|
# Create the parent directory ourselves.
|
|
inreplace "src/Makefile", "install -D", "install"
|
|
lib.mkpath
|
|
|
|
system "make", "install", "PREFIX=#{prefix}"
|
|
pkgshare.install "test/tch1dn.f", "test/utils.f"
|
|
end
|
|
|
|
test do
|
|
system "gfortran", "-o", "test", pkgshare/"tch1dn.f", pkgshare/"utils.f",
|
|
"-fallow-argument-mismatch",
|
|
"-L#{lib}", "-lqrupdate",
|
|
"-L#{Formula["openblas"].opt_lib}", "-lopenblas"
|
|
assert_match "PASSED 4 FAILED 0", shell_output("./test")
|
|
end
|
|
end
|