Skip to contentSkip to conversation

gqrx: new package

PATCH Superseded Gwenhael Goavec-Merou 2 participants 6 messages Feb 10, 2017 – Feb 13, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 gqrx: new package

From: Gwenhael Goavec-Merou <[email protected]>

Gqrx is an open source software defined radio (SDR) receiver implemented using GNU Radio and the Qt GUI toolkit. Currently it works on Linux and Mac with hardware supported by gr-osmosdr, including Funcube Dongle, RTL-SDR, Airspy, HackRF, BladeRF, RFSpace, USRP and SoapySDR.

Gqrx can operate as an AM/FM/SSB receiver with audio output or as an FFT-only instrument. There are also various hooks for interacting with external application using network sockets.

---
Changes v4 -> v5:
* re-order depends/select
Changes v3 -> v4:
* revert help text and fix columns size;
* depends on BR2_PACKAGE_QT5 instead of select
Changes v2 -> v3:
* backport patch to fix Wmisleading-indentation with gcc6;
* inherits alsa-lib or portaudio dependencies from gr-audio;
* reduce help text size;
* add upstream url.
Changes v1 -> v2:
* typo

---
 package/Config.in                                |  1 +
 package/gqrx/0001-fix_compilation_in_gcc-6.patch | 34 +++++++++++++++++++
 package/gqrx/Config.in                           | 43 ++++++++++++++++++++++++
 package/gqrx/gqrx.hash                           |  2 ++
 package/gqrx/gqrx.mk                             | 15 +++++++++
 5 files changed, 95 insertions(+)
 create mode 100644 package/gqrx/0001-fix_compilation_in_gcc-6.patch
 create mode 100644 package/gqrx/Config.in
 create mode 100644 package/gqrx/gqrx.hash
 create mode 100644 package/gqrx/gqrx.mk
package/Config.in +1 -0
index deff0fe..e78fb75 100644
@@ -1451,6 +1451,7 @@ menu "Miscellaneous"
 	source "package/empty/Config.in"
 	source "package/gnuradio/Config.in"
 	source "package/googlefontdirectory/Config.in"
+	source "package/gqrx/Config.in"
 	source "package/gr-osmosdr/Config.in"
 	source "package/gsettings-desktop-schemas/Config.in"
 	source "package/haveged/Config.in"
package/gqrx/0001-fix_compilation_in_gcc-6.patch new file +34 -0
new file mode 100644
index 0000000..e1824c3
@@ -0,0 +1,34 @@
+From e6baaee4968345a53e977f593362267a91041cff Mon Sep 17 00:00:00 2001
+From: Valentin Ochs <[email protected]>
+Date: Fri, 21 Oct 2016 20:12:50 +0200
+Subject: [PATCH 05/34] Cosmetic & readability changes
+
+Backport patch from
+https://github.com/csete/gqrx/commit/e6baaee4968345a53e977f593362267a91041cff
+
+Fix compilation in gcc-6
+
+Signed-off-by: Valentin Ochs <[email protected]>
+Signed-off-by: Gwenhael Goavec-Merou <[email protected]>
+---
+diff --git a/src/qtgui/plotter.cpp b/src/qtgui/plotter.cpp
+index e491632..b877546 100644
+--- a/src/qtgui/plotter.cpp
++++ b/src/qtgui/plotter.cpp
+@@ -1336,8 +1336,11 @@ void CPlotter::drawOverlay()
+ #endif
+ 
+             int level = 0;
+-            for (; level < nLevels && tagEnd[level] > x; level++);
+-                level %= nLevels;
++            while(level < nLevels && tagEnd[level] > x)
++                level++;
++            
++            if(level == nLevels)
++                level = 0;
+ 
+             tagEnd[level] = x + nameWidth + slant - 1;
+             m_BookmarkTags.append(qMakePair<QRect, qint64>(QRect(x, level * levelHeight, nameWidth + slant, fontHeight), bookmarks[i].frequency));
+-- 
+2.10.2
+
package/gqrx/Config.in new file +43 -0

43 lines not on this page · raw message

