Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ros/rosserial_server/, dev-ros/rosserial_server/files/
Date: Mon, 02 Sep 2019 12:00:25
Message-Id: 1567425589.e643269e35dcc9df63a6b042d0fefecbb4c0eb49.aballier@gentoo
1 commit: e643269e35dcc9df63a6b042d0fefecbb4c0eb49
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 2 11:51:29 2019 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 2 11:59:49 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e643269e
7
8 dev-ros/rosserial_server: fix build with boost 1.70.
9
10 Closes: https://bugs.gentoo.org/690706
11 Package-Manager: Portage-2.3.75, Repoman-2.3.17
12 Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
13
14 dev-ros/rosserial_server/files/boost170.patch | 71 ++++++++++++++++++++++
15 .../rosserial_server/rosserial_server-0.8.0.ebuild | 3 +-
16 2 files changed, 73 insertions(+), 1 deletion(-)
17
18 diff --git a/dev-ros/rosserial_server/files/boost170.patch b/dev-ros/rosserial_server/files/boost170.patch
19 new file mode 100644
20 index 00000000000..cbf106fc9ac
21 --- /dev/null
22 +++ b/dev-ros/rosserial_server/files/boost170.patch
23 @@ -0,0 +1,71 @@
24 +Index: rosserial_server/include/rosserial_server/async_read_buffer.h
25 +===================================================================
26 +--- rosserial_server.orig/include/rosserial_server/async_read_buffer.h
27 ++++ rosserial_server/include/rosserial_server/async_read_buffer.h
28 +@@ -166,7 +166,7 @@ private:
29 +
30 + // Post the callback rather than executing it here so, so that we have a chance to do the cleanup
31 + // below prior to it actually getting run, in the event that the callback queues up another read.
32 +- stream_.get_io_service().post(boost::bind(read_success_callback_, stream));
33 ++ static_cast<boost::asio::io_service&>(stream_.get_executor().context()).post(boost::bind(read_success_callback_, stream));
34 +
35 + // Resetting these values clears our state so that we know there isn't a callback pending.
36 + read_requested_bytes_ = 0;
37 +Index: rosserial_server/include/rosserial_server/udp_stream.h
38 +===================================================================
39 +--- rosserial_server.orig/include/rosserial_server/udp_stream.h
40 ++++ rosserial_server/include/rosserial_server/udp_stream.h
41 +@@ -48,7 +48,6 @@ namespace rosserial_server
42 + {
43 +
44 + using boost::asio::ip::udp;
45 +-using boost::asio::handler_type;
46 +
47 +
48 + class UdpStream : public udp::socket
49 +@@ -62,9 +61,9 @@ public:
50 + {
51 + boost::system::error_code ec;
52 + const protocol_type protocol = server_endpoint.protocol();
53 +- this->get_service().open(this->get_implementation(), protocol, ec);
54 ++ udp::socket::open(protocol, ec);
55 + boost::asio::detail::throw_error(ec, "open");
56 +- this->get_service().bind(this->get_implementation(), server_endpoint, ec);
57 ++ bind(server_endpoint, ec);
58 + boost::asio::detail::throw_error(ec, "bind");
59 +
60 + client_endpoint_ = client_endpoint;
61 +@@ -76,6 +75,8 @@ public:
62 + async_write_some(const ConstBufferSequence& buffers,
63 + BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
64 + {
65 ++ return async_send(buffers, handler);
66 ++#if 0
67 + // If you get an error on the following line it means that your handler does
68 + // not meet the documented type requirements for a WriteHandler.
69 + BOOST_ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
70 +@@ -94,6 +95,7 @@ public:
71 + this->get_implementation(), buffers, client_endpoint_, 0,
72 + BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
73 + #endif
74 ++#endif
75 + }
76 +
77 + template <typename MutableBufferSequence, typename ReadHandler>
78 +@@ -102,6 +104,8 @@ public:
79 + async_read_some(const MutableBufferSequence& buffers,
80 + BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
81 + {
82 ++ return async_receive(buffers, handler);
83 ++#if 0
84 + // If you get an error on the following line it means that your handler does
85 + // not meet the documented type requirements for a ReadHandler.
86 + BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
87 +@@ -119,6 +123,7 @@ public:
88 + this->get_implementation(), buffers, client_endpoint_, 0,
89 + BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
90 + #endif
91 ++#endif
92 + }
93 +
94 + private:
95
96 diff --git a/dev-ros/rosserial_server/rosserial_server-0.8.0.ebuild b/dev-ros/rosserial_server/rosserial_server-0.8.0.ebuild
97 index 93bba24008f..37c1c17be5d 100644
98 --- a/dev-ros/rosserial_server/rosserial_server-0.8.0.ebuild
99 +++ b/dev-ros/rosserial_server/rosserial_server-0.8.0.ebuild
100 @@ -1,4 +1,4 @@
101 -# Copyright 1999-2018 Gentoo Authors
102 +# Copyright 1999-2019 Gentoo Authors
103 # Distributed under the terms of the GNU General Public License v2
104
105 EAPI=5
106 @@ -20,3 +20,4 @@ RDEPEND="
107 dev-libs/boost:=[threads]
108 "
109 DEPEND="${RDEPEND}"
110 +PATCHES=( "${FILESDIR}/boost170.patch" )