diff options
| author | Charlie Sharpsteen | 2010-10-10 12:12:56 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-10-25 21:51:30 -0700 |
| commit | 9e36868bf43f8657762f478a0ac7054787c59850 (patch) | |
| tree | 97448900fc3aed0e9967685b622e3c83b0ff751f /Library/Formula/triangle.rb | |
| parent | a2d245b68b15f47427d17fe465b3b2e66ee5d0bd (diff) | |
| download | homebrew-9e36868bf43f8657762f478a0ac7054787c59850.tar.bz2 | |
New formula for Triangle
Triangle is a library and command-line tool that generates triangular meshes
through Delunay Triangulation with exact arithmetic. Such meshes are suitable
for use in such applications as Finite Element analysis.
Also included is a X11 program called `showme` which is useful for visualizing
triangular meshes.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/triangle.rb')
| -rw-r--r-- | Library/Formula/triangle.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Library/Formula/triangle.rb b/Library/Formula/triangle.rb new file mode 100644 index 000000000..a2fe32a1a --- /dev/null +++ b/Library/Formula/triangle.rb @@ -0,0 +1,32 @@ +require 'formula' + +class Triangle <Formula + homepage 'http://www.cs.cmu.edu/~quake/triangle.html' + url 'http://www.netlib.org/voronoi/triangle.zip' + md5 '10aff8d7950f5e0e2fb6dd2e340be2c9' + version '1.6' + + def install + inreplace 'makefile' do |s| + s.gsub! "-DLINUX", "" + s.remove_make_var! "CC" + end + + system "make" + system "make trilibrary" + system "ar r libtriangle.a triangle.o" + + bin.install %w(triangle showme) + lib.install 'libtriangle.a' + include.install 'triangle.h' + doc.install %w(README A.poly tricall.c) + end + + def caveats; <<-EOS.undent + Triangle is distributed under a license that places restrictions on how + the code or library may be used in commercial products. See the README + file for more info: + #{prefix}/README + EOS + end +end |
