summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-03 23:24:09 +0000
committerSam James <sam@gentoo.org>2023-01-03 23:24:55 +0000
commitc3d6effbcedd49a205c45b515e80aa0a216d4918 (patch)
treea252b0cb6b9cba5a42a4787527a20cea3f4fbb84 /net-wireless/uhd
parentapp-containers/skopeo: drop code to install removed bash completions (diff)
downloadgentoo-c3d6effbcedd49a205c45b515e80aa0a216d4918.tar.gz
gentoo-c3d6effbcedd49a205c45b515e80aa0a216d4918.tar.bz2
gentoo-c3d6effbcedd49a205c45b515e80aa0a216d4918.zip
net-wireless/uhd: fix build w/ gcc 13
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-wireless/uhd')
-rw-r--r--net-wireless/uhd/files/uhd-4.3.0.0-gcc-13.patch95
-rw-r--r--net-wireless/uhd/uhd-4.3.0.0.ebuild6
2 files changed, 100 insertions, 1 deletions
diff --git a/net-wireless/uhd/files/uhd-4.3.0.0-gcc-13.patch b/net-wireless/uhd/files/uhd-4.3.0.0-gcc-13.patch
new file mode 100644
index 000000000000..8559ecb8331f
--- /dev/null
+++ b/net-wireless/uhd/files/uhd-4.3.0.0-gcc-13.patch
@@ -0,0 +1,95 @@
+https://github.com/EttusResearch/uhd/pull/652
+
+From 48a05bf621a056af7764437760ad5d64684ce7d2 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 3 Jan 2023 23:04:52 +0000
+Subject: [PATCH] Fix build with GCC 13 (add missing <cstdint> include)
+
+GCC 13 (as usual for new compiler releases) shuffles around some
+internal includes and so <cstdint> is no longer transitively included.
+
+Explicitly include <cstdint> for uint8_t.
+
+```
+/var/tmp/portage/net-wireless/uhd-4.3.0.0/work/uhd-4.3.0.0/include/uhd/rfnoc/defaults.hpp:43:14: error: 'uint32_t' does not name a type
+ 43 | static const uint32_t DEFAULT_NOC_ID = 0xFFFFFFFF;
+ | ^~~~~~~~
+/var/tmp/portage/net-wireless/uhd-4.3.0.0/work/uhd-4.3.0.0/include/uhd/rfnoc/defaults.hpp:1:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
+ +++ |+#include <cstdint>
+ 1 | //
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/include/uhd/cal/database.hpp
++++ b/include/uhd/cal/database.hpp
+@@ -8,6 +8,7 @@
+
+ #include <uhd/config.hpp>
+ #include <stddef.h>
++#include <cstdint>
+ #include <string>
+ #include <vector>
+ #include <functional>
+--- a/include/uhd/rfnoc/defaults.hpp
++++ b/include/uhd/rfnoc/defaults.hpp
+@@ -8,6 +8,7 @@
+
+ #pragma once
+
++#include <cstdint>
+ #include <string>
+
+ namespace uhd { namespace rfnoc {
+--- a/include/uhd/types/eeprom.hpp
++++ b/include/uhd/types/eeprom.hpp
+@@ -6,6 +6,7 @@
+
+ #pragma once
+
++#include <cstdint>
+ #include <map>
+ #include <string>
+ #include <vector>
+--- a/include/uhd/usrp/zbx_tune_map_item.hpp
++++ b/include/uhd/usrp/zbx_tune_map_item.hpp
+@@ -6,6 +6,7 @@
+
+ #pragma once
+ #include <uhd/config.hpp>
++#include <cstdint>
+ #include <cstring>
+ #include <string>
+ #include <vector>
+--- a/lib/usrp/dboard/magnesium/magnesium_constants.hpp
++++ b/lib/usrp/dboard/magnesium/magnesium_constants.hpp
+@@ -9,6 +9,7 @@
+
+ #include <uhd/types/ranges.hpp>
+ #include <cstddef>
++#include <cstdint>
+ #include <string>
+ #include <vector>
+
+--- a/lib/usrp/dboard/rhodium/rhodium_constants.hpp
++++ b/lib/usrp/dboard/rhodium/rhodium_constants.hpp
+@@ -9,6 +9,7 @@
+
+ #include <array>
+ #include <cstddef>
++#include <cstdint>
+ #include <string>
+ #include <vector>
+
+--- a/lib/utils/serial_number.cpp
++++ b/lib/utils/serial_number.cpp
+@@ -5,6 +5,7 @@
+ //
+
+ #include <uhdlib/utils/serial_number.hpp>
++#include <cstdint>
+ #include <stdexcept>
+ #include <string>
+
+--
+2.39.0
+
diff --git a/net-wireless/uhd/uhd-4.3.0.0.ebuild b/net-wireless/uhd/uhd-4.3.0.0.ebuild
index 43bc62d7590a..8e1f3f3cd9ac 100644
--- a/net-wireless/uhd/uhd-4.3.0.0.ebuild
+++ b/net-wireless/uhd/uhd-4.3.0.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -50,6 +50,10 @@ BDEPEND="
S="${WORKDIR}/${P}/host"
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.3.0.0-gcc-13.patch
+)
+
src_unpack() {
default
mv "uhd-images_${PV}" images || die