ledger: ofx support

Closes Homebrew/homebrew#17354.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Andrew Childs 2013-01-28 13:23:35 +13:00 committed by Adam Vandenberg
parent 4c054b7f20
commit 2fac1ebc10

View file

@ -18,6 +18,7 @@ class Ledger < Formula
depends_on 'pcre'
depends_on 'expat'
depends_on 'cmake' if build.head?
depends_on 'libofx' => :optional unless build.head?
def patches
p = {:p1 => []}
@ -35,8 +36,14 @@ class Ledger < Formula
system "./acprep", *args
system "cmake", "-D", "CMAKE_INSTALL_PREFIX=#{prefix}", "-P", "build/cmake_install.cmake"
else
args = []
if build.with? 'libofx'
args << "--enable-ofx"
# the libofx.h appears to have moved to a subdirectory
ENV.append 'CXXFLAGS', "-I#{Formula.factory('libofx').opt_prefix}/include/libofx"
end
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
"--prefix=#{prefix}", *args
system 'make'
ENV.deparallelize
system 'make install'