/[gentoo-x86]/net-wireless/gnuradio/gnuradio-9999.ebuild
Gentoo

Contents of /net-wireless/gnuradio/gnuradio-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sat Apr 20 15:09:56 2013 UTC (4 weeks, 5 days ago) by zerochaos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +2 -2 lines
adding new revisions for subslot support

(Portage version: 2.1.11.55/cvs/Linux x86_64, signed Manifest commit with key DD11F94A)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-wireless/gnuradio/gnuradio-9999.ebuild,v 1.5 2013/03/12 19:50:12 chithanh Exp $
4
5 EAPI=5
6 PYTHON_DEPEND="2"
7
8 inherit base cmake-utils fdo-mime python
9
10 DESCRIPTION="Toolkit that provides signal processing blocks to implement software radios"
11 HOMEPAGE="http://gnuradio.org/"
12 LICENSE="GPL-3"
13 SLOT="0/${PV}"
14
15 if [[ ${PV} == "9999" ]] ; then
16 EGIT_REPO_URI="http://gnuradio.org/git/gnuradio.git"
17 inherit git-2
18 KEYWORDS=""
19 else
20 SRC_URI="http://gnuradio.org/releases/${PN}/${P}.tar.gz"
21 KEYWORDS="~amd64 ~x86"
22 fi
23
24 IUSE="alsa doc examples fcd filter grc jack oss performance-counters portaudio qt4 sdl uhd utils wavelet wxwidgets"
25
26 # bug #348206
27 # comedi? ( >=sci-electronics/comedilib-0.7 )
28 # boost-1.52.0 is blacklisted, bug #461578, upstream #513, boost #7669
29 RDEPEND=">=dev-lang/orc-0.4.12
30 dev-libs/boost
31 !<=dev-libs/boost-1.52.0-r6:0/1.52
32 dev-python/cheetah
33 dev-util/cppunit
34 sci-libs/fftw:3.0
35 fcd? ( virtual/libusb:1 )
36 alsa? (
37 media-libs/alsa-lib
38 )
39 grc? (
40 dev-python/lxml
41 dev-python/numpy
42 dev-python/pygtk:2
43 )
44 jack? (
45 media-sound/jack-audio-connection-kit
46 )
47 portaudio? (
48 >=media-libs/portaudio-19_pre
49 )
50 qt4? (
51 dev-python/PyQt4[X,opengl]
52 dev-python/pyqwt:5
53 dev-qt/qtgui:4
54 )
55 sdl? ( media-libs/libsdl )
56 uhd? ( >=net-wireless/uhd-3.4.3-r1 )
57 wavelet? (
58 sci-libs/gsl
59 )
60 wxwidgets? (
61 dev-python/wxpython:2.8
62 dev-python/numpy
63 )
64 "
65 DEPEND="${RDEPEND}
66 dev-lang/swig
67 virtual/pkgconfig
68 doc? (
69 >=app-doc/doxygen-1.5.7.1
70 dev-python/sphinx
71 )
72 grc? (
73 x11-misc/xdg-utils
74 )
75 oss? (
76 virtual/os-headers
77 )
78 "
79
80 PATCHES=(
81 "${FILESDIR}"/${PN}-3.6.1-automagic-audio.patch
82 )
83
84 pkg_setup() {
85 python_set_active_version 2
86 python_pkg_setup
87 }
88
89 src_prepare() {
90 python_convert_shebangs -q -r 2 "${S}"
91 # Useless UI element would require qt3support, bug #365019
92 sed -i '/qPixmapFromMimeSource/d' "${S}"/gr-qtgui/lib/spectrumdisplayform.ui || die
93 base_src_prepare
94 }
95
96 src_configure() {
97 # TODO: docs are installed to /usr/share/doc/${PN} not /usr/share/doc/${PF}
98 # SYSCONFDIR/GR_PREFSDIR default to install below CMAKE_INSTALL_PREFIX
99 mycmakeargs=(
100 $(cmake-utils_use_enable alsa GR_AUDIO_ALSA)
101 $(cmake-utils_use_enable doc DOXYGEN) \
102 $(cmake-utils_use_enable doc SPHINX) \
103 $(cmake-utils_use_enable fcd GR_FCD) \
104 $(cmake-utils_use_enable filter GR_FILTER) \
105 $(cmake-utils_use_enable grc GRC) \
106 $(cmake-utils_use_enable jack GR_AUDIO_JACK)
107 $(cmake-utils_use_enable oss GR_AUDIO_OSS)
108 $(cmake-utils_use_enable performance-counters ENABLE_PERFORMANCE_COUNTERS)
109 $(cmake-utils_use_enable portaudio GR_AUDIO_PORTAUDIO)
110 $(cmake-utils_use_enable uhd GR_UHD) \
111 $(cmake-utils_use_enable utils GR_UTILS) \
112 $(cmake-utils_use_enable wavelet GR_WAVELET) \
113 $(cmake-utils_use_enable wxwidgets GR_WXGUI) \
114 $(cmake-utils_use_enable qt4 GR_QTGUI) \
115 $(cmake-utils_use_enable sdl GR_VIDEO_SDL) \
116 -DENABLE_GR_CORE=ON
117 -DQWT_INCLUDE_DIRS="${EPREFIX}"/usr/include/qwt5
118 -DSYSCONFDIR="${EPREFIX}"/etc
119 )
120 cmake-utils_src_configure
121 }
122
123 src_install() {
124 cmake-utils_src_install
125
126 python_clean_installation_image -q
127
128 # Remove bad shebangs that creep back in during install
129 sed -i '\|#!/usr/bin/python|d' "${ED}"/usr/bin/* || die
130
131 # Install examples to /usr/share/doc/$PF
132 if use examples ; then
133 dodir /usr/share/doc/${PF}/
134 mv "${ED}"/usr/share/${PN}/examples "${ED}"/usr/share/doc/${PF}/ || die
135 else
136 # It seems that the examples are always installed
137 rm -rf "${ED}"/usr/share/${PN}/examples || die
138 fi
139
140 # We install the mimetypes to the correct locations from the ebuild
141 rm -rf "${ED}"/usr/share/${PN}/grc/freedesktop || die
142 rm -f "${ED}"/usr/libexec/${PN}/grc_setup_freedesktop || die
143
144 # Install icons, menu items and mime-types for GRC
145 if use grc ; then
146 local fd_path="${S}/grc/freedesktop"
147 insinto /usr/share/mime/packages
148 doins "${fd_path}/${PN}-grc.xml"
149
150 domenu "${fd_path}/"*.desktop
151 doicon "${fd_path}/"*.png
152 fi
153 }
154
155 pkg_postinst()
156 {
157 local GRC_ICON_SIZES="32 48 64 128 256"
158 python_mod_optimize gnuradio
159
160 if use grc ; then
161 fdo-mime_desktop_database_update
162 fdo-mime_mime_database_update
163 for size in ${GRC_ICON_SIZES} ; do
164 xdg-icon-resource install --noupdate --context mimetypes --size ${size} \
165 "${EROOT}/usr/share/pixmaps/grc-icon-${size}.png" application-gnuradio-grc \
166 || die "icon resource installation failed"
167 xdg-icon-resource install --noupdate --context apps --size ${size} \
168 "${EROOT}/usr/share/pixmaps/grc-icon-${size}.png" gnuradio-grc \
169 || die "icon resource installation failed"
170 done
171 xdg-icon-resource forceupdate
172 fi
173 }
174
175 pkg_postrm()
176 {
177 local GRC_ICON_SIZES="32 48 64 128 256"
178 python_mod_cleanup gnuradio
179
180 if use grc ; then
181 fdo-mime_desktop_database_update
182 fdo-mime_mime_database_update
183 for size in ${GRC_ICON_SIZES} ; do
184 xdg-icon-resource uninstall --noupdate --context mimetypes --size ${size} \
185 application-gnuradio-grc || ewarn "icon uninstall failed"
186 xdg-icon-resource uninstall --noupdate --context apps --size ${size} \
187 gnuradio-grc || ewarn "icon uninstall failed"
188
189 done
190 xdg-icon-resource forceupdate
191 fi
192 }

  ViewVC Help
Powered by ViewVC 1.1.13