buildroot/package/gqrx/0005-support_37_and_38_builds_with_qmake.patch
Gwenhael Goavec-Merou 0af0d5bdb6 package/gqrx: backport/adapt patch to suppport Gnuradio 3.8
Gnuradio 3.8 has broken some APIs, and the current gqrx release does
not support these API changes.

So we add compatibility backport patches from the following
pull-request: https://github.com/csete/gqrx/pull/705

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-02-03 23:43:33 +01:00

55 lines
1.6 KiB
Diff

From c9e37484f3aaf367136aea33c1729e3b7a739182 Mon Sep 17 00:00:00 2001
From: Alexander Fasching <fasching.a91@gmail.com>
Date: Mon, 28 Oct 2019 11:25:37 +0100
Subject: [PATCH] Support 3.7 and 3.8 builds with qmake
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
gqrx.pro | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/gqrx.pro b/gqrx.pro
index 87b5bba9..ea187798 100644
--- a/gqrx.pro
+++ b/gqrx.pro
@@ -62,7 +62,7 @@ isEmpty(PREFIX) {
}
target.path = $$PREFIX/bin
-INSTALLS += target
+INSTALLS += target
#CONFIG += debug
@@ -263,6 +263,29 @@ PKGCONFIG += gnuradio-analog \
gnuradio-runtime \
gnuradio-osmosdr
+# Detect GNU Radio version and link against log4cpp for 3.8
+GNURADIO_VERSION = $$system(pkg-config --modversion gnuradio-runtime)
+
+GNURADIO_VERSION_MAJOR = $$system(cut -d '.' -f1 <<< $$GNURADIO_VERSION)
+GNURADIO_VERSION_MINOR = $$system(cut -d '.' -f2 <<< $$GNURADIO_VERSION)
+GNURADIO_VERSION_PATCH = $$system(cut -d '.' -f3 <<< $$GNURADIO_VERSION)
+
+GNURADIO_HEX_VERSION = $$system( \
+ "echo $(( \
+ ($$GNURADIO_VERSION_MAJOR / 10) << 20 | \
+ ($$GNURADIO_VERSION_MAJOR % 10) << 16 | \
+ ($$GNURADIO_VERSION_MINOR / 10) << 12 | \
+ ($$GNURADIO_VERSION_MINOR % 10) << 8 | \
+ ($$GNURADIO_VERSION_PATCH / 10) << 4 | \
+ ($$GNURADIO_VERSION_PATCH % 10) << 0 \
+ ))" \
+)
+DEFINES += GNURADIO_VERSION=$$GNURADIO_HEX_VERSION
+
+greaterThan(GNURADIO_VERSION_MINOR, 7) {
+ PKGCONFIG += log4cpp
+}
+
INCPATH += src/
unix:!macx {