aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2012-08-08 22:10:00 -0700
committerAdam Vandenberg2012-08-08 22:10:00 -0700
commit9bc35da47afb8234709fbf4a0db69ccb27651168 (patch)
tree7f99ef7ca7a148db9aeae5c795e92c22b13c53fd
parent07cb22a03fbb2da002821da0608f7de120d69539 (diff)
downloadhomebrew-9bc35da47afb8234709fbf4a0db69ccb27651168.tar.bz2
bazaar: use options dsl
-rw-r--r--Library/Formula/bazaar.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/Library/Formula/bazaar.rb b/Library/Formula/bazaar.rb
index 9aaf4f570..d231822a0 100644
--- a/Library/Formula/bazaar.rb
+++ b/Library/Formula/bazaar.rb
@@ -5,9 +5,7 @@ class Bazaar < Formula
url 'https://launchpad.net/bzr/2.5/2.5.1/+download/bzr-2.5.1.tar.gz'
md5 'ac5079858364a046071000d5cdccb67b'
- def options
- [["--system", "Install using the OS X system Python."]]
- end
+ option "system", "Install using the OS X system Python."
def install
ENV.j1 # Builds aren't parallel-safe
@@ -16,13 +14,13 @@ class Bazaar < Formula
system "make man1/bzr.1"
man1.install "man1/bzr.1"
- if ARGV.include? "--system"
+ if build.include? "--system"
ENV.prepend "PATH", "/System/Library/Frameworks/Python.framework/Versions/Current/bin", ":"
end
# Find the arch for the Python we are building against.
# We remove 'ppc' support, so we can pass Intel-optimized CFLAGS.
- if ARGV.include? "--system"
+ if build.include? "--system"
python_cmd = "/usr/bin/python"
else
python_cmd = "python"
@@ -33,14 +31,13 @@ class Bazaar < Formula
ENV['ARCHFLAGS'] = archs.as_arch_flags
system "make"
- inreplace "bzr", "#! /usr/bin/env python", "#!/usr/bin/python" if ARGV.include? "--system"
+ inreplace "bzr", "#! /usr/bin/env python", "#!/usr/bin/python" if build.include? "--system"
libexec.install 'bzr', 'bzrlib'
bin.install_symlink libexec+'bzr'
end
- def caveats
- <<-EOS.undent
+ def caveats; <<-EOS.undent
We've built a "standalone" version of bazaar and installed its libraries to:
#{libexec}