homebrew-core/Formula/admesh.rb

37 lines
1.3 KiB
Ruby
Raw Normal View History

2014-09-20 10:55:48 +00:00
class Admesh < Formula
desc "Processes triangulated solid meshes"
2014-09-20 10:55:48 +00:00
homepage "https://github.com/admesh/admesh"
url "https://github.com/admesh/admesh/releases/download/v0.98.3/admesh-0.98.3.tar.gz"
sha256 "b349c835383b6648fd159e528a530fdcb31aed95024d7a294280ac8096ec7624"
2014-09-20 10:55:48 +00:00
bottle do
cellar :any
2017-03-20 09:58:41 +00:00
sha256 "3de4fbc48e0d5ca620bb5fa9cb20d18065fa00fa0c007109473bd495e17686d1" => :sierra
sha256 "a2de7016b2356c0e2e860c80999bd27edd9967fb85069ed33c60b9dcd35f725b" => :el_capitan
sha256 "3f3db422de01a8e239d7ef6027d0264d3857feac781ef739072b6ec0d50894a0" => :yosemite
end
2014-09-20 10:55:48 +00:00
def install
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make", "install"
end
test do
# Test file is the beginning of block.stl from admesh's source
2014-09-21 03:57:55 +00:00
(testpath/"test.stl").write <<-EOS.undent
SOLID Untitled1
FACET NORMAL 0.00000000E+00 0.00000000E+00 1.00000000E+00
OUTER LOOP
VERTEX -1.96850394E+00 1.96850394E+00 1.96850394E+00
VERTEX -1.96850394E+00 -1.96850394E+00 1.96850394E+00
VERTEX 1.96850394E+00 -1.96850394E+00 1.96850394E+00
ENDLOOP
ENDFACET
ENDSOLID Untitled1
EOS
system "#{bin}/admesh", "test.stl"
2014-09-20 10:55:48 +00:00
end
end