From 5c5524494fdccde7fb9d4a2eb2e2a2590345198a Mon Sep 17 00:00:00 2001 From: nibbles 2bits Date: Mon, 19 Nov 2012 15:27:22 -0800 Subject: [PATCH] boost: fix building with icu by using with-c++11 boost needs the `--with-c++11` option if it's going to build with icu4c-50.1. This is partially due to a change in icu4c, as the previous version compiled into boost without error. The current icu4c-50.1 does pass `make check`. - Enable the c++11 if when the user throws `--with-icu`. Fixes #16144 --- Library/Formula/boost.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Library/Formula/boost.rb b/Library/Formula/boost.rb index 30149bac75c0..b05b9c86b38f 100644 --- a/Library/Formula/boost.rb +++ b/Library/Formula/boost.rb @@ -50,7 +50,7 @@ class Boost < Formula # Patch boost/config/stdlib/libcpp.hpp to fix the constexpr bug reported under Boost 1.52 in Ticket # 7671. This patch can be removed when upstream release an updated version including the fix. def patches - if MacOS.version >= :lion and build.include? 'with-c++11' + if MacOS.version >= :lion and ( build.include? 'with-c++11' or build.include? 'with-icu' ) {:p0 => "https://svn.boost.org/trac/boost/raw-attachment/ticket/7671/libcpp_c11_numeric_limits.patch"} end end @@ -83,7 +83,8 @@ def install # we specify libdir too because the script is apparently broken bargs = ["--prefix=#{prefix}", "--libdir=#{lib}"] - bargs << "--with-toolset=clang" if build.include? "with-c++11" + bargs << "--with-toolset=clang" if build.include? "with-c++11" or + build.include? 'with-icu' if build.include? 'with-icu' icu4c_prefix = Formula.factory('icu4c').opt_prefix @@ -101,7 +102,7 @@ def install "threading=multi", "install"] - if MacOS.version >= :lion and build.include? 'with-c++11' + if MacOS.version >= :lion and ( build.include? 'with-c++11' or build.include? 'with-icu' ) args << "toolset=clang" << "cxxflags=-std=c++11" args << "cxxflags=-stdlib=libc++" << "cxxflags=-fPIC" args << "linkflags=-stdlib=libc++"