2010-03-16 21:52:24 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Ode < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Library for simulating articulated rigid body dynamics"
|
2010-03-16 21:52:24 +00:00
|
|
|
homepage 'http://www.ode.org/'
|
2015-01-05 17:56:25 +00:00
|
|
|
url 'https://bitbucket.org/odedevs/ode/downloads/ode-0.13.1.tar.gz'
|
|
|
|
sha1 '2fea08792e8f0fe606e929097fbec78ba926bcab'
|
2012-05-18 00:45:38 +00:00
|
|
|
|
2015-01-05 18:16:35 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "f4c142dc1276434e7482955e6932182065c9131c" => :yosemite
|
|
|
|
sha1 "f69f17cd9bf1eed526959049c41cf3f28caed0da" => :mavericks
|
|
|
|
sha1 "ca4743cc4e6cdce4ada98187f139c3e2acb4facb" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2013-09-22 01:47:32 +00:00
|
|
|
head do
|
2015-01-05 17:56:25 +00:00
|
|
|
url 'http://bitbucket.org/odedevs/ode/', :using => :hg
|
2010-03-16 21:52:24 +00:00
|
|
|
|
2014-12-04 22:38:02 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
2012-02-28 15:39:22 +00:00
|
|
|
end
|
|
|
|
|
2013-09-22 01:47:32 +00:00
|
|
|
option 'enable-double-precision', 'Compile ODE with double precision'
|
2015-01-05 17:56:25 +00:00
|
|
|
option 'enable-shared', 'Compile ODE with shared library support'
|
2014-04-30 12:06:04 +00:00
|
|
|
option 'enable-libccd', 'enable all libccd colliders (except box-cylinder)'
|
2013-09-22 01:47:32 +00:00
|
|
|
|
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
|
2010-03-16 21:52:24 +00:00
|
|
|
def install
|
2012-08-03 10:37:18 +00:00
|
|
|
args = ["--prefix=#{prefix}",
|
|
|
|
"--disable-demos"]
|
|
|
|
args << "--enable-double-precision" if build.include? 'enable-double-precision'
|
2015-01-05 17:56:25 +00:00
|
|
|
args << "--enable-shared" if build.include? 'enable-shared'
|
2014-04-30 12:06:04 +00:00
|
|
|
args << "--enable-libccd" if build.include? "enable-libccd"
|
2012-08-03 10:37:18 +00:00
|
|
|
|
2012-08-27 05:49:12 +00:00
|
|
|
if build.head?
|
2012-05-18 00:45:38 +00:00
|
|
|
ENV['LIBTOOLIZE'] = 'glibtoolize'
|
2015-01-05 17:56:25 +00:00
|
|
|
inreplace 'bootstrap', 'libtoolize', '$LIBTOOLIZE'
|
|
|
|
system "./bootstrap"
|
2012-05-18 00:45:38 +00:00
|
|
|
end
|
2012-08-03 10:37:18 +00:00
|
|
|
system "./configure", *args
|
2010-03-16 21:52:24 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|