diff --git a/net-wireless/soapyuhd/files/soapyuhd-cxx17.patch b/net-wireless/soapyuhd/files/soapyuhd-cxx17.patch new file mode 100644 index 0000000000000..285998ba1e1bc --- /dev/null +++ b/net-wireless/soapyuhd/files/soapyuhd-cxx17.patch @@ -0,0 +1,25 @@ +From 020430131c3fa4cf70e9ba5c0a65b0765af59099 Mon Sep 17 00:00:00 2001 +From: Martin Pluskal +Date: Thu, 18 Jun 2026 19:46:20 +0200 +Subject: [PATCH] Require C++17 + +UHD 4.x public headers use std::optional and std::is_convertible_v +(e.g. uhd/rfnoc/actions.hpp, uhd/utils/cast.hpp), which need C++17. +Building against the current default (C++14) fails to compile them. +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 916687b..160f257 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,7 +25,7 @@ cmake_minimum_required(VERSION 2.8.12...3.10) + project(SoapyUHD CXX C) + enable_testing() + +-set(CMAKE_CXX_STANDARD 14) ++set(CMAKE_CXX_STANDARD 17) + + #select the release build type by default to get optimization flags + if(NOT CMAKE_BUILD_TYPE) diff --git a/net-wireless/soapyuhd/files/soapyuhd-lexical_cast.patch b/net-wireless/soapyuhd/files/soapyuhd-lexical_cast.patch new file mode 100644 index 0000000000000..4e296d117ebca --- /dev/null +++ b/net-wireless/soapyuhd/files/soapyuhd-lexical_cast.patch @@ -0,0 +1,33 @@ +From cd5b601e65cdf9d47947e0fc75c2c9fa69edc00b Mon Sep 17 00:00:00 2001 +From: pluskalm <> +Date: Thu, 18 Jun 2026 19:39:33 +0000 +Subject: [PATCH] Update soapy-uhd to version 0.4.1git20250213 / rev 11 via SR + 1360306 + +https://build.opensuse.org/request/show/1360306 +by user pluskalm + anag_factory +soapy-uhd: fix the build against UHD 4.x (C++17, needed by UHD's std::optional/std::is_convertible_v headers) and recent Boost (explicit boost/lexical_cast.hpp include), rescuing it from the botdel (SR 1360107). No version change (already at latest). Both fixes submitted upstream: pothosware/SoapyUHD#75 and #76. +--- + packages/s/soapy-uhd/boost-lexical-cast.patch | 20 ++++++++++++++++++ + create mode 100644 packages/s/soapy-uhd/boost-lexical-cast.patch + +--- a/UHDSoapyDevice.cpp 2026-06-18 19:43:32.001219273 +0200 ++++ b/UHDSoapyDevice.cpp 2026-06-18 19:43:32.017221061 +0200 +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include + #include +--- a/SoapyUHDDevice.cpp 2026-06-18 19:43:32.005219720 +0200 ++++ b/SoapyUHDDevice.cpp 2026-06-18 19:43:32.021221508 +0200 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + /*********************************************************************** + * Stream wrapper diff --git a/net-wireless/soapyuhd/soapyuhd-0.4.1_p20251220-r1.ebuild b/net-wireless/soapyuhd/soapyuhd-0.4.1_p20251220-r1.ebuild new file mode 100644 index 0000000000000..ed4590791477b --- /dev/null +++ b/net-wireless/soapyuhd/soapyuhd-0.4.1_p20251220-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2026 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" + COMMIT="2a5d381f68fd05d5b3c0e7db56c36892ea99b4ae" + SRC_URI="https://github.com/pothosware/SoapyUHD/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/SoapyUHD-${COMMIT} +fi + +LICENSE="MIT" +SLOT="0" + +RDEPEND="net-wireless/soapysdr:= + net-wireless/uhd:= + dev-libs/boost:=" +DEPEND="${RDEPEND}" + +PATCHES=( "${FILESDIR}"/${PN}-cxx17.patch + "${FILESDIR}"/${PN}-lexical_cast.patch +) + +src_prepare() { + cmake_src_prepare +} diff --git a/net-wireless/soapyuhd/soapyuhd-9999.ebuild b/net-wireless/soapyuhd/soapyuhd-9999.ebuild index aa39db3904866..cc1fe4699f204 100644 --- a/net-wireless/soapyuhd/soapyuhd-9999.ebuild +++ b/net-wireless/soapyuhd/soapyuhd-9999.ebuild @@ -25,3 +25,11 @@ RDEPEND="net-wireless/soapysdr:= net-wireless/uhd:= dev-libs/boost:=" DEPEND="${RDEPEND}" + +PATCHES=( "${FILESDIR}"/${PN}-cxx17.patch + "${FILESDIR}"/${PN}-lexical_cast.patch +) + +src_prepare() { + cmake_src_prepare +}