7c648d9732
When interpolating in strings passed to Formula#system, it should be done in such a way that if any interpolated variables contain spaces, they are either (a) passed as part of a list or (b) protected by quotes if they are part of a long string (which is subject to shell expansion). Otherwise, they will be split on the space when expanded by the shell and passed as multiple arguments to whatever process is being executed. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
37 lines
1 KiB
Ruby
37 lines
1 KiB
Ruby
require 'formula'
|
|
|
|
class Ledger < Formula
|
|
homepage 'http://ledger-cli.org'
|
|
url 'ftp://ftp.newartisans.com/pub/ledger/ledger-2.6.3.tar.gz'
|
|
md5 '6d5d8396b1cdde5f605854c7d21d1460'
|
|
|
|
head 'https://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 options
|
|
[['--no-python', 'Disable Python support']]
|
|
end
|
|
|
|
def install
|
|
# find Homebrew's libpcre
|
|
ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib"
|
|
|
|
unless ARGV.build_head?
|
|
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
|
|
else
|
|
# gmp installs x86_64 only
|
|
inreplace 'acprep', "'-arch', 'i386', ", "" if Hardware.is_64_bit?
|
|
no_python = ((ARGV.include? '--no-python') ? '--no-python' : '')
|
|
system "./acprep", no_python, "-j#{ENV.make_jobs}", "opt", "make", "--", "--prefix=#{prefix}"
|
|
end
|
|
system 'make'
|
|
ENV.deparallelize
|
|
system 'make install'
|
|
end
|
|
end
|