homebrew-core/Formula/uhd.rb

53 lines
1.8 KiB
Ruby

class Uhd < Formula
desc "Hardware driver for all USRP devices"
homepage "https://files.ettus.com/manual/"
url "https://github.com/EttusResearch/uhd/archive/v4.0.0.0.tar.gz"
sha256 "4f3513c43edf0178391ed5755266864532716b8b503bcfb9a983ae6256c51b14"
license all_of: ["GPL-3.0-or-later", "LGPL-3.0-or-later", "MIT", "BSD-3-Clause", "Apache-2.0"]
revision 1
head "https://github.com/EttusResearch/uhd.git"
livecheck do
url :stable
strategy :github_latest
end
bottle do
sha256 arm64_big_sur: "098213c91123486b73640dea181811f24089b910dc4b06dc416f6893890a545a"
sha256 big_sur: "082d0aa874d4fe5c14f5fb095c387b73a03d7b178f28223735cd0b65720686fe"
sha256 catalina: "ce3eb00e862e1d0799b0f6c36b890aa7ce8e224e4a1c37e90b0ad22edc5d3a8e"
sha256 mojave: "52ba3ba2fa2b05eef1811a34285bcb54ae49cdb81e6a9441114cd0f5106830aa"
end
depends_on "cmake" => :build
depends_on "doxygen" => :build
depends_on "boost"
depends_on "libusb"
depends_on "python@3.9"
resource "Mako" do
url "https://files.pythonhosted.org/packages/5c/db/2d2d88b924aa4674a080aae83b59ea19d593250bfe5ed789947c21736785/Mako-1.1.4.tar.gz"
sha256 "17831f0b7087c313c0ffae2bcbbd3c1d5ba9eeac9c38f2eb7b50e8c99fe9d5ab"
end
def install
xy = Language::Python.major_minor_version Formula["python@3.9"].opt_bin/"python3"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages"
resource("Mako").stage do
system Formula["python@3.9"].opt_bin/"python3",
*Language::Python.setup_install_args(libexec/"vendor")
end
mkdir "host/build" do
system "cmake", "..", *std_cmake_args, "-DENABLE_TESTS=OFF"
system "make"
system "make", "install"
end
end
test do
assert_match version.to_s, shell_output("#{bin}/uhd_config_info --version")
end
end