diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2018-04-15 04:55:45 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2018-04-15 04:55:45 +0000 |
commit | 62980771f39a82f697023c6ccf432725993f54a5 (patch) | |
tree | 05f9c45c383f5604fc34ca7c03b1819da2614d87 /comms/uhd | |
parent | - Add new port: math/R-cran-uroot (diff) |
comms/uhd: unbreak with boost 1.67
host/lib/usrp/cores/rx_vita_core_3000.cpp:77:35: error:
no matching conversion for functional-style cast from 'double' to 'boost::posix_time::milliseconds' (aka
'subsecond_duration<boost::posix_time::time_duration, 1000>')
boost::this_thread::sleep(boost::posix_time::milliseconds(1.0));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PR: 227427
Reported by: antoine (via exp-run)
Notes
Notes:
svn path=/head/; revision=467364
Diffstat (limited to 'comms/uhd')
-rw-r--r-- | comms/uhd/Makefile | 2 | ||||
-rw-r--r-- | comms/uhd/files/patch-boost-1.67 | 156 |
2 files changed, 157 insertions, 1 deletions
diff --git a/comms/uhd/Makefile b/comms/uhd/Makefile index 7c41f57ecd2c..9ab7b35d0a4d 100644 --- a/comms/uhd/Makefile +++ b/comms/uhd/Makefile @@ -2,7 +2,7 @@ PORTNAME= uhd PORTVERSION= 3.10.3.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= comms hamradio MASTER_SITES= http://files.ettus.com/binaries/images/ DISTFILES= ${IMAGE_FILE} diff --git a/comms/uhd/files/patch-boost-1.67 b/comms/uhd/files/patch-boost-1.67 new file mode 100644 index 000000000000..7a1395714a75 --- /dev/null +++ b/comms/uhd/files/patch-boost-1.67 @@ -0,0 +1,156 @@ +https://github.com/EttusResearch/uhd/commit/305d0e79e219 +https://github.com/EttusResearch/uhd/pull/170 + +--- host/examples/benchmark_rate.cpp.orig 2018-01-30 20:19:20 UTC ++++ host/examples/benchmark_rate.cpp +@@ -31,7 +31,7 @@ + + namespace po = boost::program_options; + +-const double CLOCK_TIMEOUT = 1000; // 1000mS timeout for external clock locking ++const long CLOCK_TIMEOUT = 1000; // 1000mS timeout for external clock locking + const double INIT_DELAY = 0.05; // 50mS initial delay before transmit + //typedef boost::atomic<bool> atomic_bool; + // We'll fake atomic bools for now, for more backward compat. +@@ -471,7 +471,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ + const long usecs = long((duration - secs)*1e6); + boost::this_thread::sleep(boost::posix_time::seconds(secs) + + boost::posix_time::microseconds(usecs) +- + boost::posix_time::milliseconds( (rx_channel_nums.size() <= 1 and tx_channel_nums.size() <= 1) ? 0 : (INIT_DELAY * 1000)) ++ + boost::posix_time::milliseconds( (rx_channel_nums.size() <= 1 and tx_channel_nums.size() <= 1) ? 0 : long(INIT_DELAY * 1000)) + ); + + //interrupt and join the threads +--- host/examples/rx_samples_to_file.cpp.orig 2018-01-30 20:19:20 UTC ++++ host/examples/rx_samples_to_file.cpp +@@ -166,7 +166,7 @@ template<typename samp_type> void recv_to_file( + + typedef boost::function<uhd::sensor_value_t (const std::string&)> get_sensor_fn_t; + +-bool check_locked_sensor(std::vector<std::string> sensor_names, const char* sensor_name, get_sensor_fn_t get_sensor_fn, double setup_time){ ++bool check_locked_sensor(std::vector<std::string> sensor_names, const char* sensor_name, get_sensor_fn_t get_sensor_fn, long setup_time){ + if (std::find(sensor_names.begin(), sensor_names.end(), sensor_name) == sensor_names.end()) + return false; + +@@ -211,7 +211,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ + //variables to be set by po + std::string args, file, type, ant, subdev, ref, wirefmt; + size_t total_num_samps, spb; +- double rate, freq, gain, bw, total_time, setup_time; ++ double rate, freq, gain, bw, total_time; ++ long setup_time; + + //setup the program options + po::options_description desc("Allowed options"); +@@ -232,7 +233,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ + ("bw", po::value<double>(&bw), "analog frontend filter bandwidth in Hz") + ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)") + ("wirefmt", po::value<std::string>(&wirefmt)->default_value("sc16"), "wire format (sc8 or sc16)") +- ("setup", po::value<double>(&setup_time)->default_value(1.0), "seconds of setup time") ++ ("setup", po::value<long>(&setup_time)->default_value(1), "seconds of setup time") + ("progress", "periodically display short-term bandwidth") + ("stats", "show average bandwidth on exit") + ("sizemap", "track packet size and display breakdown on exit") +--- host/examples/tx_samples_from_file.cpp.orig 2018-01-30 20:19:20 UTC ++++ host/examples/tx_samples_from_file.cpp +@@ -71,7 +71,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ + //variables to be set by po + std::string args, file, type, ant, subdev, ref, wirefmt; + size_t spb; +- double rate, freq, gain, bw, delay, lo_off; ++ double rate, freq, gain, bw, lo_off; ++ long delay; + + //setup the program options + po::options_description desc("Allowed options"); +@@ -90,7 +91,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ + ("bw", po::value<double>(&bw), "analog frontend filter bandwidth in Hz") + ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)") + ("wirefmt", po::value<std::string>(&wirefmt)->default_value("sc16"), "wire format (sc8 or sc16)") +- ("delay", po::value<double>(&delay)->default_value(0.0), "specify a delay between repeated transmission of file") ++ ("delay", po::value<long>(&delay)->default_value(0), "specify a delay between repeated transmission of file") + ("repeat", "repeatedly transmit file") + ("int-n", "tune USRP with integer-n tuning") + ; +@@ -193,7 +194,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ + else if (type == "short") send_from_file<std::complex<short> >(usrp, "sc16", wirefmt, file, spb); + else throw std::runtime_error("Unknown type " + type); + +- if(repeat and delay != 0.0) boost::this_thread::sleep(boost::posix_time::milliseconds(delay)); ++ if(repeat and delay != 0) boost::this_thread::sleep(boost::posix_time::milliseconds(delay)); + } while(repeat and not stop_signal_called); + + //finished +--- host/lib/transport/nirio/niusrprio_session.cpp.orig 2018-01-30 20:19:20 UTC ++++ host/lib/transport/nirio/niusrprio_session.cpp +@@ -218,7 +218,7 @@ nirio_status niusrprio_session::_ensure_fpga_ready() + //there is a small chance that the server is still finishing up cleaning up + //the DMA FIFOs. We currently don't have any feedback from the driver regarding + //this state so just wait. +- boost::this_thread::sleep(boost::posix_time::milliseconds(FPGA_READY_TIMEOUT_IN_MS)); ++ boost::this_thread::sleep(boost::posix_time::milliseconds(long(FPGA_READY_TIMEOUT_IN_MS))); + + //Disable all FIFOs in the FPGA + for (size_t i = 0; i < _lvbitx->get_input_fifo_count(); i++) { +--- host/lib/transport/nirio/rpc/usrprio_rpc_client.cpp.orig 2018-01-30 20:19:20 UTC ++++ host/lib/transport/nirio/rpc/usrprio_rpc_client.cpp +@@ -24,7 +24,7 @@ usrprio_rpc_client::usrprio_rpc_client( + std::string server, + std::string port + ) : _rpc_client(server, port, uhd::get_process_id(), uhd::get_host_id()), +- _timeout(boost::posix_time::milliseconds(DEFAULT_TIMEOUT_IN_MS)) ++ _timeout(boost::posix_time::milliseconds(long(DEFAULT_TIMEOUT_IN_MS))) + { + _ctor_status = _rpc_client.status() ? NiRio_Status_RpcConnectionError : NiRio_Status_Success; + } +--- host/lib/usrp/cores/rx_vita_core_3000.cpp.orig 2018-01-30 20:19:20 UTC ++++ host/lib/usrp/cores/rx_vita_core_3000.cpp +@@ -74,7 +74,7 @@ struct rx_vita_core_3000_impl : rx_vita_core_3000 + // At 1 ms * 200 MHz = 200k cycles, 8 bytes * 200k cycles = 1.6 MB + // of flushed data, when the typical amount of data buffered + // is on the order of kilobytes +- boost::this_thread::sleep(boost::posix_time::milliseconds(1.0)); ++ boost::this_thread::sleep(boost::posix_time::milliseconds(1)); + + _iface->poke32(REG_FC_WINDOW, window_size-1); + _iface->poke32(REG_FC_ENABLE, window_size?1:0); +--- host/lib/usrp/gps_ctrl.cpp.orig 2018-01-30 20:19:20 UTC ++++ host/lib/usrp/gps_ctrl.cpp +@@ -306,19 +306,19 @@ class gps_ctrl_impl : public gps_ctrl{ (private) + //issue some setup stuff so it spits out the appropriate data + //none of these should issue replies so we don't bother looking for them + //we have to sleep between commands because the JL device, despite not acking, takes considerable time to process each command. +- sleep(milliseconds(GPSDO_COMMAND_DELAY_MS)); ++ sleep(milliseconds(long(GPSDO_COMMAND_DELAY_MS))); + _send("SYST:COMM:SER:ECHO OFF\r\n"); +- sleep(milliseconds(GPSDO_COMMAND_DELAY_MS)); ++ sleep(milliseconds(long(GPSDO_COMMAND_DELAY_MS))); + _send("SYST:COMM:SER:PRO OFF\r\n"); +- sleep(milliseconds(GPSDO_COMMAND_DELAY_MS)); ++ sleep(milliseconds(long(GPSDO_COMMAND_DELAY_MS))); + _send("GPS:GPGGA 1\r\n"); +- sleep(milliseconds(GPSDO_COMMAND_DELAY_MS)); ++ sleep(milliseconds(long(GPSDO_COMMAND_DELAY_MS))); + _send("GPS:GGAST 0\r\n"); +- sleep(milliseconds(GPSDO_COMMAND_DELAY_MS)); ++ sleep(milliseconds(long(GPSDO_COMMAND_DELAY_MS))); + _send("GPS:GPRMC 1\r\n"); +- sleep(milliseconds(GPSDO_COMMAND_DELAY_MS)); ++ sleep(milliseconds(long(GPSDO_COMMAND_DELAY_MS))); + _send("SERV:TRAC 1\r\n"); +- sleep(milliseconds(GPSDO_COMMAND_DELAY_MS)); ++ sleep(milliseconds(long(GPSDO_COMMAND_DELAY_MS))); + } + + //helper function to retrieve a field from an NMEA sentence +--- host/lib/usrp/x300/x300_impl.cpp.orig 2018-01-30 20:19:20 UTC ++++ host/lib/usrp/x300/x300_impl.cpp +@@ -1471,7 +1471,7 @@ void x300_impl::sync_times(mboard_members_t &mb, const + + bool x300_impl::wait_for_clk_locked(mboard_members_t& mb, uint32_t which, double timeout) + { +- boost::system_time timeout_time = boost::get_system_time() + boost::posix_time::milliseconds(timeout * 1000.0); ++ boost::system_time timeout_time = boost::get_system_time() + boost::posix_time::milliseconds(long(timeout * 1000)); + do { + if (mb.fw_regmap->clock_status_reg.read(which)==1) + return true; |