aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/ledger.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2012-09-03 14:00:00 -0700
committerAdam Vandenberg2012-09-03 14:00:00 -0700
commitf00e34416e36e481fe6cd1dffa4d0f2b183fbf03 (patch)
treebf80ca1799eadb02457ec1f2e733dc4abec9e5b4 /Library/Formula/ledger.rb
parenta3528f977b7039814a7e2f7a97e7ce4a9945c050 (diff)
downloadhomebrew-f00e34416e36e481fe6cd1dffa4d0f2b183fbf03.tar.bz2
ledger: use new dsl
Diffstat (limited to 'Library/Formula/ledger.rb')
-rw-r--r--Library/Formula/ledger.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/Library/Formula/ledger.rb b/Library/Formula/ledger.rb
index c158e847b..a07ef997a 100644
--- a/Library/Formula/ledger.rb
+++ b/Library/Formula/ledger.rb
@@ -7,6 +7,8 @@ class Ledger < Formula
head 'https://github.com/jwiegley/ledger.git', :branch => 'next'
+ option 'no-python', 'Disable Python support'
+
depends_on 'gettext'
depends_on 'boost'
depends_on 'mpfr'
@@ -14,21 +16,18 @@ class Ledger < Formula
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
+ if build.head?
# gmp installs x86_64 only
inreplace 'acprep', "'-arch', 'i386', ", "" if Hardware.is_64_bit?
- no_python = ((ARGV.include? '--no-python') ? '--no-python' : '')
+ no_python = ((build.include? 'no-python') ? '--no-python' : '')
system "./acprep", no_python, "-j#{ENV.make_jobs}", "opt", "make", "--", "--prefix=#{prefix}"
+ else
+ system "./configure", "--disable-debug", "--disable-dependency-tracking",
+ "--prefix=#{prefix}"
end
system 'make'
ENV.deparallelize