2014-02-07 09:00:21 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Librtlsdr < Formula
|
|
|
|
homepage "http://sdr.osmocom.org/trac/wiki/rtl-sdr"
|
2014-04-19 22:53:11 +00:00
|
|
|
head "git://git.osmocom.org/rtl-sdr.git", :shallow => false
|
2014-02-07 09:00:21 +00:00
|
|
|
url "https://github.com/steve-m/librtlsdr/archive/v0.5.3.tar.gz"
|
|
|
|
sha1 "f6f20f7b0562a6d3f7b9ff7bff38a15bff175982"
|
|
|
|
|
2014-07-03 21:00:26 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "8bc76582e3464d4fa380e2fb3bf91d71a697b1b2" => :mavericks
|
|
|
|
sha1 "aafd6ee6cfe60cfc5d9ff9c4ed76893bf71873eb" => :mountain_lion
|
|
|
|
sha1 "24a67d577ad05261285acc8cfb03cb2a34afabfa" => :lion
|
|
|
|
end
|
|
|
|
|
2014-04-20 23:27:58 +00:00
|
|
|
option :universal
|
|
|
|
|
2014-02-07 09:00:21 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "cmake" => :build
|
|
|
|
depends_on "libusb"
|
|
|
|
|
|
|
|
def install
|
2014-05-10 03:54:53 +00:00
|
|
|
args = std_cmake_args
|
|
|
|
|
2014-04-20 23:27:58 +00:00
|
|
|
if build.universal?
|
|
|
|
ENV.universal_binary
|
2014-05-10 03:54:53 +00:00
|
|
|
args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}"
|
2014-04-20 23:27:58 +00:00
|
|
|
end
|
|
|
|
|
2014-05-10 03:54:53 +00:00
|
|
|
mkdir "build" do
|
|
|
|
system "cmake", "..", *args
|
|
|
|
system "make install"
|
|
|
|
end
|
2014-02-07 09:00:21 +00:00
|
|
|
end
|
|
|
|
end
|