From c859b0c7968d6463b2330909e3590adab69c060f Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 27 Jan 2024 18:27:42 +0400 Subject: [PATCH] =?UTF-8?q?gnss-sdr:=200.0.17=20=E2=86=92=200.0.19.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/applications/radio/gnss-sdr/default.nix | 36 +++++++++---------- .../fix_libcpu_features_install_path.patch | 24 ++++++------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/pkgs/applications/radio/gnss-sdr/default.nix b/pkgs/applications/radio/gnss-sdr/default.nix index c1d3950bed01..2a0d61a8e596 100644 --- a/pkgs/applications/radio/gnss-sdr/default.nix +++ b/pkgs/applications/radio/gnss-sdr/default.nix @@ -21,13 +21,13 @@ gnuradio.pkgs.mkDerivation rec { pname = "gnss-sdr"; - version = "0.0.17"; + version = "0.0.19.1"; src = fetchFromGitHub { owner = "gnss-sdr"; repo = "gnss-sdr"; rev = "v${version}"; - sha256 = "sha256-0aAjkrVAswoRL/KANBSZ5Jq4Y9VwOHZKUKLpXDdKtk8="; + sha256 = "sha256-IbkYdw1pwI+FMnZMChsxMz241Kv4EzMcBb0mm6/jq1k="; }; patches = [ @@ -75,27 +75,27 @@ gnuradio.pkgs.mkDerivation rec { ]; cmakeFlags = [ - "-DGFlags_INCLUDE_DIRS=${gflags}/include" - "-DGLOG_INCLUDE_DIR=${glog}/include" + (lib.cmakeFeature "GFlags_INCLUDE_DIRS" "${gflags}/include") + (lib.cmakeFeature "GLOG_INCLUDE_DIR" "${glog}/include") # Should use .dylib if darwin support is requested - "-DGFlags_LIBS=${gflags}/lib/libgflags.so" - "-DGLOG_LIBRARIES=${glog}/lib/libglog.so" + (lib.cmakeFeature "GFlags_LIBS" "${gflags}/lib/libgflags.so") + (lib.cmakeFeature "-DGLOG_LIBRARIES" "${glog}/lib/libglog.so") # Use our dependencies glog, gflags and armadillo dependencies - "-DENABLE_OWN_GLOG=OFF" - "-DENABLE_OWN_ARMADILLO=OFF" - "-DENABLE_ORC=ON" - "-DENABLE_LOG=ON" - "-DENABLE_RAW_UDP=${if enableRawUdp then "ON" else "OFF"}" - "-DENABLE_UHD=${if (gnuradio.hasFeature "gr-uhd") then "ON" else "OFF"}" - "-DENABLE_FMCOMMS2=${if (gnuradio.hasFeature "gr-iio" && gnuradio.hasFeature "gr-pdu") then "ON" else "OFF"}" - "-DENABLE_PLUTOSDR=${if (gnuradio.hasFeature "gr-iio") then "ON" else "OFF"}" - "-DENABLE_AD9361=${if (gnuradio.hasFeature "gr-pdu") then "ON" else "OFF"}" - "-DENABLE_UNIT_TESTING=OFF" + (lib.cmakeBool "ENABLE_OWN_GLOG" false) + (lib.cmakeBool "ENABLE_OWN_ARMADILLO" false) + (lib.cmakeBool "ENABLE_ORC" true) + (lib.cmakeBool "ENABLE_LOG" true) + (lib.cmakeBool "ENABLE_RAW_UDP" enableRawUdp) + (lib.cmakeBool "ENABLE_UHD" (gnuradio.hasFeature "gr-uhd")) + (lib.cmakeBool "ENABLE_FMCOMMS2" (gnuradio.hasFeature "gr-iio" && gnuradio.hasFeature "gr-pdu")) + (lib.cmakeBool "ENABLE_PLUTOSDR" (gnuradio.hasFeature "gr-iio")) + (lib.cmakeBool "ENABLE_AD9361" (gnuradio.hasFeature "gr-pdu")) + (lib.cmakeBool "ENABLE_UNIT_TESTING" false) # gnss-sdr doesn't truly depend on BLAS or LAPACK, as long as # armadillo is built using both, so skip checking for them. - "-DBLAS_LIBRARIES=-lblas" - "-DLAPACK_LIBRARIES=-llapack" + (lib.cmakeFeature "BLAS_LIBRARIES" "-lblas") + (lib.cmakeFeature "LAPACK_LIBRARIES" "-llapack") ]; meta = with lib; { diff --git a/pkgs/applications/radio/gnss-sdr/fix_libcpu_features_install_path.patch b/pkgs/applications/radio/gnss-sdr/fix_libcpu_features_install_path.patch index 46925e741a1c..4ff86bfab4be 100644 --- a/pkgs/applications/radio/gnss-sdr/fix_libcpu_features_install_path.patch +++ b/pkgs/applications/radio/gnss-sdr/fix_libcpu_features_install_path.patch @@ -1,7 +1,7 @@ --- i/CMakeLists.txt +++ w/CMakeLists.txt -@@ -1210,7 +1210,7 @@ if(NOT VOLKGNSSSDR_FOUND) - BINARY_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build +@@ -1233,7 +1233,7 @@ if(NOT VOLKGNSSSDR_FOUND) + BINARY_DIR ${GNSSSDR_BINARY_DIR}/volk_gnsssdr_module/build CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=$<$:None>$<$:Debug>$<$:Release>$<$:RelWithDebInfo>$<$:MinSizeRel>$<$:NoOptWithASM>$<$:Coverage>$<$:O2WithASM>$<$:O3WithASM>$<$:ASAN> - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} @@ -9,17 +9,17 @@ DOWNLOAD_COMMAND "" UPDATE_COMMAND "" PATCH_COMMAND "" -@@ -1248,7 +1248,7 @@ if(NOT VOLKGNSSSDR_FOUND) +@@ -1274,7 +1274,7 @@ if(NOT VOLKGNSSSDR_FOUND) ) set(VOLK_GNSSSDR_BUILD_BYPRODUCTS ${VOLK_GNSSSDR_BUILD_BYPRODUCTS} -- ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX} -+ ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${GNSSSDR_BINARY_DIR}/volk_gnsssdr_module/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX} ++ ${GNSSSDR_BINARY_DIR}/volk_gnsssdr_module/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX} ) endif() endif() -@@ -1261,7 +1261,7 @@ if(NOT VOLKGNSSSDR_FOUND) - BINARY_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build +@@ -1287,7 +1287,7 @@ if(NOT VOLKGNSSSDR_FOUND) + BINARY_DIR ${GNSSSDR_BINARY_DIR}/volk_gnsssdr_module/build CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=$<$:None>$<$:Debug>$<$:Release>$<$:RelWithDebInfo>$<$:MinSizeRel>$<$:NoOptWithASM>$<$:Coverage>$<$:O2WithASM>$<$:O3WithASM>$<$:ASAN> - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} @@ -27,8 +27,8 @@ DOWNLOAD_COMMAND "" UPDATE_COMMAND "" PATCH_COMMAND "" -@@ -1280,7 +1280,7 @@ if(NOT VOLKGNSSSDR_FOUND) - BINARY_DIR ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/build +@@ -1306,7 +1306,7 @@ if(NOT VOLKGNSSSDR_FOUND) + BINARY_DIR ${GNSSSDR_BINARY_DIR}/volk_gnsssdr_module/build CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=$<$:None>$<$:Debug>$<$:Release>$<$:RelWithDebInfo>$<$:MinSizeRel>$<$:NoOptWithASM>$<$:Coverage>$<$:O2WithASM>$<$:O3WithASM>$<$:ASAN> - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} @@ -36,12 +36,12 @@ DOWNLOAD_COMMAND "" UPDATE_COMMAND "" PATCH_COMMAND "" -@@ -1319,7 +1319,7 @@ if(NOT VOLKGNSSSDR_FOUND) +@@ -1346,7 +1346,7 @@ if(NOT VOLKGNSSSDR_FOUND) if(CMAKE_VERSION VERSION_GREATER 3.0 AND SUPPORTED_CPU_FEATURES_ARCH) if(NOT CPUFEATURES_FOUND AND ENABLE_CPUFEATURES) set_target_properties(Volkgnsssdr::volkgnsssdr PROPERTIES -- INTERFACE_LINK_LIBRARIES ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX} -+ INTERFACE_LINK_LIBRARIES ${CMAKE_BINARY_DIR}/volk_gnsssdr_module/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX} +- INTERFACE_LINK_LIBRARIES ${GNSSSDR_BINARY_DIR}/volk_gnsssdr_module/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX} ++ INTERFACE_LINK_LIBRARIES ${GNSSSDR_BINARY_DIR}/volk_gnsssdr_module/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}cpu_features${CMAKE_STATIC_LIBRARY_SUFFIX} ) endif() endif()