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-mathematics/cvc3/, sci-mathematics/cvc3/files/
Date: Sat, 29 Oct 2016 22:30:43
Message-Id: 1477780212.abc1591d87c0376c9b344794658b8adb31c1d86e.soap@gentoo
1 commit: abc1591d87c0376c9b344794658b8adb31c1d86e
2 Author: Matthew Dawson <matthew <AT> mjdsystems <DOT> ca>
3 AuthorDate: Mon Oct 17 03:17:19 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 29 22:30:12 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abc1591d
7
8 sci-mathematics/cvc3: Add a patch to fix compiling with GCC 6
9
10 Gentoo-bug: 593982
11
12 Package-Manager: portage-2.2.28
13 Closes: https://github.com/gentoo/gentoo/pull/2575
14
15 Signed-off-by: David Seifert <soap <AT> gentoo.org>
16
17 sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild | 2 +
18 .../cvc3/files/cvc3-2.4.1-gccv6-fix.patch | 76 ++++++++++++++++++++++
19 2 files changed, 78 insertions(+)
20
21 diff --git a/sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild b/sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild
22 index 8531710..705deae 100644
23 --- a/sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild
24 +++ b/sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild
25 @@ -29,6 +29,8 @@ DEPEND="${RDEPEND}
26
27 SITEFILE="50${PN}-gentoo.el"
28
29 +PATCHES=( "${FILESDIR}/${P}-gccv6-fix.patch" )
30 +
31 src_prepare() {
32 default
33
34
35 diff --git a/sci-mathematics/cvc3/files/cvc3-2.4.1-gccv6-fix.patch b/sci-mathematics/cvc3/files/cvc3-2.4.1-gccv6-fix.patch
36 new file mode 100644
37 index 00000000..1fb3516
38 --- /dev/null
39 +++ b/sci-mathematics/cvc3/files/cvc3-2.4.1-gccv6-fix.patch
40 @@ -0,0 +1,76 @@
41 +commit 4eb28b907e89be05d92eb704115f821b9b848e60
42 +Author: Matthew Dawson <matthew@××××××××××.ca>
43 +Date: Sun Oct 16 22:06:03 2016 -0400
44 +
45 + Fix gcc v6 compile failures.
46 +
47 + * Use std::hash<const char*> over std::hash<char *>, as throwing away the const is not allowed.
48 + * Use Hash::hash by default in CDMap over std::hash, to get Hash::hash<CVC3::expr>
49 +
50 +diff --git a/src/expr/expr_value.cpp b/src/expr/expr_value.cpp
51 +index 0c85ff6..e4dd251 100644
52 +--- a/src/expr/expr_value.cpp
53 ++++ b/src/expr/expr_value.cpp
54 +@@ -29,7 +29,7 @@ namespace CVC3 {
55 + // Class ExprValue static members
56 + ////////////////////////////////////////////////////////////////////////
57 +
58 +-std::hash<char*> ExprValue::s_charHash;
59 ++std::hash<const char*> ExprValue::s_charHash;
60 + std::hash<long int> ExprValue::s_intHash;
61 +
62 + ////////////////////////////////////////////////////////////////////////
63 +diff --git a/src/include/cdmap.h b/src/include/cdmap.h
64 +index faf682a..c3b094c 100644
65 +--- a/src/include/cdmap.h
66 ++++ b/src/include/cdmap.h
67 +@@ -43,9 +43,9 @@ namespace CVC3 {
68 + // Auxiliary class: almost the same as CDO (see cdo.h), but on
69 + // setNull() call it erases itself from the map.
70 +
71 +-template <class Key, class Data, class HashFcn = std::hash<Key> > class CDMap;
72 ++template <class Key, class Data, class HashFcn = Hash::hash<Key> > class CDMap;
73 +
74 +-template <class Key, class Data, class HashFcn = std::hash<Key> >
75 ++template <class Key, class Data, class HashFcn = Hash::hash<Key> >
76 + class CDOmap :public ContextObj {
77 + Key d_key;
78 + Data d_data;
79 +diff --git a/src/include/expr_hash.h b/src/include/expr_hash.h
80 +index b2107d7..baa2eab 100644
81 +--- a/src/include/expr_hash.h
82 ++++ b/src/include/expr_hash.h
83 +@@ -20,7 +20,6 @@
84 + * hash_set over Expr class.
85 + */
86 + /*****************************************************************************/
87 +-
88 + #ifndef _cvc3__expr_h_
89 + #include "expr.h"
90 + #endif
91 +diff --git a/src/include/expr_value.h b/src/include/expr_value.h
92 +index 95102b2..f53aa4d 100644
93 +--- a/src/include/expr_value.h
94 ++++ b/src/include/expr_value.h
95 +@@ -179,7 +179,7 @@ protected:
96 + // Static hash functions. They don't depend on the context
97 + // (ExprManager and such), so it is still thread-safe to have them
98 + // static.
99 +- static std::hash<char*> s_charHash;
100 ++ static std::hash<const char*> s_charHash;
101 + static std::hash<long int> s_intHash;
102 +
103 + static size_t pointerHash(void* p) { return s_intHash((long int)p); }
104 +diff --git a/src/theory_core/theory_core.cpp b/src/theory_core/theory_core.cpp
105 +index df5289f..37ccab9 100644
106 +--- a/src/theory_core/theory_core.cpp
107 ++++ b/src/theory_core/theory_core.cpp
108 +@@ -710,7 +710,7 @@ TheoryCore::TheoryCore(ContextManager* cm,
109 + // d_termTheorems(cm->getCurrentContext()),
110 + d_predicates(cm->getCurrentContext()),
111 + d_solver(NULL),
112 +- d_simplifyInPlace(false),
113 ++ d_simplifyInPlace(NULL),
114 + d_currentRecursiveSimplifier(NULL),
115 + d_resourceLimit(0),
116 + d_timeBase(0),