aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/mpfi.rb
blob: c24129eb5d6b56a8352b97a1297cdbd78f0c68c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require 'formula'

class Mpfi < Formula
  homepage 'http://perso.ens-lyon.fr/nathalie.revol/software.html'
  url 'https://gforge.inria.fr/frs/download.php/30130/mpfi-1.5.1.tar.gz'
  sha1 '288302c0cdefe823cc3aa71de31c1da82eeb6ad0'

  depends_on 'gmp'
  depends_on 'mpfr'

  option '32-bit'

  def install
    args = %W[--disable-dependency-tracking --prefix=#{prefix}]

    # Build 32-bit where appropriate, and help configure find 64-bit CPUs
    # Note: This logic should match what the GMP formula does.
    if MacOS.prefer_64_bit? and not build.include? '32-bit'
      ENV.m64
      args << '--build=x86_64-apple-darwin'
    else
      ENV.m32
      args << '--build=none-apple-darwin'
    end

    system './configure', *args
    system 'make'
    system 'make install'
  end
end