--- /dev/null
+# work around gcc-4.9.3's implementation of cxx14
+# bug 582576 with patch from Alexander Miller
+# https://bugs.gentoo.org/show_bug.cgi?id=582576
+
+--- a/src/lib/util/strformat.h
++++ b/src/lib/util/strformat.h
+@@ -185,9 +185,8 @@
+ #include <type_traits>\r
+ #include <utility>\r
+ \r
+-#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20150413)\r
+-namespace std\r
+-{\r
++namespace std {\r
++namespace mame_cxx14_compat {\r
+ template<class _Container>\r
+ inline constexpr auto\r
+ cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont)))-> decltype(std::begin(__cont))\r
+@@ -198,7 +197,8 @@
+ cend(const _Container& __cont) noexcept(noexcept(std::end(__cont)))-> decltype(std::end(__cont))\r
+ { return std::end(__cont); }\r
+ }\r
+-#endif\r
++using namespace mame_cxx14_compat;\r
++}\r
+ \r
+ namespace util {\r
+ namespace detail {\r
}
src_prepare() {
- epatch "${FILESDIR}"/${P}-qt.patch
+ epatch \
+ "${FILESDIR}"/${P}-qt.patch \
+ "${FILESDIR}"/${P}-cxx14.patch
# Disable using bundled libraries
enable_feature USE_SYSTEM_LIB_EXPAT
enable_feature USE_SYSTEM_LIB_FLAC