[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/11: gnu: tls: Raise conditions from target->openssl-target.
From: |
guix-commits |
Subject: |
02/11: gnu: tls: Raise conditions from target->openssl-target. |
Date: |
Mon, 15 Jul 2024 17:35:27 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository guix.
commit 832eec2a74c18559e996ffc9dd862cc9d08ea125
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Thu May 16 16:06:04 2024 +0100
gnu: tls: Raise conditions from target->openssl-target.
Rather than rasising generic errors.
* gnu/packages/tls.scm (target->openssl-target): Raise conditions rather
than
generic errors.
(openssl-1.1): Call target->openssl-target with the package.
Change-Id: I13c63328cdf6bc177b20879805246ad94ff2665b
---
gnu/packages/tls.scm | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 760b917768..fdc003731d 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -84,7 +84,9 @@
#:use-module (gnu packages time)
#:use-module (gnu packages version-control)
#:use-module (gnu packages base)
- #:use-module (srfi srfi-1))
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-34)
+ #:use-module (srfi srfi-35))
(define-public libtasn1
(package
@@ -390,7 +392,7 @@ bindings that were formerly provided as part of GnuTLS.")
(modify-inputs (package-inputs guile-gnutls)
(replace "guile" guile-2.2)))))
-(define (target->openssl-target target)
+(define (target->openssl-target pkg target)
"Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling
OpenSSL for TARGET."
;; Keep this code outside the build code,
@@ -411,7 +413,10 @@ OpenSSL for TARGET."
((target-linux? target)
"linux")
(else
- (error "unsupported openssl target kernel"))))
+ (raise (condition
+ (&package-unsupported-target-error
+ (package pkg)
+ (target target)))))))
(arch
(cond
((target-x86-32? target)
@@ -438,7 +443,10 @@ OpenSSL for TARGET."
((target-64bit? target)
"generic64")
(else
- (error "unsupported openssl target architecture")))))
+ (raise (condition
+ (&package-unsupported-target-error
+ (package pkg)
+ (target target))))))))
(string-append kernel "-" arch))))
(define-public openssl-1.1
@@ -488,6 +496,7 @@ OpenSSL for TARGET."
(setenv "CROSS_COMPILE" (string-append target "-"))
(setenv "CONFIGURE_TARGET_ARCH"
#$(target->openssl-target
+ this-package
(%current-target-system))))))
#~())
#$@(if (target-hurd?)
- branch master updated (0e5e3edec5 -> bf6ab0e0f5), guix-commits, 2024/07/15
- 01/11: guix: packages: Add new &package-unsupported-target-error., guix-commits, 2024/07/15
- 09/11: gnu: make-mingw-w64: Update to 12.0.0., guix-commits, 2024/07/15
- 11/11: gnu: mingw-w64-tools: Update to 12.0.0., guix-commits, 2024/07/15
- 03/11: guix: packages: Add &unsupported-cross-compilation-target-error., guix-commits, 2024/07/15
- 02/11: gnu: tls: Raise conditions from target->openssl-target.,
guix-commits <=
- 04/11: build-system: meson: Use a more specific exception., guix-commits, 2024/07/15
- 05/11: gnu: rust: Guard against unsupported rust targets., guix-commits, 2024/07/15
- 08/11: gnu: make-mingw-w64: Use G-Expressions., guix-commits, 2024/07/15
- 06/11: build-system: go: Properly handle when a target is unsupported., guix-commits, 2024/07/15
- 10/11: gnu: mingw-w64-tools: Use G-Expressions., guix-commits, 2024/07/15
- 07/11: gnu: make-mingw-w64: Memoize., guix-commits, 2024/07/15