diff options
| author | Jack Nagel | 2014-06-05 17:35:30 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-05 17:35:33 -0500 |
| commit | 0b6eef56f5901fb3381d4c876506b72cd13cfb87 (patch) | |
| tree | dfc7cc65529a2c2b62f57320e2221339f544b5a3 | |
| parent | 7782e10f777bfa56b00bdae324e294fbf500ae79 (diff) | |
| download | homebrew-0b6eef56f5901fb3381d4c876506b72cd13cfb87.tar.bz2 | |
ledger: fix --with-python build
| -rw-r--r-- | Library/Formula/ledger.rb | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/Library/Formula/ledger.rb b/Library/Formula/ledger.rb index 7043ba2a6..4aeea75ac 100644 --- a/Library/Formula/ledger.rb +++ b/Library/Formula/ledger.rb @@ -19,12 +19,17 @@ class Ledger < Formula option 'debug', 'Build with debugging symbols enabled' - depends_on 'boost' - depends_on 'mpfr' - depends_on 'gmp' + depends_on "cmake" => :build + depends_on "ninja" => :build + depends_on "mpfr" + depends_on "gmp" depends_on :python => :optional - depends_on 'cmake' => :build - depends_on 'ninja' => :build + + if build.with? "python" + depends_on "boost" => "with-python" + else + depends_on "boost" + end def install (buildpath/'lib/utfcpp').install resource('utfcpp') @@ -43,19 +48,16 @@ class Ledger < Formula # We need to tell CMake explicitly where our default python lives. # Inspired by # https://github.com/Homebrew/homebrew/blob/51d054c/Library/Formula/opencv.rb - args << '--python' << '--' - + args << "--python" << "--" python_prefix = `python-config --prefix`.strip - args << "-DPYTHON_LIBRARY='#{python_prefix}/Python'" - args << "-DPYTHON_INCLUDE_DIR='#{python_prefix}/Headers'" + args << "-DPYTHON_LIBRARY=#{python_prefix}/Python" + args << "-DPYTHON_INCLUDE_DIR=#{python_prefix}/Headers" end system "./acprep", *args (share+'ledger/examples').install Dir['test/input/*.dat'] (share+'ledger').install 'contrib' - if build.with? 'python' - (share+'ledger').install 'python/demo.py' - end + (share+"ledger").install "python/demo.py" if build.with? "python" end test do |
