1 |
commit: 106c80f355df1a059a63ed600f60f9de004bfe21 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 19 11:17:43 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 19 11:19:05 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=106c80f3 |
7 |
|
8 |
net-libs/nghttp2: Fixed build against ~dev-libst/boost-1.70.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/683368 |
11 |
Package-Manager: Portage-2.3.64, Repoman-2.3.12 |
12 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
13 |
|
14 |
.../files/nghttp2-1.38.0-boost-1.70.0.patch | 50 ++++++++++++++++++++++ |
15 |
net-libs/nghttp2/nghttp2-1.38.0.ebuild | 3 +- |
16 |
2 files changed, 52 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/net-libs/nghttp2/files/nghttp2-1.38.0-boost-1.70.0.patch b/net-libs/nghttp2/files/nghttp2-1.38.0-boost-1.70.0.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..cc1100a0b0b |
21 |
--- /dev/null |
22 |
+++ b/net-libs/nghttp2/files/nghttp2-1.38.0-boost-1.70.0.patch |
23 |
@@ -0,0 +1,50 @@ |
24 |
+From cbba1ebf8fcecb24392f0cc07b1235b17d0de9d8 Mon Sep 17 00:00:00 2001 |
25 |
+From: =?UTF-8?q?Adam=20Go=C5=82=C4=99biowski?= <adamg@×××××××××.org> |
26 |
+Date: Thu, 18 Apr 2019 12:35:54 +0200 |
27 |
+Subject: [PATCH] asio: support boost-1.70 |
28 |
+ |
29 |
+In boost 1.70, deprecated get_io_context() has finally been removed. |
30 |
+Introduce GET_IO_SERVICE macro that based on boost version uses |
31 |
+old get_io_service() interface (boost < 1.70), or get_executor().context() |
32 |
+for boost 1.70+. |
33 |
+ |
34 |
+Commit based idea seen in monero-project/monero@17769db9462e5201befcb05f86ccbaeabf35caf8 |
35 |
+--- |
36 |
+ src/asio_server_connection.h | 10 ++++++++-- |
37 |
+ 1 file changed, 8 insertions(+), 2 deletions(-) |
38 |
+ |
39 |
+diff --git a/src/asio_server_connection.h b/src/asio_server_connection.h |
40 |
+index 6be794060..56924c71a 100644 |
41 |
+--- a/src/asio_server_connection.h |
42 |
++++ b/src/asio_server_connection.h |
43 |
+@@ -51,6 +51,12 @@ |
44 |
+ #include "util.h" |
45 |
+ #include "template.h" |
46 |
+ |
47 |
++#if BOOST_VERSION >= 107000 |
48 |
++#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context()) |
49 |
++#else |
50 |
++#define GET_IO_SERVICE(s) ((s).get_io_service()) |
51 |
++#endif |
52 |
++ |
53 |
+ namespace nghttp2 { |
54 |
+ |
55 |
+ namespace asio_http2 { |
56 |
+@@ -71,7 +77,7 @@ class connection : public std::enable_shared_from_this<connection<socket_type>>, |
57 |
+ SocketArgs &&... args) |
58 |
+ : socket_(std::forward<SocketArgs>(args)...), |
59 |
+ mux_(mux), |
60 |
+- deadline_(socket_.get_io_service()), |
61 |
++ deadline_(GET_IO_SERVICE(socket_)), |
62 |
+ tls_handshake_timeout_(tls_handshake_timeout), |
63 |
+ read_timeout_(read_timeout), |
64 |
+ writing_(false), |
65 |
+@@ -82,7 +88,7 @@ class connection : public std::enable_shared_from_this<connection<socket_type>>, |
66 |
+ boost::system::error_code ec; |
67 |
+ |
68 |
+ handler_ = std::make_shared<http2_handler>( |
69 |
+- socket_.get_io_service(), socket_.lowest_layer().remote_endpoint(ec), |
70 |
++ GET_IO_SERVICE(socket_), socket_.lowest_layer().remote_endpoint(ec), |
71 |
+ [this]() { do_write(); }, mux_); |
72 |
+ if (handler_->start() != 0) { |
73 |
+ stop(); |
74 |
|
75 |
diff --git a/net-libs/nghttp2/nghttp2-1.38.0.ebuild b/net-libs/nghttp2/nghttp2-1.38.0.ebuild |
76 |
index 1979bd70cc2..23ae1e8d57b 100644 |
77 |
--- a/net-libs/nghttp2/nghttp2-1.38.0.ebuild |
78 |
+++ b/net-libs/nghttp2/nghttp2-1.38.0.ebuild |
79 |
@@ -52,7 +52,8 @@ DEPEND="${RDEPEND} |
80 |
test? ( >=dev-util/cunit-2.1[${MULTILIB_USEDEP}] )" |
81 |
|
82 |
PATCHES=( |
83 |
- "${WORKDIR}/${PN}-1.38.0-unbundle_http_parser.patch" |
84 |
+ "${WORKDIR}/${PN}-1.38.0-unbundle_http_parser.patch" # 675772 |
85 |
+ "${FILESDIR}/${P}-boost-1.70.0.patch" #683368 |
86 |
) |
87 |
|
88 |
src_prepare() { |