package/gqrx/gqrx.hash new file +2 -0
new file mode 100644
index 0000000..2d126aa
@@ -0,0 +1,2 @@
+# Locally calculated:
+sha256 53d25db8d987a41ccccaf6fd85262bd7770cdfab5539b5901c4558756483c9db  gqrx-v2.6.tar.gz
package/gqrx/gqrx.mk new file +15 -0
new file mode 100644
index 0000000..b591e60
@@ -0,0 +1,15 @@
+################################################################################
+#
+# gqrx
+#
+################################################################################
+
+GQRX_VERSION = v2.6
+GQRX_SITE = $(call github,csete,gqrx,$(GQRX_VERSION))
+GQRX_LICENSE = GPLv3+, Apache-2.0
+GQRX_LICENSE_FILES = COPYING LICENSE-CTK
+GQRX_DEPENDENCIES = boost gnuradio gr-osmosdr qt5base qt5svg
+
+GQRX_CONF_OPTS = -DLINUX_AUDIO_BACKEND=Gr-audio
+
+$(eval $(cmake-package))
Signature · 1 line
2.10.2
#1 lore raw

PATCH v5 1/1 gqrx: new package

Hello,

Quoted 7 lines · Gwenhael Goavec-Merou

From: Gwenhael Goavec-Merou <[email protected]>

Gqrx is an open source software defined radio (SDR) receiver implemented using GNU Radio and the Qt GUI toolkit. Currently it works on Linux and Mac with hardware supported by gr-osmosdr, including Funcube Dongle, RTL-SDR, Airspy, HackRF, BladeRF, RFSpace, USRP and SoapySDR.

Quoted 6 lines

Gqrx can operate as an AM/FM/SSB receiver with audio output or as an FFT-only instrument. There are also various hooks for interacting with external application using network sockets.

I've applied to the next branch, after fixing a few issues, see below.

Quoted 5 lines
 package/Config.in                                |  1 +
 package/gqrx/0001-fix_compilation_in_gcc-6.patch | 34 +++++++++++++++++++
 package/gqrx/Config.in                           | 43 ++++++++++++++++++++++++
 package/gqrx/gqrx.hash                           |  2 ++
 package/gqrx/gqrx.mk                             | 15 +++++++++

You forgot to add an entry to the DEVELOPERS file, so I've added that. This way you'll receive notifications when there are build failures! :-)

package/gqrx/0001-fix_compilation_in_gcc-6.patch line 4

Quoted 10 lines
package/gqrx/0001-fix_compilation_in_gcc-6.patch new file +4 -0
new file mode 100644
index 0000000..e1824c3
@@ -0,0 +1,34 @@
+From e6baaee4968345a53e977f593362267a91041cff Mon Sep 17 00:00:00 2001
+From: Valentin Ochs <[email protected]>
+Date: Fri, 21 Oct 2016 20:12:50 +0200
+Subject: [PATCH 05/34] Cosmetic & readability changes

This 05/34 doesn't make sense in the context of Buildroot, so I've dropped that.

Quoted 7 lines
package/gqrx/Config.in new file +1 -0
new file mode 100644
index 0000000..c6bef76
@@ -0,0 +1,43 @@
+comment "gqrx needs a toolchain w/ C++, threads, wchar, dynamic library"

package/gqrx/Config.in line 11

Quoted 10 lines
package/gqrx/Config.in new file +10 -0
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_USE_WCHAR || BR2_STATIC_LIBS
+
+comment "gqrx needs qt5, gnuradio, fftw's single precision, alsa-lib or portaudio"
+	depends on !BR2_PACKAGE_GNURADIO || !BR2_PACKAGE_FFTW_PRECISION_SINGLE || \
+		!(BR2_PACKAGE_ALSA_LIB || BR2_PACKAGE_PORTAUDIO) || !BR2_PACKAGE_QT5
+
+config BR2_PACKAGE_GQRX
+	bool "gqrx"
+	depends on BR2_PACKAGE_ALSA_LIB || BR2_PACKAGE_PORTAUDIO # gr-audio

Not the default of this package, but this is really annoying. What do you think of changing the BR2_PACKAGE_GNURADIO_AUDIO option to do this:

select BR2_PACKAGE_ALSA_LIB if !BR2_PACKAGE_PORTAUDIO

This way, we're sure at least one of the two is selected, and we can then directly "select BR2_PACKAGE_GNURADIO_AUDIO" within having to worry about this anymore.

package/gqrx/Config.in line 12

Quoted 1 line
package/gqrx/Config.in new file +1 -0
+	depends on BR2_PACKAGE_FFTW_PRECISION_SINGLE # gnuradio

This one is also annoying. Did you see the work that was posted on the mailing list a while ago to allow building all variants of fftw? This would allow to select the fftw package like any other. It would be really really better. If you have some time to pick up this work and finalize it, it would be nice.

package/gqrx/Config.in line 18

