openssl: Make the #:phases argument a G-expression.
This allows using this-package-native-input later. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Make this a G-expression. (openssl-1.0)[arguments]<#:phases>: Likewise. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>master
parent
c14c2ebaee
commit
7c0eaa1f9e
|
@ -40,6 +40,7 @@
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (guix build-system go)
|
#:use-module (guix build-system go)
|
||||||
#:use-module (guix build-system perl)
|
#:use-module (guix build-system perl)
|
||||||
|
@ -339,33 +340,34 @@ required structures.")
|
||||||
;; so we explicitly disallow it here.
|
;; so we explicitly disallow it here.
|
||||||
#:disallowed-references ,(list (canonical-package perl))
|
#:disallowed-references ,(list (canonical-package perl))
|
||||||
#:phases
|
#:phases
|
||||||
|
,#~
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
,@(if (%current-target-system)
|
#$@(if (%current-target-system)
|
||||||
'((add-before
|
#~((add-before
|
||||||
'configure 'set-cross-compile
|
'configure 'set-cross-compile
|
||||||
(lambda* (#:key target outputs #:allow-other-keys)
|
(lambda* (#:key target outputs #:allow-other-keys)
|
||||||
(setenv "CROSS_COMPILE" (string-append target "-"))
|
(setenv "CROSS_COMPILE" (string-append target "-"))
|
||||||
(setenv "CONFIGURE_TARGET_ARCH"
|
(setenv "CONFIGURE_TARGET_ARCH"
|
||||||
(cond
|
(cond
|
||||||
((string-prefix? "i586" target)
|
((string-prefix? "i586" target)
|
||||||
"hurd-x86")
|
"hurd-x86")
|
||||||
((string-prefix? "i686" target)
|
((string-prefix? "i686" target)
|
||||||
"linux-x86")
|
"linux-x86")
|
||||||
((string-prefix? "x86_64" target)
|
((string-prefix? "x86_64" target)
|
||||||
"linux-x86_64")
|
"linux-x86_64")
|
||||||
((string-prefix? "mips64el" target)
|
((string-prefix? "mips64el" target)
|
||||||
"linux-mips64")
|
"linux-mips64")
|
||||||
((string-prefix? "arm" target)
|
((string-prefix? "arm" target)
|
||||||
"linux-armv4")
|
"linux-armv4")
|
||||||
((string-prefix? "aarch64" target)
|
((string-prefix? "aarch64" target)
|
||||||
"linux-aarch64")
|
"linux-aarch64")
|
||||||
((string-prefix? "powerpc64le" target)
|
((string-prefix? "powerpc64le" target)
|
||||||
"linux-ppc64le")
|
"linux-ppc64le")
|
||||||
((string-prefix? "powerpc64" target)
|
((string-prefix? "powerpc64" target)
|
||||||
"linux-ppc64")
|
"linux-ppc64")
|
||||||
((string-prefix? "powerpc" target)
|
((string-prefix? "powerpc" target)
|
||||||
"linux-ppc"))))))
|
"linux-ppc"))))))
|
||||||
'())
|
#~())
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key outputs configure-flags #:allow-other-keys)
|
(lambda* (#:key outputs configure-flags #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
@ -376,9 +378,9 @@ required structures.")
|
||||||
(string-append (assoc-ref %build-inputs "coreutils")
|
(string-append (assoc-ref %build-inputs "coreutils")
|
||||||
"/bin/env")))
|
"/bin/env")))
|
||||||
(apply
|
(apply
|
||||||
invoke ,@(if (%current-target-system)
|
invoke #$@(if (%current-target-system)
|
||||||
'("./Configure")
|
#~("./Configure")
|
||||||
'("./config"))
|
#~("./config"))
|
||||||
"shared" ;build shared libraries
|
"shared" ;build shared libraries
|
||||||
"--libdir=lib"
|
"--libdir=lib"
|
||||||
|
|
||||||
|
@ -387,13 +389,13 @@ required structures.")
|
||||||
;; conventional.
|
;; conventional.
|
||||||
(string-append "--openssldir=" out
|
(string-append "--openssldir=" out
|
||||||
"/share/openssl-"
|
"/share/openssl-"
|
||||||
,(package-version this-package))
|
#$(package-version this-package))
|
||||||
|
|
||||||
(string-append "--prefix=" out)
|
(string-append "--prefix=" out)
|
||||||
(string-append "-Wl,-rpath," lib)
|
(string-append "-Wl,-rpath," lib)
|
||||||
,@(if (%current-target-system)
|
#$@(if (%current-target-system)
|
||||||
'((getenv "CONFIGURE_TARGET_ARCH"))
|
#~((getenv "CONFIGURE_TARGET_ARCH"))
|
||||||
'())
|
#~())
|
||||||
configure-flags)
|
configure-flags)
|
||||||
;; Output the configure variables.
|
;; Output the configure variables.
|
||||||
(invoke "perl" "configdata.pm" "--dump"))))
|
(invoke "perl" "configdata.pm" "--dump"))))
|
||||||
|
@ -428,7 +430,7 @@ required structures.")
|
||||||
;; scripts. Remove them to avoid retaining a reference on Perl.
|
;; scripts. Remove them to avoid retaining a reference on Perl.
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(delete-file-recursively (string-append out "/share/openssl-"
|
(delete-file-recursively (string-append out "/share/openssl-"
|
||||||
,(package-version this-package)
|
#$(package-version this-package)
|
||||||
"/misc"))))))))
|
"/misc"))))))))
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
(list (search-path-specification
|
(list (search-path-specification
|
||||||
|
@ -473,7 +475,7 @@ required structures.")
|
||||||
;; Parallel build is not supported in 1.0.x.
|
;; Parallel build is not supported in 1.0.x.
|
||||||
((#:parallel-build? _ #f) #f)
|
((#:parallel-build? _ #f) #f)
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(modify-phases ,phases
|
#~(modify-phases #$phases
|
||||||
(add-before 'patch-source-shebangs 'patch-tests
|
(add-before 'patch-source-shebangs 'patch-tests
|
||||||
(lambda* (#:key inputs native-inputs #:allow-other-keys)
|
(lambda* (#:key inputs native-inputs #:allow-other-keys)
|
||||||
(let ((bash (assoc-ref (or native-inputs inputs) "bash")))
|
(let ((bash (assoc-ref (or native-inputs inputs) "bash")))
|
||||||
|
@ -496,9 +498,9 @@ required structures.")
|
||||||
;; Override this phase because OpenSSL 1.0 does not understand -rpath.
|
;; Override this phase because OpenSSL 1.0 does not understand -rpath.
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(invoke ,@(if (%current-target-system)
|
(invoke #$@(if (%current-target-system)
|
||||||
'("./Configure")
|
#~("./Configure")
|
||||||
'("./config"))
|
#~("./config"))
|
||||||
"shared" ;build shared libraries
|
"shared" ;build shared libraries
|
||||||
"--libdir=lib"
|
"--libdir=lib"
|
||||||
|
|
||||||
|
@ -506,12 +508,12 @@ required structures.")
|
||||||
;; PREFIX/ssl. Change that to something more
|
;; PREFIX/ssl. Change that to something more
|
||||||
;; conventional.
|
;; conventional.
|
||||||
(string-append "--openssldir=" out
|
(string-append "--openssldir=" out
|
||||||
"/share/openssl-" ,version)
|
"/share/openssl-" #$version)
|
||||||
|
|
||||||
(string-append "--prefix=" out)
|
(string-append "--prefix=" out)
|
||||||
,@(if (%current-target-system)
|
#$@(if (%current-target-system)
|
||||||
'((getenv "CONFIGURE_TARGET_ARCH"))
|
'((getenv "CONFIGURE_TARGET_ARCH"))
|
||||||
'())))))
|
'())))))
|
||||||
(delete 'move-extra-documentation)
|
(delete 'move-extra-documentation)
|
||||||
(add-after 'install 'move-man3-pages
|
(add-after 'install 'move-man3-pages
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
@ -536,7 +538,7 @@ required structures.")
|
||||||
;; scripts. Remove them to avoid retaining a reference on Perl.
|
;; scripts. Remove them to avoid retaining a reference on Perl.
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(delete-file-recursively (string-append out "/share/openssl-"
|
(delete-file-recursively (string-append out "/share/openssl-"
|
||||||
,version "/misc"))
|
#$version "/misc"))
|
||||||
#t)))))))))
|
#t)))))))))
|
||||||
|
|
||||||
(define-public libressl
|
(define-public libressl
|
||||||
|
|
Reference in New Issue