forked from titanous/homebrew-gnuradio
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgnuradio.rb
133 lines (117 loc) · 4.51 KB
/
gnuradio.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
require 'formula'
class Gnuradio < Formula
homepage 'http://gnuradio.org'
url 'http://gnuradio.org/releases/gnuradio/gnuradio-3.6.5.1.tar.gz'
sha1 '8d3846dc1d00c60b74f06c0bb8f40d57ee257b5a'
head 'http://gnuradio.org/git/gnuradio.git'
depends_on 'apple-gcc42' => :build
depends_on 'cmake' => :build
depends_on 'Cheetah' => :python
depends_on 'lxml' => :python
depends_on 'numpy' => :python
depends_on 'scipy' => :python
depends_on 'matplotlib' => :python
depends_on 'python'
depends_on 'boost'
depends_on 'cppunit'
depends_on 'gsl'
depends_on 'fftw'
depends_on 'swig'
depends_on 'pygtk'
depends_on 'sdl'
depends_on 'libusb'
depends_on 'orc'
depends_on 'pyqt' if ARGV.include?('--with-qt')
depends_on 'pyqwt' if ARGV.include?('--with-qt')
depends_on 'doxygen' if ARGV.include?('--with-docs')
fails_with :clang do
build 421
cause "Fails to compile .S files."
end
def options
[
['--with-qt', 'Build gr-qtgui.'],
['--with-docs', 'Build docs.']
]
end
def patches
DATA
end
def install
# Force compilation with gcc-4.2
ENV['CC'] = '/usr/local/bin/gcc-4.2'
ENV['LD'] = '/usr/local/bin/gcc-4.2'
ENV['CXX'] = '/usr/local/bin/g++-4.2'
mkdir 'build' do
args = ["-DCMAKE_PREFIX_PATH=#{prefix}", "-DQWT_INCLUDE_DIRS=#{HOMEBREW_PREFIX}/lib/qwt.framework/Headers"] + std_cmake_args
args << '-DENABLE_GR_QTGUI=OFF' unless ARGV.include?('--with-qt')
args << '-DENABLE_DOXYGEN=OFF' unless ARGV.include?('--with-docs')
# From opencv.rb
python_prefix = `python-config --prefix`.strip
# Python is actually a library. The libpythonX.Y.dylib points to this lib, too.
if File.exist? "#{python_prefix}/Python"
# Python was compiled with --framework:
args << "-DPYTHON_LIBRARY='#{python_prefix}/Python'"
if !MacOS::CLT.installed? and python_prefix.start_with? '/System/Library'
# For Xcode-only systems, the headers of system's python are inside of Xcode
args << "-DPYTHON_INCLUDE_DIR='#{MacOS.sdk_path}/System/Library/Frameworks/Python.framework/Versions/2.7/Headers'"
else
args << "-DPYTHON_INCLUDE_DIR='#{python_prefix}/Headers'"
end
else
python_lib = "#{python_prefix}/lib/lib#{which_python}"
if File.exists? "#{python_lib}.a"
args << "-DPYTHON_LIBRARY='#{python_lib}.a'"
else
args << "-DPYTHON_LIBRARY='#{python_lib}.dylib'"
end
args << "-DPYTHON_INCLUDE_DIR='#{python_prefix}/include/#{which_python}'"
end
args << "-DPYTHON_PACKAGES_PATH='#{lib}/#{which_python}/site-packages'"
system 'cmake', '..', *args
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
def caveats
<<-EOS.undent
If you want to use custom blocks, create this file:
~/.gnuradio/config.conf
[grc]
local_blocks_path=/usr/local/share/gnuradio/grc/blocks
EOS
end
def which_python
"python" + `python -c 'import sys;print(sys.version[:3])'`.strip
end
end
__END__
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
index f54aa4f..db0ce3c 100644
--- a/grc/CMakeLists.txt
+++ b/grc/CMakeLists.txt
@@ -25,7 +25,7 @@ include(GrPython)
GR_PYTHON_CHECK_MODULE("python >= 2.5" sys "sys.version.split()[0] >= '2.5'" PYTHON_MIN_VER_FOUND)
GR_PYTHON_CHECK_MODULE("Cheetah >= 2.0.0" Cheetah "Cheetah.Version >= '2.0.0'" CHEETAH_FOUND)
GR_PYTHON_CHECK_MODULE("lxml >= 1.3.6" lxml.etree "lxml.etree.LXML_VERSION >= (1, 3, 6, 0)" LXML_FOUND)
-GR_PYTHON_CHECK_MODULE("pygtk >= 2.10.0" gtk "gtk.pygtk_version >= (2, 10, 0)" PYGTK_FOUND)
+GR_PYTHON_CHECK_MODULE("pygtk >= 2.10.0" pygtk True PYGTK_FOUND)
GR_PYTHON_CHECK_MODULE("numpy" numpy True NUMPY_FOUND)
########################################################################
diff --git a/gr-qtgui/lib/spectrumdisplayform.ui b/gr-qtgui/lib/spectrumdisplayform.ui
index 049d4ff..a40502b 100644
--- a/gr-qtgui/lib/spectrumdisplayform.ui
+++ b/gr-qtgui/lib/spectrumdisplayform.ui
@@ -518,7 +518,6 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<customwidgets>
<customwidget>
<class>QwtWheel</class>