metis: migrate from homebrew/science
Closes #15838. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
44d5925ad9
commit
cdacbf0316
1 changed files with 27 additions and 0 deletions
27
Formula/metis.rb
Normal file
27
Formula/metis.rb
Normal file
|
@ -0,0 +1,27 @@
|
|||
class Metis < Formula
|
||||
desc "Programs that partition graphs and order matrices"
|
||||
homepage "http://glaros.dtc.umn.edu/gkhome/views/metis"
|
||||
url "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz"
|
||||
sha256 "76faebe03f6c963127dbb73c13eab58c9a3faeae48779f049066a21c087c5db2"
|
||||
|
||||
depends_on "cmake" => :build
|
||||
|
||||
def install
|
||||
system "make", "config", "prefix=#{prefix}", "shared=1"
|
||||
system "make", "install"
|
||||
|
||||
pkgshare.install "graphs"
|
||||
end
|
||||
|
||||
test do
|
||||
["4elt", "copter2", "mdual"].each do |g|
|
||||
cp pkgshare/"graphs/#{g}.graph", testpath
|
||||
system "#{bin}/graphchk", "#{g}.graph"
|
||||
system "#{bin}/gpmetis", "#{g}.graph", "2"
|
||||
system "#{bin}/ndmetis", "#{g}.graph"
|
||||
end
|
||||
cp [pkgshare/"graphs/test.mgraph", pkgshare/"graphs/metis.mesh"], testpath
|
||||
system "#{bin}/gpmetis", "test.mgraph", "2"
|
||||
system "#{bin}/mpmetis", "metis.mesh", "2"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue