aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDavid Nadlinger2011-01-17 00:42:48 +0100
committerMike McQuaid2011-01-20 22:31:39 +0000
commit65155a240af45820c7792c29ca935a0bdc25b3b1 (patch)
tree45730cf56e8f033f9566fcd6a1a6a3b41726f7cf /Library
parent209566e7a4e70bdff8f3a8528f191cb50db01147 (diff)
downloadhomebrew-65155a240af45820c7792c29ca935a0bdc25b3b1.tar.bz2
Support for building universal binaries of boost.
Closes #3915. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/boost.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/Library/Formula/boost.rb b/Library/Formula/boost.rb
index 6c0b7b8ce..9b82d83b5 100644
--- a/Library/Formula/boost.rb
+++ b/Library/Formula/boost.rb
@@ -9,6 +9,10 @@ class Boost <Formula
[['--with-mpi', "Enables MPI support"]]
end
+ def options
+ [["--universal", "Build universal binaries."]]
+ end
+
def install
fails_with_llvm "LLVM-GCC causes errors with dropped arguments to "+
"functions when linking with boost"
@@ -37,6 +41,9 @@ class Boost <Formula
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"
+
# we specify libdir too because the script is apparently broken
system "./bootstrap.sh", "--prefix=#{prefix}", "--libdir=#{lib}"
system "./bjam", "--prefix=#{prefix}",
@@ -45,6 +52,7 @@ class Boost <Formula
"--layout=tagged",
"--user-config=user-config.jam",
"threading=multi",
- "install"
+ "install",
+ *additional_jam_args
end
end