Added --enable-double-precision option to ode formula #13912

Closed
wants to merge 1 commit into
from
View
18 Library/Formula/ode.rb
@@ -1,5 +1,9 @@
require 'formula'
+def double_precision?
+ ARGV.include? '--enable-double-precision'
+end
+
class Ode < Formula
homepage 'http://www.ode.org/'
url 'http://sourceforge.net/projects/opende/files/ODE/0.12/ode-0.12.tar.bz2'
@@ -15,13 +19,25 @@ class Ode < Formula
depends_on 'libtool' => :build
end
+ def options
+ [
+ ['--enable-double-precision', 'Compile ODE with double precision'],
+ ]
+ end
+
def install
+
+ args = [ "--prefix=#{prefix}",
+ "--disable-demos"]
+
+ args << "--enable-double-precision" if double_precision?
+
if ARGV.build_head?
ENV['LIBTOOLIZE'] = 'glibtoolize'
inreplace 'autogen.sh', 'libtoolize', '$LIBTOOLIZE'
system "./autogen.sh"
end
- system "./configure", "--prefix=#{prefix}", "--disable-demos"
+ system "./configure", *args
system "make"
system "make install"
end