Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
boost: fix building with icu by using with-c++11
Browse files Browse the repository at this point in the history
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 Homebrew#16144
  • Loading branch information
nibbles 2bits committed Nov 19, 2012
1 parent 88468f3 commit 5c55244
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Library/Formula/boost.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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++"
Expand Down

0 comments on commit 5c55244

Please sign in to comment.