commit: 29c5e3f5de195abd749fb096f476cf833c0cb08a
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 14 18:20:23 2017 +0000
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Fri Jul 14 18:20:23 2017 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=29c5e3f5
sci-libs/trilinos: fix compilation with gcc-7
Package-Manager: Portage-2.3.6, Repoman-2.3.2
.../files/trilinos-12.10.1-fix_gcc_7.patch | 57 ++++++++++++++++++++++
sci-libs/trilinos/trilinos-12.10.1-r1.ebuild | 3 +-
2 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/sci-libs/trilinos/files/trilinos-12.10.1-fix_gcc_7.patch
b/sci-libs/trilinos/files/trilinos-12.10.1-fix_gcc_7.patch
new file mode 100644
index 000000000..cb005cbd3
--- /dev/null
+++ b/sci-libs/trilinos/files/trilinos-12.10.1-fix_gcc_7.patch
@@ -0,0 +1,57 @@
+diff --git a/packages/stk/stk_util/stk_util/diag/StringUtil.cpp
b/packages/stk/stk_util/stk_util/diag/StringUtil.cpp
+index eb9c7c1..942cfad 100644
+--- a/packages/stk/stk_util/stk_util/diag/StringUtil.cpp
++++ b/packages/stk/stk_util/stk_util/diag/StringUtil.cpp
+@@ -40,7 +40,7 @@
+ #include <string> // for basic_string, string, etc
+ #include "stk_util/diag/String.hpp" // for String
+
+-#if __GNUC__ == 3 || __GNUC__ == 4 || __GNUC__ == 5 || __GNUC__ == 6
++#if __GNUC__ == 3 || __GNUC__ == 4 || __GNUC__ == 5 || __GNUC__ == 6 ||
__GNUC__ == 7
+ #include <cxxabi.h>
+ #endif
+
+@@ -314,7 +314,7 @@ word_wrap(
+ #endif
+ }
+
+- #elif (__GNUC__ == 5)
++ #elif (__GNUC__ >= 5)
+ std::string
+ demangle(const char * symbol)
+ {
+@@ -338,33 +338,8 @@ word_wrap(
+ return s;
+ #endif
+ }
+-
+- #elif (__GNUC__ == 6)
+- std::string
+- demangle(const char * symbol)
+- {
+- #ifdef PURIFY_BUILD
+- return symbol;
+- #else
+- std::string s;
+-
+- int status = -1;
+-
+- char *demangled_symbol = abi::__cxa_demangle(symbol, 0, 0, &status);
+
+- if (demangled_symbol) {
+- s = std::string(demangled_symbol);
+- free(demangled_symbol);
+- }
+-
+- if (status != 0)
+- s = std::string(symbol);
+-
+- return s;
+- #endif
+- }
+-
+- #endif // (__GNUC__ == 3)
++ #endif
+
+ #else
+
diff --git a/sci-libs/trilinos/trilinos-12.10.1-r1.ebuild
b/sci-libs/trilinos/trilinos-12.10.1-r1.ebuild
index f577e1f5d..b43aabad7 100644
--- a/sci-libs/trilinos/trilinos-12.10.1-r1.ebuild
+++ b/sci-libs/trilinos/trilinos-12.10.1-r1.ebuild
@@ -85,7 +85,8 @@ trilinos_enable() {
src_prepare() {
epatch "${FILESDIR}"/${PN}-11.14.1-fix-install-paths.patch \
"${FILESDIR}"/${P}-fix_install_paths_for_destdir.patch \
- "${FILESDIR}"/${P}-fix_install_paths_for_destdir-2.patch
+ "${FILESDIR}"/${P}-fix_install_paths_for_destdir-2.patch \
+ "${FILESDIR}"/${P}-fix_gcc_7.patch
epatch_user
}