blob: 95a1c5a975d1707c9dba5ada1e3c8748fd6714e1 (
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 Librtlsdr < Formula
  homepage "http://sdr.osmocom.org/trac/wiki/rtl-sdr"
  head "git://git.osmocom.org/rtl-sdr.git", :shallow => false
  url "https://github.com/steve-m/librtlsdr/archive/v0.5.3.tar.gz"
  sha1 "f6f20f7b0562a6d3f7b9ff7bff38a15bff175982"
  bottle do
    cellar :any
    revision 1
    sha1 "8680ce437b474e7032b29cb74707a83dccd31a94" => :yosemite
    sha1 "c1e932c691bf46a96c254907201dbf00165f33e5" => :mavericks
    sha1 "e9acc1e44e8cf4c6814b1dee47ea226a24a06d9e" => :mountain_lion
  end
  option :universal
  depends_on "pkg-config" => :build
  depends_on "cmake" => :build
  depends_on "libusb"
  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
 |