mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
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.
This commit is contained in:
parent
d080368cb5
commit
e0559c5314
3 changed files with 34 additions and 2 deletions
|
@ -1199,6 +1199,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/gpsbabel-fix-i686-test.patch \
|
%D%/packages/patches/gpsbabel-fix-i686-test.patch \
|
||||||
%D%/packages/patches/grantlee-merge-theme-dirs.patch \
|
%D%/packages/patches/grantlee-merge-theme-dirs.patch \
|
||||||
%D%/packages/patches/grep-timing-sensitive-test.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/grocsvs-dont-use-admiral.patch \
|
||||||
%D%/packages/patches/gromacs-tinyxml2.patch \
|
%D%/packages/patches/gromacs-tinyxml2.patch \
|
||||||
%D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \
|
%D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \
|
||||||
|
|
|
@ -213,6 +213,7 @@ (define-public grfcodec
|
||||||
(uri (string-append "https://binaries.openttd.org/extra/"
|
(uri (string-append "https://binaries.openttd.org/extra/"
|
||||||
name "/" version "/" name "-" version
|
name "/" version "/" name "-" version
|
||||||
"-source.tar.xz"))
|
"-source.tar.xz"))
|
||||||
|
(patches (search-patches "grfcodec-gcc-compat.patch"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
|
(base32 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
|
@ -238,8 +239,7 @@ (define-public grfcodec
|
||||||
"readme" "readme.rpn"))
|
"readme" "readme.rpn"))
|
||||||
(for-each (lambda (file)
|
(for-each (lambda (file)
|
||||||
(install-file file man))
|
(install-file file man))
|
||||||
(find-files "." "\\.1"))))
|
(find-files "." "\\.1")))))))))
|
||||||
#t)))))
|
|
||||||
(inputs
|
(inputs
|
||||||
(list boost libpng zlib))
|
(list boost libpng zlib))
|
||||||
(synopsis "GRF development tools")
|
(synopsis "GRF development tools")
|
||||||
|
|
31
gnu/packages/patches/grfcodec-gcc-compat.patch
Normal file
31
gnu/packages/patches/grfcodec-gcc-compat.patch
Normal file
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in a new issue