aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libbtbb.rb
blob: c39e96b6375447d618dc1f6ea70eec3cd69471ec (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
require "formula"

class Libbtbb < Formula
  homepage "https://github.com/greatscottgadgets/libbtbb"
  url "https://github.com/greatscottgadgets/libbtbb/archive/2014-02-R2.tar.gz"
  sha1 "aa94b7d92465704aa647123f11e906491a26d090"
  version "2014-02-R2"

  head "https://github.com/greatscottgadgets/libbtbb.git"

  bottle do
    cellar :any
    sha1 "a845a9b2f08b398f965e377710fcefe85732cc7d" => :mavericks
    sha1 "41deb429b9c4b4fb5b06678db333c47c343fe19f" => :mountain_lion
    sha1 "e46bb90fd4bf1954857bfef864fd6839114e9b50" => :lion
  end

  option :universal

  depends_on "cmake" => :build
  depends_on "python"

  def install
    args = std_cmake_args

    if build.universal?
      ENV.universal_binary
      args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}"
    end

    mkdir "build" do
      system "cmake", "..", *args
      system "make", "install"
    end
  end
end