commit:     33caed6639914466158fa7c7a16b8e09773a473e
Author:     Matt Smith <matt <AT> offtopica <DOT> uk>
AuthorDate: Sat Oct 17 13:53:18 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Oct 22 21:08:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33caed66

games-util/grfcodec: Fix build failure with GCC 10

Patch taken from Fedora's grfcodec package.

Closes: https://bugs.gentoo.org/707758
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Matt Smith <matt <AT> offtopica.uk>
Closes: https://github.com/gentoo/gentoo/pull/17954
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-util/grfcodec/files/grfcodec-6.0.6-gcc10.patch | 12 ++++++++++++
 games-util/grfcodec/grfcodec-6.0.6.ebuild            |  4 +++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/games-util/grfcodec/files/grfcodec-6.0.6-gcc10.patch 
b/games-util/grfcodec/files/grfcodec-6.0.6-gcc10.patch
new file mode 100644
index 00000000000..baf84a435f6
--- /dev/null
+++ b/games-util/grfcodec/files/grfcodec-6.0.6-gcc10.patch
@@ -0,0 +1,12 @@
+diff -Nrup a/src/command.cpp b/src/command.cpp
+--- a/src/command.cpp  2015-05-09 04:59:46.000000000 -0600
++++ b/src/command.cpp  2019-09-24 11:37:06.667911307 -0600
+@@ -303,7 +303,7 @@ bool parse_comment(const string&line){
+               uint val=find_command(command_part,beaut),togglebit;
+               if(val!=(uint)-1&&val!=OFF)_commandState.beautifier=true;
+               switch(val){
+-              case -1:
++              case -1u:
+                       IssueMessage(0,COMMAND_INVALID_ARG,gen[BEAUTIFY].name);
+                       return true;
+               case OFF:_commandState.beautifier=false;break;

diff --git a/games-util/grfcodec/grfcodec-6.0.6.ebuild 
b/games-util/grfcodec/grfcodec-6.0.6.ebuild
index ebfb9b894f6..2c4927b3755 100644
--- a/games-util/grfcodec/grfcodec-6.0.6.ebuild
+++ b/games-util/grfcodec/grfcodec-6.0.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -27,6 +27,8 @@ DEPEND="
        dev-libs/boost
 "
 
+PATCHES=("${FILESDIR}/${PN}-6.0.6-gcc10.patch")
+
 src_prepare() {
        default
 

Reply via email to