2014-05-22 17:17:52 +00:00
|
|
|
require "formula"
|
2010-04-12 20:52:53 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Tbb < Formula
|
2014-05-22 17:17:52 +00:00
|
|
|
homepage "http://www.threadingbuildingblocks.org/"
|
2014-08-08 16:02:08 +00:00
|
|
|
url "https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb42_20140601oss_src.tgz"
|
|
|
|
sha1 "f50c04a27f5e37c920a03be134dc57ccf909515d"
|
|
|
|
version "4.2.5"
|
2010-04-12 20:52:53 +00:00
|
|
|
|
2014-08-08 16:39:45 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "1acf91deb5540f1ed153c3ece947146f84e52946" => :mavericks
|
|
|
|
sha1 "0e2799b23f8a7ee446fe49b986d1d8cc308ae755" => :mountain_lion
|
|
|
|
sha1 "626775355972feb9cbcf7a786c109112f36fd746" => :lion
|
|
|
|
end
|
|
|
|
|
2013-11-14 18:42:52 +00:00
|
|
|
option :cxx11
|
|
|
|
|
2010-04-12 20:52:53 +00:00
|
|
|
def install
|
2011-10-27 20:20:11 +00:00
|
|
|
# Intel sets varying O levels on each compile command.
|
|
|
|
ENV.no_optimization
|
2014-05-22 17:17:52 +00:00
|
|
|
|
|
|
|
args = %W[tbb_build_prefix=BUILDPREFIX]
|
|
|
|
|
|
|
|
case ENV.compiler
|
|
|
|
when :clang
|
|
|
|
args << "compiler=clang"
|
|
|
|
else
|
|
|
|
args << "compiler=gcc"
|
|
|
|
end
|
|
|
|
|
|
|
|
if MacOS.prefer_64_bit?
|
|
|
|
args << "arch=intel64"
|
|
|
|
else
|
|
|
|
args << "arch=ia32"
|
|
|
|
end
|
|
|
|
|
|
|
|
if build.cxx11?
|
|
|
|
ENV.cxx11
|
|
|
|
args << "cpp0x=1" << "stdlib=libc++"
|
|
|
|
end
|
|
|
|
|
2010-04-12 20:52:53 +00:00
|
|
|
system "make", *args
|
2014-05-22 17:17:52 +00:00
|
|
|
lib.install Dir["build/BUILDPREFIX_release/*.dylib"]
|
|
|
|
include.install "include/tbb"
|
2010-04-12 20:52:53 +00:00
|
|
|
end
|
|
|
|
end
|