diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
commit | 3cf7c3ef441822c889356fd1812ebf2944a59851 (patch) | |
tree | c513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-ros/libmavconn | |
parent | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff) |
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-ros/libmavconn')
-rw-r--r-- | dev-ros/libmavconn/Manifest | 8 | ||||
-rw-r--r-- | dev-ros/libmavconn/files/boost170.patch | 98 | ||||
-rw-r--r-- | dev-ros/libmavconn/files/logging.patch | 420 | ||||
-rw-r--r-- | dev-ros/libmavconn/libmavconn-1.2.0.ebuild (renamed from dev-ros/libmavconn/libmavconn-0.19.0-r1.ebuild) | 12 | ||||
-rw-r--r-- | dev-ros/libmavconn/libmavconn-9999.ebuild | 8 |
5 files changed, 13 insertions, 533 deletions
diff --git a/dev-ros/libmavconn/Manifest b/dev-ros/libmavconn/Manifest index c1431707e56c..33579d0fb898 100644 --- a/dev-ros/libmavconn/Manifest +++ b/dev-ros/libmavconn/Manifest @@ -1,6 +1,4 @@ -AUX boost170.patch 3754 BLAKE2B 7e4d5be1898f70f7075cc51b36d143f3fd4feeceab6658926d6b0ba9030b0cc3d5ccbbfe624f914698eda0bcfdc748543e35f8de2cda59133b1d0cfe813bb119 SHA512 f3d0f1bdd19f08077e5650d02997028ad044594c185994e8df08903602199bb9b063d1623a807920b8d07c91b468c1b3ac34a806aec7b40ed15e9b70a0eb60c4 -AUX logging.patch 16008 BLAKE2B ac82381998cfc3b204f745b79cba6128751dd511b0d89d50f5317c82138cd06d51e627706ce533f205a731202e32838a8c7a7b3bb7c85011d6e9c698a4d1f792 SHA512 08e64047cbc613982be4bd34c07916df2e90a96f9f6873969be7dfd265f2d6ce4956669be7c57c38f23314fd4634b5569aec17618d412d0662ae5baf8f590433 -DIST mavros-0.19.0.tar.gz 219739 BLAKE2B 4e9a47fa4cdbf11b530bdc39a8048b1834689039af3005d30ffcc2b626651612db12ecc1929ecaf994c5a887224bcf2b0469d1e15ed5b353be4132fb0f523a96 SHA512 87b1b77505d3606196d609a016bcb89b3831e982f8352a13f69f5c2580f46ac603edb2d3c2ce4df5cdd1424172145b88d2b35d149c2be507eb0f23039e7e45a7 -EBUILD libmavconn-0.19.0-r1.ebuild 499 BLAKE2B 3c0d8430aa3e771ad35d32d4d4970e950a82d3390129d3f17853d5f39c1479f72483d8f9311ff6229c4becc587e865304aff22374e85b54bf90c339f45be7979 SHA512 cf6f5d7ed4972f115f374993a04bdb5e2c855a592133e47ba684bd2c54ce7e6d5cf0678093a34e5a81475c55ca8d95be838c86718862107d502d9fd08af6ab92 -EBUILD libmavconn-9999.ebuild 431 BLAKE2B a98c07058726ca23ea9c93d4d072b51d94dbe9472f78caccd72b3e857250f18737981a4cfa2fc48c1c1c75db9313a4b129cd66320b9e82ccee04dc28616b905f SHA512 5d0ade0e7b70ff32b9fb2fed6041e2e9610a03deac57205a5e7136bc8ef9f27aa5a98a07e76e5d362784f37b4d5eb98a03184ededbd6dd39bd50f93531ace235 +DIST mavros-1.2.0.tar.gz 309704 BLAKE2B 85fa9079e6e26a5507878a092f671dfc387f52c65b9d1b2ba1f66d98439369550807b8afe3c99e276725b0c14d479eb1df2bd75870f2b78fe6e95c6020355cc9 SHA512 b37e3713ab15bdac23e88f3e7111821c7eaaaa263d7354852a18dd1e9f6f782a2e9450b29264536b8d712ab04021ddd84d82deeb932715d8e486dc019bb6f374 +EBUILD libmavconn-1.2.0.ebuild 454 BLAKE2B 2714c2f1b81848d481f64267b025275e129129e03d3f174e1043b7f45b6a1b25fdd3f33e8e4a0b3d1eed837a6ed6bb46b9a5cc82adc8c89d7bacc21039a025ca SHA512 2cbe5315f4c5591cb15d566f82b5b553ff40cb618560ee1f239b0229c4611440206d7631083f463e455e3446ad2d93a1da66c8a6f8414cc28a6c2c267512a79f +EBUILD libmavconn-9999.ebuild 454 BLAKE2B 2714c2f1b81848d481f64267b025275e129129e03d3f174e1043b7f45b6a1b25fdd3f33e8e4a0b3d1eed837a6ed6bb46b9a5cc82adc8c89d7bacc21039a025ca SHA512 2cbe5315f4c5591cb15d566f82b5b553ff40cb618560ee1f239b0229c4611440206d7631083f463e455e3446ad2d93a1da66c8a6f8414cc28a6c2c267512a79f MISC metadata.xml 328 BLAKE2B d7ed4dde907bc9dd5533e4a54e90939df954d6af2c0fac66156b21309508546a4eccf8ebaef5d70e42a30ec99091f6cadd52b90199e65e05bcf8fe92069d2ab7 SHA512 a4d2ca220b3dea64853e31e188202fdde1e3533d50659e8c5b8593a1067bf88dcd7f6881e8691f91c99d8502e8739ffa13c5bcead139763109ff304736328b2e diff --git a/dev-ros/libmavconn/files/boost170.patch b/dev-ros/libmavconn/files/boost170.patch deleted file mode 100644 index 357025d90af5..000000000000 --- a/dev-ros/libmavconn/files/boost170.patch +++ /dev/null @@ -1,98 +0,0 @@ -Index: libmavconn/src/tcp.cpp -=================================================================== ---- libmavconn.orig/src/tcp.cpp -+++ libmavconn/src/tcp.cpp -@@ -41,13 +41,19 @@ static bool resolve_address_tcp(io_servi - error_code ec; - - tcp::resolver::query query(host, ""); -- std::for_each(resolver.resolve(query, ec), tcp::resolver::iterator(), -- [&](const tcp::endpoint & q_ep) { -- ep = q_ep; -- ep.port(port); -- result = true; -- CONSOLE_BRIDGE_logDebug(PFXd "host %s resolved as %s", chan, host.c_str(), to_string_ss(ep).c_str()); -- }); -+ -+ auto fn = [&](const tcp::endpoint & q_ep) { -+ ep = q_ep; -+ ep.port(port); -+ result = true; -+ CONSOLE_BRIDGE_logDebug(PFXd "host %s resolved as %s", chan, host.c_str(), to_string_ss(ep).c_str()); -+ }; -+ -+#if BOOST_ASIO_VERSION >= 101200 -+ for (auto q_ep : resolver.resolve(query, ec)) fn(q_ep); -+#else -+ std::for_each(resolver.resolve(query, ec), tcp::resolver::iterator(), fn); -+#endif - - if (ec) { - CONSOLE_BRIDGE_logWarn(PFXd "resolve error: %s", chan, ec.message().c_str()); -@@ -112,7 +118,7 @@ void MAVConnTCPClient::client_connected( - server_channel, conn_id, to_string_ss(server_ep).c_str()); - - // start recv -- socket.get_io_service().post(std::bind(&MAVConnTCPClient::do_recv, shared_from_this())); -+ static_cast<boost::asio::io_service&>(socket.get_executor().context()).post(std::bind(&MAVConnTCPClient::do_recv, shared_from_this())); - } - - MAVConnTCPClient::~MAVConnTCPClient() -@@ -152,7 +158,7 @@ void MAVConnTCPClient::send_bytes(const - - tx_q.emplace_back(bytes, length); - } -- socket.get_io_service().post(std::bind(&MAVConnTCPClient::do_send, shared_from_this(), true)); -+ static_cast<boost::asio::io_service&>(socket.get_executor().context()).post(std::bind(&MAVConnTCPClient::do_send, shared_from_this(), true)); - } - - void MAVConnTCPClient::send_message(const mavlink_message_t *message) -@@ -174,7 +180,7 @@ void MAVConnTCPClient::send_message(cons - - tx_q.emplace_back(message); - } -- socket.get_io_service().post(std::bind(&MAVConnTCPClient::do_send, shared_from_this(), true)); -+ static_cast<boost::asio::io_service&>(socket.get_executor().context()).post(std::bind(&MAVConnTCPClient::do_send, shared_from_this(), true)); - } - - void MAVConnTCPClient::send_message(const mavlink::Message &message) -@@ -194,7 +200,7 @@ void MAVConnTCPClient::send_message(cons - - tx_q.emplace_back(message, get_status_p(), sys_id, comp_id); - } -- socket.get_io_service().post(std::bind(&MAVConnTCPClient::do_send, shared_from_this(), true)); -+ static_cast<boost::asio::io_service&>(socket.get_executor().context()).post(std::bind(&MAVConnTCPClient::do_send, shared_from_this(), true)); - } - - void MAVConnTCPClient::do_recv() -Index: libmavconn/src/udp.cpp -=================================================================== ---- libmavconn.orig/src/udp.cpp -+++ libmavconn/src/udp.cpp -@@ -41,13 +41,19 @@ static bool resolve_address_udp(io_servi - error_code ec; - - udp::resolver::query query(host, ""); -- std::for_each(resolver.resolve(query, ec), udp::resolver::iterator(), -- [&](const udp::endpoint & q_ep) { -- ep = q_ep; -- ep.port(port); -- result = true; -- CONSOLE_BRIDGE_logDebug(PFXd "host %s resolved as %s", chan, host.c_str(), to_string_ss(ep).c_str()); -- }); -+ -+ auto fn = [&](const udp::endpoint & q_ep) { -+ ep = q_ep; -+ ep.port(port); -+ result = true; -+ CONSOLE_BRIDGE_logDebug(PFXd "host %s resolved as %s", chan, host.c_str(), to_string_ss(ep).c_str()); -+ }; -+ -+#if BOOST_ASIO_VERSION >= 101200 -+ for (auto q_ep : resolver.resolve(query, ec)) fn(q_ep); -+#else -+ std::for_each(resolver.resolve(query, ec), udp::resolver::iterator(), fn); -+#endif - - if (ec) { - CONSOLE_BRIDGE_logWarn(PFXd "resolve error: %s", chan, ec.message().c_str()); diff --git a/dev-ros/libmavconn/files/logging.patch b/dev-ros/libmavconn/files/logging.patch deleted file mode 100644 index 3396a23c04df..000000000000 --- a/dev-ros/libmavconn/files/logging.patch +++ /dev/null @@ -1,420 +0,0 @@ -Index: libmavconn/src/interface.cpp -=================================================================== ---- libmavconn.orig/src/interface.cpp -+++ libmavconn/src/interface.cpp -@@ -133,7 +133,7 @@ void MAVConnInterface::log_recv(const ch - - const char *proto_version_str = (msg.magic == MAVLINK_STX) ? "v2.0" : "v1.0"; - -- logDebug("%s%zu: recv: %s %4s Message-Id: %u [%u bytes] IDs: %u.%u Seq: %u", -+ CONSOLE_BRIDGE_logDebug("%s%zu: recv: %s %4s Message-Id: %u [%u bytes] IDs: %u.%u Seq: %u", - pfx, conn_id, - proto_version_str, - framing_str, -@@ -144,7 +144,7 @@ void MAVConnInterface::log_send(const ch - { - const char *proto_version_str = (msg->magic == MAVLINK_STX) ? "v2.0" : "v1.0"; - -- logDebug("%s%zu: send: %s Message-Id: %u [%u bytes] IDs: %u.%u Seq: %u", -+ CONSOLE_BRIDGE_logDebug("%s%zu: send: %s Message-Id: %u [%u bytes] IDs: %u.%u Seq: %u", - pfx, conn_id, - proto_version_str, - msg->msgid, msg->len, msg->sysid, msg->compid, msg->seq); -@@ -152,7 +152,7 @@ void MAVConnInterface::log_send(const ch - - void MAVConnInterface::log_send_obj(const char *pfx, const mavlink::Message &msg) - { -- logDebug("%s%zu: send: %s", pfx, conn_id, msg.to_yaml().c_str()); -+ CONSOLE_BRIDGE_logDebug("%s%zu: send: %s", pfx, conn_id, msg.to_yaml().c_str()); - } - - void MAVConnInterface::send_message_ignore_drop(const mavlink::mavlink_message_t *msg) -@@ -161,7 +161,7 @@ void MAVConnInterface::send_message_igno - send_message(msg); - } - catch (std::length_error &e) { -- logError(PFX "%zu: DROPPED Message-Id %u [%u bytes] IDs: %u.%u Seq: %u: %s", -+ CONSOLE_BRIDGE_logError(PFX "%zu: DROPPED Message-Id %u [%u bytes] IDs: %u.%u Seq: %u: %s", - conn_id, - msg->msgid, msg->len, msg->sysid, msg->compid, msg->seq, - e.what()); -@@ -174,7 +174,7 @@ void MAVConnInterface::send_message_igno - send_message(msg); - } - catch (std::length_error &e) { -- logError(PFX "%zu: DROPPED Message %s: %s", -+ CONSOLE_BRIDGE_logError(PFX "%zu: DROPPED Message %s: %s", - conn_id, - msg.get_name().c_str(), - e.what()); -@@ -247,14 +247,14 @@ static void url_parse_query(std::string - auto ids_it = std::search(query.begin(), query.end(), - ids_end.begin(), ids_end.end()); - if (ids_it == query.end()) { -- logWarn(PFX "URL: unknown query arguments"); -+ CONSOLE_BRIDGE_logWarn(PFX "URL: unknown query arguments"); - return; - } - - std::advance(ids_it, ids_end.length()); - auto comma_it = std::find(ids_it, query.end(), ','); - if (comma_it == query.end()) { -- logError(PFX "URL: no comma in ids= query"); -+ CONSOLE_BRIDGE_logError(PFX "URL: no comma in ids= query"); - return; - } - -@@ -264,7 +264,7 @@ static void url_parse_query(std::string - sysid = std::stoi(sys); - compid = std::stoi(comp); - -- logDebug(PFX "URL: found system/component id = [%u, %u]", sysid, compid); -+ CONSOLE_BRIDGE_logDebug(PFX "URL: found system/component id = [%u, %u]", sysid, compid); - } - - static MAVConnInterface::Ptr url_parse_serial( -@@ -292,7 +292,7 @@ static MAVConnInterface::Ptr url_parse_u - - auto sep_it = std::find(hosts.begin(), hosts.end(), '@'); - if (sep_it == hosts.end()) { -- logError(PFX "UDP URL should contain @!"); -+ CONSOLE_BRIDGE_logError(PFX "UDP URL should contain @!"); - throw DeviceError("url", "UDP separator not found"); - } - -@@ -360,7 +360,7 @@ MAVConnInterface::Ptr MAVConnInterface:: - proto_end.begin(), proto_end.end()); - if (proto_it == url.end()) { - // looks like file path -- logDebug(PFX "URL: %s: looks like file path", url.c_str()); -+ CONSOLE_BRIDGE_logDebug(PFX "URL: %s: looks like file path", url.c_str()); - return url_parse_serial(url, "", system_id, component_id, false); - } - -@@ -384,7 +384,7 @@ MAVConnInterface::Ptr MAVConnInterface:: - ++query_it; - query.assign(query_it, url.end()); - -- logDebug(PFX "URL: %s: proto: %s, host: %s, path: %s, query: %s", -+ CONSOLE_BRIDGE_logDebug(PFX "URL: %s: proto: %s, host: %s, path: %s, query: %s", - url.c_str(), proto.c_str(), host.c_str(), - path.c_str(), query.c_str()); - -Index: libmavconn/src/mavlink_helpers.cpp.em -=================================================================== ---- libmavconn.orig/src/mavlink_helpers.cpp.em -+++ libmavconn/src/mavlink_helpers.cpp.em -@@ -27,20 +27,20 @@ using mavconn::MAVConnInterface; - - void MAVConnInterface::init_msg_entry() - { -- logDebug("mavconn: Initialize message_entries map"); -+ CONSOLE_BRIDGE_logDebug("mavconn: Initialize message_entries map"); - - auto load = [&](const char *dialect, const mavlink::mavlink_msg_entry_t & e) { - auto it = message_entries.find(e.msgid); - if (it != message_entries.end()) { - if (memcmp(&e, it->second, sizeof(e)) != 0) { -- logWarn("mavconn: init: message from %s, MSG-ID %d ignored! Table has different entry.", dialect, e.msgid); -+ CONSOLE_BRIDGE_logWarn("mavconn: init: message from %s, MSG-ID %d ignored! Table has different entry.", dialect, e.msgid); - } - else { -- logDebug("mavconn: init: message from %s, MSG-ID %d in table.", dialect, e.msgid); -+ CONSOLE_BRIDGE_logDebug("mavconn: init: message from %s, MSG-ID %d in table.", dialect, e.msgid); - } - } - else { -- logDebug("mavconn: init: add message entry for %s, MSG-ID %d", dialect, e.msgid); -+ CONSOLE_BRIDGE_logDebug("mavconn: init: add message entry for %s, MSG-ID %d", dialect, e.msgid); - message_entries[e.msgid] = &e; - } - }; -Index: libmavconn/src/serial.cpp -=================================================================== ---- libmavconn.orig/src/serial.cpp -+++ libmavconn/src/serial.cpp -@@ -43,7 +43,7 @@ MAVConnSerial::MAVConnSerial(uint8_t sys - { - using SPB = boost::asio::serial_port_base; - -- logInform(PFXd "device: %s @ %d bps", conn_id, device.c_str(), baudrate); -+ CONSOLE_BRIDGE_logInform(PFXd "device: %s @ %d bps", conn_id, device.c_str(), baudrate); - - try { - serial_dev.open(device); -@@ -95,7 +95,7 @@ void MAVConnSerial::close() - void MAVConnSerial::send_bytes(const uint8_t *bytes, size_t length) - { - if (!is_open()) { -- logError(PFXd "send: channel closed!", conn_id); -+ CONSOLE_BRIDGE_logError(PFXd "send: channel closed!", conn_id); - return; - } - -@@ -115,7 +115,7 @@ void MAVConnSerial::send_message(const m - assert(message != nullptr); - - if (!is_open()) { -- logError(PFXd "send: channel closed!", conn_id); -+ CONSOLE_BRIDGE_logError(PFXd "send: channel closed!", conn_id); - return; - } - -@@ -135,7 +135,7 @@ void MAVConnSerial::send_message(const m - void MAVConnSerial::send_message(const mavlink::Message &message) - { - if (!is_open()) { -- logError(PFXd "send: channel closed!", conn_id); -+ CONSOLE_BRIDGE_logError(PFXd "send: channel closed!", conn_id); - return; - } - -@@ -159,7 +159,7 @@ void MAVConnSerial::do_read(void) - buffer(rx_buf), - [sthis] (error_code error, size_t bytes_transferred) { - if (error) { -- logError(PFXd "receive: %s", sthis->conn_id, error.message().c_str()); -+ CONSOLE_BRIDGE_logError(PFXd "receive: %s", sthis->conn_id, error.message().c_str()); - sthis->close(); - return; - } -@@ -187,7 +187,7 @@ void MAVConnSerial::do_write(bool check_ - assert(bytes_transferred <= buf_ref.len); - - if (error) { -- logError(PFXd "write: %s", sthis->conn_id, error.message().c_str()); -+ CONSOLE_BRIDGE_logError(PFXd "write: %s", sthis->conn_id, error.message().c_str()); - sthis->close(); - return; - } -Index: libmavconn/src/tcp.cpp -=================================================================== ---- libmavconn.orig/src/tcp.cpp -+++ libmavconn/src/tcp.cpp -@@ -46,11 +46,11 @@ static bool resolve_address_tcp(io_servi - ep = q_ep; - ep.port(port); - result = true; -- logDebug(PFXd "host %s resolved as %s", chan, host.c_str(), to_string_ss(ep).c_str()); -+ CONSOLE_BRIDGE_logDebug(PFXd "host %s resolved as %s", chan, host.c_str(), to_string_ss(ep).c_str()); - }); - - if (ec) { -- logWarn(PFXd "resolve error: %s", chan, ec.message().c_str()); -+ CONSOLE_BRIDGE_logWarn(PFXd "resolve error: %s", chan, ec.message().c_str()); - result = false; - } - -@@ -73,7 +73,7 @@ MAVConnTCPClient::MAVConnTCPClient(uint8 - if (!resolve_address_tcp(io_service, conn_id, server_host, server_port, server_ep)) - throw DeviceError("tcp: resolve", "Bind address resolve failed"); - -- logInform(PFXd "Server address: %s", conn_id, to_string_ss(server_ep).c_str()); -+ CONSOLE_BRIDGE_logInform(PFXd "Server address: %s", conn_id, to_string_ss(server_ep).c_str()); - - try { - socket.open(tcp::v4()); -@@ -108,7 +108,7 @@ MAVConnTCPClient::MAVConnTCPClient(uint8 - - void MAVConnTCPClient::client_connected(size_t server_channel) - { -- logInform(PFXd "Got client, id: %zu, address: %s", -+ CONSOLE_BRIDGE_logInform(PFXd "Got client, id: %zu, address: %s", - server_channel, conn_id, to_string_ss(server_ep).c_str()); - - // start recv -@@ -140,7 +140,7 @@ void MAVConnTCPClient::close() - void MAVConnTCPClient::send_bytes(const uint8_t *bytes, size_t length) - { - if (!is_open()) { -- logError(PFXd "send: channel closed!", conn_id); -+ CONSOLE_BRIDGE_logError(PFXd "send: channel closed!", conn_id); - return; - } - -@@ -160,7 +160,7 @@ void MAVConnTCPClient::send_message(cons - assert(message != nullptr); - - if (!is_open()) { -- logError(PFXd "send: channel closed!", conn_id); -+ CONSOLE_BRIDGE_logError(PFXd "send: channel closed!", conn_id); - return; - } - -@@ -180,7 +180,7 @@ void MAVConnTCPClient::send_message(cons - void MAVConnTCPClient::send_message(const mavlink::Message &message) - { - if (!is_open()) { -- logError(PFXd "send: channel closed!", conn_id); -+ CONSOLE_BRIDGE_logError(PFXd "send: channel closed!", conn_id); - return; - } - -@@ -204,7 +204,7 @@ void MAVConnTCPClient::do_recv() - buffer(rx_buf), - [sthis] (error_code error, size_t bytes_transferred) { - if (error) { -- logError(PFXd "receive: %s", sthis->conn_id, error.message().c_str()); -+ CONSOLE_BRIDGE_logError(PFXd "receive: %s", sthis->conn_id, error.message().c_str()); - sthis->close(); - return; - } -@@ -232,7 +232,7 @@ void MAVConnTCPClient::do_send(bool chec - assert(bytes_transferred <= buf_ref.len); - - if (error) { -- logError(PFXd "send: %s", sthis->conn_id, error.message().c_str()); -+ CONSOLE_BRIDGE_logError(PFXd "send: %s", sthis->conn_id, error.message().c_str()); - sthis->close(); - return; - } -@@ -269,7 +269,7 @@ MAVConnTCPServer::MAVConnTCPServer(uint8 - if (!resolve_address_tcp(io_service, conn_id, server_host, server_port, bind_ep)) - throw DeviceError("tcp-l: resolve", "Bind address resolve failed"); - -- logInform(PFXd "Bind address: %s", conn_id, to_string_ss(bind_ep).c_str()); -+ CONSOLE_BRIDGE_logInform(PFXd "Bind address: %s", conn_id, to_string_ss(bind_ep).c_str()); - - try { - acceptor.open(tcp::v4()); -@@ -302,7 +302,7 @@ void MAVConnTCPServer::close() - if (!is_open()) - return; - -- logInform(PFXd "Terminating server. " -+ CONSOLE_BRIDGE_logInform(PFXd "Terminating server. " - "All connections will be closed.", conn_id); - - io_service.stop(); -@@ -395,7 +395,7 @@ void MAVConnTCPServer::do_accept() - acceptor_client->server_ep, - [sthis, acceptor_client] (error_code error) { - if (error) { -- logError(PFXd "accept: %s", sthis->conn_id, error.message().c_str()); -+ CONSOLE_BRIDGE_logError(PFXd "accept: %s", sthis->conn_id, error.message().c_str()); - sthis->close(); - return; - } -@@ -416,7 +416,7 @@ void MAVConnTCPServer::client_closed(std - { - if (auto instp = weak_instp.lock()) { - bool locked = mutex.try_lock(); -- logInform(PFXd "Client connection closed, id: %p, address: %s", -+ CONSOLE_BRIDGE_logInform(PFXd "Client connection closed, id: %p, address: %s", - conn_id, instp.get(), to_string_ss(instp->server_ep).c_str()); - - client_list.remove(instp); -Index: libmavconn/src/udp.cpp -=================================================================== ---- libmavconn.orig/src/udp.cpp -+++ libmavconn/src/udp.cpp -@@ -46,11 +46,11 @@ static bool resolve_address_udp(io_servi - ep = q_ep; - ep.port(port); - result = true; -- logDebug(PFXd "host %s resolved as %s", chan, host.c_str(), to_string_ss(ep).c_str()); -+ CONSOLE_BRIDGE_logDebug(PFXd "host %s resolved as %s", chan, host.c_str(), to_string_ss(ep).c_str()); - }); - - if (ec) { -- logWarn(PFXd "resolve error: %s", chan, ec.message().c_str()); -+ CONSOLE_BRIDGE_logWarn(PFXd "resolve error: %s", chan, ec.message().c_str()); - result = false; - } - -@@ -75,7 +75,7 @@ MAVConnUDP::MAVConnUDP(uint8_t system_id - if (!resolve_address_udp(io_service, conn_id, bind_host, bind_port, bind_ep)) - throw DeviceError("udp: resolve", "Bind address resolve failed"); - -- logInform(PFXd "Bind address: %s", conn_id, to_string_ss(bind_ep).c_str()); -+ CONSOLE_BRIDGE_logInform(PFXd "Bind address: %s", conn_id, to_string_ss(bind_ep).c_str()); - - if (remote_host != "") { - if (remote_host != BROADCAST_REMOTE_HOST) -@@ -86,9 +86,9 @@ MAVConnUDP::MAVConnUDP(uint8_t system_id - } - - if (remote_exists) -- logInform(PFXd "Remote address: %s", conn_id, to_string_ss(remote_ep).c_str()); -+ CONSOLE_BRIDGE_logInform(PFXd "Remote address: %s", conn_id, to_string_ss(remote_ep).c_str()); - else -- logWarn(PFXd "Remote address resolve failed.", conn_id); -+ CONSOLE_BRIDGE_logWarn(PFXd "Remote address resolve failed.", conn_id); - } - - try { -@@ -144,12 +144,12 @@ void MAVConnUDP::close() - void MAVConnUDP::send_bytes(const uint8_t *bytes, size_t length) - { - if (!is_open()) { -- logError(PFXd "send: channel closed!", conn_id); -+ CONSOLE_BRIDGE_logError(PFXd "send: channel closed!", conn_id); - return; - } - - if (!remote_exists) { -- logDebug(PFXd "send: Remote not known, message dropped.", conn_id); -+ CONSOLE_BRIDGE_logDebug(PFXd "send: Remote not known, message dropped.", conn_id); - return; - } - -@@ -169,12 +169,12 @@ void MAVConnUDP::send_message(const mavl - assert(message != nullptr); - - if (!is_open()) { -- logError(PFXd "send: channel closed!", conn_id); -+ CONSOLE_BRIDGE_logError(PFXd "send: channel closed!", conn_id); - return; - } - - if (!remote_exists) { -- logDebug(PFXd "send: Remote not known, message dropped.", conn_id); -+ CONSOLE_BRIDGE_logDebug(PFXd "send: Remote not known, message dropped.", conn_id); - return; - } - -@@ -194,12 +194,12 @@ void MAVConnUDP::send_message(const mavl - void MAVConnUDP::send_message(const mavlink::Message &message) - { - if (!is_open()) { -- logError(PFXd "send: channel closed!", conn_id); -+ CONSOLE_BRIDGE_logError(PFXd "send: channel closed!", conn_id); - return; - } - - if (!remote_exists) { -- logDebug(PFXd "send: Remote not known, message dropped.", conn_id); -+ CONSOLE_BRIDGE_logDebug(PFXd "send: Remote not known, message dropped.", conn_id); - return; - } - -@@ -224,13 +224,13 @@ void MAVConnUDP::do_recvfrom() - remote_ep, - [sthis] (error_code error, size_t bytes_transferred) { - if (error) { -- logError(PFXd "receive: %s", sthis->conn_id, error.message().c_str()); -+ CONSOLE_BRIDGE_logError(PFXd "receive: %s", sthis->conn_id, error.message().c_str()); - sthis->close(); - return; - } - - if (sthis->remote_ep != sthis->last_remote_ep) { -- logInform(PFXd "Remote address: %s", sthis->conn_id, to_string_ss(sthis->remote_ep).c_str()); -+ CONSOLE_BRIDGE_logInform(PFXd "Remote address: %s", sthis->conn_id, to_string_ss(sthis->remote_ep).c_str()); - sthis->remote_exists = true; - sthis->last_remote_ep = sthis->remote_ep; - } -@@ -259,11 +259,11 @@ void MAVConnUDP::do_sendto(bool check_tx - assert(bytes_transferred <= buf_ref.len); - - if (error == boost::asio::error::network_unreachable) { -- logWarn(PFXd "sendto: %s, retrying", sthis->conn_id, error.message().c_str()); -+ CONSOLE_BRIDGE_logWarn(PFXd "sendto: %s, retrying", sthis->conn_id, error.message().c_str()); - // do not return, try to resend - } - else if (error) { -- logError(PFXd "sendto: %s", sthis->conn_id, error.message().c_str()); -+ CONSOLE_BRIDGE_logError(PFXd "sendto: %s", sthis->conn_id, error.message().c_str()); - sthis->close(); - return; - } diff --git a/dev-ros/libmavconn/libmavconn-0.19.0-r1.ebuild b/dev-ros/libmavconn/libmavconn-1.2.0.ebuild index d42a92fd0e64..9a943481d549 100644 --- a/dev-ros/libmavconn/libmavconn-0.19.0-r1.ebuild +++ b/dev-ros/libmavconn/libmavconn-1.2.0.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 ROS_REPO_URI="https://github.com/mavlink/mavros" KEYWORDS="~amd64 ~arm" ROS_SUBDIR=${PN} @@ -18,8 +18,6 @@ RDEPEND=" dev-libs/boost:= dev-libs/console_bridge:= " -DEPEND="${RDEPEND}" -PATCHES=( - "${FILESDIR}/logging.patch" - "${FILESDIR}/boost170.patch" -) +DEPEND="${RDEPEND} + test? ( dev-cpp/gtest ) +" diff --git a/dev-ros/libmavconn/libmavconn-9999.ebuild b/dev-ros/libmavconn/libmavconn-9999.ebuild index 9eb27fcc7ea7..9a943481d549 100644 --- a/dev-ros/libmavconn/libmavconn-9999.ebuild +++ b/dev-ros/libmavconn/libmavconn-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 ROS_REPO_URI="https://github.com/mavlink/mavros" KEYWORDS="~amd64 ~arm" ROS_SUBDIR=${PN} @@ -18,4 +18,6 @@ RDEPEND=" dev-libs/boost:= dev-libs/console_bridge:= " -DEPEND="${RDEPEND}" +DEPEND="${RDEPEND} + test? ( dev-cpp/gtest ) +" |