diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d7dcf1..e76de31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,29 +85,9 @@ else() message(WARNING "C standard could not be set because compiler is not GNU, Clang or MSVC.") endif() -######################################################################## -# Find boost -######################################################################## -if(UNIX AND EXISTS "/usr/lib64") - list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix -endif(UNIX AND EXISTS "/usr/lib64") -set(Boost_ADDITIONAL_VERSIONS - "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 "1.54" - COMPONENTS filesystem system unit_test_framework thread chrono) - -if(NOT Boost_FOUND) - message(FATAL_ERROR "Boost required to compile satnogs") -endif() - ######################################################################## # Find gnuradio build dependencies ######################################################################## -find_package (Threads REQUIRED) find_package(PythonLibs 3) find_package(Gnuradio "3.8" REQUIRED runtime fft blocks filter analog digital) diff --git a/debian/control b/debian/control index df7ed58..4a9a83c 100644 --- a/debian/control +++ b/debian/control @@ -7,18 +7,27 @@ Build-Depends: cmake, dh-python, doxygen, git, - gnuradio-dev (>=3.7.10), + build-essential, + gnuradio-dev (>=3.8.0), libboost-dev, + libboost-date-time-dev, libboost-filesystem-dev, + libboost-program-options-dev, libboost-system-dev, - liblog4cpp5-dev, - libnova-dev, + libboost-thread-dev, + libboost-regex-dev, + libboost-test-dev, libpng++-dev, libvorbis-dev, pkg-config, - python-dev, - swig -X-Python-Version: >= 2.7, << 2.8 + python3-dev, + swig, + libgmp-dev, + liborc-0.4-0, + liborc-0.4-dev, + liborc-0.4-dev-bin, + liblog4cpp5-dev +X-Python-Version: >= 3.0, Standards-Version: 3.9.8 Homepage: https://gitlab.com/librespacefoundation/satnogs/gr-satnogs Vcs-Git: https://gitlab.com/librespacefoundation/satnogs/gr-satnogs.git diff --git a/debian/rules b/debian/rules index cf214be..435ae93 100755 --- a/debian/rules +++ b/debian/rules @@ -8,15 +8,15 @@ GITREV=$(shell echo $(VER) | sed -rne 's,^[0-9]+\.[0-9]+.*\+[0-9]+\+g([0-f]{8})$ GITCOUNT=$(shell echo $(VER) | sed -rne 's,^[0-9]+\.[0-9]+.*\+([0-9]+)\+g[0-f]{8}$$,\1,p') %: - dh $@ --with python2 --parallel + dh $@ --with python3 --parallel override_dh_auto_configure: - dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DPythonLibs_FIND_VERSION:STRING="2.7" -DPYTHON_EXECUTABLE:STRING="/usr/bin/python" -DGR_GIT_COUNT="$(GITCOUNT)" -DGR_GIT_HASH="$(GITREV)" + dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DPythonLibs_FIND_VERSION:STRING="3.7" -DPYTHON_EXECUTABLE:STRING="/usr/bin/python3" -DGR_GIT_COUNT="$(GITCOUNT)" -DGR_GIT_HASH="$(GITREV)" override_dh_auto_install: dh_auto_install - rm -f debian/gr-osmosdr/usr/lib/python2.7/dist-packages/satnogs/*pyc - rm -f debian/gr-osmosdr/usr/lib/python2.7/dist-packages/satnogs/*pyo + rm -f debian/gr-satnogs/usr/lib/python3.7/dist-packages/satnogs/*pyc + rm -f debian/gr-satnogs/usr/lib/python3.7/dist-packages/satnogs/*pyo version-to-get: echo $(VER) is $(GITREV) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 7715ddf..c47bce0 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -81,13 +81,11 @@ add_library(gnuradio-satnogs SHARED ${satnogs_sources}) add_dependencies(gnuradio-satnogs fec) target_link_libraries(gnuradio-satnogs PUBLIC - ${Boost_LIBRARIES} - Boost::chrono gnuradio::gnuradio-runtime gnuradio::gnuradio-fft gnuradio::gnuradio-blocks gnuradio::gnuradio-digital - ${CMAKE_THREAD_LIBS_INIT} + gnuradio::gnuradio-pmt ${VOLK_LIBRARIES} ${OGGVORBIS_LIBRARIES} ${PNG_LIBRARIES} diff --git a/lib/debug_msg_source_impl.cc b/lib/debug_msg_source_impl.cc index 97afe8f..ca86a7a 100644 --- a/lib/debug_msg_source_impl.cc +++ b/lib/debug_msg_source_impl.cc @@ -2,7 +2,8 @@ /* * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module * - * Copyright (C) 2016, Libre Space Foundation + * Copyright (C) 2016, 2019 + * Libre Space Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +25,9 @@ #include #include "debug_msg_source_impl.h" -#include + +#include +#include namespace gr { namespace satnogs { @@ -62,14 +65,12 @@ debug_msg_source_impl::msg_sender() pmt::pmt_t msg = pmt::make_blob(d_buf, d_buf_len); if (d_repeat) { while (d_running) { - boost::this_thread::sleep_for( - boost::chrono::milliseconds((size_t)(d_delay * 1e3))); + std::this_thread::sleep_for(std::chrono::milliseconds((size_t)(d_delay * 1e3))); message_port_pub(pmt::mp("msg"), msg); } } else { - boost::this_thread::sleep_for( - boost::chrono::milliseconds((size_t)(d_delay * 1e3))); + std::this_thread::sleep_for(std::chrono::milliseconds((size_t)(d_delay * 1e3))); message_port_pub(pmt::mp("msg"), msg); } } diff --git a/lib/debug_msg_source_raw_impl.cc b/lib/debug_msg_source_raw_impl.cc index 4937400..c54a7ed 100644 --- a/lib/debug_msg_source_raw_impl.cc +++ b/lib/debug_msg_source_raw_impl.cc @@ -2,7 +2,8 @@ /* * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module * - * Copyright (C) 2016, Libre Space Foundation + * Copyright (C) 2016, 2019 + * Libre Space Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,6 +26,9 @@ #include #include "debug_msg_source_raw_impl.h" +#include +#include + namespace gr { namespace satnogs { @@ -62,14 +66,12 @@ debug_msg_source_raw_impl::msg_sender() pmt::pmt_t msg = pmt::make_blob(d_buf, d_buf_len); if (d_repeat) { while (d_running) { - boost::this_thread::sleep_for( - boost::chrono::milliseconds((size_t)(d_delay * 1e3))); + std::this_thread::sleep_for(std::chrono::milliseconds((size_t)(d_delay * 1e3))); message_port_pub(pmt::mp("msg"), msg); } } else { - boost::this_thread::sleep_for( - boost::chrono::milliseconds((size_t)(d_delay * 1e3))); + std::this_thread::sleep_for(std::chrono::milliseconds((size_t)(d_delay * 1e3))); message_port_pub(pmt::mp("msg"), msg); } }