gnu: red-eclipse: Fix build.

Add a patch from the upstream repository [1] that resolves some errors that
prevent the package from building [2].

1: https://github.com/red-eclipse/base/commit/b16b4963c1ad81bb9ef784bc49
2: error: ‘____gammal_r_finite’ was not declared in this scope

* gnu/packages/games.scm (red-eclipse)[source] Add patch.
* gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch: New file
* gnu/local.mk (dist_patch_DATA): Add new patch.
master
Christopher Baines 2019-02-11 09:28:49 +00:00
parent b0a372637f
commit e7e259a503
No known key found for this signature in database
GPG Key ID: 5E28A33B0B84F577
3 changed files with 56 additions and 1 deletions

View File

@ -1197,6 +1197,7 @@ dist_patch_DATA = \
%D%/packages/patches/rct-add-missing-headers.patch \
%D%/packages/patches/readline-link-ncurses.patch \
%D%/packages/patches/readline-6.2-CVE-2014-2524.patch \
%D%/packages/patches/red-eclipse-remove-gamma-name-hack.patch \
%D%/packages/patches/reposurgeon-add-missing-docbook-files.patch \
%D%/packages/patches/reptyr-fix-gcc-7.patch \
%D%/packages/patches/ripperx-missing-file.patch \

View File

@ -2843,7 +2843,9 @@ http://lavachat.symlynx.com/unix/")
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"1vs9k6f5fgsiy1n72imlqm8khjwm8cryc08zwd4gr7yxlxv45bs0"))))
"1vs9k6f5fgsiy1n72imlqm8khjwm8cryc08zwd4gr7yxlxv45bs0"))
(patches
(search-patches "red-eclipse-remove-gamma-name-hack.patch"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no check target

View File

@ -0,0 +1,52 @@
From b16b4963c1ad81bb9ef784bc4913a4c8ab5f1bb4 Mon Sep 17 00:00:00 2001
From: Lee Salzman <lsalzman@gmail.com>
Date: Tue, 12 Sep 2017 14:45:10 -0400
Subject: [PATCH] remove gamma name hack
---
src/engine/main.cpp | 6 +++---
src/shared/cube.h | 8 --------
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/engine/main.cpp b/src/engine/main.cpp
index 1032004d..77c9233a 100644
--- a/src/engine/main.cpp
+++ b/src/engine/main.cpp
@@ -278,10 +278,10 @@ static void setgamma(int val)
}
static int curgamma = 100;
-VARF(IDF_PERSIST, gamma, 30, 100, 300,
+VARFN(IDF_PERSIST, gamma, reqgamma, 30, 100, 300,
{
- if(initing || gamma == curgamma) return;
- curgamma = gamma;
+ if(initing || reqgamma == curgamma) return;
+ curgamma = reqgamma;
setgamma(curgamma);
});
diff --git a/src/shared/cube.h b/src/shared/cube.h
index 3864c492..7ff5e267 100644
--- a/src/shared/cube.h
+++ b/src/shared/cube.h
@@ -3,19 +3,11 @@
#define _FILE_OFFSET_BITS 64
-#ifdef __GNUC__
-#define gamma __gamma
-#endif
-
#ifdef WIN32
#define _USE_MATH_DEFINES
#endif
#include <math.h>
-#ifdef __GNUC__
-#undef gamma
-#endif
-
#include <string.h>
#include <stdio.h>
#include <stdlib.h>