Skip to content
This repository

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

Closed
wants to merge 1 commit into from

4 participants

Fabien Benureau swrede Juxi Adam Vandenberg
Fabien Benureau
humm commented August 03, 2012

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.

Fabien Benureau
humm commented August 21, 2012

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...

Adam Vandenberg
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?

Fabien Benureau

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.

Adam Vandenberg adamv closed this pull request from a commit August 03, 2012
Fabien Benureau ode: add --enable-double-precision
Closes #13912.
8fdf612
Adam Vandenberg adamv closed this in 8fdf612 January 08, 2013
Yousef Ourabi yourabi referenced this pull request from a commit August 03, 2012
Fabien Benureau ode: add --enable-double-precision
Closes #13912.
776d8ce
David Holm dholm referenced this pull request from a commit in dholm/homebrew August 03, 2012
Fabien Benureau ode: add --enable-double-precision
Closes #13912.
a1a4312
guyzmo guyzmo referenced this pull request from a commit January 16, 2013
Commit has since been removed from the repository and is no longer available.
Eric Gallager cooljeanius referenced this pull request from a commit February 18, 2013
Commit has since been removed from the repository and is no longer available.
Rajeev Jain rajeeja referenced this pull request from a commit April 19, 2013
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Aug 03, 2012
Fabien Benureau Added --enable-double-precision option to ode formula c58960d
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 17 additions and 1 deletion. Show diff stats Hide diff stats

  1. 18  Library/Formula/ode.rb
18  Library/Formula/ode.rb
... ...
@@ -1,5 +1,9 @@
1 1
 require 'formula'
2 2
 
  3
+def double_precision?
  4
+  ARGV.include? '--enable-double-precision'
  5
+end
  6
+
3 7
 class Ode < Formula
4 8
   homepage 'http://www.ode.org/'
5 9
   url 'http://sourceforge.net/projects/opende/files/ODE/0.12/ode-0.12.tar.bz2'
@@ -15,13 +19,25 @@ class Ode < Formula
15 19
     depends_on 'libtool' => :build
16 20
   end
17 21
 
  22
+  def options
  23
+    [
  24
+      ['--enable-double-precision', 'Compile ODE with double precision'],
  25
+    ]
  26
+  end
  27
+
18 28
   def install
  29
+    
  30
+    args = [ "--prefix=#{prefix}",
  31
+             "--disable-demos"]
  32
+    
  33
+    args << "--enable-double-precision" if double_precision?
  34
+    
19 35
     if ARGV.build_head?
20 36
       ENV['LIBTOOLIZE'] = 'glibtoolize'
21 37
       inreplace 'autogen.sh', 'libtoolize', '$LIBTOOLIZE'
22 38
       system "./autogen.sh"
23 39
     end
24  
-    system "./configure", "--prefix=#{prefix}", "--disable-demos"
  40
+    system "./configure", *args
25 41
     system "make"
26 42
     system "make install"
27 43
   end
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.