forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
triangle.rb
32 lines (27 loc) · 869 Bytes
/
triangle.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class Triangle < Formula
homepage "https://www.cs.cmu.edu/~quake/triangle.html"
url "http://www.netlib.org/voronoi/triangle.zip"
version "1.6"
sha256 "1766327add038495fa3499e9b7cc642179229750f7201b94f8e1b7bee76f8480"
depends_on :x11
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