aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2011-03-19 09:49:39 -0700
committerAdam Vandenberg2011-03-19 09:49:39 -0700
commit55ec0b33053dda7c1d73035e89f5d7655b13e74d (patch)
treec8da0d248d74e6660690639ebc5ed39f99e59fda /Library
parent4f63836bb76be0feaafc13e1f64ab4499c40468c (diff)
downloadhomebrew-55ec0b33053dda7c1d73035e89f5d7655b13e74d.tar.bz2
bazaar: use new arch methods and fix usage of system Python
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/bazaar.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/Library/Formula/bazaar.rb b/Library/Formula/bazaar.rb
index eff160b18..6cb157325 100644
--- a/Library/Formula/bazaar.rb
+++ b/Library/Formula/bazaar.rb
@@ -20,11 +20,17 @@ class Bazaar < Formula
ENV.prepend "PATH", "/System/Library/Frameworks/Python.framework/Versions/Current/bin", ":"
end
- # Find the archs of the Python we are building against.
- # If the python includes PPC support, then don't use Intel-
- # specific compiler flags
- archs = archs_for_command("python")
- ENV.minimal_optimization if archs.include? :ppc64 or archs.include? :ppc7400
+ # 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"
+ python_cmd = "/usr/bin/python"
+ else
+ python_cmd = "python"
+ end
+
+ archs = archs_for_command("python_cmd")
+ archs.remove_ppc!
+ ENV['ARCHFLAGS'] = archs.as_arch_flags
system "make"
inreplace "bzr", "#! /usr/bin/env python", "#!/usr/bin/python" if ARGV.include? "--system"