diff mbox series

[bug#49025,v4,core-updates,17/36] openssl: Make the #:phases argument a G-expression.

Message ID 20210619150458.12057-18-maximedevos@telenet.be
State Accepted
Headers show
Series Support cross-compilation with meson | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

M June 19, 2021, 3:04 p.m. UTC
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.
---
 gnu/packages/tls.scm | 42 ++++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 20 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 3688449efe..f561c28251 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -39,6 +39,7 @@ 
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils)
+  #:use-module (guix gexp)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system perl)
@@ -338,9 +339,10 @@  required structures.")
       ;; so we explicitly disallow it here.
       #:disallowed-references ,(list (canonical-package perl))
       #:phases
+      ,#~
       (modify-phases %standard-phases
-       ,@(if (%current-target-system)
-           '((add-before
+       #$@(if (%current-target-system)
+          #~((add-before
                'configure 'set-cross-compile
                (lambda* (#:key target outputs #:allow-other-keys)
                  (setenv "CROSS_COMPILE" (string-append target "-"))
@@ -364,7 +366,7 @@  required structures.")
                             "linux-ppc64")
                            ((string-prefix? "powerpc" target)
                             "linux-ppc"))))))
-           '())
+             #~())
         (replace 'configure
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
@@ -374,9 +376,9 @@  required structures.")
                 (("/usr/bin/env")
                  (string-append (assoc-ref %build-inputs "coreutils")
                                 "/bin/env")))
-              (invoke ,@(if (%current-target-system)
-                          '("./Configure")
-                          '("./config"))
+              (invoke #$@(if (%current-target-system)
+                             #~("./Configure")
+                             #~("./config"))
                       "shared"       ;build shared libraries
                       "--libdir=lib"
 
@@ -385,13 +387,13 @@  required structures.")
                       ;; conventional.
                       (string-append "--openssldir=" out
                                      "/share/openssl-"
-                                     ,(package-version this-package))
+                                     #$(package-version this-package))
 
                       (string-append "--prefix=" out)
                       (string-append "-Wl,-rpath," lib)
-                      ,@(if (%current-target-system)
-                          '((getenv "CONFIGURE_TARGET_ARCH"))
-                          '())))))
+                      #$@(if (%current-target-system)
+                             #~((getenv "CONFIGURE_TARGET_ARCH"))
+                             #~())))))
         (add-after 'install 'move-static-libraries
           (lambda* (#:key outputs #:allow-other-keys)
             ;; Move static libraries to the "static" output.
@@ -423,7 +425,7 @@  required structures.")
            ;; scripts.  Remove them to avoid retaining a reference on Perl.
            (let ((out (assoc-ref outputs "out")))
              (delete-file-recursively (string-append out "/share/openssl-"
-                                                     ,(package-version this-package)
+                                                     #$(package-version this-package)
                                                      "/misc"))))))))
    (native-search-paths
     (list (search-path-specification
@@ -468,7 +470,7 @@  required structures.")
        ;; Parallel build is not supported in 1.0.x.
        ((#:parallel-build? _ #f) #f)
        ((#:phases phases)
-        `(modify-phases ,phases
+       #~(modify-phases #$phases
            (add-before 'patch-source-shebangs 'patch-tests
              (lambda* (#:key inputs native-inputs #:allow-other-keys)
                (let ((bash (assoc-ref (or native-inputs inputs) "bash")))
@@ -491,9 +493,9 @@  required structures.")
 	     ;; Override this phase because OpenSSL 1.0 does not understand -rpath.
 	     (lambda* (#:key outputs #:allow-other-keys)
 	       (let ((out (assoc-ref outputs "out")))
-		 (invoke ,@(if (%current-target-system)
-			       '("./Configure")
-			       '("./config"))
+		 (invoke #$@(if (%current-target-system)
+			        #~("./Configure")
+			        #~("./config"))
 			 "shared"                 ;build shared libraries
 			 "--libdir=lib"
 
@@ -501,12 +503,12 @@  required structures.")
 			 ;; PREFIX/ssl.  Change that to something more
 			 ;; conventional.
 			 (string-append "--openssldir=" out
-					"/share/openssl-" ,version)
+					"/share/openssl-" #$version)
 
 			 (string-append "--prefix=" out)
-			 ,@(if (%current-target-system)
-			       '((getenv "CONFIGURE_TARGET_ARCH"))
-			       '())))))
+			 #$@(if (%current-target-system)
+			        '((getenv "CONFIGURE_TARGET_ARCH"))
+			        '())))))
         (delete 'move-extra-documentation)
         (add-after 'install 'move-man3-pages
           (lambda* (#:key outputs #:allow-other-keys)
@@ -531,7 +533,7 @@  required structures.")
                ;; scripts.  Remove them to avoid retaining a reference on Perl.
                (let ((out (assoc-ref outputs "out")))
                  (delete-file-recursively (string-append out "/share/openssl-"
-                                                         ,version "/misc"))
+                                                         #$version "/misc"))
                  #t)))))))))
 
 (define-public libressl