aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2019-12-19 09:51:56 +0100
committerMathieu Othacehe <m.othacehe@gmail.com>2019-12-19 09:51:56 +0100
commit8a0e29d8b9da4a277c8f9613be85df16de9e8898 (patch)
treeb21cf3410daec6b60a6f5671325d80609b72a758 /gnu
parent8166b6afe5e28d64d3ffd426a8153a980e2692b0 (diff)
downloadguix-8a0e29d8b9da4a277c8f9613be85df16de9e8898.tar
guix-8a0e29d8b9da4a277c8f9613be85df16de9e8898.tar.gz
gnu: tcl: Fix cross-compilation.
* gnu/packages/patches/tcl-fix-cross-compilation.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/tcl.scm (tcl): Apply it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/tcl-fix-cross-compilation.patch39
-rw-r--r--gnu/packages/tcl.scm4
3 files changed, 43 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 0224b7101b..3d672ea213 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1383,6 +1383,7 @@ dist_patch_DATA = \
%D%/packages/patches/tar-skip-unreliable-tests.patch \
%D%/packages/patches/tcc-boot-0.9.27.patch \
%D%/packages/patches/tclxml-3.2-install.patch \
+ %D%/packages/patches/tcl-fix-cross-compilation.patch \
%D%/packages/patches/tcsh-fix-autotest.patch \
%D%/packages/patches/teensy-loader-cli-help.patch \
%D%/packages/patches/teeworlds-use-latest-wavpack.patch \
diff --git a/gnu/packages/patches/tcl-fix-cross-compilation.patch b/gnu/packages/patches/tcl-fix-cross-compilation.patch
new file mode 100644
index 0000000000..00c36b8f27
--- /dev/null
+++ b/gnu/packages/patches/tcl-fix-cross-compilation.patch
@@ -0,0 +1,39 @@
+From f7fa48c4c75a1e748dc5071e709c0b62ff739eaa Mon Sep 17 00:00:00 2001
+From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
+Date: Mon, 9 Dec 2019 10:02:20 +0000
+Subject: [PATCH] Fix [abd4abedd2]: Failed to build tk 8.6.10 with cross
+ compile
+
+Patch taken from upstream to fix cross-compilation. To be removed on next Tcl release.
+
+---
+ compat/strtol.c | 2 +-
+ compat/strtoul.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/compat/strtol.c b/compat/strtol.c
+index b7f69196ce2..811006a64c3 100644
+--- a/compat/strtol.c
++++ b/compat/strtol.c
+@@ -53,7 +53,7 @@ strtol(
+ */
+
+ p = string;
+- while (TclIsSpaceProc(*p)) {
++ while (isspace(UCHAR(*p))) {
+ p += 1;
+ }
+
+diff --git a/compat/strtoul.c b/compat/strtoul.c
+index e37eb05f823..15587f1da1a 100644
+--- a/compat/strtoul.c
++++ b/compat/strtoul.c
+@@ -74,7 +74,7 @@ strtoul(
+ */
+
+ p = string;
+- while (TclIsSpaceProc(*p)) {
++ while (isspace(UCHAR(*p))) {
+ p += 1;
+ }
+ if (*p == '-') {
diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm
index 7531c1ca9d..c88d0338cb 100644
--- a/gnu/packages/tcl.scm
+++ b/gnu/packages/tcl.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -50,7 +51,8 @@
version "/tcl" version "-src.tar.gz"))
(sha256
(base32
- "1vc7imilx6kcb5319r7hnrp4jn5pqb41an3vr3azhgcfcgvdp5ji"))))
+ "1vc7imilx6kcb5319r7hnrp4jn5pqb41an3vr3azhgcfcgvdp5ji"))
+ (patches (search-patches "tcl-fix-cross-compilation.patch"))))
(build-system gnu-build-system)
(arguments
`(#:phases (modify-phases %standard-phases