Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cutest 2.0.57 #72

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 26 additions & 17 deletions cutest.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
class Cutest < Formula

Check warning on line 1 in cutest.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

No bottle built for cutest!

cutest has unbottled dependencies, so a bottle will not be built.
desc "Constrained and Unconstrained Testing Environment on steroids"
homepage "https://github.com/ralna/CUTEst/wiki"
url "https://github.com/ralna/CUTEst/archive/v2.0.2.tar.gz"
sha256 "16ff35ff5956dfc6715250a26f7e5fa171b166fea5a60aeee2d6e232b22de954"
revision 2
url "https://github.com/ralna/CUTEst/archive/refs/tags/v2.0.57.tar.gz"
sha256 "279d4350cc3044e2450593993131d41dab53da15304575d61b1ceb03b5c05107"

head "https://github.com/ralna/CUTEst.git"

Expand All @@ -16,6 +15,7 @@

option "with-matlab", "Compile with Matlab support"
option "without-single", "Compile without single support"
option "without-quadruple", "Compile without quadruple support"

depends_on "gcc"

Expand All @@ -27,47 +27,51 @@
patch :DATA

def install
ENV.deparallelize
toolset = build.with?("matlab") ? "1" : "2"
single = build.with?("single") ? "y" : "n"
precisions = build.with?("single") ? ["single", "double"] : ["double"]
quadruple = build.with?("quadruple") ? "y" : "n"
precisions = ["double"]
build.with?("single") && precisions.append("single")
build.with?("quadruple") && precisions.append("quadruple")

if OS.mac?
machine, key = Hardware::CPU.is_64_bit? ? %w[mac64 13] : %w[mac 12]
machine, key = Hardware::CPU.is_64_bit? ? %w[mac64 2] : %w[mac 4]
arch = "osx"
fcomp = "2"
ccomp = "5"
fcomp = "4"
ccomp = "3"
Pathname.new("cutest.input").write <<~EOF
#{key}
#{fcomp}
n#{fcomp}
#{toolset}
#{ccomp}
nnyd#{single}
nnyd#{single}#{quadruple}
EOF
else
machine = "pc64"
arch = "lnx"
fcomp = "5"
fcomp = "8"
ccomp = "7"
Pathname.new("cutest.input").write <<~EOF
6
2
#{fcomp}
1
1
n#{fcomp}
#{toolset}
#{ccomp}
nnyd#{single}
nnyd#{single}#{quadruple}
EOF
end

ENV["ARCHDEFS"] = Formula["archdefs"].opt_libexec
ENV["SIFDECODE"] = Formula["sifdecode"].opt_libexec
system "./install_cutest < cutest.input"
ENV.deparallelize do
system "./install_cutest < cutest.input"
end

# Build shared libraries.
if OS.mac?
so = "dylib"
all_load = "-Wl,-all_load"
noall_load = "-Wl,-noall_load"
noall_load = ""
extra = ["-Wl,-undefined", "-Wl,dynamic_lookup", "-headerpad_max_install_names"]
else
so = "so"
Expand Down Expand Up @@ -104,6 +108,11 @@
ln_sf "#{libexec}/objects/#{machine}.#{arch}.#{compiler}/single/libcutest_single.#{so}",
"#{lib}/libcutest_single.#{so}"
end
if build.with? "quadruple"
ln_sf "#{libexec}/objects/#{machine}.#{arch}.#{compiler}/quadruple/libcutest.a", "#{lib}/libcutest_quadruple.a"
ln_sf "#{libexec}/objects/#{machine}.#{arch}.#{compiler}/quadruple/libcutest_quadruple.#{so}",
"#{lib}/libcutest_quadruple.#{so}"
end

s = <<~EOS
export CUTEST=#{opt_libexec}
Expand Down
Loading