xref: /libbtbb/packaging/libbtbb.rb (revision 2ab29bdbe9996680e304751c319366ed1ee6620e)
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
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