Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/monotone/, dev-vcs/monotone/files/
Date: Fri, 26 May 2017 21:01:22
Message-Id: 1495832390.f0b1fd53dd05451d68ca0317020ce6e569eb7851.soap@gentoo
1 commit: f0b1fd53dd05451d68ca0317020ce6e569eb7851
2 Author: Peter Levine <plevine457 <AT> gmail <DOT> com>
3 AuthorDate: Fri May 26 03:16:08 2017 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri May 26 20:59:50 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0b1fd53
7
8 dev-vcs/monotone: Fix building with GCC-6
9
10 Bug: https://bugs.gentoo.org/show_bug.cgi?id=594538
11 Package-Manager: Portage-2.3.6, Repoman-2.3.2
12 Closes: https://github.com/gentoo/gentoo/pull/4764
13
14 dev-vcs/monotone/files/monotone-1.0-gcc6.patch | 64 ++++++++++++++++++++++++++
15 dev-vcs/monotone/monotone-1.0-r4.ebuild | 3 +-
16 2 files changed, 66 insertions(+), 1 deletion(-)
17
18 diff --git a/dev-vcs/monotone/files/monotone-1.0-gcc6.patch b/dev-vcs/monotone/files/monotone-1.0-gcc6.patch
19 new file mode 100644
20 index 00000000000..f9e1751e09b
21 --- /dev/null
22 +++ b/dev-vcs/monotone/files/monotone-1.0-gcc6.patch
23 @@ -0,0 +1,64 @@
24 +Bug: https://bugs.gentoo.org/594538
25 +
26 +--- a/src/cache_logger.hh
27 ++++ b/src/cache_logger.hh
28 +@@ -23,7 +23,7 @@
29 + // if given the empty filename, do nothing
30 + explicit cache_logger(std::string const & filename, int max_size);
31 +
32 +- bool logging() const { return _impl; }
33 ++ bool logging() const { return static_cast<bool>(_impl); }
34 +
35 + void log_exists(bool exists, int position, int item_count, int est_size) const;
36 + void log_touch(bool exists, int position, int item_count, int est_size) const;
37 +--- a/src/cmd_ws_commit.cc
38 ++++ b/src/cmd_ws_commit.cc
39 +@@ -1170,7 +1170,7 @@
40 + {
41 + for (attr_map_t::iterator i = node->attrs.begin();
42 + i != node->attrs.end(); ++i)
43 +- i->second = make_pair(false, "");
44 ++ i->second = make_pair(false, attr_value(""));
45 + }
46 + else
47 + {
48 +@@ -1179,7 +1179,7 @@
49 + E(node->attrs.find(a_key) != node->attrs.end(), origin::user,
50 + F("path '%s' does not have attribute '%s'")
51 + % path % a_key);
52 +- node->attrs[a_key] = make_pair(false, "");
53 ++ node->attrs[a_key] = make_pair(false, attr_value(""));
54 + }
55 +
56 + cset cs;
57 +--- a/src/roster.cc
58 ++++ b/src/roster.cc
59 +@@ -223,7 +223,7 @@
60 +
61 + bool marking_map::contains(node_id nid) const
62 + {
63 +- return _store.get_if_present(nid);
64 ++ return static_cast<bool>(_store.get_if_present(nid));
65 + }
66 +
67 + void marking_map::remove_marking(node_id nid)
68 +@@ -727,7 +727,7 @@
69 + bool
70 + roster_t::has_node(node_id n) const
71 + {
72 +- return nodes.get_if_present(n);
73 ++ return static_cast<bool>(nodes.get_if_present(n));
74 + }
75 +
76 + bool
77 +@@ -1898,8 +1898,8 @@
78 + node_t const &left_node = left_roster.all_nodes().get_if_present(i->first);
79 + node_t const &right_node = right_roster.all_nodes().get_if_present(i->first);
80 +
81 +- bool exists_in_left = (left_node);
82 +- bool exists_in_right = (right_node);
83 ++ bool exists_in_left = static_cast<bool>(left_node);
84 ++ bool exists_in_right = static_cast<bool>(right_node);
85 +
86 + if (!exists_in_left && !exists_in_right)
87 + mark_new_node(new_rid, n, new_markings);
88
89 diff --git a/dev-vcs/monotone/monotone-1.0-r4.ebuild b/dev-vcs/monotone/monotone-1.0-r4.ebuild
90 index ba474c6a345..a04a8dd6684 100644
91 --- a/dev-vcs/monotone/monotone-1.0-r4.ebuild
92 +++ b/dev-vcs/monotone/monotone-1.0-r4.ebuild
93 @@ -1,4 +1,4 @@
94 -# Copyright 1999-2014 Gentoo Foundation
95 +# Copyright 1999-2017 Gentoo Foundation
96 # Distributed under the terms of the GNU General Public License v2
97
98 # QA failiures reported in https://code.monotone.ca/p/monotone/issues/181/
99 @@ -43,6 +43,7 @@ src_prepare() {
100 epatch "${FILESDIR}/monotone-1.0-boost-1.53.patch"
101 epatch "${FILESDIR}/monotone-1.0-pcre3.patch"
102 epatch "${FILESDIR}/monotone-1.0-texinfo-5.1.patch"
103 + epatch "${FILESDIR}/monotone-1.0-gcc6.patch"
104 }
105
106 src_configure() {