New version

Resolves: rhbz#2073640
This commit is contained in:
Jaroslav Škarvada 2022-04-21 15:04:27 +02:00
parent 613bc2470d
commit 875ad9bdff
4 changed files with 14 additions and 59 deletions

View File

@ -1,2 +1,2 @@
SHA512 (uhd-images_4.1.0.4.tar.xz) = 6dfd612d794281e01739e6d2623c89d1a516e6a770cc39ce7536d6b760a51a4e2e09453d80791c417d635d3f76326a397875e04dd08418ed724b4d0679f2961b
SHA512 (uhd-4.1.0.5.tar.gz) = 4929ebc8a12bcc0acfe4a64ceafe17387420e2f056e7bb7284a8d7b60d14aba05484b3c033ce63b00c6d9115f570b056df4e2b36e11a2b25079a8c34b1d084af
SHA512 (uhd-4.2.0.0.tar.gz) = a5f105a8765a06e53bed17dee760dfa985d40a97c61ca243127c8a912378d6f5ae81170a48e8e5f92a238bcfd66742798043b3fb0119e574dbac74291f15ec9c
SHA512 (uhd-images_4.1.0.5.tar.xz) = fa9ca49bc917e55a1505acce090dc6b06cac6c59fbe7a78c2c47f79783fab52baf9563903715da205762962485c8b4a83292a171a33e7c247b0eeb35819aff5c

View File

@ -1,46 +0,0 @@
diff --git a/host/cmake/Modules/UHDAtomics.cmake b/host/cmake/Modules/UHDAtomics.cmake
index 4d53a2d..e206f39 100644
--- a/host/cmake/Modules/UHDAtomics.cmake
+++ b/host/cmake/Modules/UHDAtomics.cmake
@@ -33,6 +33,16 @@ function(CHECK_WORKING_CXX_ATOMICS64 varname)
" ${varname})
endfunction(CHECK_WORKING_CXX_ATOMICS64)
+function(CHECK_WORKING_CXX_BOOST_ATOMICS varname)
+ CHECK_CXX_SOURCE_COMPILES("
+ #include <boost/lockfree/queue.hpp>
+ boost::lockfree::queue<int> queue(1);
+ int main() {
+ return queue.is_lock_free();
+ }
+ " ${varname})
+endfunction(CHECK_WORKING_CXX_BOOST_ATOMICS)
+
macro(CHECK_ATOMICS_LIB_REQUIRED required_var)
set(${required_var} FALSE)
if(MSVC)
@@ -76,5 +86,24 @@ macro(CHECK_ATOMICS_LIB_REQUIRED required_var)
"Host compiler appears to require libatomic for 64-bit operations, but cannot find it.")
endif()
endif()
+ # Check whether boost requires atomic.
+ CHECK_WORKING_CXX_BOOST_ATOMICS(HAVE_CXX_BOOST_ATOMICS_WITHOUT_LIB)
+ # If not, check if the library exists, and atomics work with it.
+ if(NOT HAVE_CXX_BOOST_ATOMICS_WITHOUT_LIB)
+ check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
+ if(HAVE_LIBATOMIC)
+ set(${required_var} TRUE)
+ set(CMAKE_REQUIRED_LIBRARIES "atomic")
+ CHECK_WORKING_CXX_BOOST_ATOMICS(HAVE_CXX_BOOST_ATOMICS_WITH_LIB)
+ unset(CMAKE_REQUIRED_LIBRARIES)
+ if (NOT HAVE_CXX_BOOST_ATOMICS_WITH_LIB)
+ message(FATAL_ERROR "Host compiler must support std::atomic!")
+ endif()
+ else()
+ message(
+ FATAL_ERROR
+ "Host compiler appears to require libatomic, but cannot find it.")
+ endif()
+ endif()
endif()
endmacro(CHECK_ATOMICS_LIB_REQUIRED)

View File

@ -1,13 +1,13 @@
diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp
index 802dd5e..e3bd722 100644
index 73b4cc2..a122c9d 100644
--- a/host/lib/utils/paths.cpp
+++ b/host/lib/utils/paths.cpp
@@ -289,7 +289,7 @@ std::string uhd::get_pkg_path(void)
@@ -290,7 +290,7 @@ std::string uhd::get_pkg_path(void)
std::string uhd::get_lib_path(void)
{
- fs::path runtime_libfile_path = boost::dll::this_line_location();
+ fs::path runtime_libfile_path = "/usr" / boost::dll::this_line_location();
//Normalize before decomposing path so result is reliable
// Normalize before decomposing path so result is reliable
fs::path lib_path = runtime_libfile_path.lexically_normal().parent_path();
return lib_path.string();

View File

@ -29,10 +29,10 @@
Name: uhd
URL: http://github.com/EttusResearch/uhd
Version: 4.1.0.5
Version: 4.2.0.0
#%%global images_ver %%{version}
%global images_ver 4.1.0.4
Release: 5%{?dist}
%global images_ver 4.1.0.5
Release: 1%{?dist}
License: GPLv3+
BuildRequires: make
BuildRequires: gcc-c++
@ -68,11 +68,9 @@ Summary: Universal Hardware Driver for Ettus Research products
Source0: %{url}/archive/v%{version}/uhd-%{version}.tar.gz
Source1: %{name}-limits.conf
Source2: %{url}/releases/download/v%{images_ver}/uhd-images_%{images_ver}.tar.xz
# https://github.com/EttusResearch/uhd/issues/410
Patch1: uhd-4.1.0.5-s390x-build-fix.patch
# dirty workaround for the https://github.com/EttusResearch/uhd/issues/551
# until the better fix is available
Patch2: uhd-4.1.0.5-imagepath-fix.patch
Patch0: uhd-4.2.0.0-imagepath-fix.patch
%description
The UHD is the universal hardware driver for Ettus Research products.
@ -120,8 +118,7 @@ Wireshark dissector plugins.
%prep
%setup -q
%patch1 -p1 -b .s390x-build-fix
%patch2 -p1 -b .imagepath-fix
%patch0 -p1 -b .imagepath-fix
# firmware
%if %{with binary_firmware}
@ -283,6 +280,10 @@ exit 0
%endif
%changelog
* Thu Apr 21 2022 Jaroslav Škarvada <jskarvad@redhat.com> - 4.2.0.0-1
- New version
Resolves: rhbz#2073640
* Tue Feb 1 2022 Jaroslav Škarvada <jskarvad@redhat.com> - 4.1.0.5-5
- Switched to the upstream patch to fix compilation on the s390x