net-wireless/soapyuhd: Adapt to >=uhd-4.8

Signed-off-by: Thomas Beierlein <tomjbe@gentoo.org>
This commit is contained in:
Thomas Beierlein
2025-02-25 13:28:38 +01:00
parent f754e486e8
commit 3eb8a2c0b0
3 changed files with 76 additions and 3 deletions

View File

@@ -0,0 +1,43 @@
From 6eeee4fd3217166199068bbe05c555c2bccb2a7b Mon Sep 17 00:00:00 2001
From: Ryan Volz <ryan.volz@gmail.com>
Date: Fri, 7 Feb 2025 11:09:35 -0500
Subject: [PATCH] Define post_input_action/post_output_action for UHD 4.8+
---
UHDSoapyDevice.cpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/UHDSoapyDevice.cpp b/UHDSoapyDevice.cpp
index 3ce66f3..88641c5 100644
--- a/UHDSoapyDevice.cpp
+++ b/UHDSoapyDevice.cpp
@@ -707,6 +707,14 @@ class UHDSoapyRxStream : public uhd::rx_streamer
if (ret != 0) throw std::runtime_error(str(boost::format("UHDSoapyRxStream::issue_stream_cmd() = %d") % ret));
}
+ #if UHD_VERSION >= 4080000
+ void post_input_action(
+ const std::shared_ptr<uhd::rfnoc::action_info>&, const size_t) override
+ {
+ throw uhd::not_implemented_error("post_input_action is not implemented here!");
+ }
+ #endif
+
private:
SoapySDR::Device *_device;
SoapySDR::Stream *_stream;
@@ -851,6 +859,14 @@ class UHDSoapyTxStream : public uhd::tx_streamer
return true;
}
+ #if UHD_VERSION >= 4080000
+ void post_output_action(
+ const std::shared_ptr<uhd::rfnoc::action_info>&, const size_t) override
+ {
+ throw uhd::not_implemented_error("post_output_action is not implemented here!");
+ }
+ #endif
+
private:
bool _active;
SoapySDR::Device *_device;

View File

@@ -0,0 +1,28 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Soapy SDR plugins for UHD supported SDR devices"
HOMEPAGE="https://github.com/pothosware/SoapyUHD"
if [ "${PV}" = "9999" ]; then
EGIT_REPO_URI="https://github.com/pothosware/SoapyUHD.git"
inherit git-r3
else
KEYWORDS="~amd64 ~arm ~riscv ~x86"
SRC_URI="https://github.com/pothosware/SoapyUHD/archive/soapy-uhd-${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}"/SoapyUHD-soapy-uhd-"${PV}"
# picked up from git repo
PATCHES=( "${FILESDIR}"/${P}-uhd-4.8.patch )
fi
LICENSE="MIT"
SLOT="0"
RDEPEND="net-wireless/soapysdr:=
net-wireless/uhd:=
dev-libs/boost:="
DEPEND="${RDEPEND}"

View File

@@ -1,7 +1,7 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
inherit cmake
@@ -12,9 +12,11 @@ if [ "${PV}" = "9999" ]; then
EGIT_REPO_URI="https://github.com/pothosware/SoapyUHD.git"
inherit git-r3
else
KEYWORDS="~amd64 ~x86"
KEYWORDS="~amd64 ~arm ~riscv ~x86"
SRC_URI="https://github.com/pothosware/SoapyUHD/archive/soapy-uhd-${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}"/SoapyUHD-soapy-uhd-"${PV}"
# picked up from git repo
PATCHES=( "${FILESDIR}"/${P}-uhd-4.8.patch )
fi
LICENSE="MIT"