-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
/
uhd.rb
53 lines (43 loc) 路 1.65 KB
/
uhd.rb
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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_000.tar.gz"
sha256 "36acbad244270972446383c64577aa9c6171cfee7e9e94a300c287454c736a05"
head "https://github.com/EttusResearch/uhd.git"
bottle do
sha256 "c1ef5c34f15a2a49ee31ec78a64f2b84b445a23c71722a8045872aaffd092127" => :yosemite
sha256 "09bc2c3e1cd960106e290d372401403d1117d6afebf8733061fa6e8e91cf69d7" => :mavericks
sha256 "c7e7164248fc83cd496ca622306b785d2490aea1552c1dc463c247f03297a009" => :mountain_lion
end
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
resource "Mako" do
url "https://pypi.python.org/packages/source/M/Mako/Mako-1.0.2.tar.gz"
sha256 "2550c2e4528820db68cbcbe668add5c71ab7fa332b7eada7919044bf8697679e"
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")
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