2010-03-16 21:52:24 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Ode < Formula
|
2010-03-16 21:52:24 +00:00
|
|
|
homepage 'http://www.ode.org/'
|
2012-05-18 00:45:38 +00:00
|
|
|
url 'http://sourceforge.net/projects/opende/files/ODE/0.12/ode-0.12.tar.bz2'
|
2012-07-29 19:13:13 +00:00
|
|
|
sha1 '10e7aae6cc6b1afe523ed52e76afd5e06461ea93'
|
2012-05-18 00:45:38 +00:00
|
|
|
|
2010-10-20 04:33:35 +00:00
|
|
|
head 'http://opende.svn.sourceforge.net/svnroot/opende/trunk'
|
2010-03-16 21:52:24 +00:00
|
|
|
|
2012-08-03 10:37:18 +00:00
|
|
|
option 'enable-double-precision', 'Compile ODE with double precision'
|
|
|
|
|
2012-07-29 19:13:13 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
|
2012-08-27 05:49:12 +00:00
|
|
|
if build.head?
|
2012-08-03 10:37:18 +00:00
|
|
|
depends_on :automake
|
|
|
|
depends_on :libtool
|
2012-02-28 15:39:22 +00:00
|
|
|
end
|
|
|
|
|
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'
|
|
|
|
|
2012-08-27 05:49:12 +00:00
|
|
|
if build.head?
|
2012-05-18 00:45:38 +00:00
|
|
|
ENV['LIBTOOLIZE'] = 'glibtoolize'
|
|
|
|
inreplace 'autogen.sh', 'libtoolize', '$LIBTOOLIZE'
|
|
|
|
system "./autogen.sh"
|
|
|
|
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
|