summaryrefslogtreecommitdiff
path: root/games-emulation
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2016-05-10 03:11:05 -0400
committerMichael Sterrett <mr_bones_@gentoo.org>2016-05-10 03:11:22 -0400
commitd612d994f4d12ea0c6f8624e10564deedf68b020 (patch)
treea15c048c96ef2d0147a4934759076d4f61620fe5 /games-emulation
parent863d128699ffd2f6929180e144073db3d804caae (diff)
downloadgentoo-d612d994f4d12ea0c6f8624e10564deedf68b020.tar.gz
gentoo-d612d994f4d12ea0c6f8624e10564deedf68b020.tar.xz
games-emulation/sdlmame: fix buildins with gcc-4.9.3 with patch from Alexander Miller (bug #582576)
Package-Manager: portage-2.2.26
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/sdlmame/files/sdlmame-0.173-cxx14.patch28
-rw-r--r--games-emulation/sdlmame/sdlmame-0.173.ebuild4
2 files changed, 31 insertions, 1 deletions
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
index 00000000000..bd88cb476e8
--- /dev/null
+++ b/games-emulation/sdlmame/files/sdlmame-0.173-cxx14.patch
@@ -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>
+ #include <utility>
+
+-#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20150413)
+-namespace std
+-{
++namespace std {
++namespace mame_cxx14_compat {
+ template<class _Container>
+ inline constexpr auto
+ cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont)))-> decltype(std::begin(__cont))
+@@ -198,7 +197,8 @@
+ cend(const _Container& __cont) noexcept(noexcept(std::end(__cont)))-> decltype(std::end(__cont))
+ { return std::end(__cont); }
+ }
+-#endif
++using namespace mame_cxx14_compat;
++}
+
+ namespace util {
+ namespace detail {
diff --git a/games-emulation/sdlmame/sdlmame-0.173.ebuild b/games-emulation/sdlmame/sdlmame-0.173.ebuild
index e5d5a0e5652..edac5fe3c2a 100644
--- a/games-emulation/sdlmame/sdlmame-0.173.ebuild
+++ b/games-emulation/sdlmame/sdlmame-0.173.ebuild
@@ -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