diff options
author | acxz | 2019-11-19 10:38:26 -0500 |
---|---|---|
committer | John Hendy | 2019-11-19 09:38:26 -0600 |
commit | d68cedad780435ccbb867ab993f9c7703065cbca (patch) | |
tree | d385cd0a5b1e0fb0f03b48bcd1e9fc663b4b5c25 | |
parent | a5d30de1c3f6129c47bcbb5c981b1935f3e53293 (diff) | |
download | aur-d68cedad780435ccbb867ab993f9c7703065cbca.tar.gz |
patch get_io issue related to boost 1.70 (#2)
* update url and package to 33.3
* patch boost 1.70 issue
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | boost-1.70.patch | 52 |
3 files changed, 69 insertions, 15 deletions
@@ -1,8 +1,8 @@ pkgbase = ros-melodic-libmavconn pkgdesc = ROS - MAVLink communication library. - pkgver = 0.32.2 + pkgver = 0.33.3 pkgrel = 1 - url = https://wiki.ros.org/mavros + url = https://wiki.ros.org/libmavconn arch = any license = GPLv3, LGPLv3, BSD makedepends = cmake @@ -14,8 +14,10 @@ pkgbase = ros-melodic-libmavconn depends = ros-melodic-mavlink depends = boost depends = console-bridge - source = ros-melodic-libmavconn-0.32.2.tar.gz::https://github.com/mavlink/mavros/archive/0.32.2.tar.gz - sha256sums = d5e04661f88896a9a77f22a083023ce5e8e13dd71c1f8f1b7d5e187b3bf6c4f8 + source = ros-melodic-libmavconn-0.33.3.tar.gz::https://github.com/mavlink/mavros/archive/0.33.3.tar.gz + source = boost-1.70.patch + sha256sums = eb4fc2439c78cdc2fa5f2d9ab81abe4f1fa54f9dd45f02b8f2440a231125118e + sha256sums = d7a6c462f9328536ffd9b5b59e3a7e483fc5d403d71114bfc03024c364df233d pkgname = ros-melodic-libmavconn @@ -1,10 +1,10 @@ # Script generated with import_catkin_packages.py # For more information: https://github.com/bchretien/arch-ros-stacks pkgdesc="ROS - MAVLink communication library." -url='https://wiki.ros.org/mavros' +url='https://wiki.ros.org/libmavconn' pkgname='ros-melodic-libmavconn' -pkgver='0.32.2' +pkgver='0.33.3' arch=('any') pkgrel=1 license=('GPLv3, LGPLv3, BSD') @@ -21,16 +21,16 @@ depends=(${ros_depends[@]} boost console-bridge) -# Git version (e.g. for debugging) -# _tag=release/melodic/libmavconn/${pkgver}-${_pkgver_patch} -# _dir=${pkgname} -# source=("${_dir}"::"git+https://github.com/mavlink/mavros-release.git"#tag=${_tag}) -# sha256sums=('SKIP') - -# Tarball version (faster download) _dir="mavros-${pkgver}/libmavconn" -source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/mavlink/mavros/archive/${pkgver}.tar.gz") -sha256sums=('d5e04661f88896a9a77f22a083023ce5e8e13dd71c1f8f1b7d5e187b3bf6c4f8') +source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/mavlink/mavros/archive/${pkgver}.tar.gz" + "boost-1.70.patch") +sha256sums=('eb4fc2439c78cdc2fa5f2d9ab81abe4f1fa54f9dd45f02b8f2440a231125118e' + 'd7a6c462f9328536ffd9b5b59e3a7e483fc5d403d71114bfc03024c364df233d') + +prepare() { + cd "${srcdir}/${_dir}" + patch -uN src/tcp.cpp ../../../boost-1.70.patch || return 1 +} build() { # Use ROS environment variables diff --git a/boost-1.70.patch b/boost-1.70.patch new file mode 100644 index 000000000000..5da5343dd7c1 --- /dev/null +++ b/boost-1.70.patch @@ -0,0 +1,52 @@ +--- tcp.cpp.old 2019-11-16 23:18:03.959450362 -0500 ++++ tcp.cpp 2019-11-16 23:14:48.329447262 -0500 +@@ -21,6 +21,13 @@ + #include <mavconn/thread_utils.h> + #include <mavconn/tcp.h> + ++// Ensure the correct io_service() is called based on boost version ++#if BOOST_VERSION >= 107000 ++#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context()) ++#else ++#define GET_IO_SERVICE(s) ((s).get_io_service()) ++#endif ++ + namespace mavconn { + + using boost::system::error_code; +@@ -120,7 +127,7 @@ + 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())); ++ GET_IO_SERVICE(socket).post(std::bind(&MAVConnTCPClient::do_recv, shared_from_this())); + } + + MAVConnTCPClient::~MAVConnTCPClient() +@@ -166,7 +173,7 @@ + + tx_q.emplace_back(bytes, length); + } +- socket.get_io_service().post(std::bind(&MAVConnTCPClient::do_send, shared_from_this(), true)); ++ GET_IO_SERVICE(socket).post(std::bind(&MAVConnTCPClient::do_send, shared_from_this(), true)); + } + + void MAVConnTCPClient::send_message(const mavlink_message_t *message) +@@ -188,7 +195,7 @@ + + tx_q.emplace_back(message); + } +- socket.get_io_service().post(std::bind(&MAVConnTCPClient::do_send, shared_from_this(), true)); ++ GET_IO_SERVICE(socket).post(std::bind(&MAVConnTCPClient::do_send, shared_from_this(), true)); + } + + void MAVConnTCPClient::send_message(const mavlink::Message &message, const uint8_t source_compid) +@@ -208,7 +215,7 @@ + + tx_q.emplace_back(message, get_status_p(), sys_id, source_compid); + } +- socket.get_io_service().post(std::bind(&MAVConnTCPClient::do_send, shared_from_this(), true)); ++ GET_IO_SERVICE(socket).post(std::bind(&MAVConnTCPClient::do_send, shared_from_this(), true)); + } + + void MAVConnTCPClient::do_recv() |