aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/tbb.rb
blob: dd32392b6e3aa6d17193ee834d731c81522bed13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require "formula"

class Tbb < Formula
  homepage "http://www.threadingbuildingblocks.org/"
  url "https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb43_20141023oss_src.tgz"
  sha1 "aaecdc97049fbe3c623be46c4e1261b74a1a41a3"
  version "4.3-20141023"

  bottle do
    cellar :any
    sha1 "f3111568e5b600345ca518027771a5169fa4f981" => :yosemite
    sha1 "79e0ed2f2f78f7686a22f155df083ed3a678159a" => :mavericks
    sha1 "ef6d80cc918ee3a2305cf470cb81c48b48e73bd2" => :mountain_lion
  end

  # requires malloc features first introduced in Lion
  # https://github.com/Homebrew/homebrew/issues/32274
  depends_on :macos => :lion

  option :cxx11

  def install
    # Intel sets varying O levels on each compile command.
    ENV.no_optimization

    args = %W[tbb_build_prefix=BUILDPREFIX]

    if build.cxx11?
      ENV.cxx11
      args << "cpp0x=1" << "stdlib=libc++"
    end

    system "make", *args
    lib.install Dir["build/BUILDPREFIX_release/*.dylib"]
    include.install "include/tbb"
  end
end