gnu: racket: Don't inject store paths into Racket files.
[jackhill/guix/guix.git] / gnu / packages / patches / gnutls-cross.patch
CommitLineData
7eee37cd
JN
1Not sent upstream.
2
3From e23de62e28f64599148ff06e439fac116a391299 Mon Sep 17 00:00:00 2001
4From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
5Date: Fri, 10 Apr 2020 07:24:48 +0200
6Subject: [PATCH] guile: Cross build fix.
7
8To cross-build, both the host guile and the native guile-for-build
9must be available. If the native guile is not available, no snarfing
10is done and the guile cross build is skipped.
11
12During the cross-build gnutls.scm does not load when compliling
13extra.scm, becase of missing definitions from guile-gnutls-v-2.
14
15* guile/modules/gnutls.in (protocol/ssl-3 protocol/tls-1.0,
16protocol/tls-1.1, credentials/anonymous, cipher/rijndael-256-cbc,
17cipher/rijndael-128-cbc, cipher/rijndael-cbc, cipher/arcfour-128,
18certificate-verify/allow-any-x509-v1-ca-certificate,
19certificate-verify/allow-x509-v1-ca-certificate): Define to #f
20initially. When "GNUTLS_GUILE_CROSS_COMPILING" not set, set! to value
21from "guile-gnutls-v-2" load-extension C module.
22---
23 guile/modules/gnutls.in | 40 +++++++++++++++++++++++++++-------------
24 1 file changed, 27 insertions(+), 13 deletions(-)
25
26diff --git a/guile/modules/gnutls.in b/guile/modules/gnutls.in
27index 6461c404a..954e315de 100644
28--- a/guile/modules/gnutls.in
29+++ b/guile/modules/gnutls.in
30@@ -564,22 +564,36 @@ This defines 'variable' as an alias for 'alias', and emits a warning when
31 (identifier? #'id)
32 #'alias))))))))))
33
34-
35 ;; Renaming.
36-(define protocol/ssl-3 protocol/ssl3)
37-(define protocol/tls-1.0 protocol/tls1-0)
38-(define protocol/tls-1.1 protocol/tls1-1)
39+(define protocol/ssl-3 #f)
40+(define protocol/tls-1.0 #f)
41+(define protocol/tls-1.1 #f)
42
43 ;; Aliases.
44-(define credentials/anonymous credentials/anon)
45-(define cipher/rijndael-256-cbc cipher/aes-256-cbc)
46-(define cipher/rijndael-128-cbc cipher/aes-128-cbc)
47-(define cipher/rijndael-cbc cipher/aes-128-cbc)
48-(define cipher/arcfour-128 cipher/arcfour)
49-(define certificate-verify/allow-any-x509-v1-ca-certificate
50- certificate-verify/allow-any-x509-v1-ca-crt)
51-(define certificate-verify/allow-x509-v1-ca-certificate
52- certificate-verify/allow-x509-v1-ca-crt)
53+(define credentials/anonymous #f)
54+(define cipher/rijndael-256-cbc #f)
55+(define cipher/rijndael-128-cbc #f)
56+(define cipher/rijndael-cbc #f)
57+(define cipher/arcfour-128 #f)
58+(define certificate-verify/allow-any-x509-v1-ca-certificate #f)
59+(define certificate-verify/allow-x509-v1-ca-certificate #f)
60+
61+(unless (getenv "GNUTLS_GUILE_CROSS_COMPILING")
62+ ;; Renaming.
63+ (set! protocol/ssl-3 protocol/ssl3)
64+ (set! protocol/tls-1.0 protocol/tls1-0)
65+ (set! protocol/tls-1.1 protocol/tls1-1)
66+
67+ ;; Aliases.
68+ (set! credentials/anonymous credentials/anon)
69+ (set! cipher/rijndael-256-cbc cipher/aes-256-cbc)
70+ (set! cipher/rijndael-128-cbc cipher/aes-128-cbc)
71+ (set! cipher/rijndael-cbc cipher/aes-128-cbc)
72+ (set! cipher/arcfour-128 cipher/arcfour)
73+ (set! certificate-verify/allow-any-x509-v1-ca-certificate
74+ certificate-verify/allow-any-x509-v1-ca-crt)
75+ (set! certificate-verify/allow-x509-v1-ca-certificate
76+ certificate-verify/allow-x509-v1-ca-crt))
77
78 ;; Deprecated OpenPGP bindings.
79 (define-deprecated certificate-type/openpgp)
80--
812.26.0
82