Closes #18066.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2017-09-14 01:17:05 -07:00
parent 72a11e0d60
commit 4db979491e

View file

@ -1,9 +1,8 @@
class Tbb < Formula
desc "Rich and complete approach to parallelism in C++"
homepage "https://www.threadingbuildingblocks.org/"
url "https://github.com/01org/tbb/archive/2017_U7.tar.gz"
version "2017_U7"
sha256 "78ad6ec9dd492b9dcc4753938b06716f7458506084adc138ced09aa0aa609b6b"
url "https://github.com/01org/tbb/archive/2018.tar.gz"
sha256 "94f643f1edfaccb57d64b503c7c96f00dec64e8635c054bbaa33855d72c5822d"
bottle do
cellar :any
@ -21,9 +20,6 @@ class Tbb < Formula
depends_on :python if MacOS.version <= :snow_leopard
depends_on "swig" => :build
# Patch clang C++11 support (reported upstream by email)
patch :DATA
def install
compiler = (ENV.compiler == :clang) ? "clang" : "gcc"
args = %W[tbb_build_prefix=BUILDPREFIX compiler=#{compiler}]
@ -58,15 +54,3 @@ class Tbb < Formula
system "./test"
end
end
__END__
--- a/include/tbb/tbb_config.h
+++ b/include/tbb/tbb_config.h
@@ -740,7 +740,7 @@
// The implicit upcasting of the tuple of a reference of a derived class to a base class fails on icc 13.X if the system's gcc environment is 4.8
// Also in gcc 4.4 standard library the implementation of the tuple<&> conversion (tuple<A&> a = tuple<B&>, B is inherited from A) is broken.
-#if __GXX_EXPERIMENTAL_CXX0X__ && ((__INTEL_COMPILER >=1300 && __INTEL_COMPILER <=1310 && __TBB_GLIBCXX_VERSION>=40700) || (__TBB_GLIBCXX_VERSION < 40500))
+#if __GXX_EXPERIMENTAL_CXX0X__ && !__clang__ && ((__INTEL_COMPILER >=1300 && __INTEL_COMPILER <=1310 && __TBB_GLIBCXX_VERSION>=40700) || (__TBB_GLIBCXX_VERSION < 40500))
#define __TBB_UPCAST_OF_TUPLE_OF_REF_BROKEN 1
#endif