diff options
| author | Alexis Hildebrandt | 2012-09-05 13:24:31 +0200 |
|---|---|---|
| committer | Adam Vandenberg | 2012-09-13 07:09:11 -0700 |
| commit | acb1f7f78e729b4158c269f8f4f89a1eaded06c6 (patch) | |
| tree | a0cd522634e0e2f9983c6d7a8601e0b39275f447 /Library/Formula/ledger.rb | |
| parent | d9cc750f8418594627717857066bc5e43a43c626 (diff) | |
| download | homebrew-acb1f7f78e729b4158c269f8f4f89a1eaded06c6.tar.bz2 | |
ledger: update HEAD build to acprep and cmake
The upstream repository switched to acprep and cmake and made
several changes to the build process when building ledger 3.0 (HEAD).
This commit includes:
Change option to enable python support (disabled by default in acprep)
Add option to enable debug build
Add option to apply time-colon patch
Closes #14730.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/ledger.rb')
| -rw-r--r-- | Library/Formula/ledger.rb | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Library/Formula/ledger.rb b/Library/Formula/ledger.rb index a07ef997a..27c5ef6e7 100644 --- a/Library/Formula/ledger.rb +++ b/Library/Formula/ledger.rb @@ -7,7 +7,9 @@ class Ledger < Formula head 'https://github.com/jwiegley/ledger.git', :branch => 'next' - option 'no-python', 'Disable Python support' + option 'debug', 'Build with debugging symbols enabled' + option 'python', 'Enable Python support' + option 'time-colon', 'Apply time-colon patch' depends_on 'gettext' depends_on 'boost' @@ -15,22 +17,29 @@ class Ledger < Formula depends_on 'gmp' depends_on 'pcre' depends_on 'expat' + depends_on 'cmake' if build.head? + + def patches + p = {:p1 => []} + p[:p1] << 'https://raw.github.com/gist/856799/66158f9f3b732d658f5d0784407ec63a0be33746/ledger_time_colon.patch' if build.include? 'time-colon' + p + end def install # find Homebrew's libpcre ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib" if build.head? - # gmp installs x86_64 only - inreplace 'acprep', "'-arch', 'i386', ", "" if Hardware.is_64_bit? - no_python = ((build.include? 'no-python') ? '--no-python' : '') - system "./acprep", no_python, "-j#{ENV.make_jobs}", "opt", "make", "--", "--prefix=#{prefix}" + args = [((build.include? 'debug') ? 'debug' : 'opt'), "make", "-j#{ENV.make_jobs}", "--output=build"] + args << '--python' if build.include? 'python' + system "./acprep", *args + system "cmake", "-D", "CMAKE_INSTALL_PREFIX=#{prefix}", "-P", "build/cmake_install.cmake" else system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" + system 'make' + ENV.deparallelize + system 'make install' end - system 'make' - ENV.deparallelize - system 'make install' end end |
