Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/aria2/, net-misc/aria2/files/
Date: Wed, 30 May 2018 06:38:35
Message-Id: 1527662292.c3d0fdfb770b1c5d4ffdba023b7085cf7ff3b5a6.mgorny@gentoo
1 commit: c3d0fdfb770b1c5d4ffdba023b7085cf7ff3b5a6
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 30 06:36:04 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed May 30 06:38:12 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3d0fdfb
7
8 net-misc/aria2: Backport make_unique fix
9
10 Closes: https://bugs.gentoo.org/655892
11
12 net-misc/aria2/aria2-1.34.0.ebuild | 1 +
13 .../aria2/files/aria2-1.34.0-make_unique.patch | 44 ++++++++++++++++++++++
14 2 files changed, 45 insertions(+)
15
16 diff --git a/net-misc/aria2/aria2-1.34.0.ebuild b/net-misc/aria2/aria2-1.34.0.ebuild
17 index 330ad0add54..aa58515c9fb 100644
18 --- a/net-misc/aria2/aria2-1.34.0.ebuild
19 +++ b/net-misc/aria2/aria2-1.34.0.ebuild
20 @@ -63,6 +63,7 @@ pkg_setup() {
21 }
22
23 src_prepare() {
24 + eapply "${FILESDIR}"/${P}-make_unique.patch
25 default
26 sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed"
27 }
28
29 diff --git a/net-misc/aria2/files/aria2-1.34.0-make_unique.patch b/net-misc/aria2/files/aria2-1.34.0-make_unique.patch
30 new file mode 100644
31 index 00000000000..448d6cfe775
32 --- /dev/null
33 +++ b/net-misc/aria2/files/aria2-1.34.0-make_unique.patch
34 @@ -0,0 +1,44 @@
35 +From e8e04d6f22a507e8374651d3d2343cd9fb986993 Mon Sep 17 00:00:00 2001
36 +From: Tatsuhiro Tsujikawa <tatsuhiro.t@×××××.com>
37 +Date: Thu, 17 May 2018 18:39:44 +0900
38 +Subject: [PATCH] Fix build failure when InternalDHKeyExchange is used
39 +
40 +---
41 + src/bignum.h | 10 ++++++----
42 + 1 file changed, 6 insertions(+), 4 deletions(-)
43 +
44 +diff --git a/src/bignum.h b/src/bignum.h
45 +index e59ab6bbf..5fb4402bc 100644
46 +--- a/src/bignum.h
47 ++++ b/src/bignum.h
48 +@@ -19,6 +19,8 @@
49 + #include <memory>
50 + #include <stdint.h>
51 +
52 ++#include "a2functional.h"
53 ++
54 + namespace bignum {
55 +
56 + template <size_t dim> class ulong {
57 +@@ -31,17 +33,17 @@ template <size_t dim> class ulong {
58 + std::unique_ptr<char_t[]> buf_;
59 +
60 + public:
61 +- inline ulong() : buf_(make_unique<char_t[]>(dim)) {}
62 +- inline ulong(size_t t) : buf_(make_unique<char_t[]>(dim))
63 ++ inline ulong() : buf_(aria2::make_unique<char_t[]>(dim)) {}
64 ++ inline ulong(size_t t) : buf_(aria2::make_unique<char_t[]>(dim))
65 + {
66 + memcpy(buf_.get(), (char_t*)&t, sizeof(t));
67 + }
68 +- inline ulong(const ulong<dim>& rhs) : buf_(make_unique<char_t[]>(dim))
69 ++ inline ulong(const ulong<dim>& rhs) : buf_(aria2::make_unique<char_t[]>(dim))
70 + {
71 + memcpy(buf_.get(), rhs.buf_.get(), dim);
72 + }
73 + explicit inline ulong(const char_t* data, size_t size)
74 +- : buf_(make_unique<char_t[]>(dim))
75 ++ : buf_(aria2::make_unique<char_t[]>(dim))
76 + {
77 + if (size > dim) {
78 + throw std::bad_alloc();