aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2011-04-01 17:39:55 -0700
committerAdam Vandenberg2011-04-01 17:39:55 -0700
commit17ab50d045b1a455a75918104bea45ec876a4c4e (patch)
tree5cdce9a404d7c01238c7d14df0740747d6a42433 /Library/Formula
parent009fbc33bd55a932d7ed7f91aa825a8a05b6e897 (diff)
downloadhomebrew-17ab50d045b1a455a75918104bea45ec876a4c4e.tar.bz2
boost - add warning about universal and python
A universal build of boost will expect a universal build of Python.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/boost.rb31
1 files changed, 20 insertions, 11 deletions
diff --git a/Library/Formula/boost.rb b/Library/Formula/boost.rb
index a80cc1762..081129319 100644
--- a/Library/Formula/boost.rb
+++ b/Library/Formula/boost.rb
@@ -15,6 +15,15 @@ class Boost < Formula
fails_with_llvm "LLVM-GCC causes errors with dropped arguments to functions when linking with boost"
def install
+ if ARGV.include? "--universal"
+ archs = archs_for_command("python")
+ unless archs.universal?
+ opoo "A universal build was requested, but Python is not a universal build"
+ puts "Boost compiles against the Python it finds in the path; if this Python"
+ puts "is not a universal build then linking will likely fail."
+ end
+ end
+
# Adjust the name the libs are installed under to include the path to the
# Homebrew lib directory so executables will work when installed to a
# non-/usr/local location.
@@ -33,24 +42,24 @@ class Boost < Formula
# /usr/local/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
inreplace 'tools/build/v2/tools/darwin.jam', '-install_name "', "-install_name \"#{HOMEBREW_PREFIX}/lib/"
- # Force boost to compile using the GCC 4.2 compiler
+ # Force boost to compile using the appropriate GCC version
open("user-config.jam", "a") do |file|
file.write "using darwin : : #{ENV['CXX']} ;\n"
file.write "using mpi ;\n" if ARGV.include? '--with-mpi'
end
- additional_jam_args = []
- additional_jam_args << "address-model=32_64" << "pch=off" if ARGV.include? "--universal"
+ args = ["--prefix=#{prefix}",
+ "--libdir=#{lib}",
+ "-j#{Hardware.processor_count}",
+ "--layout=tagged",
+ "--user-config=user-config.jam",
+ "threading=multi",
+ "install"]
+
+ args << "address-model=32_64" << "pch=off" if ARGV.include? "--universal"
# we specify libdir too because the script is apparently broken
system "./bootstrap.sh", "--prefix=#{prefix}", "--libdir=#{lib}"
- system "./bjam", "--prefix=#{prefix}",
- "--libdir=#{lib}",
- "-j#{Hardware.processor_count}",
- "--layout=tagged",
- "--user-config=user-config.jam",
- "threading=multi",
- "install",
- *additional_jam_args
+ system "./bjam", *args
end
end