summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina <zerochaos@gentoo.org>2014-11-04 12:35:24 +0000
committerRick Farina <zerochaos@gentoo.org>2014-11-04 12:35:24 +0000
commit9e1b7f9b78af7dc192425f48f099e5054d4793b6 (patch)
treee1549949b78e69ef142490ae026c065c2107f9f4 /net-wireless
parentremove old ebuilds (diff)
downloadgentoo-2-9e1b7f9b78af7dc192425f48f099e5054d4793b6.tar.gz
gentoo-2-9e1b7f9b78af7dc192425f48f099e5054d4793b6.tar.bz2
gentoo-2-9e1b7f9b78af7dc192425f48f099e5054d4793b6.zip
add patch to disable pre-amp on hackrf by default, remove old ebuilds to avoid accidental hardware damage
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key DD11F94A)
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/gr-osmosdr/ChangeLog10
-rw-r--r--net-wireless/gr-osmosdr/files/hackrf-safety.patch34
-rw-r--r--net-wireless/gr-osmosdr/gr-osmosdr-0.0.2-r1.ebuild67
-rw-r--r--net-wireless/gr-osmosdr/gr-osmosdr-0.1.3-r1.ebuild (renamed from net-wireless/gr-osmosdr/gr-osmosdr-0.1.3.ebuild)3
4 files changed, 45 insertions, 69 deletions
diff --git a/net-wireless/gr-osmosdr/ChangeLog b/net-wireless/gr-osmosdr/ChangeLog
index 6166a8ec5f46..a9b154d78ff4 100644
--- a/net-wireless/gr-osmosdr/ChangeLog
+++ b/net-wireless/gr-osmosdr/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-wireless/gr-osmosdr
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/gr-osmosdr/ChangeLog,v 1.26 2014/08/28 19:58:13 zerochaos Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/gr-osmosdr/ChangeLog,v 1.27 2014/11/04 12:35:24 zerochaos Exp $
+
+*gr-osmosdr-0.1.3-r1 (04 Nov 2014)
+
+ 04 Nov 2014; Rick Farina <zerochaos@gentoo.org> +files/hackrf-safety.patch,
+ +gr-osmosdr-0.1.3-r1.ebuild, -gr-osmosdr-0.0.2-r1.ebuild,
+ -gr-osmosdr-0.1.3.ebuild:
+ add patch to disable pre-amp on hackrf by default, remove old ebuilds to avoid
+ accidental hardware damage
*gr-osmosdr-0.1.3 (28 Aug 2014)
diff --git a/net-wireless/gr-osmosdr/files/hackrf-safety.patch b/net-wireless/gr-osmosdr/files/hackrf-safety.patch
new file mode 100644
index 000000000000..fc04fc0c50ed
--- /dev/null
+++ b/net-wireless/gr-osmosdr/files/hackrf-safety.patch
@@ -0,0 +1,34 @@
+commit 39230788d7f4b0a8d6d3ab32039073ed53e74af6
+Author: Dimitri Stolnikov <horiz0n@gmx.net>
+Date: Tue Oct 21 22:10:40 2014 +0200
+
+ hackrf: disable AMP gain stage by default to protect it from damage
+
+ patch proivided by Paul Connolly
+
+diff --git a/lib/hackrf/hackrf_sink_c.cc b/lib/hackrf/hackrf_sink_c.cc
+index 120b271..3a1e7da 100644
+--- a/lib/hackrf/hackrf_sink_c.cc
++++ b/lib/hackrf/hackrf_sink_c.cc
+@@ -213,7 +213,7 @@ hackrf_sink_c::hackrf_sink_c (const std::string &args)
+ set_sample_rate( get_sample_rates().start() );
+ set_bandwidth( 0 );
+
+- set_gain( 14 ); /* enable AMP gain stage by default */
++ set_gain( 0 ); /* disable AMP gain stage by default to protect full sprectrum pre-amp from physical damage */
+
+ set_if_gain( 16 ); /* preset to a reasonable default (non-GRC use case) */
+
+diff --git a/lib/hackrf/hackrf_source_c.cc b/lib/hackrf/hackrf_source_c.cc
+index f647b80..e3b3ea4 100644
+--- a/lib/hackrf/hackrf_source_c.cc
++++ b/lib/hackrf/hackrf_source_c.cc
+@@ -168,7 +168,7 @@ hackrf_source_c::hackrf_source_c (const std::string &args)
+ set_sample_rate( get_sample_rates().start() );
+ set_bandwidth( 0 );
+
+- set_gain( 14 ); /* enable AMP gain stage by default */
++ set_gain( 0 ); /* disable AMP gain stage by default to protect full sprectrum pre-amp from physical damage */
+
+ set_if_gain( 16 ); /* preset to a reasonable default (non-GRC use case) */
+
diff --git a/net-wireless/gr-osmosdr/gr-osmosdr-0.0.2-r1.ebuild b/net-wireless/gr-osmosdr/gr-osmosdr-0.0.2-r1.ebuild
deleted file mode 100644
index 71fdd5b075c7..000000000000
--- a/net-wireless/gr-osmosdr/gr-osmosdr-0.0.2-r1.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/gr-osmosdr/gr-osmosdr-0.0.2-r1.ebuild,v 1.1 2013/09/16 16:03:12 zerochaos Exp $
-
-EAPI=5
-PYTHON_DEPEND="python? 2"
-
-inherit cmake-utils python
-
-DESCRIPTION="GNU Radio source block for OsmoSDR and rtlsdr and hackrf"
-HOMEPAGE="http://sdr.osmocom.org/trac/wiki/GrOsmoSDR"
-
-if [[ ${PV} == 9999* ]]; then
- inherit git-2
- SRC_URI=""
- EGIT_REPO_URI="git://git.osmocom.org/${PN}.git"
- KEYWORDS=""
-else
- SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
- KEYWORDS="~amd64 ~arm ~x86"
-fi
-
-LICENSE="GPL-3"
-SLOT="0/${PV}"
-IUSE="fcd hackrf iqbalance python rtlsdr uhd"
-#IUSE="fcd hackrf iqbalance osmosdr python rtlsdr uhd"
-
-# osmosdr? ( net-libs/libosmosdr:= )
-RDEPEND="<net-wireless/gnuradio-3.7_rc:0=[fcd?]
- hackrf? ( net-libs/libhackrf:= )
- iqbalance? ( =net-wireless/gr-iqbal-0.36.0:= )
- rtlsdr? ( net-wireless/rtl-sdr:= )
- uhd? ( net-wireless/uhd:= )"
-DEPEND="${RDEPEND}
- dev-python/cheetah"
-
-pkg_setup() {
- python_set_active_version 2
- python_pkg_setup
-}
-
-src_prepare() {
- python_convert_shebangs -q -r 2 "${S}"
-}
-
-src_configure() {
- local mycmakeargs=(
- -DENABLE_DEFAULT=OFF
- $(cmake-utils_use_enable fcd)
- $(cmake-utils_use_enable hackrf)
- $(cmake-utils_use_enable iqbalance)
- $(cmake-utils_use_enable python)
- $(cmake-utils_use_enable rtlsdr RTL)
- $(cmake-utils_use_enable rtlsdr RTL_TCP)
- $(cmake-utils_use_enable uhd)
- )
-# $(cmake-utils_use_enable osmosdr)
-
- cmake-utils_src_configure
-}
-
-pkg_postinst() {
- if use !rtlsdr && has 0.0.1 ${REPLACING_VERSIONS}; then
- ewarn "RTL-SDR support is no longer enabled by default."
- ewarn "Set USE=\"rtlsdr\" if you need it."
- fi
-}
diff --git a/net-wireless/gr-osmosdr/gr-osmosdr-0.1.3.ebuild b/net-wireless/gr-osmosdr/gr-osmosdr-0.1.3-r1.ebuild
index 5faa1c02453f..215c084c6dad 100644
--- a/net-wireless/gr-osmosdr/gr-osmosdr-0.1.3.ebuild
+++ b/net-wireless/gr-osmosdr/gr-osmosdr-0.1.3-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/gr-osmosdr/gr-osmosdr-0.1.3.ebuild,v 1.1 2014/08/28 19:58:13 zerochaos Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/gr-osmosdr/gr-osmosdr-0.1.3-r1.ebuild,v 1.1 2014/11/04 12:35:24 zerochaos Exp $
EAPI=5
PYTHON_COMPAT=( python2_7 )
@@ -42,6 +42,7 @@ DEPEND="${RDEPEND}
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
src_prepare() {
+ epatch "${FILESDIR}/hackrf-safety.patch"
epatch_user
}