Reformat boost a bit

This commit is contained in:
Adam Vandenberg 2010-07-09 16:36:52 -07:00
parent 515a0c3399
commit 8bbca11387

View file

@ -6,44 +6,25 @@ class Boost <Formula
md5 'dd49767bfb726b0c774f7db0cef91ed1'
def install
fails_with_llvm "the standard llvm-gcc causes errors with dropped arugments "+
fails_with_llvm "the standard llvm-gcc causes errors with dropped arguments "+
"to functions when linking with the boost library"
# Adjust the name the libs are installed under to include the path to the
# Homebrew lib directory. It has the following effect:
# Homebrew lib directory so executables will work when isntalled to a non-/usr/local location.
#
# otool -L `which mkvmerge`
# /Users/cehoffman/.homebrew/bin/mkvmerge:
# /Users/cehoffman/.homebrew/Cellar/libvorbis/1.2.3/lib/libvorbis.0.dylib (compatibility version 5.0.0, current version 5.3.0)
# /Users/cehoffman/.homebrew/Cellar/libogg/1.1.4/lib/libogg.0.dylib (compatibility version 7.0.0, current version 7.0.0)
# /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
# /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
# /usr/lib/libexpat.1.dylib (compatibility version 7.0.0, current version 7.2.0)
# /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
# /usr/local/bin/mkvmerge:
# libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
# libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
# libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
# /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
# /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
#
# becomes
# becomes:
#
# /Users/cehoffman/.homebrew/bin/mkvmerge:
# /Users/cehoffman/.homebrew/Cellar/libvorbis/1.2.3/lib/libvorbis.0.dylib (compatibility version 5.0.0, current version 5.3.0)
# /Users/cehoffman/.homebrew/Cellar/libogg/1.1.4/lib/libogg.0.dylib (compatibility version 7.0.0, current version 7.0.0)
# /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
# /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
# /usr/lib/libexpat.1.dylib (compatibility version 7.0.0, current version 7.2.0)
# /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
# /Users/cehoffman/.homebrew/lib/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
# /Users/cehoffman/.homebrew/lib/libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
# /Users/cehoffman/.homebrew/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
# /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
# /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
#
# Hence executables that link against the boost library will work when
# Homebrew is installed in a non standard location
inreplace 'tools/build/v2/tools/darwin.jam', '-install_name "', "-install_name \"#{`brew --prefix`.strip}/lib/"
# /usr/local/bin/mkvmerge:
# /usr/local/lib/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
# /usr/local/lib/libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
# /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
open("user-config.jam", "a") do |file|
@ -51,7 +32,13 @@ class Boost <Formula
end
# we specify libdir too because the script is apparently broken
system "./bootstrap.sh --prefix='#{prefix}' --libdir='#{lib}'"
system "./bjam -j#{Hardware.processor_count} --layout=tagged --prefix='#{prefix}' --libdir='#{lib}' --user-config=user-config.jam threading=multi install"
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"
end
end