From 3d36088eda7dd478b36d30344429eaa6e160ca77 Mon Sep 17 00:00:00 2001 From: Peter Levine Date: Sat, 22 Jul 2017 21:05:47 -0400 Subject: games-puzzle/enigma: Fix building with GCC-6 Bug: https://bugs.gentoo.org/show_bug.cgi?id=610778 Package-Manager: Portage-2.3.6, Repoman-2.3.2 --- games-puzzle/enigma/enigma-1.21-r2.ebuild | 5 +++-- games-puzzle/enigma/files/enigma-1.21-gcc6.patch | 25 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 games-puzzle/enigma/files/enigma-1.21-gcc6.patch diff --git a/games-puzzle/enigma/enigma-1.21-r2.ebuild b/games-puzzle/enigma/enigma-1.21-r2.ebuild index 4a7f98d9af4e..af0c5543f041 100644 --- a/games-puzzle/enigma/enigma-1.21-r2.ebuild +++ b/games-puzzle/enigma/enigma-1.21-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 @@ -31,7 +31,8 @@ RDEPEND="${COMMON_DEPS} src_prepare() { cp /usr/share/gettext/config.rpath . - epatch "${FILESDIR}"/${P}-build.patch + epatch "${FILESDIR}"/${P}-build.patch \ + "${FILESDIR}"/${P}-gcc6.patch sed -i \ -e "s:DOCDIR:\"/usr/share/doc/${P}/html\":" \ src/main.cc || die diff --git a/games-puzzle/enigma/files/enigma-1.21-gcc6.patch b/games-puzzle/enigma/files/enigma-1.21-gcc6.patch new file mode 100644 index 000000000000..fd72dbc89065 --- /dev/null +++ b/games-puzzle/enigma/files/enigma-1.21-gcc6.patch @@ -0,0 +1,25 @@ +Bug: https://bugs.gentoo.org/610778 + +From e0f31f63ba4252ced7128d3ceec2bc668e8681f4 Mon Sep 17 00:00:00 2001 +From: Legimet +Date: Sat, 13 Aug 2016 23:41:27 -0400 +Subject: [PATCH] Fix build error with GCC 6, caused by comparing + basic_ifstream to NULL + +--- + src/lev/Proxy.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lev/Proxy.cc b/src/lev/Proxy.cc +index 6d58c0ba..69f54a20 100644 +--- a/src/lev/Proxy.cc ++++ b/src/lev/Proxy.cc +@@ -933,7 +933,7 @@ namespace enigma { namespace lev { + } else if (haveLocalCopy) { + // plain file + basic_ifstream ifs(absExtPath.c_str(), ios::binary | ios::in); +- if (ifs != NULL) ++ if (ifs) + Readfile(ifs, extCode); + else + haveLocalCopy = false; -- cgit v1.2.3