54 lines
1.7 KiB
Ruby
54 lines
1.7 KiB
Ruby
class GrOsmosdr < Formula
|
|
desc "Osmocom GNU Radio Blocks"
|
|
homepage "https://osmocom.org/projects/sdr/wiki/GrOsmoSDR"
|
|
url "https://cgit.osmocom.org/gr-osmosdr/snapshot/gr-osmosdr-0.1.4.tar.gz"
|
|
mirror "https://github.com/osmocom/gr-osmosdr/archive/v0.1.4.tar.gz"
|
|
sha256 "bcf9a9b1760e667c41a354e8cd41ef911d0929d5e4a18e0594ccb3320d735066"
|
|
revision 3
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "d353f505e4868896ca2d7fa9a902ef8ba6f0b8f782c59510a6924ffebcacfd46" => :mojave
|
|
sha256 "1b2946f58b69f2a4490163cfc45ffa895363434f3a0006464bb640a44ed68ec6" => :high_sierra
|
|
sha256 "37ba90f9c4c1b429723fa3efe5106beae45025821c47e07e527ccd0b0c53c9bd" => :sierra
|
|
sha256 "4bf8a0d3223f32cbcb73218f267a6ef146d92b91ae65ea38d0dffd7b76db770c" => :el_capitan
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "swig" => :build
|
|
depends_on "airspy"
|
|
depends_on "boost"
|
|
depends_on "gnuradio"
|
|
depends_on "hackrf"
|
|
depends_on "librtlsdr"
|
|
depends_on "python"
|
|
depends_on "uhd"
|
|
|
|
resource "Cheetah" do
|
|
url "https://files.pythonhosted.org/packages/source/C/Cheetah/Cheetah-2.4.4.tar.gz"
|
|
sha256 "be308229f0c1e5e5af4f27d7ee06d90bb19e6af3059794e5fd536a6f29a9b550"
|
|
end
|
|
|
|
def install
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
|
|
|
resource("Cheetah").stage do
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
end
|
|
|
|
system "cmake", ".", *std_cmake_args
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.cpp").write <<~EOS
|
|
#include <osmosdr/device.h>
|
|
int main() {
|
|
osmosdr::device_t device();
|
|
return 0;
|
|
}
|
|
EOS
|
|
system ENV.cc, "test.cpp", "-L#{lib}", "-lgnuradio-osmosdr", "-o", "test"
|
|
system "./test"
|
|
end
|
|
end
|