Quoted 6 lines
package/gqrx/Config.in new file +6 -0
+	depends on BR2_PACKAGE_GNURADIO
+	depends on BR2_PACKAGE_QT5
+	depends on BR2_INSTALL_LIBSTDCPP # boost, qt5
+	depends on !BR2_STATIC_LIBS # qt5
+	depends on BR2_TOOLCHAIN_HAS_THREADS # boost, qt5
+	depends on BR2_USE_WCHAR # boost, qt5

Since you're using "depends on BR2_PACKAGE_QT5", there is no need to replicate the Qt5 dependencies here. So I've dropped the ", qt5" comments and the BR2_STATIC_LIBS dependency.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH v5 1/1 gqrx: new package

Quoted 5 lines · On Sun, 12 Feb 2017 15:53:48 +0100 Thomas Petazzoni…

Hello,

Quoted 2 lines · Gwenhael Goavec-Merou

From: Gwenhael Goavec-Merou <[email protected]>

[...]

Quoted 28 lines
Quoted 22 lines
package/gqrx/Config.in new file +1 -0
new file mode 100644
index 0000000..c6bef76
@@ -0,0 +1,43 @@
+comment "gqrx needs a toolchain w/ C++, threads, wchar, dynamic

library"

package/gqrx/Config.in new file +1 -0
+	depends on !BR2_INSTALL_LIBSTDCPP

|| !BR2_TOOLCHAIN_HAS_THREADS || \

package/gqrx/Config.in new file +3 -0
+		!BR2_USE_WCHAR || BR2_STATIC_LIBS
+
+comment "gqrx needs qt5, gnuradio, fftw's single precision,

alsa-lib or portaudio"

package/gqrx/Config.in new file +1 -0
+	depends on !BR2_PACKAGE_GNURADIO

|| !BR2_PACKAGE_FFTW_PRECISION_SINGLE || \

package/gqrx/Config.in new file +1 -0
+		!(BR2_PACKAGE_ALSA_LIB || BR2_PACKAGE_PORTAUDIO)

|| !BR2_PACKAGE_QT5 +

package/gqrx/Config.in new file +3 -0
+config BR2_PACKAGE_GQRX
+	bool "gqrx"
+	depends on BR2_PACKAGE_ALSA_LIB || BR2_PACKAGE_PORTAUDIO #
Quoted 1 line

gr-audio

Not the default of this package, but this is really annoying. What do you think of changing the BR2_PACKAGE_GNURADIO_AUDIO option to do this:

Quoted 6 lines

select BR2_PACKAGE_ALSA_LIB if !BR2_PACKAGE_PORTAUDIO

This way, we're sure at least one of the two is selected, and we can then directly "select BR2_PACKAGE_GNURADIO_AUDIO" within having to worry about this anymore.

I'm agree, maybe portaudio by default because gnuradio users seems to use it preferentially.

Quoted 8 lines

package/gqrx/Config.in line 12

Quoted 1 line
package/gqrx/Config.in new file +1 -0
+	depends on BR2_PACKAGE_FFTW_PRECISION_SINGLE # gnuradio  

This one is also annoying. Did you see the work that was posted on the mailing list a while ago to allow building all variants of fftw? This would allow to select the fftw package like any other. It would be really really better. If you have some time to pick up this work and finalize it, it would be nice.

Thanks to highlight this patch because I've missed this one. I've, recently, looking at a way to build all flavors for this package instead of just one.
Currently, according to the precision specified, fftw produce a dynamic library with a name corresponding to the precision. All others files (headers and doc) are the same and there are no risk with overwrite. I must update this patch.

[...]

Quoted 4 lines

Thanks!

Thomas

Thanks
Gwen

#3 lore raw

PATCH v5 1/1 gqrx: new package

Hello,

Quoted 2 lines · gwenhael.goavec

I'm agree, maybe portaudio by default because gnuradio users seems to use it preferentially.

OK. portaudio only depends on thread support, and gnuradio already needs thread support anyway. So you can directly:

select BR2_PACKAGE_PORTAUDIO if !BR2_PACKAGE_ALSA_LIB

in the BR2_PACKAGE_GNURADIO_AUDIO option.

Quoted 8 lines
Quoted 8 lines

package/gqrx/Config.in line 12

Quoted 1 line
package/gqrx/Config.in new file +1 -0
+	depends on BR2_PACKAGE_FFTW_PRECISION_SINGLE # gnuradio    

