xref: /libbtbb/packaging/libbtbb.rb (revision 1cf1ba495a2d196ae37284f01d95eb862a76f638)
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
14  def install
15    if build.universal?
16      ENV.universal_binary
17      ENV['CMAKE_OSX_ARCHITECTURES'] = Hardware::CPU.universal_archs.as_cmake_arch_flags
18    end
19    mkdir "build" do
20      system "cmake", "..", *std_cmake_args
21      system "make install"
22    end
23  end
24end
25