aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorNibbles 2bits2011-09-23 01:00:15 -0700
committerCharlie Sharpsteen2011-09-23 17:18:57 -0700
commit8e667b2cbeb4ea1950219db88eaea3a1c566bcac (patch)
tree8fd3b1c003f9b8d318f707d0358e902d2731e491 /Library/Formula
parentf026f270d28cfa94c33cf1c303352a4d86d01ce9 (diff)
downloadhomebrew-8e667b2cbeb4ea1950219db88eaea3a1c566bcac.tar.bz2
New Formula: solid
This is a new formula for a C++ library called Solid that is used for collision detection between objects in 3D space. This formula exposes two options to the user, for issues of precision and rounding error. This also fixes #5282 and compiles well, using llvm 2335, gcc-4.2.1, and clang from XCode 4.0.2 on 64bit 10.6.8. This builds shared and static native libraries. This is the final opensource release of this software. Closes #7776. Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/solid.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/Library/Formula/solid.rb b/Library/Formula/solid.rb
new file mode 100644
index 000000000..01f6dfe38
--- /dev/null
+++ b/Library/Formula/solid.rb
@@ -0,0 +1,32 @@
+require 'formula'
+
+class Solid < Formula
+ url 'http://www.dtecta.com/files/solid-3.5.6.tgz'
+ homepage 'http://www.dtecta.com/'
+ sha1 'bd0afef7842f826c270cff32fc23994aec0b0d65'
+
+ def options
+ [
+ [ '--enable-doubles', 'Use internal double precision floats' ],
+ [ '--enable-tracer', 'Use rounding error tracer' ]
+ ]
+ end
+
+ def install
+ args = ["--disable-dependency-tracking",
+ "--disable-debug",
+ "--prefix=#{prefix}",
+ "--infodir=#{info}" ]
+ args << '--enable-doubles' if ARGV.include? '--enable-doubles'
+ args << '--enable-tracer' if ARGV.include? '--enable-tracer'
+
+ system "./configure", *args
+
+ # exclude the examples from compiling!
+ # the examples do not compile because the include statements
+ # for the GLUT library are not platform independent
+ inreplace "Makefile", " examples ", " "
+
+ system "make install"
+ end
+end \ No newline at end of file