homebrew-core/Formula/uhd.rb

54 lines
1.6 KiB
Ruby
Raw Normal View History

2015-08-26 10:10:14 +00:00
class Uhd < Formula
desc "Hardware driver for all USRP devices."
homepage "http://files.ettus.com/manual/"
url "https://github.com/EttusResearch/uhd/archive/release_003_009_001.tar.gz"
sha256 "e2059c34bea2aaca31eb8d3501ce7b535b559775d3050ed5c30946c34146a92e"
2015-08-26 10:10:14 +00:00
head "https://github.com/EttusResearch/uhd.git"
2015-08-29 02:05:06 +00:00
bottle do
2015-09-20 01:02:31 +00:00
sha256 "e013a49457a34e404dc6a286b32eeca286f7f28eb68e3c052f5913472099a77d" => :el_capitan
sha256 "00c4833d41b74f0f9515147bce77c9959dda9934760ef473acc5a08519e7530c" => :yosemite
sha256 "9ae282ffd9b883a695d9cb5e595781e5bc5543ef4e3a6f1a75e323a0fcb838e9" => :mavericks
2015-08-29 02:05:06 +00:00
end
2015-08-26 10:10:14 +00:00
option :universal
depends_on "cmake" => :build
depends_on "boost"
depends_on "libusb"
depends_on :python if MacOS.version <= :snow_leopard
depends_on "doxygen" => [:build, :optional]
depends_on "gpsd" => :optional
2015-08-26 10:10:14 +00:00
resource "Mako" do
url "https://pypi.python.org/packages/source/M/Mako/Mako-1.0.2.tar.gz"
sha256 "2550c2e4528820db68cbcbe668add5c71ab7fa332b7eada7919044bf8697679e"
2015-08-26 10:10:14 +00:00
end
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
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
resource("Mako").stage do
system "python", *Language::Python.setup_install_args(libexec/"vendor")
2015-08-26 10:10:14 +00:00
end
mkdir "host/build" do
system "cmake", "..", *args
system "make"
system "make", "test"
system "make", "install"
end
end
test do
assert_match version.to_s, shell_output("#{bin}/uhd_find_devices --help", 1).chomp
end
end