xref: /libbtbb/packaging/libbtbb.rb (revision e9c4bdccf7e3385bf9cde436c2e5be41b183e64f)
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
8  head 'https://github.com/greatscottgadgets/libbtbb.git'
9
10  option :universal
11
12  depends_on 'cmake' => :build
13  depends_on 'python'
14
15  def install
16    if build.universal?
17      ENV.universal_binary
18      ENV['CMAKE_OSX_ARCHITECTURES'] = Hardware::CPU.universal_archs.as_cmake_arch_flags
19    end
20    mkdir "build" do
21      system "cmake", "..", *std_cmake_args
22      system "make install"
23    end
24  end
25end
26