2010-10-10 19:12:56 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Triangle < Formula
|
2010-10-10 19:12:56 +00:00
|
|
|
homepage 'http://www.cs.cmu.edu/~quake/triangle.html'
|
|
|
|
url 'http://www.netlib.org/voronoi/triangle.zip'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '63d11e0b5bf097eb946a4da4ee18ddf279e16fc4'
|
2010-10-10 19:12:56 +00:00
|
|
|
version '1.6'
|
|
|
|
|
2012-11-11 23:16:42 +00:00
|
|
|
depends_on :x11
|
|
|
|
|
2010-10-10 19:12:56 +00:00
|
|
|
def install
|
|
|
|
inreplace 'makefile' do |s|
|
2012-11-11 23:16:42 +00:00
|
|
|
s.gsub! '-DLINUX', ''
|
|
|
|
s.remove_make_var! 'CC'
|
2010-10-10 19:12:56 +00:00
|
|
|
end
|
|
|
|
|
2012-11-11 23:16:42 +00:00
|
|
|
system 'make'
|
|
|
|
system 'make', 'trilibrary'
|
|
|
|
system 'ar', 'r', 'libtriangle.a', 'triangle.o'
|
2010-10-10 19:12:56 +00:00
|
|
|
|
|
|
|
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
|