diff options
| author | Jack Nagel | 2014-05-22 12:17:52 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-05-22 12:17:56 -0500 | 
| commit | ff946ab38fce281bb79248a308894260491d93c9 (patch) | |
| tree | d4f4103cd42cfc1c82d63efca208322ce914c1da | |
| parent | 92e1fdd9311fddf71821882f46cb4d662b1f9b88 (diff) | |
| download | homebrew-ff946ab38fce281bb79248a308894260491d93c9.tar.bz2 | |
tbb 4.2.4
 - Fix LLVM failure
| -rw-r--r-- | Library/Formula/tbb.rb | 47 | 
1 files changed, 28 insertions, 19 deletions
| diff --git a/Library/Formula/tbb.rb b/Library/Formula/tbb.rb index 093f2a1c3..5dd266c8d 100644 --- a/Library/Formula/tbb.rb +++ b/Library/Formula/tbb.rb @@ -1,30 +1,39 @@ -require 'formula' +require "formula"  class Tbb < Formula -  homepage 'http://www.threadingbuildingblocks.org/' -  url 'https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb42_20140122oss_src.tgz' -  sha1 'd897a6ced4f425c6608422a2e19218898e727260' -  version '4.2.3' +  homepage "http://www.threadingbuildingblocks.org/" +  url "https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb42_20140416oss_src.tgz" +  sha1 "1285471b4dce67cf3edf20a071db37f4f205bcf1" +  version "4.2.4"    option :cxx11 -  fails_with :llvm do -    cause 'llvm is not supported on macos. Add build/macos.llvm.inc file with compiler-specific settings.' -  end -    def install      # Intel sets varying O levels on each compile command.      ENV.no_optimization -    ENV.cxx11 if build.cxx11? -    # Override build prefix so we can copy the dylibs out of the same place -    # no matter what system we're on, and use our compilers. -    compiler = ENV.compiler.to_s.start_with?('gcc') ? 'gcc' : ENV.compiler -    args = ['tbb_build_prefix=BUILDPREFIX', -            "compiler=#{compiler}"] -    args << (MacOS.prefer_64_bit? ? "arch=intel64" : "arch=ia32") -    args << "cpp0x=1" << "stdlib=libc++" if build.cxx11? + +    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 +      system "make", *args -    lib.install Dir['build/BUILDPREFIX_release/*.dylib'] -    include.install 'include/tbb' +    lib.install Dir["build/BUILDPREFIX_release/*.dylib"] +    include.install "include/tbb"    end  end | 
