xref: /libbtbb/packaging/libbtbb.rb (revision 12f90b5e480f734477496aff4e7d7bea01c978f9)
1require 'formula'
2
3class Libbtbb < Formula
4  homepage 'https://github.com/greatscottgadgets/libbtbb'
5  url 'https://github.com/greatscottgadgets/libbtbb/archive/2014-02-R1.tar.gz'
6  sha256 '91a0dafcb9911d6ca4959fdd8d2aaa5d2cfa76c9754757505898def08da7d5a3'
7  version '2014-02-R1'
8
9  head 'https://github.com/greatscottgadgets/libbtbb.git'
10
11  option :universal
12
13  depends_on 'cmake' => :build
14  depends_on :python
15
16  def install
17    if build.universal?
18      ENV.universal_binary
19      ENV['CMAKE_OSX_ARCHITECTURES'] = Hardware::CPU.universal_archs.as_cmake_arch_flags
20    end
21    mkdir "build" do
22      system "cmake", "..", *std_cmake_args
23      system "make install"
24    end
25  end
26end
27