gnu: openssl-1.1: Clean-up definition.
* gnu/packages/tls.scm (openssl-1.1): Do not quasiquote arguments. Remove extraneous let-bound variables and use more gexp variables.
This commit is contained in:
parent
4895846197
commit
732105ef7e
@ -15,7 +15,7 @@
|
|||||||
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
|
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
|
||||||
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
|
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2020, 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
|
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
|
||||||
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
|
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
|
||||||
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
|
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
|
||||||
@ -447,112 +447,104 @@ OpenSSL for TARGET."
|
|||||||
"static")) ;6.4 MiB of .a files
|
"static")) ;6.4 MiB of .a files
|
||||||
(native-inputs (list perl))
|
(native-inputs (list perl))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:parallel-tests? #f
|
(list
|
||||||
#:test-target "test"
|
#:parallel-tests? #f
|
||||||
|
#:test-target "test"
|
||||||
|
;; Changes to OpenSSL sometimes cause Perl to "sneak in" to the closure,
|
||||||
|
;; so we explicitly disallow it here.
|
||||||
|
#:disallowed-references (list (canonical-package perl))
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
#$@(if (%current-target-system)
|
||||||
|
#~((add-before 'configure 'set-cross-compile
|
||||||
|
(lambda* (#:key target #:allow-other-keys)
|
||||||
|
(setenv "CROSS_COMPILE" (string-append target "-"))
|
||||||
|
(setenv "CONFIGURE_TARGET_ARCH"
|
||||||
|
#$(target->openssl-target
|
||||||
|
(%current-target-system))))))
|
||||||
|
#~())
|
||||||
|
(replace 'check
|
||||||
|
(lambda* (#:key tests? test-target #:allow-other-keys)
|
||||||
|
(when tests?
|
||||||
|
;; 'test_ssl_new.t' in 1.1.1n and 3.0.3 fails due to an expired
|
||||||
|
;; certificate:
|
||||||
|
;; <https://github.com/openssl/openssl/issues/18441>.
|
||||||
|
;; Skip it.
|
||||||
|
;;
|
||||||
|
;; 'test_afalg' seems to be dependent on kernel features:
|
||||||
|
;; <https://github.com/openssl/openssl/issues/12242>.
|
||||||
|
(invoke "make" test-target
|
||||||
|
#$(if (or (target-arm?) (target-riscv64?))
|
||||||
|
"TESTS=-test_afalg -tls_ssl_new"
|
||||||
|
"TESTS=-test_ssl_new")))))
|
||||||
|
(replace 'configure
|
||||||
|
(lambda* (#:key configure-flags #:allow-other-keys)
|
||||||
|
;; It's not a shebang so patch-source-shebangs misses it.
|
||||||
|
(substitute* "config"
|
||||||
|
(("/usr/bin/env")
|
||||||
|
(which "env")))
|
||||||
|
(apply
|
||||||
|
invoke #$@(if (%current-target-system)
|
||||||
|
#~("./Configure")
|
||||||
|
#~("./config"))
|
||||||
|
"shared" ;build shared libraries
|
||||||
|
"--libdir=lib"
|
||||||
|
|
||||||
;; Changes to OpenSSL sometimes cause Perl to "sneak in" to the closure,
|
;; The default for this catch-all directory is
|
||||||
;; so we explicitly disallow it here.
|
;; PREFIX/ssl. Change that to something more
|
||||||
#:disallowed-references ,(list (canonical-package perl))
|
;; conventional.
|
||||||
#:phases
|
(string-append "--openssldir=" #$output
|
||||||
,#~
|
"/share/openssl-"
|
||||||
(modify-phases %standard-phases
|
#$(package-version this-package))
|
||||||
#$@(if (%current-target-system)
|
|
||||||
#~((add-before
|
|
||||||
'configure 'set-cross-compile
|
|
||||||
(lambda* (#:key target #:allow-other-keys)
|
|
||||||
(setenv "CROSS_COMPILE" (string-append target "-"))
|
|
||||||
(setenv "CONFIGURE_TARGET_ARCH"
|
|
||||||
#$(target->openssl-target
|
|
||||||
(%current-target-system))))))
|
|
||||||
#~())
|
|
||||||
(replace 'check
|
|
||||||
(lambda* (#:key tests? test-target #:allow-other-keys)
|
|
||||||
(when tests?
|
|
||||||
;; 'test_ssl_new.t' in 1.1.1n and 3.0.3 fails due to an expired
|
|
||||||
;; certificate:
|
|
||||||
;; <https://github.com/openssl/openssl/issues/18441>.
|
|
||||||
;; Skip it.
|
|
||||||
;;
|
|
||||||
;; 'test_afalg' seems to be dependent on kernel features:
|
|
||||||
;; <https://github.com/openssl/openssl/issues/12242>.
|
|
||||||
(invoke "make" test-target
|
|
||||||
#$(if (or (target-arm?) (target-riscv64?))
|
|
||||||
"TESTS=-test_afalg -tls_ssl_new"
|
|
||||||
"TESTS=-test_ssl_new")))))
|
|
||||||
(replace 'configure
|
|
||||||
(lambda* (#:key configure-flags #:allow-other-keys)
|
|
||||||
(let* ((out #$output)
|
|
||||||
(lib (string-append out "/lib")))
|
|
||||||
;; It's not a shebang so patch-source-shebangs misses it.
|
|
||||||
(substitute* "config"
|
|
||||||
(("/usr/bin/env")
|
|
||||||
(string-append (assoc-ref %build-inputs "coreutils")
|
|
||||||
"/bin/env")))
|
|
||||||
(apply
|
|
||||||
invoke #$@(if (%current-target-system)
|
|
||||||
#~("./Configure")
|
|
||||||
#~("./config"))
|
|
||||||
"shared" ;build shared libraries
|
|
||||||
"--libdir=lib"
|
|
||||||
|
|
||||||
;; The default for this catch-all directory is
|
(string-append "--prefix=" #$output)
|
||||||
;; PREFIX/ssl. Change that to something more
|
(string-append "-Wl,-rpath," (string-append #$output "/lib"))
|
||||||
;; conventional.
|
#$@(if (%current-target-system)
|
||||||
(string-append "--openssldir=" out
|
#~((getenv "CONFIGURE_TARGET_ARCH"))
|
||||||
"/share/openssl-"
|
#~())
|
||||||
#$(package-version this-package))
|
configure-flags)
|
||||||
|
;; Output the configure variables.
|
||||||
(string-append "--prefix=" out)
|
(invoke "perl" "configdata.pm" "--dump")))
|
||||||
(string-append "-Wl,-rpath," lib)
|
(add-after 'install 'move-static-libraries
|
||||||
#$@(if (%current-target-system)
|
(lambda _
|
||||||
#~((getenv "CONFIGURE_TARGET_ARCH"))
|
;; Move static libraries to the "static" output.
|
||||||
#~())
|
(let* ((lib (string-append #$output "/lib"))
|
||||||
configure-flags)
|
(slib (string-append #$output:static "/lib")))
|
||||||
;; Output the configure variables.
|
(for-each (lambda (file)
|
||||||
(invoke "perl" "configdata.pm" "--dump"))))
|
(install-file file slib)
|
||||||
(add-after 'install 'move-static-libraries
|
(delete-file file))
|
||||||
(lambda _
|
(find-files
|
||||||
;; Move static libraries to the "static" output.
|
lib
|
||||||
(let* ((out #$output)
|
#$(if (target-mingw?)
|
||||||
(lib (string-append out "/lib"))
|
'(lambda (filename _)
|
||||||
(static #$output:static)
|
(and (string-suffix? ".a" filename)
|
||||||
(slib (string-append static "/lib")))
|
(not (string-suffix? ".dll.a"
|
||||||
(for-each (lambda (file)
|
filename))))
|
||||||
(install-file file slib)
|
"\\.a$"))))))
|
||||||
(delete-file file))
|
(add-after 'install 'move-extra-documentation
|
||||||
(find-files
|
(lambda _
|
||||||
lib
|
;; Move man pages and full HTML documentation to "doc".
|
||||||
#$(if (target-mingw?)
|
(let* ((man (string-append #$output "/share/man"))
|
||||||
'(lambda (filename _)
|
(html (string-append #$output "/share/doc/openssl"))
|
||||||
(and (string-suffix? ".a" filename)
|
(man-target (string-append #$output:doc "/share/man"))
|
||||||
(not (string-suffix? ".dll.a" filename))))
|
(html-target (string-append
|
||||||
"\\.a$"))))))
|
#$output:doc "/share/doc/openssl")))
|
||||||
(add-after 'install 'move-extra-documentation
|
(mkdir-p (dirname man-target))
|
||||||
(lambda _
|
(mkdir-p (dirname html-target))
|
||||||
;; Move man pages and full HTML documentation to "doc".
|
(rename-file man man-target)
|
||||||
(let* ((out #$output)
|
(rename-file html html-target))))
|
||||||
(man (string-append out "/share/man"))
|
(add-after 'install 'remove-miscellany
|
||||||
(html (string-append out "/share/doc/openssl"))
|
(lambda _
|
||||||
(doc #$output:doc)
|
;; The 'misc' directory contains random undocumented shell and
|
||||||
(man-target (string-append doc "/share/man"))
|
;; Perl scripts. Remove them to avoid retaining a reference on
|
||||||
(html-target (string-append doc "/share/doc/openssl")))
|
;; Perl.
|
||||||
(mkdir-p (dirname man-target))
|
(delete-file-recursively
|
||||||
(mkdir-p (dirname html-target))
|
(string-append #$output "/share/openssl-"
|
||||||
(rename-file man man-target)
|
#$(package-version this-package) "/misc")))))))
|
||||||
(rename-file html html-target))))
|
|
||||||
(add-after
|
|
||||||
'install 'remove-miscellany
|
|
||||||
(lambda _
|
|
||||||
;; The 'misc' directory contains random undocumented shell and Perl
|
|
||||||
;; scripts. Remove them to avoid retaining a reference on Perl.
|
|
||||||
(delete-file-recursively (string-append #$output "/share/openssl-"
|
|
||||||
#$(package-version this-package)
|
|
||||||
"/misc")))))))
|
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
(list $SSL_CERT_DIR $SSL_CERT_FILE))
|
(list $SSL_CERT_DIR $SSL_CERT_FILE))
|
||||||
(synopsis "SSL/TLS implementation")
|
(synopsis "SSL/TLS implementation")
|
||||||
(description
|
(description "OpenSSL is an implementation of SSL/TLS.")
|
||||||
"OpenSSL is an implementation of SSL/TLS.")
|
|
||||||
(license license:openssl)
|
(license license:openssl)
|
||||||
(home-page "https://www.openssl.org/")))
|
(home-page "https://www.openssl.org/")))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user