1 |
commit: 2b01e7caec293f9e124749610ebe13b51ebeed96 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 11 18:09:56 2019 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 11 18:09:56 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b01e7ca |
7 |
|
8 |
dev-cpp/websocketpp: Fix building against boost 1.70 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/683472 |
11 |
Package-Manager: Portage-2.3.71, Repoman-2.3.17 |
12 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
13 |
|
14 |
.../files/websocketpp-0.8.1-boost-1.70.patch | 139 +++++++++++++++++++++ |
15 |
...test_transport-test_transport_asio_timers.patch | 46 +++++++ |
16 |
dev-cpp/websocketpp/websocketpp-0.8.1.ebuild | 13 +- |
17 |
3 files changed, 193 insertions(+), 5 deletions(-) |
18 |
|
19 |
diff --git a/dev-cpp/websocketpp/files/websocketpp-0.8.1-boost-1.70.patch b/dev-cpp/websocketpp/files/websocketpp-0.8.1-boost-1.70.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..40ae155307d |
22 |
--- /dev/null |
23 |
+++ b/dev-cpp/websocketpp/files/websocketpp-0.8.1-boost-1.70.patch |
24 |
@@ -0,0 +1,139 @@ |
25 |
+From c769c9238ad62178f506038178714a1c35aa2769 Mon Sep 17 00:00:00 2001 |
26 |
+From: Stefan Floeren <42731906+stefan-floeren@××××××××××××××××××××.com> |
27 |
+Date: Tue, 16 Apr 2019 08:38:01 +0200 |
28 |
+Subject: [PATCH 1/2] Replace make_shared with new in some cases |
29 |
+ |
30 |
+Replace make_shared for asio types that take a lib::ref as a parameter. |
31 |
+This should fix the ASIO change (boostorg/asio@59066d8) for 1.70, |
32 |
+while keeping it backwards compatible to older boost versions. |
33 |
+--- |
34 |
+ websocketpp/transport/asio/connection.hpp | 7 ++++--- |
35 |
+ websocketpp/transport/asio/endpoint.hpp | 3 +-- |
36 |
+ websocketpp/transport/asio/security/none.hpp | 3 +-- |
37 |
+ websocketpp/transport/asio/security/tls.hpp | 3 +-- |
38 |
+ 4 files changed, 7 insertions(+), 9 deletions(-) |
39 |
+ |
40 |
+diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp |
41 |
+index 60f88a79..1ccda8f3 100644 |
42 |
+--- a/websocketpp/transport/asio/connection.hpp |
43 |
++++ b/websocketpp/transport/asio/connection.hpp |
44 |
+@@ -311,9 +311,10 @@ class connection : public config::socket_type::socket_con_type { |
45 |
+ * needed. |
46 |
+ */ |
47 |
+ timer_ptr set_timer(long duration, timer_handler callback) { |
48 |
+- timer_ptr new_timer = lib::make_shared<lib::asio::steady_timer>( |
49 |
+- lib::ref(*m_io_service), |
50 |
+- lib::asio::milliseconds(duration) |
51 |
++ timer_ptr new_timer( |
52 |
++ new lib::asio::steady_timer( |
53 |
++ *m_io_service, |
54 |
++ lib::asio::milliseconds(duration)) |
55 |
+ ); |
56 |
+ |
57 |
+ if (config::enable_multithreading) { |
58 |
+diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp |
59 |
+index ddab2c74..4b719a97 100644 |
60 |
+--- a/websocketpp/transport/asio/endpoint.hpp |
61 |
++++ b/websocketpp/transport/asio/endpoint.hpp |
62 |
+@@ -195,8 +195,7 @@ class endpoint : public config::socket_type { |
63 |
+ |
64 |
+ m_io_service = ptr; |
65 |
+ m_external_io_service = true; |
66 |
+- m_acceptor = lib::make_shared<lib::asio::ip::tcp::acceptor>( |
67 |
+- lib::ref(*m_io_service)); |
68 |
++ m_acceptor.reset(new lib::asio::ip::tcp::acceptor(*m_io_service)); |
69 |
+ |
70 |
+ m_state = READY; |
71 |
+ ec = lib::error_code(); |
72 |
+diff --git a/websocketpp/transport/asio/security/none.hpp b/websocketpp/transport/asio/security/none.hpp |
73 |
+index 5c8293db..6c7d3524 100644 |
74 |
+--- a/websocketpp/transport/asio/security/none.hpp |
75 |
++++ b/websocketpp/transport/asio/security/none.hpp |
76 |
+@@ -168,8 +168,7 @@ class connection : public lib::enable_shared_from_this<connection> { |
77 |
+ return socket::make_error_code(socket::error::invalid_state); |
78 |
+ } |
79 |
+ |
80 |
+- m_socket = lib::make_shared<lib::asio::ip::tcp::socket>( |
81 |
+- lib::ref(*service)); |
82 |
++ m_socket.reset(new lib::asio::ip::tcp::socket(*service)); |
83 |
+ |
84 |
+ if (m_socket_init_handler) { |
85 |
+ m_socket_init_handler(m_hdl, *m_socket); |
86 |
+diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp |
87 |
+index c76fd9aa..04ac3790 100644 |
88 |
+--- a/websocketpp/transport/asio/security/tls.hpp |
89 |
++++ b/websocketpp/transport/asio/security/tls.hpp |
90 |
+@@ -193,8 +193,7 @@ class connection : public lib::enable_shared_from_this<connection> { |
91 |
+ if (!m_context) { |
92 |
+ return socket::make_error_code(socket::error::invalid_tls_context); |
93 |
+ } |
94 |
+- m_socket = lib::make_shared<socket_type>( |
95 |
+- _WEBSOCKETPP_REF(*service),lib::ref(*m_context)); |
96 |
++ m_socket.reset(new socket_type(*service, *m_context)); |
97 |
+ |
98 |
+ if (m_socket_init_handler) { |
99 |
+ m_socket_init_handler(m_hdl, get_socket()); |
100 |
+ |
101 |
+From f810ca2e800e9b55be41c5911cf1d1185fcd516b Mon Sep 17 00:00:00 2001 |
102 |
+From: Stefan Floeren <42731906+stefan-floeren@××××××××××××××××××××.com> |
103 |
+Date: Wed, 17 Apr 2019 10:06:18 +0000 |
104 |
+Subject: [PATCH 2/2] Fix missed entries; fix testing |
105 |
+ |
106 |
+--- |
107 |
+ CMakeLists.txt | 2 +- |
108 |
+ websocketpp/transport/asio/connection.hpp | 3 +-- |
109 |
+ websocketpp/transport/asio/endpoint.hpp | 7 ++----- |
110 |
+ 3 files changed, 4 insertions(+), 8 deletions(-) |
111 |
+ |
112 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
113 |
+index 2786aba9..951de975 100644 |
114 |
+--- a/CMakeLists.txt |
115 |
++++ b/CMakeLists.txt |
116 |
+@@ -202,7 +202,7 @@ if (BUILD_TESTS OR BUILD_EXAMPLES) |
117 |
+ endif () |
118 |
+ |
119 |
+ if (NOT Boost_USE_STATIC_LIBS) |
120 |
+- add_definitions (/DBOOST_TEST_DYN_LINK) |
121 |
++ add_definitions (-DBOOST_TEST_DYN_LINK) |
122 |
+ endif () |
123 |
+ |
124 |
+ set (Boost_FIND_REQUIRED TRUE) |
125 |
+diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp |
126 |
+index 1ccda8f3..57dda74a 100644 |
127 |
+--- a/websocketpp/transport/asio/connection.hpp |
128 |
++++ b/websocketpp/transport/asio/connection.hpp |
129 |
+@@ -462,8 +462,7 @@ class connection : public config::socket_type::socket_con_type { |
130 |
+ m_io_service = io_service; |
131 |
+ |
132 |
+ if (config::enable_multithreading) { |
133 |
+- m_strand = lib::make_shared<lib::asio::io_service::strand>( |
134 |
+- lib::ref(*io_service)); |
135 |
++ m_strand.reset(new lib::asio::io_service::strand(*io_service)); |
136 |
+ } |
137 |
+ |
138 |
+ lib::error_code ec = socket_con_type::init_asio(io_service, m_strand, |
139 |
+diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp |
140 |
+index 4b719a97..94509adb 100644 |
141 |
+--- a/websocketpp/transport/asio/endpoint.hpp |
142 |
++++ b/websocketpp/transport/asio/endpoint.hpp |
143 |
+@@ -687,9 +687,7 @@ class endpoint : public config::socket_type { |
144 |
+ * @since 0.3.0 |
145 |
+ */ |
146 |
+ void start_perpetual() { |
147 |
+- m_work = lib::make_shared<lib::asio::io_service::work>( |
148 |
+- lib::ref(*m_io_service) |
149 |
+- ); |
150 |
++ m_work.reset(new lib::asio::io_service::work(*m_io_service)); |
151 |
+ } |
152 |
+ |
153 |
+ /// Clears the endpoint's perpetual flag, allowing it to exit when empty |
154 |
+@@ -853,8 +851,7 @@ class endpoint : public config::socket_type { |
155 |
+ |
156 |
+ // Create a resolver |
157 |
+ if (!m_resolver) { |
158 |
+- m_resolver = lib::make_shared<lib::asio::ip::tcp::resolver>( |
159 |
+- lib::ref(*m_io_service)); |
160 |
++ m_resolver.reset(new lib::asio::ip::tcp::resolver(*m_io_service)); |
161 |
+ } |
162 |
+ |
163 |
+ tcon->set_uri(u); |
164 |
|
165 |
diff --git a/dev-cpp/websocketpp/files/websocketpp-0.8.1-disable-test_transport-test_transport_asio_timers.patch b/dev-cpp/websocketpp/files/websocketpp-0.8.1-disable-test_transport-test_transport_asio_timers.patch |
166 |
new file mode 100644 |
167 |
index 00000000000..8d6c93fcec3 |
168 |
--- /dev/null |
169 |
+++ b/dev-cpp/websocketpp/files/websocketpp-0.8.1-disable-test_transport-test_transport_asio_timers.patch |
170 |
@@ -0,0 +1,46 @@ |
171 |
+--- a/test/transport/CMakeLists.txt |
172 |
++++ b/test/transport/CMakeLists.txt |
173 |
+@@ -1,24 +1,24 @@ |
174 |
+ if (OPENSSL_FOUND) |
175 |
+ |
176 |
+-# Test transport integration |
177 |
+-file (GLOB SOURCE integration.cpp) |
178 |
+- |
179 |
+-init_target (test_transport) |
180 |
+-build_test (${TARGET_NAME} ${SOURCE}) |
181 |
+-link_boost () |
182 |
+-link_openssl() |
183 |
+-final_target () |
184 |
+-set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "test") |
185 |
+- |
186 |
+-# Test transport asio timers |
187 |
+-file (GLOB SOURCE asio/timers.cpp) |
188 |
+- |
189 |
+-init_target (test_transport_asio_timers) |
190 |
+-build_test (${TARGET_NAME} ${SOURCE}) |
191 |
+-link_boost () |
192 |
+-link_openssl() |
193 |
+-final_target () |
194 |
+-set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "test") |
195 |
++## Test transport integration |
196 |
++#file (GLOB SOURCE integration.cpp) |
197 |
++# |
198 |
++#init_target (test_transport) |
199 |
++#build_test (${TARGET_NAME} ${SOURCE}) |
200 |
++#link_boost () |
201 |
++#link_openssl() |
202 |
++#final_target () |
203 |
++#set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "test") |
204 |
++# |
205 |
++## Test transport asio timers |
206 |
++#file (GLOB SOURCE asio/timers.cpp) |
207 |
++# |
208 |
++#init_target (test_transport_asio_timers) |
209 |
++#build_test (${TARGET_NAME} ${SOURCE}) |
210 |
++#link_boost () |
211 |
++#link_openssl() |
212 |
++#final_target () |
213 |
++#set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "test") |
214 |
+ |
215 |
+ # Test transport asio security |
216 |
+ file (GLOB SOURCE asio/security.cpp) |
217 |
|
218 |
diff --git a/dev-cpp/websocketpp/websocketpp-0.8.1.ebuild b/dev-cpp/websocketpp/websocketpp-0.8.1.ebuild |
219 |
index 6bf27e854c1..7a4b182f57c 100644 |
220 |
--- a/dev-cpp/websocketpp/websocketpp-0.8.1.ebuild |
221 |
+++ b/dev-cpp/websocketpp/websocketpp-0.8.1.ebuild |
222 |
@@ -1,4 +1,4 @@ |
223 |
-# Copyright 1999-2018 Gentoo Authors |
224 |
+# Copyright 1999-2019 Gentoo Authors |
225 |
# Distributed under the terms of the GNU General Public License v2 |
226 |
|
227 |
EAPI=6 |
228 |
@@ -19,10 +19,13 @@ RDEPEND="${DEPEND} |
229 |
boost? ( dev-libs/boost ) |
230 |
" |
231 |
|
232 |
-# bug 630450 |
233 |
-RESTRICT="test" |
234 |
- |
235 |
-PATCHES=( "${FILESDIR}/${PN}-0.7.0-cmake-install.patch" ) |
236 |
+PATCHES=( |
237 |
+ "${FILESDIR}"/${PN}-0.7.0-cmake-install.patch |
238 |
+ "${FILESDIR}"/${PN}-0.8.1-boost-1.70.patch |
239 |
+ # disable tests that are timing sensitive |
240 |
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1461069 |
241 |
+ "${FILESDIR}"/${PN}-0.8.1-disable-test_transport-test_transport_asio_timers.patch |
242 |
+) |
243 |
|
244 |
src_configure() { |
245 |
local mycmakeargs=( |