diff options
| author | Xiyue Deng | 2013-07-17 22:17:45 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2013-07-18 15:36:22 -0700 |
| commit | 8ab1cdd66b28e7dc02ef1177cb8c561752344642 (patch) | |
| tree | 4807a4306fafe2d044ee7efea866317c1f5eb316 /Library/Formula | |
| parent | d73f44c314543ef7ee71e9eae10ac8a3bd3fbd68 (diff) | |
| download | homebrew-8ab1cdd66b28e7dc02ef1177cb8c561752344642.tar.bz2 | |
boost: enable single/multi/shared/static libs.
* Add option to disable single threading variant.
* Add option to disable static library variant.
* Drop unneeded "--with-system-layout" option.
Closes #21298.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/boost.rb | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Library/Formula/boost.rb b/Library/Formula/boost.rb index 71e26a7ce..f4fa0998f 100644 --- a/Library/Formula/boost.rb +++ b/Library/Formula/boost.rb @@ -31,7 +31,8 @@ class Boost < Formula option :universal option 'with-icu', 'Build regexp engine with icu support' option 'with-c++11', 'Compile using Clang, std=c++11 and stdlib=libc++' if MacOS.version >= :lion - option 'use-system-layout', 'Use system layout instead of tagged' + option 'without-single', 'Disable building single-threading variant' + option 'without-static', 'Disable building static library variant' depends_on :python => :recommended depends_on UniversalPython if build.universal? and build.with? "python" @@ -113,16 +114,26 @@ class Boost < Formula # on such systems. bargs << "--without-libraries=log" if MacOS.version <= :snow_leopard - boost_layout = (build.include? "use-system-layout") ? "system" : "tagged" args = ["--prefix=#{prefix}", "--libdir=#{lib}", "-d2", "-j#{ENV.make_jobs}", - "--layout=#{boost_layout}", + "--layout=tagged", "--user-config=user-config.jam", - "threading=multi", "install"] + if build.include? 'without-single' + args << "threading=multi" + else + args << "threading=multi,single" + end + + if build.include? 'without-static' + args << "link=shared" + else + args << "link=shared,static" + end + if MacOS.version >= :lion and build.with? 'c++11' args << "toolset=clang" << "cxxflags=-std=c++11" args << "cxxflags=-stdlib=libc++" << "cxxflags=-fPIC" |
