aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/ledger.rb
blob: f1aefa48440a3ef3ea565a7134a80738e9eb6ade (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
require 'formula'

class Ledger <Formula
  url 'ftp://ftp.newartisans.com/pub/ledger/ledger-2.6.2.tar.gz'
  md5 'b2e6fa98e7339d1e130b1ea9af211c0f'
  homepage 'http://www.newartisans.com/software/ledger.html'
  head 'git://github.com/jwiegley/ledger.git', :branch => 'next'

  depends_on 'gettext'
  depends_on 'boost'
  depends_on 'mpfr'
  depends_on 'gmp'
  depends_on 'pcre'
  depends_on 'expat'

  def install
    unless 'HEAD' == @version
      system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
    else
      # gmp installs x86_64 only
      inreplace 'acprep', "'-arch', 'i386', ", "" if Hardware.is_64_bit?
      system "./acprep -j#{Hardware.processor_count} opt make -- --prefix=#{prefix}"
    end
    system "make install"
  end
end