homebrew-core/Formula/ode.rb

47 lines
1.4 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Ode < Formula
desc "Library for simulating articulated rigid body dynamics"
homepage 'http://www.ode.org/'
url 'https://bitbucket.org/odedevs/ode/downloads/ode-0.13.1.tar.gz'
sha1 '2fea08792e8f0fe606e929097fbec78ba926bcab'
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
url 'http://bitbucket.org/odedevs/ode/', :using => :hg
2014-12-04 22:38:02 +00:00
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
2013-09-22 01:47:32 +00:00
option 'enable-double-precision', 'Compile ODE with double precision'
option 'enable-shared', 'Compile ODE with shared library support'
option 'enable-libccd', 'enable all libccd colliders (except box-cylinder)'
2013-09-22 01:47:32 +00:00
depends_on 'pkg-config' => :build
def install
args = ["--prefix=#{prefix}",
"--disable-demos"]
args << "--enable-double-precision" if build.include? 'enable-double-precision'
args << "--enable-shared" if build.include? 'enable-shared'
args << "--enable-libccd" if build.include? "enable-libccd"
2012-08-27 05:49:12 +00:00
if build.head?
ENV['LIBTOOLIZE'] = 'glibtoolize'
inreplace 'bootstrap', 'libtoolize', '$LIBTOOLIZE'
system "./bootstrap"
end
system "./configure", *args
system "make"
system "make install"
end
end