homebrew-core/Formula/uhd.rb

56 lines
1.9 KiB
Ruby

class Uhd < Formula
desc "Hardware driver for all USRP devices"
homepage "https://files.ettus.com/manual/"
# The build system uses git to recover version information
url "https://github.com/EttusResearch/uhd.git",
tag: "v4.0.0.0",
revision: "90ce6062b6b5df2eddeee723777be85108e4e7c7"
license all_of: ["GPL-3.0-or-later", "LGPL-3.0-or-later", "MIT", "BSD-3-Clause", "Apache-2.0"]
revision 2
head "https://github.com/EttusResearch/uhd.git"
livecheck do
url :stable
strategy :github_latest
end
bottle do
sha256 arm64_big_sur: "6d7c30e045cd3c2db314798a440e9b6ef803f776efe61a1c43cec845eba345c7"
sha256 big_sur: "8958921dbc42bfa6fa8280009f934beb86cffadf488e17cd433b7f6b2b79f744"
sha256 catalina: "cea4d4a254b7ece640531c5c7a4e8555a512ba80a9a67c856ac880dd13d6c4e4"
sha256 mojave: "36ce3765f122569d97f783b9e81718e8c03bbae8777f4f32d82085cd0c73787a"
end
depends_on "cmake" => :build
depends_on "doxygen" => :build
depends_on "pkg-config" => :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.major_minor_patch.to_s, shell_output("#{bin}/uhd_config_info --version")
end
end