diff options
| author | Sven Köhler | 2015-01-23 17:43:38 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-25 11:06:52 +0000 |
| commit | 3c5f747ca2ed1ba26c04637e093285262232ab12 (patch) | |
| tree | e84f0e4ff3a9fb2ed2746c5e17a769b71e612e31 /Library | |
| parent | 5705dec76a409deafe6782059a837fd0b5ec475e (diff) | |
| download | homebrew-3c5f747ca2ed1ba26c04637e093285262232ab12.tar.bz2 | |
solid: fix building on clang.
Patched two small bugs in code, that prevented solid from building
successfully. Also updated style on formula, and fixed some issues pointed out
by `brew audit --strict`.
Closes #36166.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/solid.rb | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/Library/Formula/solid.rb b/Library/Formula/solid.rb index 78ce75693..9d06aad5f 100644 --- a/Library/Formula/solid.rb +++ b/Library/Formula/solid.rb @@ -1,20 +1,25 @@ -require 'formula' - class Solid < Formula - homepage 'http://www.dtecta.com/' - url 'http://www.dtecta.com/files/solid-3.5.6.tgz' - sha1 'bd0afef7842f826c270cff32fc23994aec0b0d65' + homepage "http://www.dtecta.com/" + url "http://www.dtecta.com/files/solid-3.5.6.tgz" + sha1 "bd0afef7842f826c270cff32fc23994aec0b0d65" + + deprecated_option "enable-doubles" => "with-doubles" + deprecated_option "enable-tracer" => "with-tracer" - option 'enable-doubles', 'Use internal double precision floats' - option 'enable-tracer', 'Use rounding error tracer' + option "with-doubles", "Use internal double precision floats" + option "with-tracer", "Use rounding error tracer" + + # This patch fixes a broken build on clang-600.0.56. + # Was reported to bugs@dtecta.com (since it also applies to solid-3.5.6) + patch :DATA def install args = ["--disable-dependency-tracking", "--disable-debug", "--prefix=#{prefix}", - "--infodir=#{info}" ] - args << '--enable-doubles' if build.include? 'enable-doubles' - args << '--enable-tracer' if build.include? 'enable-tracer' + "--infodir=#{info}"] + args << "--enable-doubles" if build.with? "doubles" + args << "--enable-tracer" if build.with? "tracer" system "./configure", *args @@ -23,6 +28,32 @@ class Solid < Formula # for the GLUT library are not platform independent inreplace "Makefile", " examples ", " " - system "make install" + system "make", "install" end end + +__END__ +diff --git a/include/MT/Quaternion.h b/include/MT/Quaternion.h +index 3726b4f..3393697 100644 +--- a/include/MT/Quaternion.h ++++ b/include/MT/Quaternion.h +@@ -154,7 +154,7 @@ namespace MT { + + Quaternion<Scalar> inverse() const + { +- return conjugate / length2(); ++ return conjugate() / length2(); + } + + Quaternion<Scalar> slerp(const Quaternion<Scalar>& q, const Scalar& t) const +diff --git a/src/complex/DT_CBox.h b/src/complex/DT_CBox.h +index 7fc7c5d..16ce972 100644 +--- a/src/complex/DT_CBox.h ++++ b/src/complex/DT_CBox.h +@@ -131,4 +131,6 @@ inline DT_CBox operator-(const DT_CBox& b1, const DT_CBox& b2) + b1.getExtent() + b2.getExtent()); + } + ++inline DT_CBox computeCBox(MT_Scalar margin, const MT_Transform& xform); ++ + #endif |