This one is also annoying. Did you see the work that was posted on the mailing list a while ago to allow building all variants of fftw? This would allow to select the fftw package like any other. It would be really really better. If you have some time to pick up this work and finalize it, it would be nice.

Quoted 7 lines

Thanks to highlight this patch because I've missed this one. I've, recently, looking at a way to build all flavors for this package instead of just one.
Currently, according to the precision specified, fftw produce a dynamic library with a name corresponding to the precision. All others files (headers and doc) are the same and there are no risk with overwrite. I must update this patch.

That would be nice. However, there were some issues with the patch, so it is not going to be good as-is. Make sure to read the discussion I had with the original submitter. I remember spending quite some time interacting with him/her to try to find a good solution (but that wasn't trivial).

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH v5 1/1 gqrx: new package

Quoted 7 lines · On Mon, 13 Feb 2017 13:35:07 +0100 Thomas Petazzoni…

Hello,

Quoted 2 lines · gwenhael.goavec

I'm agree, maybe portaudio by default because gnuradio users seems to use it preferentially.

Quoted 6 lines

OK. portaudio only depends on thread support, and gnuradio already needs thread support anyway. So you can directly:

select BR2_PACKAGE_PORTAUDIO if !BR2_PACKAGE_ALSA_LIB

in the BR2_PACKAGE_GNURADIO_AUDIO option.

this modification produce :
package/alsa-lib/Config.in:4:error: recursive dependency detected!
package/alsa-lib/Config.in:4: symbol BR2_PACKAGE_ALSA_LIB is selected
by BR2_PACKAGE_PORTAUDIO_ALSA package/portaudio/Config.in:15: symbol BR2_PACKAGE_PORTAUDIO_ALSA depends on BR2_PACKAGE_PORTAUDIO package/portaudio/Config.in:4: symbol BR2_PACKAGE_PORTAUDIO is selected by BR2_PACKAGE_ALSA_LIB

I think the first solution (select BR2_PACKAGE_ALSA_LIB), to have a default backend, is the most simpliest.

Quoted 18 lines
Quoted 10 lines
Quoted 10 lines
Quoted 3 lines
(quoted diff) +1 -0
+	depends on BR2_PACKAGE_FFTW_PRECISION_SINGLE #

gnuradio

This one is also annoying. Did you see the work that was posted on the mailing list a while ago to allow building all variants of fftw? This would allow to select the fftw package like any other. It would be really really better. If you have some time to pick up this work and finalize it, it would be nice.

Quoted 7 lines

Thanks to highlight this patch because I've missed this one. I've, recently, looking at a way to build all flavors for this package instead of just one.
Currently, according to the precision specified, fftw produce a dynamic library with a name corresponding to the precision. All others files (headers and doc) are the same and there are no risk with overwrite. I must update this patch.

Quoted 2 lines

That would be nice. However, there were some issues with the patch, so it is not going to be good as-is.

Of course.

Quoted 5 lines

Make sure to read the discussion I
had with the original submitter. I remember spending quite some time interacting with him/her to try to find a good solution (but that wasn't trivial).

I know. I must check everything to have my opinion about this... But I think more than one version of this patch will be needed.

Quoted 5 lines

Thanks!

Thomas

Gwen

#5 lore raw

PATCH v5 1/1 gqrx: new package

Hello,

Quoted 8 lines · gwenhael.goavec
Quoted 1 line

in the BR2_PACKAGE_GNURADIO_AUDIO option.

this modification produce :
package/alsa-lib/Config.in:4:error: recursive dependency detected!
package/alsa-lib/Config.in:4: symbol BR2_PACKAGE_ALSA_LIB is selected
by BR2_PACKAGE_PORTAUDIO_ALSA package/portaudio/Config.in:15: symbol BR2_PACKAGE_PORTAUDIO_ALSA depends on BR2_PACKAGE_PORTAUDIO package/portaudio/Config.in:4: symbol BR2_PACKAGE_PORTAUDIO is selected by BR2_PACKAGE_ALSA_LIB

Gah, yes, indeed.

Quoted 2 lines

I think the first solution (select BR2_PACKAGE_ALSA_LIB), to have a default backend, is the most simpliest.

Yes, I think too.

Quoted 7 lines
Quoted 4 lines

Make sure to read the discussion I
had with the original submitter. I remember spending quite some time interacting with him/her to try to find a good solution (but that wasn't trivial).

I know. I must check everything to have my opinion about this... But I think more than one version of this patch will be needed.

Sure, no problem.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com