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' md5 'dd49767bfb726b0c774f7db0cef91ed1'
def install 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" "to functions when linking with the boost library"
# Adjust the name the libs are installed under to include the path to the # 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` # otool -L `which mkvmerge`
# /Users/cehoffman/.homebrew/bin/mkvmerge: # /usr/local/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)
# libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0) # 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_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) # 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: # /usr/local/bin/mkvmerge:
# /Users/cehoffman/.homebrew/Cellar/libvorbis/1.2.3/lib/libvorbis.0.dylib (compatibility version 5.0.0, current version 5.3.0) # /usr/local/lib/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
# /Users/cehoffman/.homebrew/Cellar/libogg/1.1.4/lib/libogg.0.dylib (compatibility version 7.0.0, current version 7.0.0) # /usr/local/lib/libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
# /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) # /usr/local/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
# /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5) inreplace 'tools/build/v2/tools/darwin.jam', '-install_name "', "-install_name \"#{HOMEBREW_PREFIX}/lib/"
# /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/"
# Force boost to compile using the GCC 4.2 compiler # Force boost to compile using the GCC 4.2 compiler
open("user-config.jam", "a") do |file| open("user-config.jam", "a") do |file|
@ -51,7 +32,13 @@ class Boost <Formula
end end
# we specify libdir too because the script is apparently broken # we specify libdir too because the script is apparently broken
system "./bootstrap.sh --prefix='#{prefix}' --libdir='#{lib}'" 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 "./bjam", "--prefix=#{prefix}",
"--libdir=#{lib}",
"-j#{Hardware.processor_count}",
"--layout=tagged",
"--user-config=user-config.jam",
"threading=multi",
"install"
end end
end end