forked from jjeising/homebrew-hackrf
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgr-osmosdr.rb
29 lines (25 loc) · 836 Bytes
/
gr-osmosdr.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
require 'formula'
class GrOsmosdr < Formula
homepage 'http://sdr.osmocom.org/trac/wiki/GrOsmoSDR'
head 'git://git.osmocom.org/gr-osmosdr', :branch => 'master',
:shallow => false
depends_on 'cmake' => :build
depends_on 'gnuradio'
depends_on 'librtlsdr'
depends_on 'swig'
depends_on 'homebrew/python/numpy'
depends_on 'homebrew/python/scipy'
depends_on 'homebrew/python/matplotlib'
def install
mkdir 'build' do
system 'cmake', '..', *std_cmake_args << "-DPYTHON_LIBRARY=#{python_path}/Frameworks/Python.framework/" << "-DENABLE_PYTHON=ON"
system 'make'
system 'make install'
end
end
def python_path
python = Formula.factory('python')
kegs = python.rack.children.reject { |p| p.basename.to_s == '.DS_Store' }
kegs.find { |p| Keg.new(p).linked? } || kegs.last
end
end