2010-03-13 09:10:05 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Ledger < Formula
|
2012-02-24 22:51:33 +00:00
|
|
|
homepage 'http://ledger-cli.org'
|
2011-09-12 00:21:30 +00:00
|
|
|
url 'ftp://ftp.newartisans.com/pub/ledger/ledger-2.6.3.tar.gz'
|
|
|
|
md5 '6d5d8396b1cdde5f605854c7d21d1460'
|
2012-02-24 22:51:33 +00:00
|
|
|
|
2011-05-27 05:02:55 +00:00
|
|
|
head 'https://github.com/jwiegley/ledger.git', :branch => 'next'
|
2010-03-13 09:10:05 +00:00
|
|
|
|
|
|
|
depends_on 'gettext'
|
|
|
|
depends_on 'boost'
|
|
|
|
depends_on 'mpfr'
|
|
|
|
depends_on 'gmp'
|
|
|
|
depends_on 'pcre'
|
|
|
|
depends_on 'expat'
|
|
|
|
|
2012-01-21 18:24:08 +00:00
|
|
|
def options
|
|
|
|
[['--no-python', 'Disable Python support']]
|
|
|
|
end
|
|
|
|
|
2010-03-13 09:10:05 +00:00
|
|
|
def install
|
2012-02-24 22:51:33 +00:00
|
|
|
# find Homebrew's libpcre
|
|
|
|
ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib"
|
|
|
|
|
|
|
|
unless ARGV.build_head?
|
2010-03-13 09:10:05 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
|
|
|
|
else
|
|
|
|
# gmp installs x86_64 only
|
|
|
|
inreplace 'acprep', "'-arch', 'i386', ", "" if Hardware.is_64_bit?
|
2012-01-21 18:24:08 +00:00
|
|
|
no_python = ((ARGV.include? '--no-python') ? '--no-python' : '')
|
2012-05-15 18:31:21 +00:00
|
|
|
system "./acprep", no_python, "-j#{ENV.make_jobs}", "opt", "make", "--", "--prefix=#{prefix}"
|
2010-03-13 09:10:05 +00:00
|
|
|
end
|
2011-09-12 00:21:30 +00:00
|
|
|
system 'make'
|
|
|
|
ENV.deparallelize
|
|
|
|
system 'make install'
|
2010-03-13 09:10:05 +00:00
|
|
|
end
|
|
|
|
end
|