Hello community, here is the log from the commit of package soapy-sdr for openSUSE:Factory checked in at 2018-06-19 12:02:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/soapy-sdr (Old) and /work/SRC/openSUSE:Factory/.soapy-sdr.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "soapy-sdr" Tue Jun 19 12:02:26 2018 rev:4 rq:616942 version:0.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/soapy-sdr/soapy-sdr.changes 2018-01-17 21:59:16.372509450 +0100 +++ /work/SRC/openSUSE:Factory/.soapy-sdr.new/soapy-sdr.changes 2018-06-19 12:02:27.464718057 +0200 @@ -1,0 +2,14 @@ +Fri Jun 8 10:06:58 UTC 2018 - [email protected] + +- Update to version 0.6.1 + * Handle null pointer in SoapySDRDevice_makeStrArgs() + * Added read stream status to rate testing application + * Fixed units for average byte rate in stream rate testing utility + * Separate ENABLE_PYTHON and ENABLE_PYTHON3 options for python support + * Moved cmake modules into subdirectory to hide them from cmake's + default project search path when cloned in user's home directory +- Remove patch: + - 0001-Remove-whitespace-padding-from-PYTHON3_LIBRARIES-var.patch + (applied upstream) + +------------------------------------------------------------------- Old: ---- 0001-Remove-whitespace-padding-from-PYTHON3_LIBRARIES-var.patch soapy-sdr-0.6.0.tar.gz New: ---- soapy-sdr-0.6.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ soapy-sdr.spec ++++++ --- /var/tmp/diff_new_pack.2DYe4d/_old 2018-06-19 12:02:29.060658802 +0200 +++ /var/tmp/diff_new_pack.2DYe4d/_new 2018-06-19 12:02:29.060658802 +0200 @@ -19,14 +19,13 @@ %define sover 0_6 Name: soapy-sdr -Version: 0.6.0 +Version: 0.6.1 Release: 0 Summary: Vendor and platform neutral SDR support library License: BSL-1.0 Group: Development/Libraries/C and C++ Url: https://github.com/pothosware/SoapySDR.git Source: https://github.com/pothosware/SoapySDR/archive/%{name}-%{version}.tar.gz -Patch0: 0001-Remove-whitespace-padding-from-PYTHON3_LIBRARIES-var.patch BuildRequires: boost-devel BuildRequires: cmake BuildRequires: doxygen @@ -66,7 +65,6 @@ %prep %setup -q -n SoapySDR-%{name}-%{version} -%patch0 -p1 %build %cmake \ ++++++ soapy-sdr-0.6.0.tar.gz -> soapy-sdr-0.6.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/.travis.yml new/SoapySDR-soapy-sdr-0.6.1/.travis.yml --- old/SoapySDR-soapy-sdr-0.6.0/.travis.yml 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/.travis.yml 2017-12-13 02:14:49.000000000 +0100 @@ -17,16 +17,10 @@ include: - os: linux compiler: gcc - env: - global: - - PYTHON_EXECUTABLE=/usr/bin/python - - PYTHON3_EXECUTABLE=/usr/bin/python3 + env: PYTHON_EXECUTABLE=/usr/bin/python PYTHON3_EXECUTABLE=/usr/bin/python3 - os: osx compiler: clang - env: - global: - - PYTHON_EXECUTABLE=/usr/local/bin/python - - PYTHON3_EXECUTABLE=/usr/local/bin/python3 + env: PYTHON_EXECUTABLE=/usr/local/bin/python2 PYTHON3_EXECUTABLE=/usr/local/bin/python3 env: global: @@ -46,7 +40,9 @@ # install python3 support dependencies - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq python3 python3-dev python3-numpy swig; fi; - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install swig python3 ; fi + + # install osx python and python2 dependencies + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install swig python2 python3 ; fi script: - mkdir build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/CMakeLists.txt new/SoapySDR-soapy-sdr-0.6.1/CMakeLists.txt --- old/SoapySDR-soapy-sdr-0.6.0/CMakeLists.txt 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/CMakeLists.txt 2017-12-13 02:14:49.000000000 +0100 @@ -10,10 +10,15 @@ # gather version information # packagers may specify -DSOAPY_SDR_EXTVER="foo" to replace the git hash ######################################################################## -set(SOAPY_SDR_LIBVER "0.6.0") +file(READ "${PROJECT_SOURCE_DIR}/Changelog.txt" changelog_txt) +string(REGEX MATCH "Release ([0-9]+\\.[0-9]+\\.[0-9]+) \\(" CHANGELOG_MATCH "${changelog_txt}") +if(NOT CHANGELOG_MATCH) + message(FATAL_ERROR "Failed to extract version number from Changelog.txt") +endif(NOT CHANGELOG_MATCH) +set(SOAPY_SDR_LIBVER "${CMAKE_MATCH_1}") if (NOT SOAPY_SDR_EXTVER) - include(${PROJECT_SOURCE_DIR}/cmake/GetGitRevisionDescription.cmake) + include(${PROJECT_SOURCE_DIR}/cmake/Modules/GetGitRevisionDescription.cmake) get_git_head_revision(GITREFSPEC GITHASH) if (GITHASH) string(SUBSTRING "${GITHASH}" 0 8 GITHASH) @@ -78,7 +83,7 @@ ######################################################################## # Allows in-tree module util ######################################################################## -set(SoapySDR_DIR ${PROJECT_SOURCE_DIR}/cmake) +set(SoapySDR_DIR ${PROJECT_SOURCE_DIR}/cmake/Modules) set(SOAPY_SDR_IN_TREE_SOURCE_DIR ${PROJECT_SOURCE_DIR}) find_package(SoapySDR NO_MODULE REQUIRED) include_directories(${SoapySDR_INCLUDE_DIRS}) #local include precedence @@ -87,12 +92,12 @@ # Install cmake helper modules ######################################################################## configure_file( - ${PROJECT_SOURCE_DIR}/cmake/SoapySDRConfigVersion.in.cmake + ${PROJECT_SOURCE_DIR}/cmake/Modules/SoapySDRConfigVersion.in.cmake ${PROJECT_BINARY_DIR}/SoapySDRConfigVersion.cmake @ONLY) set(cmake_files - ${PROJECT_SOURCE_DIR}/cmake/SoapySDRConfig.cmake - ${PROJECT_SOURCE_DIR}/cmake/SoapySDRUtil.cmake + ${PROJECT_SOURCE_DIR}/cmake/Modules/SoapySDRConfig.cmake + ${PROJECT_SOURCE_DIR}/cmake/Modules/SoapySDRUtil.cmake ${PROJECT_BINARY_DIR}/SoapySDRConfigVersion.cmake) if (UNIX) install(FILES ${cmake_files} DESTINATION share/cmake/${PROJECT_NAME}) @@ -116,8 +121,6 @@ ######################################################################## # Python support (optional) ######################################################################## -option(ENABLE_PYTHON "enable python bindings" ON) -if (ENABLE_PYTHON) message(STATUS "") message(STATUS "#############################################") message(STATUS "## Begin configuration for Python support...") @@ -125,16 +128,13 @@ message(STATUS "Enabling optional Python bindings if possible...") add_subdirectory(python) -if(BUILD_PYTHON3) message(STATUS "") message(STATUS "#############################################") message(STATUS "## Begin configuration for Python3 support...") message(STATUS "#############################################") message(STATUS "Enabling optional Python3 bindings if possible...") add_subdirectory(python3) -endif(BUILD_PYTHON3) -endif (ENABLE_PYTHON) ######################################################################## # uninstall target diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/Changelog.txt new/SoapySDR-soapy-sdr-0.6.1/Changelog.txt --- old/SoapySDR-soapy-sdr-0.6.0/Changelog.txt 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/Changelog.txt 2017-12-13 02:14:49.000000000 +0100 @@ -1,5 +1,15 @@ This this the changelog file for the SoapySDR project. +Release 0.6.1 (2017-12-12) +========================== + +- Handle null pointer in SoapySDRDevice_makeStrArgs() +- Added read stream status to rate testing application +- Fixed units for average byte rate in stream rate testing utility +- Separate ENABLE_PYTHON and ENABLE_PYTHON3 options for python support +- Moved cmake modules into subdirectory to hide them from cmake's + default project search path when cloned in user's home directory + Release 0.6.0 (2017-04-29) ========================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/apps/SoapyRateTest.cpp new/SoapySDR-soapy-sdr-0.6.1/apps/SoapyRateTest.cpp --- old/SoapySDR-soapy-sdr-0.6.0/apps/SoapyRateTest.cpp 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/apps/SoapyRateTest.cpp 2017-12-13 02:14:49.000000000 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2016 Josh Blum +// Copyright (c) 2016-2017 Josh Blum // SPDX-License-Identifier: BSL-1.0 #include <SoapySDR/Device.hpp> @@ -37,6 +37,9 @@ unsigned long long totalSamples(0); const auto startTime = std::chrono::high_resolution_clock::now(); auto timeLastPrint = std::chrono::high_resolution_clock::now(); + auto timeLastSpin = std::chrono::high_resolution_clock::now(); + auto timeLastStatus = std::chrono::high_resolution_clock::now(); + int spinIndex(0); std::cout << "Starting stream loop, press Ctrl+C to exit..." << std::endl; device->activateStream(stream); @@ -75,15 +78,36 @@ totalSamples += ret; const auto now = std::chrono::high_resolution_clock::now(); + if (timeLastSpin + std::chrono::milliseconds(300) < now) + { + timeLastSpin = now; + static const char spin[] = {"|/-\\"}; + printf("\b%c", spin[(spinIndex++)%4]); + fflush(stdout); + } + //occasionally read out the stream status (non blocking) + if (timeLastStatus + std::chrono::seconds(1) < now) + { + timeLastStatus = now; + while (true) + { + size_t chanMask; int flags; long long timeNs; + ret = device->readStreamStatus(stream, chanMask, flags, timeNs, 0); + if (ret == SOAPY_SDR_OVERFLOW) overflows++; + else if (ret == SOAPY_SDR_UNDERFLOW) underflows++; + else if (ret == SOAPY_SDR_TIME_ERROR) {} + else break; + } + } if (timeLastPrint + std::chrono::seconds(5) < now) { timeLastPrint = now; const auto timePassed = std::chrono::duration_cast<std::chrono::microseconds>(now - startTime); const auto sampleRate = double(totalSamples)/timePassed.count(); - printf("%g Msps\t%g Bps", sampleRate, sampleRate*numChans*elemSize); + printf("\b%g Msps\t%g MBps", sampleRate, sampleRate*numChans*elemSize); if (overflows != 0) printf("\tOverflows %u", overflows); if (underflows != 0) printf("\tUnderflows %u", underflows); - printf("\n"); + printf("\n "); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/cmake/GetGitRevisionDescription.cmake new/SoapySDR-soapy-sdr-0.6.1/cmake/GetGitRevisionDescription.cmake --- old/SoapySDR-soapy-sdr-0.6.0/cmake/GetGitRevisionDescription.cmake 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/cmake/GetGitRevisionDescription.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,130 +0,0 @@ -# - Returns a version string from Git -# -# These functions force a re-configure on each git commit so that you can -# trust the values of the variables in your build system. -# -# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...]) -# -# Returns the refspec and sha hash of the current head revision -# -# git_describe(<var> [<additional arguments to git describe> ...]) -# -# Returns the results of git describe on the source tree, and adjusting -# the output so that it tests false if an error occurs. -# -# git_get_exact_tag(<var> [<additional arguments to git describe> ...]) -# -# Returns the results of git describe --exact-match on the source tree, -# and adjusting the output so that it tests false if there was no exact -# matching tag. -# -# Requires CMake 2.6 or newer (uses the 'function' command) -# -# Original Author: -# 2009-2010 Ryan Pavlik <[email protected]> <[email protected]> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -if(__get_git_revision_description) - return() -endif() -set(__get_git_revision_description YES) - -# We must run the following at "include" time, not at function call time, -# to find the path to this module rather than the path to a calling list file -get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) - -function(get_git_head_revision _refspecvar _hashvar) - set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") - set(GIT_DIR "${GIT_PARENT_DIR}/.git") - while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories - set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") - get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) - if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT) - # We have reached the root directory, we are not in git - set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE) - set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE) - return() - endif() - set(GIT_DIR "${GIT_PARENT_DIR}/.git") - endwhile() - # check if this is a submodule - if(NOT IS_DIRECTORY ${GIT_DIR}) - file(READ ${GIT_DIR} submodule) - string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule}) - get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH) - get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE) - endif() - set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data") - if(NOT EXISTS "${GIT_DATA}") - file(MAKE_DIRECTORY "${GIT_DATA}") - endif() - - if(NOT EXISTS "${GIT_DIR}/HEAD") - return() - endif() - set(HEAD_FILE "${GIT_DATA}/HEAD") - configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY) - - configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in" - "${GIT_DATA}/grabRef.cmake" - @ONLY) - include("${GIT_DATA}/grabRef.cmake") - - set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE) - set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE) -endfunction() - -function(git_describe _var) - if(NOT GIT_FOUND) - find_package(Git QUIET) - endif() - get_git_head_revision(refspec hash) - if(NOT GIT_FOUND) - set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) - return() - endif() - if(NOT hash) - set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) - return() - endif() - - # TODO sanitize - #if((${ARGN}" MATCHES "&&") OR - # (ARGN MATCHES "||") OR - # (ARGN MATCHES "\\;")) - # message("Please report the following error to the project!") - # message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}") - #endif() - - #message(STATUS "Arguments to execute_process: ${ARGN}") - - execute_process(COMMAND - "${GIT_EXECUTABLE}" - describe - ${hash} - ${ARGN} - WORKING_DIRECTORY - "${CMAKE_SOURCE_DIR}" - RESULT_VARIABLE - res - OUTPUT_VARIABLE - out - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(NOT res EQUAL 0) - set(out "${out}-${res}-NOTFOUND") - endif() - - set(${_var} "${out}" PARENT_SCOPE) -endfunction() - -function(git_get_exact_tag _var) - git_describe(out --exact-match ${ARGN}) - set(${_var} "${out}" PARENT_SCOPE) -endfunction() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/cmake/GetGitRevisionDescription.cmake.in new/SoapySDR-soapy-sdr-0.6.1/cmake/GetGitRevisionDescription.cmake.in --- old/SoapySDR-soapy-sdr-0.6.0/cmake/GetGitRevisionDescription.cmake.in 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/cmake/GetGitRevisionDescription.cmake.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,38 +0,0 @@ -# -# Internal file for GetGitRevisionDescription.cmake -# -# Requires CMake 2.6 or newer (uses the 'function' command) -# -# Original Author: -# 2009-2010 Ryan Pavlik <[email protected]> <[email protected]> -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -set(HEAD_HASH) - -file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024) - -string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS) -if(HEAD_CONTENTS MATCHES "ref") - # named branch - string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}") - if(EXISTS "@GIT_DIR@/${HEAD_REF}") - configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) - elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}") - configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) - set(HEAD_HASH "${HEAD_REF}") - endif() -else() - # detached HEAD - configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY) -endif() - -if(NOT HEAD_HASH) - file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024) - string(STRIP "${HEAD_HASH}" HEAD_HASH) -endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/cmake/Modules/GetGitRevisionDescription.cmake new/SoapySDR-soapy-sdr-0.6.1/cmake/Modules/GetGitRevisionDescription.cmake --- old/SoapySDR-soapy-sdr-0.6.0/cmake/Modules/GetGitRevisionDescription.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/SoapySDR-soapy-sdr-0.6.1/cmake/Modules/GetGitRevisionDescription.cmake 2017-12-13 02:14:49.000000000 +0100 @@ -0,0 +1,130 @@ +# - Returns a version string from Git +# +# These functions force a re-configure on each git commit so that you can +# trust the values of the variables in your build system. +# +# get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...]) +# +# Returns the refspec and sha hash of the current head revision +# +# git_describe(<var> [<additional arguments to git describe> ...]) +# +# Returns the results of git describe on the source tree, and adjusting +# the output so that it tests false if an error occurs. +# +# git_get_exact_tag(<var> [<additional arguments to git describe> ...]) +# +# Returns the results of git describe --exact-match on the source tree, +# and adjusting the output so that it tests false if there was no exact +# matching tag. +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <[email protected]> <[email protected]> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__get_git_revision_description) + return() +endif() +set(__get_git_revision_description YES) + +# We must run the following at "include" time, not at function call time, +# to find the path to this module rather than the path to a calling list file +get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) + +function(get_git_head_revision _refspecvar _hashvar) + set(GIT_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + set(GIT_DIR "${GIT_PARENT_DIR}/.git") + while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories + set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") + get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) + if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT) + # We have reached the root directory, we are not in git + set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE) + set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE) + return() + endif() + set(GIT_DIR "${GIT_PARENT_DIR}/.git") + endwhile() + # check if this is a submodule + if(NOT IS_DIRECTORY ${GIT_DIR}) + file(READ ${GIT_DIR} submodule) + string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule}) + get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH) + get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE) + endif() + set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data") + if(NOT EXISTS "${GIT_DATA}") + file(MAKE_DIRECTORY "${GIT_DATA}") + endif() + + if(NOT EXISTS "${GIT_DIR}/HEAD") + return() + endif() + set(HEAD_FILE "${GIT_DATA}/HEAD") + configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY) + + configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in" + "${GIT_DATA}/grabRef.cmake" + @ONLY) + include("${GIT_DATA}/grabRef.cmake") + + set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE) + set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE) +endfunction() + +function(git_describe _var) + if(NOT GIT_FOUND) + find_package(Git QUIET) + endif() + get_git_head_revision(refspec hash) + if(NOT GIT_FOUND) + set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) + return() + endif() + if(NOT hash) + set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) + return() + endif() + + # TODO sanitize + #if((${ARGN}" MATCHES "&&") OR + # (ARGN MATCHES "||") OR + # (ARGN MATCHES "\\;")) + # message("Please report the following error to the project!") + # message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}") + #endif() + + #message(STATUS "Arguments to execute_process: ${ARGN}") + + execute_process(COMMAND + "${GIT_EXECUTABLE}" + describe + ${hash} + ${ARGN} + WORKING_DIRECTORY + "${CMAKE_SOURCE_DIR}" + RESULT_VARIABLE + res + OUTPUT_VARIABLE + out + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT res EQUAL 0) + set(out "${out}-${res}-NOTFOUND") + endif() + + set(${_var} "${out}" PARENT_SCOPE) +endfunction() + +function(git_get_exact_tag _var) + git_describe(out --exact-match ${ARGN}) + set(${_var} "${out}" PARENT_SCOPE) +endfunction() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/cmake/Modules/GetGitRevisionDescription.cmake.in new/SoapySDR-soapy-sdr-0.6.1/cmake/Modules/GetGitRevisionDescription.cmake.in --- old/SoapySDR-soapy-sdr-0.6.0/cmake/Modules/GetGitRevisionDescription.cmake.in 1970-01-01 01:00:00.000000000 +0100 +++ new/SoapySDR-soapy-sdr-0.6.1/cmake/Modules/GetGitRevisionDescription.cmake.in 2017-12-13 02:14:49.000000000 +0100 @@ -0,0 +1,38 @@ +# +# Internal file for GetGitRevisionDescription.cmake +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik <[email protected]> <[email protected]> +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +set(HEAD_HASH) + +file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024) + +string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS) +if(HEAD_CONTENTS MATCHES "ref") + # named branch + string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}") + if(EXISTS "@GIT_DIR@/${HEAD_REF}") + configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) + elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}") + configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) + set(HEAD_HASH "${HEAD_REF}") + endif() +else() + # detached HEAD + configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY) +endif() + +if(NOT HEAD_HASH) + file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024) + string(STRIP "${HEAD_HASH}" HEAD_HASH) +endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/cmake/Modules/SoapySDRConfig.cmake new/SoapySDR-soapy-sdr-0.6.1/cmake/Modules/SoapySDRConfig.cmake --- old/SoapySDR-soapy-sdr-0.6.0/cmake/Modules/SoapySDRConfig.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/SoapySDR-soapy-sdr-0.6.1/cmake/Modules/SoapySDRConfig.cmake 2017-12-13 02:14:49.000000000 +0100 @@ -0,0 +1,177 @@ +if(DEFINED INCLUDED_SOAPY_SDR_CONFIG_CMAKE) + return() +endif() +set(INCLUDED_SOAPY_SDR_CONFIG_CMAKE TRUE) + +######################################################################## +# SoapySDRConfig - cmake project configuration for client clibraries +# +# The following will be set after find_package(SoapySDR): +# SOAPY_SDR_MODULE_UTIL() - utility function to build modules +# SoapySDR_LIBRARIES - SoapySDR development libraries +# SoapySDR_INCLUDE_DIRS - SoapySDR development includes +######################################################################## +list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR}) +include(SoapySDRUtil) + +######################################################################## +# select the release build type by default to get optimization flags +######################################################################## +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") + message(STATUS "Build type not specified: defaulting to release.") +endif(NOT CMAKE_BUILD_TYPE) +set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") + +######################################################################## +# Automatic LIB_SUFFIX detection + configuration option +######################################################################## +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(LINUX TRUE) +endif() + +if(LINUX AND EXISTS "/etc/debian_version") + set(DEBIAN TRUE) +endif() + +if(LINUX AND EXISTS "/etc/redhat-release") + set(REDHAT TRUE) +endif() + +if(LINUX AND EXISTS "/etc/SuSE-release") + set(SUSE TRUE) +endif() + +if(LINUX AND EXISTS "/etc/slackware-version") + set(SLACKWARE TRUE) +endif() + +if(NOT DEFINED LIB_SUFFIX AND (REDHAT OR SUSE OR SLACKWARE) AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$") + SET(LIB_SUFFIX 64) +endif() +set(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix") + +######################################################################## +# Provide add_compile_options() when not available +######################################################################## +if(CMAKE_VERSION VERSION_LESS "2.8.12") + function(add_compile_options) + add_definitions(${ARGN}) + endfunction(add_compile_options) +endif() + +######################################################################## +# Helpful compiler flags +######################################################################## + +#C++11 is a required language feature for this project +set(CMAKE_CXX_STANDARD 11) + +if(CMAKE_COMPILER_IS_GNUCXX) + + #enable C++11 on older versions of cmake + if (CMAKE_VERSION VERSION_LESS "3.1") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") + endif() + + #force a compile-time error when symbols are missing + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") + + #common warnings to help encourage good coding practices + add_compile_options(-Wall) + add_compile_options(-Wextra) + + #symbols are only exported from libraries/modules explicitly + add_compile_options(-fvisibility=hidden) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") +endif() + +if(APPLE) + #fixes issue with duplicate module registry when using application bundle + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flat_namespace") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -flat_namespace") +endif() + +if(MSVC) + #C++11 is a required language feature for this project + if (${MSVC_VERSION} LESS 1700) + message(FATAL_ERROR "the build requires MSVC 2012 or newer for C++11 support") + endif() + + #we always want to use multiple cores for compilation + add_compile_options(/MP) + + #suppress the following warnings which are commonly caused by project headers + add_compile_options(/wd4251) #disable 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' + add_compile_options(/wd4503) #'identifier' : decorated name length exceeded, name was truncated + + #projects should be cross-platform and standard stl functions should work + add_definitions(-DNOMINMAX) #enables std::min and std::max +endif() + +if ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") + add_compile_options(-stdlib=libc++) +endif() + +######################################################################## +# extract the ABI version string from the Version.h header +######################################################################## +function(_SOAPY_SDR_GET_ABI_VERSION VERSION SOAPY_SDR_INCLUDE_DIR) + file(READ "${SOAPY_SDR_INCLUDE_DIR}/SoapySDR/Version.h" version_h) + string(REGEX MATCH "\\#define SOAPY_SDR_ABI_VERSION \"([0-9]+\\.[0-9]+(-[A-Za-z0-9]+)?)\"" SOAPY_SDR_ABI_VERSION_MATCHES "${version_h}") + if(NOT SOAPY_SDR_ABI_VERSION_MATCHES) + message(FATAL_ERROR "Failed to extract version number from Version.h") + endif(NOT SOAPY_SDR_ABI_VERSION_MATCHES) + set(${VERSION} "${CMAKE_MATCH_1}" PARENT_SCOPE) +endfunction(_SOAPY_SDR_GET_ABI_VERSION) + +######################################################################## +# In-tree settings +######################################################################## +if (SOAPY_SDR_IN_TREE_SOURCE_DIR) + if(NOT SOAPY_SDR_ROOT) + set(SOAPY_SDR_ROOT ${CMAKE_INSTALL_PREFIX}) + endif(NOT SOAPY_SDR_ROOT) + set(SoapySDR_INCLUDE_DIRS ${SOAPY_SDR_IN_TREE_SOURCE_DIR}/include) + set(SoapySDR_LIBRARIES SoapySDR) + _SOAPY_SDR_GET_ABI_VERSION(SOAPY_SDR_ABI_VERSION ${SoapySDR_INCLUDE_DIRS}) + return() +endif (SOAPY_SDR_IN_TREE_SOURCE_DIR) + +######################################################################## +## installation root +######################################################################## +if (UNIX) + get_filename_component(SOAPY_SDR_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../.." ABSOLUTE) +elseif (WIN32) + get_filename_component(SOAPY_SDR_ROOT "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE) +endif () + +######################################################################## +## locate the library +######################################################################## +find_library( + SOAPY_SDR_LIBRARY SoapySDR SoapySDRd + PATHS ${SOAPY_SDR_ROOT}/lib${LIB_SUFFIX} + PATH_SUFFIXES ${CMAKE_LIBRARY_ARCHITECTURE} + NO_DEFAULT_PATH +) +if(NOT SOAPY_SDR_LIBRARY) + message(FATAL_ERROR "cannot find SoapySDR library in ${SOAPY_SDR_ROOT}/lib${LIB_SUFFIX}") +endif() +set(SoapySDR_LIBRARIES ${SOAPY_SDR_LIBRARY}) + +######################################################################## +## locate the includes +######################################################################## +find_path( + SOAPY_SDR_INCLUDE_DIR SoapySDR/Config.hpp + PATHS ${SOAPY_SDR_ROOT}/include + NO_DEFAULT_PATH +) +if(NOT SOAPY_SDR_INCLUDE_DIR) + message(FATAL_ERROR "cannot find SoapySDR includes in ${SOAPY_SDR_ROOT}/include") +endif() +set(SoapySDR_INCLUDE_DIRS ${SOAPY_SDR_INCLUDE_DIR}) +_SOAPY_SDR_GET_ABI_VERSION(SOAPY_SDR_ABI_VERSION ${SoapySDR_INCLUDE_DIRS}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/cmake/Modules/SoapySDRConfigVersion.in.cmake new/SoapySDR-soapy-sdr-0.6.1/cmake/Modules/SoapySDRConfigVersion.in.cmake --- old/SoapySDR-soapy-sdr-0.6.0/cmake/Modules/SoapySDRConfigVersion.in.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/SoapySDR-soapy-sdr-0.6.1/cmake/Modules/SoapySDRConfigVersion.in.cmake 2017-12-13 02:14:49.000000000 +0100 @@ -0,0 +1,12 @@ +set(PACKAGE_FIND_NAME "@PROJECT_NAME@") +set(PACKAGE_VERSION "@SOAPY_SDR_VERSION@") + +# Check whether the requested PACKAGE_FIND_VERSION is compatible +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/cmake/Modules/SoapySDRUtil.cmake new/SoapySDR-soapy-sdr-0.6.1/cmake/Modules/SoapySDRUtil.cmake --- old/SoapySDR-soapy-sdr-0.6.0/cmake/Modules/SoapySDRUtil.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/SoapySDR-soapy-sdr-0.6.1/cmake/Modules/SoapySDRUtil.cmake 2017-12-13 02:14:49.000000000 +0100 @@ -0,0 +1,53 @@ +if(DEFINED INCLUDED_SOAPY_SDR_UTIL_CMAKE) + return() +endif() +set(INCLUDED_SOAPY_SDR_UTIL_CMAKE TRUE) + +######################################################################## +## SOAPY_SDR_MODULE_UTIL - build and install modules for Soapy SDR +## +## This utility can handle the build and installation operations. +## +## Arguments: +## +## TARGET - the name of the module to build +## +## SOURCES - a list of c++ source files +## +## LIBRARIES - a list of libraries to link the module to +## The module will automatically link to SoapySDR library. +## +## DESTINATION - override the default install path when specified +## The default destination is a relative path (<lib>/SoapySDR/modules). +## This argument specifies an alternative relative or absolute path, +## and can be used standalone or in conjunction with PREFIX. +## +## PREFIX - override the default install prefix when specified +## The prefix modifies the destination with an absolute path +## to replace the typical CMAKE_INSTALL_PREFIX install rules. +## +######################################################################## +function(SOAPY_SDR_MODULE_UTIL) + + include(CMakeParseArguments) + CMAKE_PARSE_ARGUMENTS(MODULE "" "TARGET;DESTINATION;PREFIX" "SOURCES;LIBRARIES" ${ARGN}) + + include_directories(${SoapySDR_INCLUDE_DIRS}) + add_library(${MODULE_TARGET} MODULE ${MODULE_SOURCES}) + target_link_libraries(${MODULE_TARGET} ${MODULE_LIBRARIES} ${SoapySDR_LIBRARIES}) + set_target_properties(${MODULE_TARGET} PROPERTIES DEBUG_POSTFIX "") #same name in debug mode + + if (NOT MODULE_DESTINATION) + set(MODULE_DESTINATION lib${LIB_SUFFIX}/SoapySDR/modules${SOAPY_SDR_ABI_VERSION}/) + endif() + + if (MODULE_PREFIX) + set(MODULE_DESTINATION ${MODULE_PREFIX}/${MODULE_DESTINATION}) + endif() + + install( + TARGETS ${MODULE_TARGET} + DESTINATION ${MODULE_DESTINATION} + ) + +endfunction(SOAPY_SDR_MODULE_UTIL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/cmake/SoapySDRConfig.cmake new/SoapySDR-soapy-sdr-0.6.1/cmake/SoapySDRConfig.cmake --- old/SoapySDR-soapy-sdr-0.6.0/cmake/SoapySDRConfig.cmake 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/cmake/SoapySDRConfig.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,177 +0,0 @@ -if(DEFINED INCLUDED_SOAPY_SDR_CONFIG_CMAKE) - return() -endif() -set(INCLUDED_SOAPY_SDR_CONFIG_CMAKE TRUE) - -######################################################################## -# SoapySDRConfig - cmake project configuration for client clibraries -# -# The following will be set after find_package(SoapySDR): -# SOAPY_SDR_MODULE_UTIL() - utility function to build modules -# SoapySDR_LIBRARIES - SoapySDR development libraries -# SoapySDR_INCLUDE_DIRS - SoapySDR development includes -######################################################################## -list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR}) -include(SoapySDRUtil) - -######################################################################## -# select the release build type by default to get optimization flags -######################################################################## -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release") - message(STATUS "Build type not specified: defaulting to release.") -endif(NOT CMAKE_BUILD_TYPE) -set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") - -######################################################################## -# Automatic LIB_SUFFIX detection + configuration option -######################################################################## -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(LINUX TRUE) -endif() - -if(LINUX AND EXISTS "/etc/debian_version") - set(DEBIAN TRUE) -endif() - -if(LINUX AND EXISTS "/etc/redhat-release") - set(REDHAT TRUE) -endif() - -if(LINUX AND EXISTS "/etc/SuSE-release") - set(SUSE TRUE) -endif() - -if(LINUX AND EXISTS "/etc/slackware-version") - set(SLACKWARE TRUE) -endif() - -if(NOT DEFINED LIB_SUFFIX AND (REDHAT OR SUSE OR SLACKWARE) AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$") - SET(LIB_SUFFIX 64) -endif() -set(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix") - -######################################################################## -# Provide add_compile_options() when not available -######################################################################## -if(CMAKE_VERSION VERSION_LESS "2.8.12") - function(add_compile_options) - add_definitions(${ARGN}) - endfunction(add_compile_options) -endif() - -######################################################################## -# Helpful compiler flags -######################################################################## - -#C++11 is a required language feature for this project -set(CMAKE_CXX_STANDARD 11) - -if(CMAKE_COMPILER_IS_GNUCXX) - - #enable C++11 on older versions of cmake - if (CMAKE_VERSION VERSION_LESS "3.1") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") - endif() - - #force a compile-time error when symbols are missing - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") - - #common warnings to help encourage good coding practices - add_compile_options(-Wall) - add_compile_options(-Wextra) - - #symbols are only exported from libraries/modules explicitly - add_compile_options(-fvisibility=hidden) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") -endif() - -if(APPLE) - #fixes issue with duplicate module registry when using application bundle - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flat_namespace") - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -flat_namespace") -endif() - -if(MSVC) - #C++11 is a required language feature for this project - if (${MSVC_VERSION} LESS 1700) - message(FATAL_ERROR "the build requires MSVC 2012 or newer for C++11 support") - endif() - - #we always want to use multiple cores for compilation - add_compile_options(/MP) - - #suppress the following warnings which are commonly caused by project headers - add_compile_options(/wd4251) #disable 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' - add_compile_options(/wd4503) #'identifier' : decorated name length exceeded, name was truncated - - #projects should be cross-platform and standard stl functions should work - add_definitions(-DNOMINMAX) #enables std::min and std::max -endif() - -if ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") - add_compile_options(-stdlib=libc++) -endif() - -######################################################################## -# extract the ABI version string from the Version.h header -######################################################################## -function(_SOAPY_SDR_GET_ABI_VERSION VERSION SOAPY_SDR_INCLUDE_DIR) - file(READ "${SOAPY_SDR_INCLUDE_DIR}/SoapySDR/Version.h" version_h) - string(REGEX MATCH "\\#define SOAPY_SDR_ABI_VERSION \"([0-9]+\\.[0-9]+(-[A-Za-z0-9]+)?)\"" SOAPY_SDR_ABI_VERSION_MATCHES "${version_h}") - if(NOT SOAPY_SDR_ABI_VERSION_MATCHES) - message(FATAL_ERROR "Failed to extract version number from Version.h") - endif(NOT SOAPY_SDR_ABI_VERSION_MATCHES) - set(${VERSION} "${CMAKE_MATCH_1}" PARENT_SCOPE) -endfunction(_SOAPY_SDR_GET_ABI_VERSION) - -######################################################################## -# In-tree settings -######################################################################## -if (SOAPY_SDR_IN_TREE_SOURCE_DIR) - if(NOT SOAPY_SDR_ROOT) - set(SOAPY_SDR_ROOT ${CMAKE_INSTALL_PREFIX}) - endif(NOT SOAPY_SDR_ROOT) - set(SoapySDR_INCLUDE_DIRS ${SOAPY_SDR_IN_TREE_SOURCE_DIR}/include) - set(SoapySDR_LIBRARIES SoapySDR) - _SOAPY_SDR_GET_ABI_VERSION(SOAPY_SDR_ABI_VERSION ${SoapySDR_INCLUDE_DIRS}) - return() -endif (SOAPY_SDR_IN_TREE_SOURCE_DIR) - -######################################################################## -## installation root -######################################################################## -if (UNIX) - get_filename_component(SOAPY_SDR_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../.." ABSOLUTE) -elseif (WIN32) - get_filename_component(SOAPY_SDR_ROOT "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE) -endif () - -######################################################################## -## locate the library -######################################################################## -find_library( - SOAPY_SDR_LIBRARY SoapySDR SoapySDRd - PATHS ${SOAPY_SDR_ROOT}/lib${LIB_SUFFIX} - PATH_SUFFIXES ${CMAKE_LIBRARY_ARCHITECTURE} - NO_DEFAULT_PATH -) -if(NOT SOAPY_SDR_LIBRARY) - message(FATAL_ERROR "cannot find SoapySDR library in ${SOAPY_SDR_ROOT}/lib${LIB_SUFFIX}") -endif() -set(SoapySDR_LIBRARIES ${SOAPY_SDR_LIBRARY}) - -######################################################################## -## locate the includes -######################################################################## -find_path( - SOAPY_SDR_INCLUDE_DIR SoapySDR/Config.hpp - PATHS ${SOAPY_SDR_ROOT}/include - NO_DEFAULT_PATH -) -if(NOT SOAPY_SDR_INCLUDE_DIR) - message(FATAL_ERROR "cannot find SoapySDR includes in ${SOAPY_SDR_ROOT}/include") -endif() -set(SoapySDR_INCLUDE_DIRS ${SOAPY_SDR_INCLUDE_DIR}) -_SOAPY_SDR_GET_ABI_VERSION(SOAPY_SDR_ABI_VERSION ${SoapySDR_INCLUDE_DIRS}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/cmake/SoapySDRConfigVersion.in.cmake new/SoapySDR-soapy-sdr-0.6.1/cmake/SoapySDRConfigVersion.in.cmake --- old/SoapySDR-soapy-sdr-0.6.0/cmake/SoapySDRConfigVersion.in.cmake 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/cmake/SoapySDRConfigVersion.in.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -set(PACKAGE_FIND_NAME "@PROJECT_NAME@") -set(PACKAGE_VERSION "@SOAPY_SDR_VERSION@") - -# Check whether the requested PACKAGE_FIND_VERSION is compatible -if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") - set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() - set(PACKAGE_VERSION_COMPATIBLE TRUE) - if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") - set(PACKAGE_VERSION_EXACT TRUE) - endif() -endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/cmake/SoapySDRUtil.cmake new/SoapySDR-soapy-sdr-0.6.1/cmake/SoapySDRUtil.cmake --- old/SoapySDR-soapy-sdr-0.6.0/cmake/SoapySDRUtil.cmake 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/cmake/SoapySDRUtil.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,53 +0,0 @@ -if(DEFINED INCLUDED_SOAPY_SDR_UTIL_CMAKE) - return() -endif() -set(INCLUDED_SOAPY_SDR_UTIL_CMAKE TRUE) - -######################################################################## -## SOAPY_SDR_MODULE_UTIL - build and install modules for Soapy SDR -## -## This utility can handle the build and installation operations. -## -## Arguments: -## -## TARGET - the name of the module to build -## -## SOURCES - a list of c++ source files -## -## LIBRARIES - a list of libraries to link the module to -## The module will automatically link to SoapySDR library. -## -## DESTINATION - override the default install path when specified -## The default destination is a relative path (<lib>/SoapySDR/modules). -## This argument specifies an alternative relative or absolute path, -## and can be used standalone or in conjunction with PREFIX. -## -## PREFIX - override the default install prefix when specified -## The prefix modifies the destination with an absolute path -## to replace the typical CMAKE_INSTALL_PREFIX install rules. -## -######################################################################## -function(SOAPY_SDR_MODULE_UTIL) - - include(CMakeParseArguments) - CMAKE_PARSE_ARGUMENTS(MODULE "" "TARGET;DESTINATION;PREFIX" "SOURCES;LIBRARIES" ${ARGN}) - - include_directories(${SoapySDR_INCLUDE_DIRS}) - add_library(${MODULE_TARGET} MODULE ${MODULE_SOURCES}) - target_link_libraries(${MODULE_TARGET} ${MODULE_LIBRARIES} ${SoapySDR_LIBRARIES}) - set_target_properties(${MODULE_TARGET} PROPERTIES DEBUG_POSTFIX "") #same name in debug mode - - if (NOT MODULE_DESTINATION) - set(MODULE_DESTINATION lib${LIB_SUFFIX}/SoapySDR/modules${SOAPY_SDR_ABI_VERSION}/) - endif() - - if (MODULE_PREFIX) - set(MODULE_DESTINATION ${MODULE_PREFIX}/${MODULE_DESTINATION}) - endif() - - install( - TARGETS ${MODULE_TARGET} - DESTINATION ${MODULE_DESTINATION} - ) - -endfunction(SOAPY_SDR_MODULE_UTIL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/debian/changelog new/SoapySDR-soapy-sdr-0.6.1/debian/changelog --- old/SoapySDR-soapy-sdr-0.6.0/debian/changelog 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/debian/changelog 2017-12-13 02:14:49.000000000 +0100 @@ -1,3 +1,9 @@ +soapysdr (0.6.1-1) unstable; urgency=low + + * Release 0.6.1 (2017-12-12) + + -- Josh Blum <[email protected]> Tue, 12 Dec 2017 19:14:44 -0000 + soapysdr (0.6.0-1) unstable; urgency=low * Release 0.6.0 (2017-04-29) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/debian/rules new/SoapySDR-soapy-sdr-0.6.1/debian/rules --- old/SoapySDR-soapy-sdr-0.6.0/debian/rules 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/debian/rules 2017-12-13 02:14:49.000000000 +0100 @@ -6,6 +6,7 @@ # extract the last section of the changelog version for extra info DEB_VERSION ?= $(shell dpkg-parsechangelog -S Version) +DEB_VERSION_EXTRA := $(lastword $(subst -, ,$(DEB_VERSION))) # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 @@ -17,7 +18,7 @@ dh_auto_configure -- \ -DCMAKE_AUTOSET_INSTALL_RPATH=FALSE \ -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" \ - -DSOAPY_SDR_EXTVER="$(DEB_VERSION)" + -DSOAPY_SDR_EXTVER="$(DEB_VERSION_EXTRA)" override_dh_installchangelogs: dh_installchangelogs Changelog.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/include/SoapySDR/Device.h new/SoapySDR-soapy-sdr-0.6.1/include/SoapySDR/Device.h --- old/SoapySDR-soapy-sdr-0.6.0/include/SoapySDR/Device.h 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/include/SoapySDR/Device.h 2017-12-13 02:14:49.000000000 +0100 @@ -1138,20 +1138,20 @@ * Get meta-information about a sensor. * Example: displayable name, type, range. * \param device a pointer to a device instance - * \param name the name of an available sensor + * \param key the ID name of an available sensor * \return meta-information about a sensor */ -SOAPY_SDR_API SoapySDRArgInfo SoapySDRDevice_getSensorInfo(const SoapySDRDevice *device, const char *name); +SOAPY_SDR_API SoapySDRArgInfo SoapySDRDevice_getSensorInfo(const SoapySDRDevice *device, const char *key); /*! * Readback a global sensor given the name. * The value returned is a string which can represent * a boolean ("true"/"false"), an integer, or float. * \param device a pointer to a device instance - * \param name the name of an available sensor + * \param key the ID name of an available sensor * \return the current value of the sensor */ -SOAPY_SDR_API char *SoapySDRDevice_readSensor(const SoapySDRDevice *device, const char *name); +SOAPY_SDR_API char *SoapySDRDevice_readSensor(const SoapySDRDevice *device, const char *key); /*! * List the available channel readback sensors. @@ -1170,10 +1170,10 @@ * \param device a pointer to a device instance * \param direction the channel direction RX or TX * \param channel an available channel on the device - * \param name the name of an available sensor + * \param key the ID name of an available sensor * \return meta-information about a sensor */ -SOAPY_SDR_API SoapySDRArgInfo SoapySDRDevice_getChannelSensorInfo(const SoapySDRDevice *device, const int direction, const size_t channel, const char *name); +SOAPY_SDR_API SoapySDRArgInfo SoapySDRDevice_getChannelSensorInfo(const SoapySDRDevice *device, const int direction, const size_t channel, const char *key); /*! * Readback a channel sensor given the name. @@ -1182,10 +1182,10 @@ * \param device a pointer to a device instance * \param direction the channel direction RX or TX * \param channel an available channel on the device - * \param name the name of an available sensor + * \param key the ID name of an available sensor * \return the current value of the sensor */ -SOAPY_SDR_API char *SoapySDRDevice_readChannelSensor(const SoapySDRDevice *device, const int direction, const size_t channel, const char *name); +SOAPY_SDR_API char *SoapySDRDevice_readChannelSensor(const SoapySDRDevice *device, const int direction, const size_t channel, const char *key); /******************************************************************* * Register API diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/include/SoapySDR/Device.hpp new/SoapySDR-soapy-sdr-0.6.1/include/SoapySDR/Device.hpp --- old/SoapySDR-soapy-sdr-0.6.0/include/SoapySDR/Device.hpp 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/include/SoapySDR/Device.hpp 2017-12-13 02:14:49.000000000 +0100 @@ -996,19 +996,19 @@ /*! * Get meta-information about a sensor. * Example: displayable name, type, range. - * \param name the name of an available sensor + * \param key the ID name of an available sensor * \return meta-information about a sensor */ - virtual ArgInfo getSensorInfo(const std::string &name) const; + virtual ArgInfo getSensorInfo(const std::string &key) const; /*! * Readback a global sensor given the name. * The value returned is a string which can represent * a boolean ("true"/"false"), an integer, or float. - * \param name the name of an available sensor + * \param key the ID name of an available sensor * \return the current value of the sensor */ - virtual std::string readSensor(const std::string &name) const; + virtual std::string readSensor(const std::string &key) const; /*! * List the available channel readback sensors. @@ -1024,10 +1024,10 @@ * Example: displayable name, type, range. * \param direction the channel direction RX or TX * \param channel an available channel on the device - * \param name the name of an available sensor + * \param key the ID name of an available sensor * \return meta-information about a sensor */ - virtual ArgInfo getSensorInfo(const int direction, const size_t channel, const std::string &name) const; + virtual ArgInfo getSensorInfo(const int direction, const size_t channel, const std::string &key) const; /*! * Readback a channel sensor given the name. @@ -1035,10 +1035,10 @@ * a boolean ("true"/"false"), an integer, or float. * \param direction the channel direction RX or TX * \param channel an available channel on the device - * \param name the name of an available sensor + * \param key the ID name of an available sensor * \return the current value of the sensor */ - virtual std::string readSensor(const int direction, const size_t channel, const std::string &name) const; + virtual std::string readSensor(const int direction, const size_t channel, const std::string &key) const; /******************************************************************* * Register API diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/lib/DeviceC.cpp new/SoapySDR-soapy-sdr-0.6.1/lib/DeviceC.cpp --- old/SoapySDR-soapy-sdr-0.6.0/lib/DeviceC.cpp 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/lib/DeviceC.cpp 2017-12-13 02:14:49.000000000 +0100 @@ -713,17 +713,17 @@ __SOAPY_SDR_C_CATCH_RET(nullptr); } -SoapySDRArgInfo SoapySDRDevice_getSensorInfo(const SoapySDRDevice *device, const char *name) +SoapySDRArgInfo SoapySDRDevice_getSensorInfo(const SoapySDRDevice *device, const char *key) { __SOAPY_SDR_C_TRY - return toArgInfo(device->getSensorInfo(name)); + return toArgInfo(device->getSensorInfo(key)); __SOAPY_SDR_C_CATCH_RET(SoapySDRArgInfoNull()); } -char *SoapySDRDevice_readSensor(const SoapySDRDevice *device, const char *name) +char *SoapySDRDevice_readSensor(const SoapySDRDevice *device, const char *key) { __SOAPY_SDR_C_TRY - return strdup(device->readSensor(name).c_str()); + return strdup(device->readSensor(key).c_str()); __SOAPY_SDR_C_CATCH_RET(nullptr); } @@ -735,17 +735,17 @@ __SOAPY_SDR_C_CATCH_RET(nullptr); } -SoapySDRArgInfo SoapySDRDevice_getChannelSensorInfo(const SoapySDRDevice *device, const int direction, const size_t channel, const char *name) +SoapySDRArgInfo SoapySDRDevice_getChannelSensorInfo(const SoapySDRDevice *device, const int direction, const size_t channel, const char *key) { __SOAPY_SDR_C_TRY - return toArgInfo(device->getSensorInfo(direction, channel, name)); + return toArgInfo(device->getSensorInfo(direction, channel, key)); __SOAPY_SDR_C_CATCH_RET(SoapySDRArgInfoNull()); } -char *SoapySDRDevice_readChannelSensor(const SoapySDRDevice *device, const int direction, const size_t channel, const char *name) +char *SoapySDRDevice_readChannelSensor(const SoapySDRDevice *device, const int direction, const size_t channel, const char *key) { __SOAPY_SDR_C_TRY - return strdup(device->readSensor(direction, channel, name).c_str()); + return strdup(device->readSensor(direction, channel, key).c_str()); __SOAPY_SDR_C_CATCH_RET(nullptr); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/lib/FactoryC.cpp new/SoapySDR-soapy-sdr-0.6.1/lib/FactoryC.cpp --- old/SoapySDR-soapy-sdr-0.6.0/lib/FactoryC.cpp 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/lib/FactoryC.cpp 2017-12-13 02:14:49.000000000 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2016 Josh Blum +// Copyright (c) 2014-2017 Josh Blum // SPDX-License-Identifier: BSL-1.0 #include "ErrorHelpers.hpp" @@ -36,7 +36,7 @@ SoapySDRDevice *SoapySDRDevice_makeStrArgs(const char *args) { __SOAPY_SDR_C_TRY - return (SoapySDRDevice *)SoapySDR::Device::make(args); + return (SoapySDRDevice *)SoapySDR::Device::make((args==nullptr)?"":args); __SOAPY_SDR_C_CATCH_RET(nullptr); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/lib/Version.in.cpp new/SoapySDR-soapy-sdr-0.6.1/lib/Version.in.cpp --- old/SoapySDR-soapy-sdr-0.6.0/lib/Version.in.cpp 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/lib/Version.in.cpp 2017-12-13 02:14:49.000000000 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2016 Josh Blum +// Copyright (c) 2014-2017 Josh Blum // SPDX-License-Identifier: BSL-1.0 #include <SoapySDR/Version.hpp> @@ -7,9 +7,10 @@ std::string SoapySDR::getAPIVersion(void) { std::stringstream ss; - ss << int((SOAPY_SDR_API_VERSION >> 24) & 0xf) << "." - << int((SOAPY_SDR_API_VERSION >> 16) & 0xf) << "." - << int((SOAPY_SDR_API_VERSION >> 0) & 0xff); + ss << std::hex << int((SOAPY_SDR_API_VERSION >> 24) & 0xff) << "." + << std::hex << int((SOAPY_SDR_API_VERSION >> 16) & 0xff) << "." + << std::hex << int((SOAPY_SDR_API_VERSION >> 0) & 0xffff) + << std::dec; return ss.str(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/python/CMakeLists.txt new/SoapySDR-soapy-sdr-0.6.1/python/CMakeLists.txt --- old/SoapySDR-soapy-sdr-0.6.0/python/CMakeLists.txt 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/python/CMakeLists.txt 2017-12-13 02:14:49.000000000 +0100 @@ -54,6 +54,7 @@ COMMAND ${PYTHON_CONFIG_EXECUTABLE} --ldflags OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE PYTHON_LIBRARIES) + string(STRIP "${PYTHON_LIBRARIES}" PYTHON_LIBRARIES) set(PYTHONLIBS_VERSION_STRING ${PYTHON_VERSION_STRING}) set(PYTHONLIBS_FOUND TRUE) else() @@ -90,6 +91,12 @@ set(BUILD_PYTHON3 TRUE PARENT_SCOPE) endif() +#or enable search for python3 when this directory failed to find +#a full set of python interpreter and devel files of any version +if(NOT PYTHONINTERP_FOUND OR NOT PYTHONLIBS_FOUND) + set(BUILD_PYTHON3 TRUE PARENT_SCOPE) +endif() + ######################################################################## ## set the swig flags - shared with python3 build ######################################################################## diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/python/SoapySDR.i new/SoapySDR-soapy-sdr-0.6.1/python/SoapySDR.i --- old/SoapySDR-soapy-sdr-0.6.0/python/SoapySDR.i 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/python/SoapySDR.i 2017-12-13 02:14:49.000000000 +0100 @@ -160,6 +160,7 @@ def extractBuffPointer(buff): if hasattr(buff, '__array_interface__'): return buff.__array_interface__['data'][0] + if hasattr(buff, 'buffer_info'): return buff.buffer_info()[0] if hasattr(buff, '__long__'): return long(buff) if hasattr(buff, '__int__'): return int(buff) raise Exception("Unrecognized data format: " + str(type(buff))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/python/apps/MeasureDelay.py new/SoapySDR-soapy-sdr-0.6.1/python/apps/MeasureDelay.py --- old/SoapySDR-soapy-sdr-0.6.0/python/apps/MeasureDelay.py 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/python/apps/MeasureDelay.py 2017-12-13 02:14:49.000000000 +0100 @@ -101,6 +101,12 @@ if sr.ret > 0: rxBuffs = np.concatenate((rxBuffs, rxBuff[:sr.ret])) else: break + #cleanup streams + print("Cleanup streams") + sdr.deactivateStream(txStream) + sdr.closeStream(rxStream) + sdr.closeStream(txStream) + #check resulting buffer if len(rxBuffs) != numRxSamps: raise Exception('receive fail - captured samples %d out of %d'%(len(rxBuffs), numRxSamps)) @@ -143,13 +149,6 @@ rxPeakTime = rxTime0 + long((rxArgmaxIndex/rate)*1e9) timeDelta = rxPeakTime - txPeakTime print('>>> Time delta %f us'%(timeDelta/1e3)) - - #cleanup streams - print("Cleanup streams") - sdr.deactivateStream(rxStream) - sdr.deactivateStream(txStream) - sdr.closeStream(rxStream) - sdr.closeStream(txStream) print("Done!") def main(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/python3/CMakeLists.txt new/SoapySDR-soapy-sdr-0.6.1/python3/CMakeLists.txt --- old/SoapySDR-soapy-sdr-0.6.0/python3/CMakeLists.txt 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/python3/CMakeLists.txt 2017-12-13 02:14:49.000000000 +0100 @@ -55,7 +55,7 @@ ######################################################################## include(FeatureSummary) include(CMakeDependentOption) -cmake_dependent_option(ENABLE_PYTHON3 "Enable python bindings" ON "ENABLE_LIBRARY;SWIG_FOUND;PYTHON3INTERP_FOUND;PYTHON3LIBS_FOUND;PYTHON3_DEBUG_OK" OFF) +cmake_dependent_option(ENABLE_PYTHON3 "Enable python bindings" ON "ENABLE_LIBRARY;SWIG_FOUND;PYTHON3INTERP_FOUND;PYTHON3LIBS_FOUND;PYTHON3_DEBUG_OK;BUILD_PYTHON3" OFF) add_feature_info(Python3 ENABLE_PYTHON3 "python3 bindings") if (NOT ENABLE_PYTHON3) return() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.6.0/python3/FindPython3Libs.cmake new/SoapySDR-soapy-sdr-0.6.1/python3/FindPython3Libs.cmake --- old/SoapySDR-soapy-sdr-0.6.0/python3/FindPython3Libs.cmake 2017-04-29 17:35:49.000000000 +0200 +++ new/SoapySDR-soapy-sdr-0.6.1/python3/FindPython3Libs.cmake 2017-12-13 02:14:49.000000000 +0100 @@ -156,6 +156,7 @@ COMMAND ${PYTHON3_CONFIG_EXECUTABLE} --ldflags OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE PYTHON3_LIBRARIES) + string(STRIP "${PYTHON3_LIBRARIES}" PYTHON3_LIBRARIES) endif(PYTHON3_CONFIG_EXECUTABLE) endif()
