Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
wants to merge 1 commit into from

4 participants

@humm

Sometimes, you need ODE in double precision. This makes it convenient. I adapted the code for the imagemagick formula. I hope this is the right way to do it.

@humm

Could somebody could take a look at this pull request ? It's small, uncontroversial and useful.

@swrede

+1 for this pull request. The current formula is causing really unnecessary documentation issues if one wants double precision.

@Juxi

+1 for this pull request also from me.
without it getting double precision in ode is a bit of a hack...

@adamv
Owner

Is there a reason this should not always be enabled? What if we end up with things that depend on ODE being compiled both ways?

@humm

We have two choices :
1. The careful one : we just add the possibility of double precision through an option. It doesn't affect anybody (anymore than now) unless people that know what they are doing.
2. The optimist one : we activate double precision by default. I don't know enough about this issue to recommend or argue against such a decision.

@adamv adamv closed this pull request from a commit
@humm humm ode: add --enable-double-precision
Closes #13912.
8fdf612
@adamv adamv closed this in 8fdf612
@yourabi yourabi referenced this pull request from a commit
@humm humm ode: add --enable-double-precision
Closes #13912.
776d8ce
@dholm dholm referenced this pull request from a commit in dholm/homebrew
@humm humm ode: add --enable-double-precision
Closes #13912.
a1a4312
@guyzmo guyzmo referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@cooljeanius cooljeanius referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@rajeeja rajeeja referenced this pull request from a commit
@humm humm ode: add --enable-double-precision
Closes #13912.
74c14ed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 3, 2012
  1. @humm
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 1 deletion.
  1. +17 −1 Library/Formula/ode.rb
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
Something went wrong with that request. Please try again.