summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-05-28 02:36:09 +0100
committerSam James <sam@gentoo.org>2024-05-28 02:36:09 +0100
commitbae5ae994b8a67ea627bf27c82973b808922e4f7 (patch)
treebef62c0660b1da5a47f6a57bf6f623e1313daa56 /net-wireless
parentgames-strategy/0ad: fix build w/ boost-1.85 (diff)
downloadgentoo-bae5ae994b8a67ea627bf27c82973b808922e4f7.tar.gz
gentoo-bae5ae994b8a67ea627bf27c82973b808922e4f7.tar.bz2
gentoo-bae5ae994b8a67ea627bf27c82973b808922e4f7.zip
net-wireless/uhd: fix build w/ boost-1.85
Closes: https://bugs.gentoo.org/932239 Thanks-to: Vladislav Mikhailikov <vmikhailikov@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/uhd/files/uhd-4.6.0.0-boost-1.85-1.patch80
-rw-r--r--net-wireless/uhd/files/uhd-4.6.0.0-boost-1.85-2.patch31
-rw-r--r--net-wireless/uhd/uhd-4.6.0.0.ebuild5
3 files changed, 116 insertions, 0 deletions
diff --git a/net-wireless/uhd/files/uhd-4.6.0.0-boost-1.85-1.patch b/net-wireless/uhd/files/uhd-4.6.0.0-boost-1.85-1.patch
new file mode 100644
index 000000000000..5861b93b6676
--- /dev/null
+++ b/net-wireless/uhd/files/uhd-4.6.0.0-boost-1.85-1.patch
@@ -0,0 +1,80 @@
+https://github.com/EttusResearch/uhd/commit/ea586168c596d13d05d145832519755794649ba0
+https://bugs.gentoo.org/932239#c10
+
+From ea586168c596d13d05d145832519755794649ba0 Mon Sep 17 00:00:00 2001
+From: Martin Braun <martin.braun@ettus.com>
+Date: Thu, 28 Mar 2024 17:28:57 +0100
+Subject: [PATCH 08/30] lib: Replace deprecated boost::filesystem usage
+
+Recent versions of Boost were throwing compiler warnings due to usage of
+deprecated functions. Our minimum version of Boost (1.65) already
+provides the replacements, so this commit simply updates these
+deprecated use cases.
+---
+ host/lib/usrp/mpmd/mpmd_image_loader.cpp | 6 ++----
+ host/lib/usrp/x300/x300_image_loader.cpp | 4 ++--
+ host/lib/usrp_clock/octoclock/octoclock_image_loader.cpp | 2 +-
+ 3 files changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/host/lib/usrp/mpmd/mpmd_image_loader.cpp b/host/lib/usrp/mpmd/mpmd_image_loader.cpp
+index 31b6387ab..ba0f45fad 100644
+--- a/lib/usrp/mpmd/mpmd_image_loader.cpp
++++ b/lib/usrp/mpmd/mpmd_image_loader.cpp
+@@ -27,8 +27,6 @@
+ #include <cctype>
+ #include <fstream>
+ #include <iterator>
+-#include <sstream>
+-#include <streambuf>
+ #include <string>
+ #include <vector>
+
+@@ -271,7 +269,7 @@ static uhd::usrp::component_files_t bin_dts_to_component_files(
+ // DTS component struct
+ // First, we need to determine the name
+ const std::string base_name =
+- boost::filesystem::change_extension(fpga_path, "").string();
++ boost::filesystem::path(fpga_path).replace_extension("").string();
+ if (base_name == fpga_path) {
+ const std::string err_msg(
+ "Can't cut extension from FPGA filename... " + fpga_path);
+@@ -340,7 +338,7 @@ static void mpmd_send_fpga_to_device(
+ UHD_LOG_TRACE("MPMD IMAGE LOADER", "FPGA path: " << fpga_path);
+
+ // If the fpga_path is a lvbitx file, parse it as such
+- if (boost::filesystem::extension(fpga_path) == ".lvbitx") {
++ if (boost::filesystem::path(fpga_path).extension() == ".lvbitx") {
+ all_component_files = lvbitx_to_component_files(fpga_path, delay_reload);
+ } else {
+ all_component_files = bin_dts_to_component_files(fpga_path, delay_reload);
+diff --git a/host/lib/usrp/x300/x300_image_loader.cpp b/host/lib/usrp/x300/x300_image_loader.cpp
+index d7a64d4d0..a84dba420 100644
+--- a/lib/usrp/x300/x300_image_loader.cpp
++++ b/lib/usrp/x300/x300_image_loader.cpp
+@@ -138,8 +138,8 @@ static void x300_validate_image(x300_session_t& session)
+ boost::format("Could not find image at path \"%s\".") % session.filepath));
+ }
+
+- std::string extension = fs::extension(session.filepath);
+- session.lvbitx = (extension == ".lvbitx");
++ const std::string extension = fs::path(session.filepath).extension().string();
++ session.lvbitx = (extension == ".lvbitx");
+
+ if (session.lvbitx) {
+ extract_from_lvbitx(session);
+diff --git a/host/lib/usrp_clock/octoclock/octoclock_image_loader.cpp b/host/lib/usrp_clock/octoclock/octoclock_image_loader.cpp
+index 930c5d758..4c39790c7 100644
+--- a/lib/usrp_clock/octoclock/octoclock_image_loader.cpp
++++ b/lib/usrp_clock/octoclock/octoclock_image_loader.cpp
+@@ -95,7 +95,7 @@ static void octoclock_validate_firmware_image(octoclock_session_t& session)
+ % session.image_filepath));
+ }
+
+- std::string extension = fs::extension(session.image_filepath);
++ const std::string extension = fs::path(session.image_filepath).extension().string();
+ if (extension == ".bin") {
+ octoclock_read_bin(session);
+ } else if (extension == ".hex") {
+--
+2.44.1
+
diff --git a/net-wireless/uhd/files/uhd-4.6.0.0-boost-1.85-2.patch b/net-wireless/uhd/files/uhd-4.6.0.0-boost-1.85-2.patch
new file mode 100644
index 000000000000..fab224782ccc
--- /dev/null
+++ b/net-wireless/uhd/files/uhd-4.6.0.0-boost-1.85-2.patch
@@ -0,0 +1,31 @@
+https://github.com/EttusResearch/uhd/commit/c4863b9b9f8b639260f7797157e8ac4dd81fef93
+https://bugs.gentoo.org/932239#c11
+
+From c4863b9b9f8b639260f7797157e8ac4dd81fef93 Mon Sep 17 00:00:00 2001
+From: Joerg Hofrichter <joerg.hofrichter@ni.com>
+Date: Wed, 17 Apr 2024 13:59:19 +0200
+Subject: [PATCH 26/30] fix compilation with boost 1.85.0
+
+The header boost/filesystem/convenience.hpp was removed with boost 1.85.0
+
+The deprecated extension-related functions were already replaced with
+commit ea586168c596d13d05d145832519755794649ba0
+---
+ host/lib/usrp/mpmd/mpmd_image_loader.cpp | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/host/lib/usrp/mpmd/mpmd_image_loader.cpp b/host/lib/usrp/mpmd/mpmd_image_loader.cpp
+index ba0f45fad..9824bbf4d 100644
+--- a/lib/usrp/mpmd/mpmd_image_loader.cpp
++++ b/lib/usrp/mpmd/mpmd_image_loader.cpp
+@@ -21,7 +21,6 @@
+ #include <boost/algorithm/string.hpp>
+ #include <boost/archive/iterators/binary_from_base64.hpp>
+ #include <boost/archive/iterators/transform_width.hpp>
+-#include <boost/filesystem/convenience.hpp>
+ #include <boost/optional.hpp>
+ #include <boost/property_tree/xml_parser.hpp>
+ #include <cctype>
+--
+2.44.1
+
diff --git a/net-wireless/uhd/uhd-4.6.0.0.ebuild b/net-wireless/uhd/uhd-4.6.0.0.ebuild
index 9872c06071f8..bfe690bb44c8 100644
--- a/net-wireless/uhd/uhd-4.6.0.0.ebuild
+++ b/net-wireless/uhd/uhd-4.6.0.0.ebuild
@@ -50,6 +50,11 @@ BDEPEND="
S="${WORKDIR}/${P}/host"
+PATCHES=(
+ "${FILESDIR}"/uhd-4.6.0.0-boost-1.85-1.patch
+ "${FILESDIR}"/uhd-4.6.0.0-boost-1.85-2.patch
+)
+
src_unpack() {
default
mv "uhd-images_${PV}" images || die