[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/08: gnu: grfcodec: Fix build with GCC 10.
From: |
guix-commits |
Subject: |
01/08: gnu: grfcodec: Fix build with GCC 10. |
Date: |
Fri, 17 Dec 2021 13:08:54 -0500 (EST) |
mbakke pushed a commit to branch master
in repository guix.
commit e0559c531425da5a689d14553af7873528b49d09
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Fri Dec 17 17:13:03 2021 +0100
gnu: grfcodec: Fix build with GCC 10.
* gnu/packages/patches/grfcodec-gcc-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/game-development.scm (grfcodec)[source](patches): New field.
[arguments]: Remove trailing #t.
---
gnu/local.mk | 1 +
gnu/packages/game-development.scm | 4 ++--
gnu/packages/patches/grfcodec-gcc-compat.patch | 31 ++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index f76561c..25f50ae 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1199,6 +1199,7 @@ dist_patch_DATA =
\
%D%/packages/patches/gpsbabel-fix-i686-test.patch \
%D%/packages/patches/grantlee-merge-theme-dirs.patch \
%D%/packages/patches/grep-timing-sensitive-test.patch \
+ %D%/packages/patches/grfcodec-gcc-compat.patch \
%D%/packages/patches/grocsvs-dont-use-admiral.patch \
%D%/packages/patches/gromacs-tinyxml2.patch \
%D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \
diff --git a/gnu/packages/game-development.scm
b/gnu/packages/game-development.scm
index 19d5e71..d7502db 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -213,6 +213,7 @@ DeuTex has functions such as merging wads, etc.")
(uri (string-append "https://binaries.openttd.org/extra/"
name "/" version "/" name "-" version
"-source.tar.xz"))
+ (patches (search-patches "grfcodec-gcc-compat.patch"))
(sha256
(base32 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
(build-system gnu-build-system)
@@ -238,8 +239,7 @@ DeuTex has functions such as merging wads, etc.")
"readme" "readme.rpn"))
(for-each (lambda (file)
(install-file file man))
- (find-files "." "\\.1"))))
- #t)))))
+ (find-files "." "\\.1")))))))))
(inputs
(list boost libpng zlib))
(synopsis "GRF development tools")
diff --git a/gnu/packages/patches/grfcodec-gcc-compat.patch
b/gnu/packages/patches/grfcodec-gcc-compat.patch
new file mode 100644
index 0000000..02685d4
--- /dev/null
+++ b/gnu/packages/patches/grfcodec-gcc-compat.patch
@@ -0,0 +1,31 @@
+Fix type comparison issue that is a hard error in GCC 10.
+
+Taken from upstream:
+
+
https://github.com/OpenTTD/grfcodec/commit/bb692b2c723c5e87cc8f89f445928e97594d5b8f
+
+diff --git a/src/command.cpp b/src/command.cpp
+index 9aa0e14..1f32cf1 100644
+--- a/src/command.cpp
++++ b/src/command.cpp
+@@ -300,8 +300,9 @@ bool parse_comment(const string&line){
+ break;
+ case BEAUTIFY:{
+ commandstream>>command_part;
+- uint val=find_command(command_part,beaut),togglebit;
+- if(val!=(uint)-1&&val!=OFF)_commandState.beautifier=true;
++ int val=find_command(command_part,beaut);
++ uint togglebit;
++ if(val!=-1&&val!=OFF)_commandState.beautifier=true;
+ switch(val){
+ case -1:
+ IssueMessage(0,COMMAND_INVALID_ARG,gen[BEAUTIFY].name);
+@@ -372,7 +373,7 @@ bool parse_comment(const string&line){
+ dotoggle:
+ commandstream>>command_part;
+ val=find_command(command_part,beaut);
+- if(!commandstream||val==(uint)-1){
++ if(!commandstream||val==-1){
+
IssueMessage(0,COMMAND_INVALID_ARG,gen[BEAUTIFY].name);
+ return true;
+ }
- branch master updated (d080368 -> 3399c29), guix-commits, 2021/12/17
- 01/08: gnu: grfcodec: Fix build with GCC 10.,
guix-commits <=
- 03/08: gnu: python-graph-tool: Build with Cairomm 1.14., guix-commits, 2021/12/17
- 02/08: gnu: Remove unneeded uses of custom GCC versions., guix-commits, 2021/12/17
- 04/08: gnu: python-graph-tool: Remove input labels., guix-commits, 2021/12/17
- 05/08: gnu: libime: Update to 1.0.10., guix-commits, 2021/12/17
- 07/08: gnu: python-django-rest-framework: Update to 3.13.1., guix-commits, 2021/12/17
- 06/08: gnu: python-django: Add 4.0., guix-commits, 2021/12/17
- 08/08: gnu: python-djangorestframework: Rename to python-django-rest-framework., guix-commits, 2021/12/17