1 |
commit: aa8e967236b90655df2bfc796f14fc228e786f86 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 10 19:39:23 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 10 19:43:53 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa8e9672 |
7 |
|
8 |
net-dns/pdns: fix boost-1.73+ compatibility |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
.../pdns-4.3.0-boost-1.73-compatibility.patch | 57 ++++++++++++++++++++++ |
14 |
net-dns/pdns/pdns-4.3.0.ebuild | 2 + |
15 |
2 files changed, 59 insertions(+) |
16 |
|
17 |
diff --git a/net-dns/pdns/files/pdns-4.3.0-boost-1.73-compatibility.patch b/net-dns/pdns/files/pdns-4.3.0-boost-1.73-compatibility.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..5975b09f099 |
20 |
--- /dev/null |
21 |
+++ b/net-dns/pdns/files/pdns-4.3.0-boost-1.73-compatibility.patch |
22 |
@@ -0,0 +1,57 @@ |
23 |
+Fix compatibility with boost-1.73+ |
24 |
+ |
25 |
+Backport of https://github.com/PowerDNS/pdns/commit/71246536642590e8e8b21c11307ec4bd0e165066 |
26 |
+ |
27 |
+--- a/pdns/ixfrdist-web.cc |
28 |
++++ b/pdns/ixfrdist-web.cc |
29 |
+@@ -32,7 +32,7 @@ IXFRDistWebServer::IXFRDistWebServer(const ComboAddress &listenAddress, const Ne |
30 |
+ { |
31 |
+ d_ws->setACL(acl); |
32 |
+ d_ws->setLogLevel(loglevel); |
33 |
+- d_ws->registerWebHandler("/metrics", boost::bind(&IXFRDistWebServer::getMetrics, this, _1, _2)); |
34 |
++ d_ws->registerWebHandler("/metrics", std::bind(&IXFRDistWebServer::getMetrics, this, std::placeholders::_1, std::placeholders::_2)); |
35 |
+ d_ws->bind(); |
36 |
+ } |
37 |
+ |
38 |
+--- a/pdns/webserver.cc |
39 |
++++ b/pdns/webserver.cc |
40 |
+@@ -107,7 +107,7 @@ static void bareHandlerWrapper(WebServer::HandlerFunction handler, YaHTTP::Reque |
41 |
+ |
42 |
+ void WebServer::registerBareHandler(const string& url, HandlerFunction handler) |
43 |
+ { |
44 |
+- YaHTTP::THandlerFunction f = boost::bind(&bareHandlerWrapper, handler, _1, _2); |
45 |
++ YaHTTP::THandlerFunction f = std::bind(&bareHandlerWrapper, handler, std::placeholders::_1, std::placeholders::_2); |
46 |
+ YaHTTP::Router::Any(url, f); |
47 |
+ } |
48 |
+ |
49 |
+@@ -179,7 +179,7 @@ void WebServer::apiWrapper(WebServer::HandlerFunction handler, HttpRequest* req, |
50 |
+ } |
51 |
+ |
52 |
+ void WebServer::registerApiHandler(const string& url, HandlerFunction handler, bool allowPassword) { |
53 |
+- HandlerFunction f = boost::bind(&WebServer::apiWrapper, this, handler, _1, _2, allowPassword); |
54 |
++ HandlerFunction f = std::bind(&WebServer::apiWrapper, this, handler, std::placeholders::_1, std::placeholders::_2, allowPassword); |
55 |
+ registerBareHandler(url, f); |
56 |
+ } |
57 |
+ |
58 |
+@@ -196,7 +196,7 @@ void WebServer::webWrapper(WebServer::HandlerFunction handler, HttpRequest* req, |
59 |
+ } |
60 |
+ |
61 |
+ void WebServer::registerWebHandler(const string& url, HandlerFunction handler) { |
62 |
+- HandlerFunction f = boost::bind(&WebServer::webWrapper, this, handler, _1, _2); |
63 |
++ HandlerFunction f = std::bind(&WebServer::webWrapper, this, handler, std::placeholders::_1, std::placeholders::_2); |
64 |
+ registerBareHandler(url, f); |
65 |
+ } |
66 |
+ |
67 |
+--- a/pdns/ws-auth.cc |
68 |
++++ b/pdns/ws-auth.cc |
69 |
+@@ -2328,8 +2328,8 @@ void AuthWebServer::webThread() |
70 |
+ d_ws->registerApiHandler("/api", &apiDiscovery); |
71 |
+ } |
72 |
+ if (::arg().mustDo("webserver")) { |
73 |
+- d_ws->registerWebHandler("/style.css", boost::bind(&AuthWebServer::cssfunction, this, _1, _2)); |
74 |
+- d_ws->registerWebHandler("/", boost::bind(&AuthWebServer::indexfunction, this, _1, _2)); |
75 |
++ d_ws->registerWebHandler("/style.css", std::bind(&AuthWebServer::cssfunction, this, std::placeholders::_1, std::placeholders::_2)); |
76 |
++ d_ws->registerWebHandler("/", std::bind(&AuthWebServer::indexfunction, this, std::placeholders::_1, std::placeholders::_2)); |
77 |
+ } |
78 |
+ d_ws->go(); |
79 |
+ } |
80 |
|
81 |
diff --git a/net-dns/pdns/pdns-4.3.0.ebuild b/net-dns/pdns/pdns-4.3.0.ebuild |
82 |
index 97e6ee4740a..e2c22a1c64b 100644 |
83 |
--- a/net-dns/pdns/pdns-4.3.0.ebuild |
84 |
+++ b/net-dns/pdns/pdns-4.3.0.ebuild |
85 |
@@ -48,6 +48,8 @@ BDEPEND="virtual/pkgconfig |
86 |
|
87 |
S="${WORKDIR}"/${P/_/-} |
88 |
|
89 |
+PATCHES=( "${FILESDIR}"/${P}-boost-1.73-compatibility.patch ) |
90 |
+ |
91 |
src_configure() { |
92 |
local dynmodules="pipe bind" # the default backends, always enabled |