games-emulation/sdlmame: fix buildins with gcc-4.9.3 with patch from Alexander Miller...
authorMichael Sterrett <mr_bones_@gentoo.org>
Tue, 10 May 2016 07:11:05 +0000 (03:11 -0400)
committerMichael Sterrett <mr_bones_@gentoo.org>
Tue, 10 May 2016 07:11:22 +0000 (03:11 -0400)
Package-Manager: portage-2.2.26

games-emulation/sdlmame/files/sdlmame-0.173-cxx14.patch [new file with mode: 0644]
games-emulation/sdlmame/sdlmame-0.173.ebuild

diff --git a/games-emulation/sdlmame/files/sdlmame-0.173-cxx14.patch b/games-emulation/sdlmame/files/sdlmame-0.173-cxx14.patch
new file mode 100644 (file)
index 0000000..bd88cb4
--- /dev/null
@@ -0,0 +1,28 @@
+# 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
index e5d5a0e56527b3e05bbf41f8ec0f3944e162f691..edac5fe3c2a3c452b555a739308b9fd4e45aa87a 100644 (file)
@@ -73,7 +73,9 @@ src_unpack() {
 }
 
 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