net-wireless/uhd: Fix building with GCC-6
authorPeter Levine <plevine457@gmail.com>
Sun, 15 Oct 2017 23:55:09 +0000 (19:55 -0400)
committerJason A. Donenfeld <zx2c4@gentoo.org>
Mon, 16 Oct 2017 01:13:38 +0000 (03:13 +0200)
Bug: https://bugs.gentoo.org/611680
Package-Manager: Portage-2.3.10, Repoman-2.3.3

net-wireless/uhd/files/uhd-3.8.5-gcc6.patch [new file with mode: 0644]
net-wireless/uhd/uhd-3.8.5.ebuild
net-wireless/uhd/uhd-3.9.6.ebuild

diff --git a/net-wireless/uhd/files/uhd-3.8.5-gcc6.patch b/net-wireless/uhd/files/uhd-3.8.5-gcc6.patch
new file mode 100644 (file)
index 0000000..c2e5e00
--- /dev/null
@@ -0,0 +1,25 @@
+Bug: https://bugs.gentoo.org/611680
+Backported from: https://github.com/EttusResearch/uhd/commit/b6ad4c0531ef56f4e197cccd06f1d11fc89e4aab
+
+--- a/host/lib/usrp/dboard/db_cbx.cpp
++++ b/host/lib/usrp/dboard/db_cbx.cpp
+@@ -38,7 +38,7 @@ sbx_xcvr::cbx::~cbx(void){
+     /* NOP */
+ }
+-void sbx_xcvr::cbx::write_lo_regs(dboard_iface::unit_t unit, std::vector<boost::uint32_t> &regs)
++void sbx_xcvr::cbx::write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs)
+ {
+     BOOST_FOREACH(boost::uint32_t reg, regs)
+     {
+--- a/host/lib/usrp/dboard/db_sbx_common.hpp
++++ b/host/lib/usrp/dboard/db_sbx_common.hpp
+@@ -225,7 +225,7 @@ class sbx_xcvr : public xcvr_dboard_base{
+         /*! This is the registered instance of the wrapper class, sbx_base. */
+         sbx_xcvr *self_base;
+     private:
+-        void write_lo_regs(dboard_iface::unit_t unit, std::vector<boost::uint32_t> &regs);
++        void write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs);
+         max287x_iface::sptr _txlo;
+         max287x_iface::sptr _rxlo;
+     };
index 1474f296e8cac8722c3763c1eddff9b28cb409ea..d6787b88c5f43953f2a83225384049c08b89a741 100644 (file)
@@ -34,7 +34,11 @@ DEPEND="${RDEPEND}
 
 S="${WORKDIR}"/uhd-release_00$(get_version_component_range 1)_00$(get_version_component_range 2)_00$(get_version_component_range 3)/host
 
+PATCHES=( "${FILESDIR}"/${P}-gcc6.patch )
+
 src_prepare() {
+       cmake-utils_src_prepare
+
        gnome2_environment_reset #534582
 
        #this may not be needed in 3.4.3 and above, please verify
index f1f73a61cafbb66a77b0a7e6e85a2649ed8fc148..57e303285555c615a1b0d10a8ec2fd60c823c9d3 100644 (file)
@@ -36,6 +36,8 @@ DEPEND="${RDEPEND}
 S="${WORKDIR}"/uhd-release_00$(get_version_component_range 1)_00$(get_version_component_range 2)_00$(get_version_component_range 3)/host
 
 src_prepare() {
+       cmake-utils_src_prepare
+
        gnome2_environment_reset #534582
 
        #this may not be needed in 3.4.3 and above, please verify