[PATCH] gnu: red-eclipse: Fix build.

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Baines
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal

Debbugs page

Christopher Baines wrote 6 years ago
(address . guix-patches@gnu.org)
20190211093231.17805-1-mail@cbaines.net
Add a patch from the upstream repository [1] that resolves some errors that
prevent the package from building [2].

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.
---
gnu/local.mk | 1 +
gnu/packages/games.scm | 4 +-
.../red-eclipse-remove-gamma-name-hack.patch | 52 +++++++++++++++++++
3 files changed, 56 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch

Toggle diff (87 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 37083ca916..ca46ae7419 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1193,6 +1193,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 \
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 5d7c89a880..de53ac798d 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -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
diff --git a/gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch b/gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch
new file mode 100644
index 0000000000..573920cb99
--- /dev/null
+++ b/gnu/packages/patches/red-eclipse-remove-gamma-name-hack.patch
@@ -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>
--
2.20.1
Ricardo Wurmus wrote 6 years ago
(name . Christopher Baines)(address . mail@cbaines.net)(address . 34429@debbugs.gnu.org)
87lg2ml315.fsf@elephly.net
Hi,

Christopher Baines <mail@cbaines.net> writes:

Toggle quote (10 lines)
> 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.

LGTM! Thanks!

--
Ricardo
Christopher Baines wrote 6 years ago
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 34429-done@debbugs.gnu.org)
87y36kt8r6.fsf@cbaines.net
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (16 lines)
> Hi,
>
> Christopher Baines <mail@cbaines.net> writes:
>
>> 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.
>
> LGTM! Thanks!

Great, I've pushed this as e7e259a50335269cddd004482a655f59d5c7a237

Thanks,

Chris
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlxjz21fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfyuhAAjn79zLNYEqmL468o0yQccz007pm/NjLbooIJTMKgDcaUvv/W8crlkx+v
vSeHziNVabHvuyCWyXSIdT2scx8UOU4I2OvOVTFtXd5sboOTYBJzbKs73z++LlmK
LW0U6ANJ/LM/RtnTvxyPWeFBfupfORJapY3AZ4JQeBBBBXctM9vbI1rF8eyYUrtT
UYwmZcWlIKfc1dnfH3SlCmC1RwLK093WNpl8bPo8+h2fv2+HW10no3QCl3Dx5a/p
EpaqE74fqLh28LhTTWtK1hrU9T0eVyaoiTZVFa8A7EGcIREbupFulbb31k+/keCO
zAiUVRabM6DdlBOZTaaPkAIQ1H2NyzbR20oRSGe9PV6/UnhBvxgW/iKkfPLfVBRY
K53E8Amd4O0kwPSEGWMidyhYibjlST0TTf86fnBy20WpxIPHGxLlqmYjdPmjhUsa
XQLYtKNNlBstzQYDazemBcgBnDuZ2Pie6y8GCzGaPoIPNZ2lfh/hujGUYJFTdWd7
6/X143fAbUlL709B0SkECobwbc4HctnTtdo9vjScyjfAk7jVvhbgM5MKE2AL4+jB
RUQCgChy0RO+wBmb156TqP1ovLRh7H3VGrmiKsWBENAN1gAbAVhmcoMGzQoStBfC
dnVvlFleIwAWDdWsjoteyvmP/PgqeKj1VPNCkTwWB49NGD+5Qmo=
=kPYW
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 34429@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 34429
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help