unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob f3317e39b10c47878db3463a4e80ce6c1bcea670 3000 bytes (raw)
name: gnu/packages/patches/racket-backport-8.6-cross-install-2.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
 
From 85802f4d515e310e657928707800ad709a676e2a Mon Sep 17 00:00:00 2001
From: Matthew Flatt <mflatt@racket-lang.org>
Date: Mon, 15 Aug 2022 10:37:01 +0800
Subject: [PATCH 2/2] configure: adjust cross-build assumption for a pb build

Don't assume a cross build for a pb target on a platform that's only
supported via pb.

(cherry picked from commit 70e484e885637c495be5481983dae2207fdd67bb)

(Edited to remove unrelated tweak to comments in
"racket/src/expander/expand/require+provide.rkt".)
---
 racket/src/cs/c/configure    | 15 +++++++++++----
 racket/src/cs/c/configure.ac | 15 +++++++++++----
 2 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/racket/src/cs/c/configure b/racket/src/cs/c/configure
index 454d79e11a..7e0fa5600d 100755
--- a/racket/src/cs/c/configure
+++ b/racket/src/cs/c/configure
@@ -4679,6 +4679,11 @@ case "$MACH_HOST_CPU" in
     ;;
 esac
 
+if test "${MACH}" = "" ; then
+  default_mach_was_empty=yes
+else
+  default_mach_was_empty=no
+fi
 
 if test "${enable_mach}" != "" ; then
   MACH="${enable_mach}"
@@ -4701,13 +4706,15 @@ elif test "$MACH" = "" -o "$MACH_OS" = "" ; then
    exit 1
 fi
 
-# For a pb build where Racket is supplied, force cross-build
-# mode on the assumption that the host is not a pb build
-# (because it should be created with default configure options)
+# For a pb build where Racket is supplied and MACH was not originally
+# empty, force cross-build mode on the assumption that the host is not
+# a pb build (because it should be created with default configure options)
 if test "${enable_pb}" = "yes" ; then
   if test "${enable_racket}" != "" ; then
     if test "${enable_target}" = "" ; then
-      enable_target="${MACH}"
+      if test "${default_mach_was_empty}" = "no" ; then
+        enable_target="${MACH}"
+      fi
     fi
   fi
 fi
diff --git a/racket/src/cs/c/configure.ac b/racket/src/cs/c/configure.ac
index 5bce979c92..734c1e8feb 100644
--- a/racket/src/cs/c/configure.ac
+++ b/racket/src/cs/c/configure.ac
@@ -415,6 +415,11 @@ case "$MACH_HOST_CPU" in
     ;;
 esac
 
+if test "${MACH}" = "" ; then
+  default_mach_was_empty=yes
+else
+  default_mach_was_empty=no
+fi
 
 if test "${enable_mach}" != "" ; then
   MACH="${enable_mach}"
@@ -437,13 +442,15 @@ elif test "$MACH" = "" -o "$MACH_OS" = "" ; then
    exit 1
 fi
 
-# For a pb build where Racket is supplied, force cross-build
-# mode on the assumption that the host is not a pb build
-# (because it should be created with default configure options)
+# For a pb build where Racket is supplied and MACH was not originally
+# empty, force cross-build mode on the assumption that the host is not
+# a pb build (because it should be created with default configure options)
 if test "${enable_pb}" = "yes" ; then
   if test "${enable_racket}" != "" ; then
     if test "${enable_target}" = "" ; then
-      enable_target="${MACH}"
+      if test "${default_mach_was_empty}" = "no" ; then
+        enable_target="${MACH}"
+      fi
     fi
   fi
 fi
-- 
2.32.0


debug log:

solving f3317e39b10c ...
found f3317e39b10c in https://yhetil.org/guix-patches/875yipqboa.fsf@kolabnow.com/

applying [1/1] https://yhetil.org/guix-patches/875yipqboa.fsf@kolabnow.com/
diff --git a/gnu/packages/patches/racket-backport-8.6-cross-install-2.patch b/gnu/packages/patches/racket-backport-8.6-cross-install-2.patch
new file mode 100644
index 000000000000..f3317e39b10c

1:31: trailing whitespace.
 
1:37: trailing whitespace.
 
1:43: trailing whitespace.
 
1:67: trailing whitespace.
 
1:73: trailing whitespace.
 
Checking patch gnu/packages/patches/racket-backport-8.6-cross-install-2.patch...
Applied patch gnu/packages/patches/racket-backport-8.6-cross-install-2.patch cleanly.
warning: squelched 3 whitespace errors
warning: 8 lines add whitespace errors.

index at:
100644 f3317e39b10c47878db3463a4e80ce6c1bcea670	gnu/packages/patches/racket-backport-8.6-cross-install-2.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).