Date: Wed, 21 Aug 2019 20:43:23 +0000 (UTC) From: Ganael LAPLANCHE <martymac@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r509562 - in head/comms: gqrx gqrx/files gr-osmosdr gr-osmosdr/files Message-ID: <201908212043.x7LKhNB3051602@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: martymac Date: Wed Aug 21 20:43:23 2019 New Revision: 509562 URL: https://svnweb.freebsd.org/changeset/ports/509562 Log: Un-break comms/gr-osmosdr and comms/gqrx following Gnuradio 3.8 update For both projects, building with Gnuradio 3.8 is not yet officially supported so we use local patches at the moment. See *gr38* patch headers for more details. Added: head/comms/gqrx/files/patch-00-gr38-compat.txt (contents, props changed) head/comms/gr-osmosdr/files/patch-00-gr38-compat.txt (contents, props changed) head/comms/gr-osmosdr/files/patch-01-gr38-blocks-fix.txt (contents, props changed) Modified: head/comms/gqrx/Makefile head/comms/gqrx/files/patch-gqrx.pro head/comms/gr-osmosdr/Makefile head/comms/gr-osmosdr/distinfo head/comms/gr-osmosdr/files/patch-CMakeLists.txt head/comms/gr-osmosdr/pkg-plist Modified: head/comms/gqrx/Makefile ============================================================================== --- head/comms/gqrx/Makefile Wed Aug 21 20:37:29 2019 (r509561) +++ head/comms/gqrx/Makefile Wed Aug 21 20:43:23 2019 (r509562) @@ -4,7 +4,7 @@ PORTNAME= gqrx PORTVERSION= 2.11.5 DISTVERSIONPREFIX= v -PORTREVISION= 10 +PORTREVISION= 11 PORTEPOCH= 1 CATEGORIES= comms hamradio @@ -14,9 +14,6 @@ COMMENT= Software defined radio receiver powered by GN LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING -DEPRECATED= Depends on expiring comms/gr-osmosdr -EXPIRATION_DATE= 2019-09-04 - LIB_DEPENDS= libgnuradio-runtime.so:comms/gnuradio \ libgnuradio-analog.so:comms/gnuradio \ libgnuradio-blocks.so:comms/gnuradio \ @@ -27,7 +24,9 @@ LIB_DEPENDS= libgnuradio-runtime.so:comms/gnuradio \ libgnuradio-osmosdr.so:comms/gr-osmosdr \ libboost_system.so:devel/boost-libs \ libboost_program_options.so:devel/boost-libs \ - liblog4cpp.so:devel/log4cpp + liblog4cpp.so:devel/log4cpp \ + libgmpxx.so:math/gmp \ + libgmp.so:math/gmp USES= gl pkgconfig qmake qt:5 Added: head/comms/gqrx/files/patch-00-gr38-compat.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/comms/gqrx/files/patch-00-gr38-compat.txt Wed Aug 21 20:43:23 2019 (r509562) @@ -0,0 +1,145 @@ +Gnuradio 3.8 compatibility patch from: +https://github.com/csete/gqrx/pull/696 +https://github.com/csete/gqrx/commit/2cc48cb8c9e71f893b04a70ff4ad3e9ee3b49b3e.diff + +diff --git a/src/applications/gqrx/receiver.cpp b/src/applications/gqrx/receiver.cpp +index 361be52c..1a364521 100644 +--- src/applications/gqrx/receiver.cpp.orig ++++ src/applications/gqrx/receiver.cpp +@@ -28,7 +28,7 @@ + + #include <iostream> + +-#include <gnuradio/blocks/multiply_const_ff.h> ++#include <gnuradio/blocks/multiply_const.h> + #include <gnuradio/prefs.h> + #include <gnuradio/top_block.h> + #include <osmosdr/source.h> +diff --git a/src/applications/gqrx/receiver.h b/src/applications/gqrx/receiver.h +index f86d741d..2b2c7f17 100644 +--- src/applications/gqrx/receiver.h.orig ++++ src/applications/gqrx/receiver.h +@@ -23,10 +23,10 @@ + #ifndef RECEIVER_H + #define RECEIVER_H + +-#include <gnuradio/analog/sig_source_c.h> ++#include <gnuradio/analog/sig_source.h> + #include <gnuradio/blocks/file_sink.h> +-#include <gnuradio/blocks/multiply_const_ff.h> +-#include <gnuradio/blocks/multiply_cc.h> ++#include <gnuradio/blocks/multiply_const.h> ++#include <gnuradio/blocks/multiply.h> + #include <gnuradio/blocks/null_sink.h> + #include <gnuradio/blocks/wavfile_sink.h> + #include <gnuradio/blocks/wavfile_source.h> +diff --git a/src/dsp/correct_iq_cc.h b/src/dsp/correct_iq_cc.h +index cb033782..1fe96878 100644 +--- src/dsp/correct_iq_cc.h.orig ++++ src/dsp/correct_iq_cc.h +@@ -28,7 +28,7 @@ + #include <gnuradio/blocks/float_to_complex.h> + #include <gnuradio/hier_block2.h> + #include <gnuradio/filter/single_pole_iir_filter_cc.h> +-#include <gnuradio/blocks/sub_cc.h> ++#include <gnuradio/blocks/sub.h> + + class dc_corr_cc; + class iq_swap_cc; +diff --git a/src/dsp/filter/fir_decim.cpp b/src/dsp/filter/fir_decim.cpp +index af2ebda7..7ee3e1b2 100644 +--- src/dsp/filter/fir_decim.cpp.orig ++++ src/dsp/filter/fir_decim.cpp +@@ -24,7 +24,7 @@ + #include <cstdio> + #include <vector> + +-#include <gnuradio/filter/fir_filter_ccf.h> ++#include <gnuradio/filter/fir_filter.h> + #include <gnuradio/hier_block2.h> + #include <gnuradio/io_signature.h> + +diff --git a/src/dsp/filter/fir_decim.h b/src/dsp/filter/fir_decim.h +index 9c026f48..bd1f09f2 100644 +--- src/dsp/filter/fir_decim.h.orig ++++ src/dsp/filter/fir_decim.h +@@ -22,7 +22,7 @@ + */ + #pragma once + +-#include <gnuradio/filter/fir_filter_ccf.h> ++#include <gnuradio/filter/fir_filter_blk.h> + #include <gnuradio/hier_block2.h> + + class fir_decim_cc; +diff --git a/src/dsp/lpf.h b/src/dsp/lpf.h +index 049b3a9c..6663fdc2 100644 +--- src/dsp/lpf.h.orig ++++ src/dsp/lpf.h +@@ -25,7 +25,7 @@ + + #include <gnuradio/hier_block2.h> + #include <gnuradio/filter/firdes.h> +-#include <gnuradio/filter/fir_filter_fff.h> ++#include <gnuradio/filter/fir_filter_blk.h> + + + class lpf_ff; +diff --git a/src/dsp/rx_filter.h b/src/dsp/rx_filter.h +index 8723be32..d1b1db61 100644 +--- src/dsp/rx_filter.h.orig ++++ src/dsp/rx_filter.h +@@ -24,8 +24,8 @@ + #define RX_FILTER_H + + #include <gnuradio/hier_block2.h> +-#include <gnuradio/filter/fir_filter_ccc.h> +-#include <gnuradio/filter/freq_xlating_fir_filter_ccc.h> ++#include <gnuradio/filter/fir_filter_blk.h> ++#include <gnuradio/filter/freq_xlating_fir_filter.h> + + + #define RX_FILTER_MIN_WIDTH 100 /*! Minimum width of filter */ +diff --git a/src/dsp/rx_rds.h b/src/dsp/rx_rds.h +index 17e406ae..098b20ef 100644 +--- src/dsp/rx_rds.h.orig ++++ src/dsp/rx_rds.h +@@ -24,11 +24,9 @@ + #define RX_RDS_H + + #include <gnuradio/hier_block2.h> +-#include <gnuradio/filter/fir_filter_ccc.h> +-#include <gnuradio/filter/fir_filter_ccf.h> +-#include <gnuradio/filter/fir_filter_fff.h> +-#include <gnuradio/filter/freq_xlating_fir_filter_fcf.h> +-#include <gnuradio/filter/freq_xlating_fir_filter_ccf.h> ++#include <gnuradio/filter/fir_filter.h> ++#include <gnuradio/filter/fir_filter_blk.h> ++#include <gnuradio/filter/freq_xlating_fir_filter.h> + #include <gnuradio/digital/constellation_receiver_cb.h> + #include <gnuradio/blocks/keep_one_in_n.h> + #include <gnuradio/digital/diff_decoder_bb.h> +diff --git a/src/dsp/stereo_demod.h b/src/dsp/stereo_demod.h +index 28be5c0c..d88e0890 100644 +--- src/dsp/stereo_demod.h.orig ++++ src/dsp/stereo_demod.h +@@ -26,14 +26,13 @@ + + #include <gnuradio/hier_block2.h> + #include <gnuradio/filter/firdes.h> +-#include <gnuradio/filter/fir_filter_fcc.h> +-#include <gnuradio/filter/fir_filter_fff.h> ++#include <gnuradio/filter/fir_filter.h> ++#include <gnuradio/filter/fir_filter_blk.h> + #include <gnuradio/analog/pll_refout_cc.h> +-#include <gnuradio/blocks/multiply_cc.h> +-#include <gnuradio/blocks/multiply_ff.h> +-#include <gnuradio/blocks/multiply_const_ff.h> ++#include <gnuradio/blocks/multiply.h> ++#include <gnuradio/blocks/multiply_const.h> + #include <gnuradio/blocks/complex_to_imag.h> +-#include <gnuradio/blocks/add_ff.h> ++#include <gnuradio/blocks/add_blk.h> + #include <vector> + #include "dsp/lpf.h" + #include "dsp/resampler_xx.h" Modified: head/comms/gqrx/files/patch-gqrx.pro ============================================================================== --- head/comms/gqrx/files/patch-gqrx.pro Wed Aug 21 20:37:29 2019 (r509561) +++ head/comms/gqrx/files/patch-gqrx.pro Wed Aug 21 20:43:23 2019 (r509562) @@ -1,10 +1,11 @@ ---- ./gqrx.pro.orig 2014-08-08 08:21:20.000000000 -0500 -+++ ./gqrx.pro 2014-09-05 22:50:58.000000000 -0500 -@@ -206,7 +206,6 @@ +--- gqrx.pro.orig 2018-05-16 23:32:13.000000000 +0200 ++++ gqrx.pro 2019-08-20 22:57:38.783794000 +0200 +@@ -267,7 +267,7 @@ unix:!macx { LIBS += -lboost_system$$BOOST_SUFFIX -lboost_program_options$$BOOST_SUFFIX - LIBS += -lrt # need to include on some distros ++ LIBS += -llog4cpp } macx { Modified: head/comms/gr-osmosdr/Makefile ============================================================================== --- head/comms/gr-osmosdr/Makefile Wed Aug 21 20:37:29 2019 (r509561) +++ head/comms/gr-osmosdr/Makefile Wed Aug 21 20:43:23 2019 (r509562) @@ -2,9 +2,8 @@ PORTNAME= gr-osmosdr DISTVERSIONPREFIX= v -DISTVERSION= 0.1.4-99 -DISTVERSIONSUFFIX= -gc98be5d -PORTREVISION= 9 +DISTVERSION= 0.1.4-127 +DISTVERSIONSUFFIX= -g4d83c60 PORTEPOCH= 1 CATEGORIES= comms hamradio @@ -13,17 +12,17 @@ COMMENT= GNU Radio OsmoSDR module LICENSE= GPLv3 -BROKEN= does not build with Gnuradio 3.8 -DEPRECATED= Broken for more than 6 months -EXPIRATION_DATE= 2019-09-04 - BUILD_DEPENDS= swig3.0:devel/swig30 \ cheetah:devel/py-cheetah LIB_DEPENDS= libgnuradio-runtime.so:comms/gnuradio \ libgnuradio-pmt.so:comms/gnuradio \ libgnuradio-blocks.so:comms/gnuradio \ libboost_system.so:devel/boost-libs \ - libboost_thread.so:devel/boost-libs + libboost_thread.so:devel/boost-libs \ + liblog4cpp.so:devel/log4cpp \ + libgmpxx.so:math/gmp \ + libgmp.so:math/gmp \ + liborc-0.4.so:devel/orc USES= cmake compiler:c++11-lang fortran pkgconfig python:2.7 tar:tgz @@ -35,7 +34,6 @@ BINARY_ALIAS= swig=swig3.0 # See lib/CMakeLists.txt to enable more components CMAKE_ARGS+= -DENABLE_DEFAULT:BOOL=OFF \ - -DENABLE_FCD:BOOL=ON \ -DENABLE_FILE:BOOL=ON \ -DENABLE_PYTHON=ON \ -DPYTHON_EXECUTABLE:STRING="${PYTHON_CMD}" Modified: head/comms/gr-osmosdr/distinfo ============================================================================== --- head/comms/gr-osmosdr/distinfo Wed Aug 21 20:37:29 2019 (r509561) +++ head/comms/gr-osmosdr/distinfo Wed Aug 21 20:43:23 2019 (r509562) @@ -1,3 +1,3 @@ -TIMESTAMP = 1530557606 -SHA256 (osmocom-gr-osmosdr-v0.1.4-99-gc98be5d_GH0.tar.gz) = d18f86265cf90aaa7e009dce3a41f2d752a1df5561cb453078a61ab2a4669d53 -SIZE (osmocom-gr-osmosdr-v0.1.4-99-gc98be5d_GH0.tar.gz) = 272154 +TIMESTAMP = 1565587646 +SHA256 (osmocom-gr-osmosdr-v0.1.4-127-g4d83c60_GH0.tar.gz) = 9f363b33b4c3eb5f3ba04b7cb3b7d3b5a51d615c595b10e6e7b985cfc4076ca6 +SIZE (osmocom-gr-osmosdr-v0.1.4-127-g4d83c60_GH0.tar.gz) = 278385 Added: head/comms/gr-osmosdr/files/patch-00-gr38-compat.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/comms/gr-osmosdr/files/patch-00-gr38-compat.txt Wed Aug 21 20:43:23 2019 (r509562) @@ -0,0 +1,8349 @@ +Gnuradio 3.8 compatibility patch from: +https://github.com/igorauad/gr-osmosdr/tree/gr3.8 + +generated using: +git diff --no-prefix 4d83c60 gr3.8 + +diff --git .gitignore .gitignore +new file mode 100644 +index 0000000..05e004f +--- /dev/null ++++ .gitignore +@@ -0,0 +1,74 @@ ++*~ ++*.pyc ++*.pyo ++build*/ ++cmake-* ++libosmo-dsp/* ++ ++# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm ++# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 ++ ++# User-specific stuff ++.idea ++.idea/**/workspace.xml ++.idea/**/tasks.xml ++.idea/**/usage.statistics.xml ++.idea/**/dictionaries ++.idea/**/shelf ++ ++# Generated files ++.idea/**/contentModel.xml ++ ++# Sensitive or high-churn files ++.idea/**/dataSources/ ++.idea/**/dataSources.ids ++.idea/**/dataSources.local.xml ++.idea/**/sqlDataSources.xml ++.idea/**/dynamic.xml ++.idea/**/uiDesigner.xml ++.idea/**/dbnavigator.xml ++ ++# Gradle ++.idea/**/gradle.xml ++.idea/**/libraries ++ ++# Gradle and Maven with auto-import ++# When using Gradle or Maven with auto-import, you should exclude module files, ++# since they will be recreated, and may cause churn. Uncomment if using ++# auto-import. ++# .idea/modules.xml ++# .idea/*.iml ++# .idea/modules ++ ++# CMake ++cmake-build-*/ ++ ++# Mongo Explorer plugin ++.idea/**/mongoSettings.xml ++ ++# File-based project format ++*.iws ++ ++# IntelliJ ++out/ ++ ++# mpeltonen/sbt-idea plugin ++.idea_modules/ ++ ++# JIRA plugin ++atlassian-ide-plugin.xml ++ ++# Cursive Clojure plugin ++.idea/replstate.xml ++ ++# Crashlytics plugin (for Android Studio and IntelliJ) ++com_crashlytics_export_strings.xml ++crashlytics.properties ++crashlytics-build.properties ++fabric.properties ++ ++# Editor-based Rest Client ++.idea/httpRequests ++ ++# Android studio 3.1+ serialized cache file ++.idea/caches/build_file_checksums.ser +diff --git CMakeLists.txt CMakeLists.txt +index af21291..76375dc 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -20,11 +20,21 @@ + ######################################################################## + # Project setup + ######################################################################## +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.8) + project(gr-osmosdr CXX C) + enable_testing() + +-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) ++#install to PyBOMBS target prefix if defined ++if(DEFINED ENV{PYBOMBS_PREFIX}) ++ set(CMAKE_INSTALL_PREFIX $ENV{PYBOMBS_PREFIX}) ++ message(STATUS "PyBOMBS installed GNU Radio. Setting CMAKE_INSTALL_PREFIX to $ENV{PYBOMBS_PREFIX}") ++endif() ++ ++# Get GNU Radio Installation Prefix ++if(DEFINED CMAKE_INSTALL_PREFIX) ++ set(GR_PREFIX ${CMAKE_INSTALL_PREFIX}) ++ message(STATUS "Installation is located at: ${GR_PREFIX}") ++endif() + + #select the release build type by default to get optimization flags + if(NOT CMAKE_BUILD_TYPE) +@@ -33,6 +43,9 @@ if(NOT CMAKE_BUILD_TYPE) + endif(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") + ++#make sure our local CMake Modules path comes first ++list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) ++ + set(ENABLE_NONFREE FALSE CACHE BOOL "Enable or disable nonfree components.") + + # Set the version information here +@@ -40,23 +53,24 @@ set(VERSION_INFO_MAJOR_VERSION 0) + set(VERSION_INFO_API_COMPAT 1) + set(VERSION_INFO_MINOR_VERSION 5) + set(VERSION_INFO_MAINT_VERSION git) +-include(GrVersion) #setup version info ++ ++cmake_policy(SET CMP0011 NEW) ++ + + ######################################################################## + # Compiler specific setup + ######################################################################## +- + IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|x86") +- SET(USE_SIMD "SSE2" CACHE STRING "Use SIMD instructions") ++ SET(USE_SIMD "SSE2" CACHE STRING "Use SIMD instructions") + ELSE() +- SET(USE_SIMD "no" CACHE STRING "Use SIMD instructions") ++ SET(USE_SIMD "no" CACHE STRING "Use SIMD instructions") ++ENDIF() ++SET(USE_SIMD_VALUES "no" "SSE2" "AVX") ++SET_PROPERTY(CACHE USE_SIMD PROPERTY STRINGS ${USE_SIMD_VALUES}) ++LIST(FIND USE_SIMD_VALUES ${USE_SIMD} USE_SIMD_INDEX) ++IF(${USE_SIMD_INDEX} EQUAL -1) ++ message(FATAL_ERROR "Option ${USE_SIMD} not supported, valid entries are ${USE_SIMD_VALUES}") + ENDIF() +- SET(USE_SIMD_VALUES "no" "SSE2" "AVX") +- SET_PROPERTY(CACHE USE_SIMD PROPERTY STRINGS ${USE_SIMD_VALUES}) +- LIST(FIND USE_SIMD_VALUES ${USE_SIMD} USE_SIMD_INDEX) +- IF(${USE_SIMD_INDEX} EQUAL -1) +- message(FATAL_ERROR "Option ${USE_SIMD} not supported, valid entries are ${USE_SIMD_VALUES}") +- ENDIF() + + IF(CMAKE_CXX_COMPILER MATCHES ".*clang") + SET(CMAKE_COMPILER_IS_CLANGXX 1) +@@ -94,43 +108,25 @@ ELSEIF(MSVC) + ENDIF() + ENDIF() + ++ + ######################################################################## +-# Setup boost ++# Install directories + ######################################################################## +-MESSAGE(STATUS "Configuring Boost C++ Libraries...") +- +-# Although not required on my system, some users have linking issues without +-SET(BOOST_REQUIRED_COMPONENTS +- thread +- system +-) +- +-if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64") +- list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix +-endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64") +- +-set(Boost_ADDITIONAL_VERSIONS +- "1.35.0" "1.35" "1.36.0" "1.36" "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39" +- "1.40.0" "1.40" "1.41.0" "1.41" "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44" +- "1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.49.0" "1.49" +- "1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54" +- "1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59" +- "1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64" +- "1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69" +-) +- +-find_package(Boost COMPONENTS ${BOOST_REQUIRED_COMPONENTS}) +- +-if(NOT Boost_FOUND) +- message(FATAL_ERROR "Boost required to build " ${CMAKE_PROJECT_NAME}) ++find_package(Gnuradio REQUIRED) # Side effect of MODULE_PATH getting prepended with system components ++list(REVERSE CMAKE_MODULE_PATH) ++set(MIN_GR_VERSION "3.8") ++if("${Gnuradio_VERSION}" VERSION_LESS MIN_GR_VERSION) ++ MESSAGE(FATAL_ERROR "GnuRadio version required: >=\"" ${MIN_GR_VERSION} "\" found: \"" ${Gnuradio_VERSION} "\"") + endif() + +-ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK) ++include(GrVersion) + +-######################################################################## +-# Install directories +-######################################################################## + include(GrPlatform) #define LIB_SUFFIX ++if(NOT CMAKE_MODULES_DIR) ++ set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake) ++endif(NOT CMAKE_MODULES_DIR) ++ ++set(GR_CMAKE_DIR ${CMAKE_MODULES_DIR}/osmosdr) + set(GR_RUNTIME_DIR bin) + set(GR_LIBRARY_DIR lib${LIB_SUFFIX}) + set(GR_INCLUDE_DIR include) +@@ -146,26 +142,69 @@ set(GR_LIBEXEC_DIR libexec) + set(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME}) + set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks) + ++######################################################################## ++# On Apple only, set install name and use rpath correctly, if not already set ++######################################################################## ++if(APPLE) ++ if(NOT CMAKE_INSTALL_NAME_DIR) ++ set(CMAKE_INSTALL_NAME_DIR ++ ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE ++ PATH "Library Install Name Destination Directory" FORCE) ++ endif(NOT CMAKE_INSTALL_NAME_DIR) ++ if(NOT CMAKE_INSTALL_RPATH) ++ set(CMAKE_INSTALL_RPATH ++ ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE ++ PATH "Library Install RPath" FORCE) ++ endif(NOT CMAKE_INSTALL_RPATH) ++ if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH) ++ set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE ++ BOOL "Do Build Using Library Install RPath" FORCE) ++ endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH) ++endif(APPLE) ++ + ######################################################################## + # Find build dependencies + ######################################################################## + set(GR_REQUIRED_COMPONENTS RUNTIME PMT BLOCKS) +-set(MIN_GR_VERSION "3.7.10") +-find_package(Gnuradio REQUIRED) +-if("${Gnuradio_VERSION}" VERSION_LESS MIN_GR_VERSION) +- MESSAGE(FATAL_ERROR "GnuRadio version required: >=\"" ${MIN_GR_VERSION} "\" found: \"" ${Gnuradio_VERSION} "\"") +-endif() ++ ++find_package(gnuradio-blocks PATHS ${GR_PREFIX}/lib/cmake/gnuradio/) ++message(STATUS "Found Block Block: ${gnuradio-blocks_FOUND}") ++ ++#[[find_package(gnuradio-pmt PATHS ${GR_PREFIX}/lib/cmake/gnuradio/) ++message(STATUS "Found PMT Block: ${gnuradio-pmt_FOUND}") ++ ++find_package(gnuradio-runtime PATHS ${GR_PREFIX}/lib/cmake/gnuradio/) ++message(STATUS "Found Runtime Block: ${gnuradio-runtime_FOUND}") ++ ++# Software Components part of GNU Radio - These should all be present for a default install ++message(STATUS " Searching for IQ Balance...") ++#find_package(Gnuradio COMPONENTS iqbalance REQUIRED) ++find_package(gnuradio-iqbalance PATHS ${GR_PREFIX}/lib/cmake/iqbalance) ++message (STATUS "Found IQ Balance: ${gnuradio-iqbalance_FOUND}") ++ ++message(STATUS " Searching for UHD Drivers...") ++#find_package(Gnuradio COMPONENTS uhd REQUIRED) ++find_package(UHD REQUIRED ${GR_PREFIX}/lib/cmake/uhd) ++message (STATUS "Found UHD Driver: ${UHD_FOUND}") ++ ++message(STATUS " Searching for UHD Block...") ++#find_package(Gnuradio COMPONENTS gnuradio-uhd REQUIRED) ++find_package(gnuradio-uhd PATHS ${GR_PREFIX}/lib/cmake/gnuradio/) ++message (STATUS "Found UHD Block: ${gnuradio-uhd_FOUND}") ++ ++message(STATUS " Searching for Volk...") ++#find_package(Gnuradio COMPONENTS Volk REQUIRED) ++find_package(volk PATHS ${GR_PREFIX}/lib/cmake/volk) ++message (STATUS "Found Volk: ${volk_FOUND}") ]]# + + find_package(GnuradioIQBalance) + find_package(UHD) + find_package(GnuradioUHD) +-find_package(GnuradioFCD) +-find_package(GnuradioFCDPP) + find_package(LibOsmoSDR) + find_package(LibRTLSDR) + find_package(LibMiriSDR) + if(ENABLE_NONFREE) +-find_package(LibSDRplay) ++ find_package(LibSDRplay) + endif(ENABLE_NONFREE) + find_package(LibHackRF) + find_package(LibAIRSPY) +@@ -175,23 +214,35 @@ find_package(SoapySDR NO_MODULE) + find_package(LibFreeSRP) + find_package(Doxygen) + +-if(NOT GNURADIO_RUNTIME_FOUND) +- message(FATAL_ERROR "GnuRadio Runtime required to build " ${CMAKE_PROJECT_NAME}) +-endif() ++#get_cmake_property(_variableNames VARIABLES) ++#list (SORT _variableNames) ++#foreach (_variableName ${_variableNames}) ++# message(STATUS "${_variableName}=${${_variableName}}") ++#endforeach() ++ ++ ++######################################################################## ++# Setup doxygen option ++######################################################################## ++if(DOXYGEN_FOUND) ++ option(ENABLE_DOXYGEN "Build docs using Doxygen" ON) ++else(DOXYGEN_FOUND) ++ option(ENABLE_DOXYGEN "Build docs using Doxygen" OFF) ++endif(DOXYGEN_FOUND) + + ######################################################################## + # Setup the include and linker paths + ######################################################################## + include_directories( +- ${CMAKE_SOURCE_DIR}/include +- ${CMAKE_SOURCE_DIR}/lib +- ${Boost_INCLUDE_DIRS} +- ${GNURADIO_ALL_INCLUDE_DIRS} ++ ${CMAKE_SOURCE_DIR}/include ++ ${CMAKE_SOURCE_DIR}/lib ++ ${Boost_INCLUDE_DIRS} ++ ${GNURADIO_ALL_INCLUDE_DIRS} + ) + + link_directories( +- ${Boost_LIBRARY_DIRS} +- ${GNURADIO_ALL_LIBRARY_DIRS} ++ ${Boost_LIBRARY_DIRS} ++ ${GNURADIO_ALL_LIBRARY_DIRS} + ) + + # Set component parameters +@@ -208,12 +259,13 @@ configure_file( + + add_custom_target(uninstall + ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake +-) ++ ) ++ + + ######################################################################## + # Enable python component + ######################################################################## +-find_package(PythonLibs 2) ++find_package(PythonLibs) + find_package(SWIG) + + if(SWIG_FOUND) +@@ -226,10 +278,11 @@ endif(SWIG_FOUND) + + include(GrComponent) + GR_REGISTER_COMPONENT("Python support" ENABLE_PYTHON +- PYTHONLIBS_FOUND +- SWIG_FOUND +- SWIG_VERSION_CHECK +-) ++ PYTHONLIBS_FOUND ++ SWIG_FOUND ++ SWIG_VERSION_CHECK ++ ) ++ + + ######################################################################## + # Add subdirectories +@@ -244,6 +297,14 @@ if(ENABLE_PYTHON) + endif(ENABLE_PYTHON) + add_subdirectory(docs) + ++######################################################################## ++# Install cmake search helper for this library ++######################################################################## ++ ++install(FILES cmake/Modules/osmosdrConfig.cmake ++ DESTINATION ${CMAKE_MODULES_DIR}/osmosdr ++) ++ + ######################################################################## + # Create Pkg Config File + ######################################################################## +@@ -272,13 +333,13 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GNU Radio block for various radio hardwar + set(CPACK_PACKAGE_VERSION ${VERSION}) + + CONFIGURE_FILE( +- ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-osmosdr.pc.in +- ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-osmosdr.pc +-@ONLY) ++ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-osmosdr.pc.in ++ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-osmosdr.pc ++ @ONLY) + + INSTALL( +- FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-osmosdr.pc +- DESTINATION ${GR_LIBRARY_DIR}/pkgconfig ++ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-osmosdr.pc ++ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig + ) + + ######################################################################## +@@ -286,11 +347,11 @@ INSTALL( + ######################################################################## + GR_PRINT_COMPONENT_SUMMARY() + if(ENABLE_NONFREE) +-MESSAGE(STATUS +- "NONFREE components have been enabled. The resulting ++ MESSAGE(STATUS ++ "NONFREE components have been enabled. The resulting + binaries cannot be distributed under GPL terms. + " +-) ++ ) + endif(ENABLE_NONFREE) + + MESSAGE(STATUS "Building for version: ${VERSION} / ${LIBVER}") +diff --git README README +index 67fa475..4d8363b 100644 +--- README ++++ README +@@ -1,8 +1,6 @@ + While primarily being developed for the OsmoSDR hardware, this block + as well supports: + +- * FUNcube Dongle through libgnuradio-fcd +- * FUNcube Dongle Pro+ through gr-fcdproplus + * sysmocom OsmoSDR Devices through libosmosdr + * RTL2832U based DVB-T dongles through librtlsdr + * RTL-TCP spectrum server (see librtlsdr project) +diff --git apps/osmocom_siggen_base.py apps/osmocom_siggen_base.py +index b6e9a0c..f07f3f6 100644 +--- apps/osmocom_siggen_base.py ++++ apps/osmocom_siggen_base.py +@@ -109,9 +109,9 @@ class gsm_source_c(gr.hier_block2): + [0,0,0], + ] + burst = sum(chunks,[]) +- burst = sum(map(list, zip(burst, (1,) * len(burst))), []) ++ burst = sum(list(map(list, list(zip(burst, (1,) * len(burst))))), []) + burst += [1,0] * (l-148) +- return map(int, burst) ++ return list(map(int, burst)) + + def gen_gsm_frame(self): + return \ +@@ -186,7 +186,7 @@ class top_block(gr.top_block, pubsub): + try: + self._sink.get_sample_rates().start() + except RuntimeError: +- print "Sink has no sample rates (wrong device arguments?)." ++ print("Sink has no sample rates (wrong device arguments?).") + sys.exit(1) + + # Set the clock source: +@@ -202,60 +202,60 @@ class top_block(gr.top_block, pubsub): + if(options.gain): + gain = self._sink.set_gain(options.gain) + if self._verbose: +- print "Set gain to:", gain ++ print("Set gain to:", gain) + + if self._verbose: + gain_names = self._sink.get_gain_names() + for name in gain_names: + range = self._sink.get_gain_range(name) +- print "%s gain range: start %d stop %d step %d" % (name, range.start(), range.stop(), range.step()) ++ print("%s gain range: start %d stop %d step %d" % (name, range.start(), range.stop(), range.step())) + + if options.gains: + for tuple in options.gains.split(","): + name, gain = tuple.split(":") + gain = int(gain) +- print "Setting gain %s to %d." % (name, gain) ++ print("Setting gain %s to %d." % (name, gain)) + self._sink.set_gain(gain, name) + + if self._verbose: + rates = self._sink.get_sample_rates() +- print 'Supported sample rates %d-%d step %d.' % (rates.start(), rates.stop(), rates.step()) ++ print('Supported sample rates %d-%d step %d.' % (rates.start(), rates.stop(), rates.step())) + + # Set the antenna + if self._verbose: +- print "setting antenna..." ++ print("setting antenna...") + if(options.antenna): + ant = self._sink.set_antenna(options.antenna, 0) + if self._verbose: +- print "Set antenna to:", ant ++ print("Set antenna to:", ant) + try: + self.publish(FREQ_RANGE_KEY, self._sink.get_freq_range) + except: +- print "Couldn't publish %s" % FREQ_RANGE_KEY ++ print("Couldn't publish %s" % FREQ_RANGE_KEY) + + try: + for name in self.get_gain_names(): + self.publish(GAIN_RANGE_KEY(name), (lambda self=self,name=name: self._sink.get_gain_range(name))) + except: +- print "Couldn't publish %s" % FREQ_RANGE_KEY ++ print("Couldn't publish %s" % FREQ_RANGE_KEY) + + try: + self.publish(BWIDTH_RANGE_KEY, self._sink.get_bandwidth_range) + except: + if self._verbose: +- print "Couldn't publish %s" % BWIDTH_RANGE_KEY ++ print("Couldn't publish %s" % BWIDTH_RANGE_KEY) + + try: + for name in self.get_gain_names(): + self.publish(GAIN_KEY(name), (lambda self=self,name=name: self._sink.get_gain(name))) + except: + if self._verbose: +- print "Couldn't publish GAIN_KEYs" ++ print("Couldn't publish GAIN_KEYs") + try: + self.publish(BWIDTH_KEY, self._sink.get_bandwidth) + except: + if self._verbose: +- print "Couldn't publish %s" % BWIDTH_KEY ++ print("Couldn't publish %s" % BWIDTH_KEY) + + def get_gain_names(self): + return self._sink.get_gain_names() +@@ -277,7 +277,7 @@ class top_block(gr.top_block, pubsub): + return True # Waveform not yet set + + if self._verbose: +- print "Set sample rate to:", sr ++ print("Set sample rate to:", sr) + + return True + +@@ -286,27 +286,27 @@ class top_block(gr.top_block, pubsub): + g = self[GAIN_RANGE_KEY(name)] + gain = float(g.start()+g.stop())/2 + if self._verbose: +- print "Using auto-calculated mid-point gain" ++ print("Using auto-calculated mid-point gain") + self[GAIN_KEY(name)] = gain + return + + gain = self._sink.set_gain(gain, name) + if self._verbose: +- print "Set " + name + " gain to:", gain ++ print("Set " + name + " gain to:", gain) + + def set_bandwidth(self, bw): + try: + clipped_bw = self[BWIDTH_RANGE_KEY].clip(bw) + except: + if self._verbose: +- print "couldn't clip bandwidth" ++ print("couldn't clip bandwidth") + return + + if self._sink.get_bandwidth() != clipped_bw: + bw = self._sink.set_bandwidth(clipped_bw) + + if self._verbose: +- print "Set bandwidth to:", bw ++ print("Set bandwidth to:", bw) + + def set_dc_offset(self, value): + correction = complex( self[DC_OFFSET_REAL], self[DC_OFFSET_IMAG] ) +@@ -315,9 +315,9 @@ class top_block(gr.top_block, pubsub): + self._sink.set_dc_offset( correction ) + + if self._verbose: +- print "Set DC offset to", correction ++ print("Set DC offset to", correction) + except RuntimeError as ex: +- print ex ++ print(ex) + + def set_iq_balance(self, value): + correction = complex( self[IQ_BALANCE_MAG], self[IQ_BALANCE_PHA] ) +@@ -326,16 +326,16 @@ class top_block(gr.top_block, pubsub): + self._sink.set_iq_balance( correction ) + + if self._verbose: +- print "Set IQ balance to", correction ++ print("Set IQ balance to", correction) + except RuntimeError as ex: +- print ex ++ print(ex) + + def set_freq(self, freq): + if freq is None: + f = self[FREQ_RANGE_KEY] + freq = float(f.start()+f.stop())/2.0 + if self._verbose: +- print "Using auto-calculated mid-point frequency" ++ print("Using auto-calculated mid-point frequency") + self[TX_FREQ_KEY] = freq + return + +@@ -343,22 +343,22 @@ class top_block(gr.top_block, pubsub): + if freq is not None: + self._freq = freq + if self._verbose: +- print "Set center frequency to", freq ++ print("Set center frequency to", freq) + elif self._verbose: +- print "Failed to set freq." ++ print("Failed to set freq.") + return freq + + def set_freq_corr(self, ppm): + if ppm is None: + ppm = 0.0 + if self._verbose: +- print "Using frequency corrrection of", ppm ++ print("Using frequency corrrection of", ppm) + self[FREQ_CORR_KEY] = ppm + return + + ppm = self._sink.set_freq_corr(ppm) + if self._verbose: +- print "Set frequency correction to:", ppm ++ print("Set frequency correction to:", ppm) + + def set_waveform_freq(self, freq): + if self[TYPE_KEY] == analog.GR_SIN_WAVE: +@@ -433,24 +433,24 @@ class top_block(gr.top_block, pubsub): + self.unlock() + + if self._verbose: +- print "Set baseband modulation to:", waveforms[type] ++ print("Set baseband modulation to:", waveforms[type]) + if type == analog.GR_SIN_WAVE: +- print "Modulation frequency: %sHz" % (n2s(self[WAVEFORM_FREQ_KEY]),) +- print "Initial phase:", self[WAVEFORM_OFFSET_KEY] ++ print("Modulation frequency: %sHz" % (n2s(self[WAVEFORM_FREQ_KEY]),)) ++ print("Initial phase:", self[WAVEFORM_OFFSET_KEY]) + elif type == "2tone": +- print "Tone 1: %sHz" % (n2s(self[WAVEFORM_FREQ_KEY]),) +- print "Tone 2: %sHz" % (n2s(self[WAVEFORM2_FREQ_KEY]),) ++ print("Tone 1: %sHz" % (n2s(self[WAVEFORM_FREQ_KEY]),)) ++ print("Tone 2: %sHz" % (n2s(self[WAVEFORM2_FREQ_KEY]),)) + elif type == "sweep": +- print "Sweeping across %sHz to %sHz" % (n2s(-self[WAVEFORM_FREQ_KEY]/2.0),n2s(self[WAVEFORM_FREQ_KEY]/2.0)) +- print "Sweep rate: %sHz" % (n2s(self[WAVEFORM2_FREQ_KEY]),) ++ print("Sweeping across %sHz to %sHz" % (n2s(-self[WAVEFORM_FREQ_KEY]/2.0),n2s(self[WAVEFORM_FREQ_KEY]/2.0))) ++ print("Sweep rate: %sHz" % (n2s(self[WAVEFORM2_FREQ_KEY]),)) + elif type == "gsm": +- print "GSM Burst Sequence" +- print "TX amplitude:", self[AMPLITUDE_KEY] ++ print("GSM Burst Sequence") ++ print("TX amplitude:", self[AMPLITUDE_KEY]) + + def set_amplitude(self, amplitude): + if amplitude < 0.0 or amplitude > 1.0: + if self._verbose: +- print "Amplitude out of range:", amplitude ++ print("Amplitude out of range:", amplitude) + return False + + if self[TYPE_KEY] in (analog.GR_SIN_WAVE, analog.GR_CONST_WAVE, analog.GR_GAUSSIAN, analog.GR_UNIFORM): +@@ -466,7 +466,7 @@ class top_block(gr.top_block, pubsub): + return True # Waveform not yet set + + if self._verbose: +- print "Set amplitude to:", amplitude ++ print("Set amplitude to:", amplitude) + return True + + def get_options(): +@@ -525,19 +525,19 @@ def get_options(): + # the below does not run. + def test_main(): + if gr.enable_realtime_scheduling() != gr.RT_OK: +- print "Note: failed to enable realtime scheduling, continuing" ++ print("Note: failed to enable realtime scheduling, continuing") + + # Grab command line options and create top block + try: + (options, args) = get_options() + tb = top_block(options, args) + +- except RuntimeError, e: +- print e ++ except RuntimeError as e: ++ print(e) + sys.exit(1) + + tb.start() +- raw_input('Press Enter to quit: ') ++ input('Press Enter to quit: ') + tb.stop() + tb.wait() + +diff --git cmake/Modules/CMakeParseArgumentsCopy.cmake cmake/Modules/CMakeParseArgumentsCopy.cmake +index 7ce4c49..66016cb 100644 +--- cmake/Modules/CMakeParseArgumentsCopy.cmake ++++ cmake/Modules/CMakeParseArgumentsCopy.cmake +@@ -58,7 +58,7 @@ + # the new option. + # E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in + # MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would +-# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor. ++# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefore. + + #============================================================================= + # Copyright 2010 Alexander Neundorf <neundorf@kde.org> +diff --git cmake/Modules/GrSwig.cmake cmake/Modules/GrSwig.cmake +deleted file mode 100644 +index f907a51..0000000 +--- cmake/Modules/GrSwig.cmake ++++ /dev/null +@@ -1,248 +0,0 @@ +-# Copyright 2010-2011 Free Software Foundation, Inc. +-# +-# This file is part of GNU Radio +-# +-# GNU Radio is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 3, or (at your option) +-# any later version. +-# +-# GNU Radio is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with GNU Radio; see the file COPYING. If not, write to +-# the Free Software Foundation, Inc., 51 Franklin Street, +-# Boston, MA 02110-1301, USA. +- +-if(DEFINED __INCLUDED_GR_SWIG_CMAKE) +- return() +-endif() +-set(__INCLUDED_GR_SWIG_CMAKE TRUE) +- +-include(GrPython) +- +-######################################################################## +-# Builds a swig documentation file to be generated into python docstrings +-# Usage: GR_SWIG_MAKE_DOCS(output_file input_path input_path....) *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908212043.x7LKhNB3051602>