mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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
This commit is contained in:
parent
4b85db10b1
commit
832eec2a74
1 changed files with 13 additions and 4 deletions
|
@ -84,7 +84,9 @@ (define-module (gnu packages tls)
|
|||
#: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 @@ (define-public guile2.2-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 @@ (define (target->openssl-target 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 @@ (define (target->openssl-target 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 @@ (define-public openssl-1.1
|
|||
(setenv "CROSS_COMPILE" (string-append target "-"))
|
||||
(setenv "CONFIGURE_TARGET_ARCH"
|
||||
#$(target->openssl-target
|
||||
this-package
|
||||
(%current-target-system))))))
|
||||
#~())
|
||||
#$@(if (target-hurd?)
|
||||
|
|
Loading…
Reference in a new issue