Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-physics/reduze/, sci-physics/reduze/files/
Date: Fri, 02 Jun 2017 07:04:38
Message-Id: 1496386717.8aeb28a1a899987c2556491da2fe2eaff6a141a8.soap@gentoo
1 commit: 8aeb28a1a899987c2556491da2fe2eaff6a141a8
2 Author: Peter Levine <plevine457 <AT> gmail <DOT> com>
3 AuthorDate: Sun May 28 22:16:54 2017 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 2 06:58:37 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8aeb28a1
7
8 sci-physics/reduze: Fix building with GCC-6
9
10 Bug: https://bugs.gentoo.org/show_bug.cgi?id=594900
11 Package-Manager: Portage-2.3.6, Repoman-2.3.2
12 Closes: https://github.com/gentoo/gentoo/pull/4796
13
14 sci-physics/reduze/files/reduze-2.0.9-gcc6.patch | 58 ++++++++++++++++++++++++
15 sci-physics/reduze/files/reduze-2.1-gcc6.patch | 29 ++++++++++++
16 sci-physics/reduze/reduze-2.0.9.ebuild | 4 +-
17 sci-physics/reduze/reduze-2.1.ebuild | 4 +-
18 4 files changed, 93 insertions(+), 2 deletions(-)
19
20 diff --git a/sci-physics/reduze/files/reduze-2.0.9-gcc6.patch b/sci-physics/reduze/files/reduze-2.0.9-gcc6.patch
21 new file mode 100644
22 index 00000000000..9864163cdec
23 --- /dev/null
24 +++ b/sci-physics/reduze/files/reduze-2.0.9-gcc6.patch
25 @@ -0,0 +1,58 @@
26 +--- a/reduze/amplitude.cpp
27 ++++ b/reduze/amplitude.cpp
28 +@@ -782,7 +782,7 @@
29 +
30 + ex resultLeadingNc = result;
31 + for (exset::const_iterator it = found.begin(); it != found.end(); ++it) {
32 +- VERIFY(is_a<function>(*it) && ex_to<function>(*it).get_name() == "Color");
33 ++ VERIFY(is_a<GiNaC::function>(*it) && ex_to<GiNaC::function>(*it).get_name() == "Color");
34 + VERIFY(is_a<lst>(it->op(0)));
35 + ex res(1);
36 + for (size_t i = 0; i < it->op(0).nops(); ++i)
37 +@@ -823,7 +823,7 @@
38 + timer.restart();
39 + exmap m;
40 + for (exset::const_iterator it = found.begin(); it != found.end(); ++it) {
41 +- VERIFY(is_a<function>(*it) && ex_to<function>(*it).get_name() == "Lorentz");
42 ++ VERIFY(is_a<GiNaC::function>(*it) && ex_to<GiNaC::function>(*it).get_name() == "Lorentz");
43 + VERIFY(is_a<lst>(it->op(0)));
44 +
45 + ex res(1);
46 +--- a/reduze/files.cpp
47 ++++ b/reduze/files.cpp
48 +@@ -420,7 +420,7 @@
49 + get_filename_sectormappings(m.integralfamily()->name());
50 + ofstream file(file_name.c_str());
51 + if (!file)
52 +- ABORT("Can't write to " << file);
53 ++ ABORT("Can't write to " << file_name);
54 + os << YAML::BeginMap << YAML::Key << "sectormappings" << YAML::Value;
55 + os << m << YAML::EndMap;
56 + file << os.c_str();
57 +@@ -617,7 +617,7 @@
58 +
59 + bool is_readable_file(const string& filename) {
60 + ifstream is(filename.c_str());
61 +- bool ok = is;
62 ++ bool ok = !is.fail();
63 + is.close();
64 + return ok;
65 + }
66 +--- a/reduze/sectormappings.cpp
67 ++++ b/reduze/sectormappings.cpp
68 +@@ -757,13 +757,13 @@
69 + const Node& z_node = node["zero_sectors"];
70 + for (Iterator n = z_node.begin(); n != z_node.end(); ++n)
71 + for (Iterator s = n.second().begin(); s != n.second().end(); ++s)
72 +- m.zero_sectors_.insert(*s);
73 ++ m.zero_sectors_.insert((const int) *s);
74 +
75 + if (node.FindValue("sectors_without_graph")) {
76 + const Node& ng_node = node["sectors_without_graph"];
77 + for (Iterator n = ng_node.begin(); n != ng_node.end(); ++n)
78 + for (Iterator s = n.second().begin(); s != n.second().end(); ++s)
79 +- m.sectors_without_graph_.insert(*s);
80 ++ m.sectors_without_graph_.insert((const int) *s);
81 + }
82 +
83 + const Node& rel_node = node["sector_relations"];
84
85 diff --git a/sci-physics/reduze/files/reduze-2.1-gcc6.patch b/sci-physics/reduze/files/reduze-2.1-gcc6.patch
86 new file mode 100644
87 index 00000000000..3b347ef413c
88 --- /dev/null
89 +++ b/sci-physics/reduze/files/reduze-2.1-gcc6.patch
90 @@ -0,0 +1,29 @@
91 +--- a/reduze/files.cpp
92 ++++ b/reduze/files.cpp
93 +@@ -723,7 +723,7 @@
94 + string file_name_tmp = file_name + ".tmp";
95 + ofstream file(file_name_tmp.c_str());
96 + if (!file)
97 +- ABORT("Can't write to " << file);
98 ++ ABORT("Can't write to " << file_name_tmp);
99 + Emitter os;
100 + os << BeginMap;
101 + os << Key << "crossings" << Value;
102 +@@ -752,7 +752,7 @@
103 + string file_name_tmp = file_name + ".tmp";
104 + ofstream file(file_name_tmp.c_str());
105 + if (!file)
106 +- ABORT("Can't write to " << file);
107 ++ ABORT("Can't write to " << file_name_tmp);
108 + os << YAML::BeginMap << YAML::Key << "sectormappings" << YAML::Value;
109 + os << m << YAML::EndMap;
110 + file << os.c_str();
111 +@@ -1036,7 +1036,7 @@
112 +
113 + bool is_readable_file(const string& filename) {
114 + ifstream is(filename.c_str());
115 +- bool ok = is;
116 ++ bool ok = !is.fail();
117 + is.close();
118 + return ok && !is_readable_directory(filename);
119 + }
120
121 diff --git a/sci-physics/reduze/reduze-2.0.9.ebuild b/sci-physics/reduze/reduze-2.0.9.ebuild
122 index 1055762ebeb..3c0713e8e16 100644
123 --- a/sci-physics/reduze/reduze-2.0.9.ebuild
124 +++ b/sci-physics/reduze/reduze-2.0.9.ebuild
125 @@ -1,4 +1,4 @@
126 -# Copyright 1999-2013 Gentoo Foundation
127 +# Copyright 1999-2017 Gentoo Foundation
128 # Distributed under the terms of the GNU General Public License v2
129
130 EAPI=5
131 @@ -25,6 +25,8 @@ DEPEND="${RDEPEND}
132 DOCS=( ChangeLog README )
133
134 src_prepare() {
135 + epatch "${FILESDIR}"/${P}-gcc6.patch
136 +
137 # gentoo doc directory
138 sed -i \
139 -e "s:share/reduze:share/doc/${PF}:g" \
140
141 diff --git a/sci-physics/reduze/reduze-2.1.ebuild b/sci-physics/reduze/reduze-2.1.ebuild
142 index 9e78238cc71..ad6f52292b4 100644
143 --- a/sci-physics/reduze/reduze-2.1.ebuild
144 +++ b/sci-physics/reduze/reduze-2.1.ebuild
145 @@ -1,4 +1,4 @@
146 -# Copyright 1999-2016 Gentoo Foundation
147 +# Copyright 1999-2017 Gentoo Foundation
148 # Distributed under the terms of the GNU General Public License v2
149
150 EAPI=6
151 @@ -22,6 +22,8 @@ DEPEND="${RDEPEND}
152 virtual/pkgconfig
153 doc? ( app-doc/doxygen )"
154
155 +PATCHES=( "${FILESDIR}"/${P}-gcc6.patch )
156 +
157 src_prepare() {
158 cmake-utils_src_prepare
159 # gentoo doc directory