summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-07-14 13:12:58 +0200
committerMathieu Othacehe <othacehe@gnu.org>2021-07-14 15:57:40 +0200
commit7c0eaa1f9e3caf1623adf2d334b0a4548cd0367e (patch)
tree6b879d5f9fe0fffeb02390816859db576e8f6187
parentc14c2ebaeec9defd4c0a152e7af4fe332cd3afd7 (diff)
downloadguix-7c0eaa1f9e3caf1623adf2d334b0a4548cd0367e.tar.gz
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>
-rw-r--r--gnu/packages/tls.scm88
1 files changed, 45 insertions, 43 deletions
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 95fb261c9a..102677971d 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -40,6 +40,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)
@@ -339,33 +340,34 @@ 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
-                     'configure 'set-cross-compile
-                   (lambda* (#:key target outputs #:allow-other-keys)
-                     (setenv "CROSS_COMPILE" (string-append target "-"))
-                     (setenv "CONFIGURE_TARGET_ARCH"
-                             (cond
-                              ((string-prefix? "i586" target)
-                               "hurd-x86")
-                              ((string-prefix? "i686" target)
-                               "linux-x86")
-                              ((string-prefix? "x86_64" target)
-                               "linux-x86_64")
-                              ((string-prefix? "mips64el" target)
-                               "linux-mips64")
-                              ((string-prefix? "arm" target)
-                               "linux-armv4")
-                              ((string-prefix? "aarch64" target)
-                               "linux-aarch64")
-                              ((string-prefix? "powerpc64le" target)
-                               "linux-ppc64le")
-                              ((string-prefix? "powerpc64" target)
-                               "linux-ppc64")
-                              ((string-prefix? "powerpc" target)
-                               "linux-ppc"))))))
-               '())
+         #$@(if (%current-target-system)
+                #~((add-before
+                       'configure 'set-cross-compile
+                     (lambda* (#:key target outputs #:allow-other-keys)
+                       (setenv "CROSS_COMPILE" (string-append target "-"))
+                       (setenv "CONFIGURE_TARGET_ARCH"
+                               (cond
+                                ((string-prefix? "i586" target)
+                                 "hurd-x86")
+                                ((string-prefix? "i686" target)
+                                 "linux-x86")
+                                ((string-prefix? "x86_64" target)
+                                 "linux-x86_64")
+                                ((string-prefix? "mips64el" target)
+                                 "linux-mips64")
+                                ((string-prefix? "arm" target)
+                                 "linux-armv4")
+                                ((string-prefix? "aarch64" target)
+                                 "linux-aarch64")
+                                ((string-prefix? "powerpc64le" target)
+                                 "linux-ppc64le")
+                                ((string-prefix? "powerpc64" target)
+                                 "linux-ppc64")
+                                ((string-prefix? "powerpc" target)
+                                 "linux-ppc"))))))
+                #~())
          (replace 'configure
            (lambda* (#:key outputs configure-flags #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -376,9 +378,9 @@ required structures.")
                   (string-append (assoc-ref %build-inputs "coreutils")
                                  "/bin/env")))
                (apply
-                invoke ,@(if (%current-target-system)
-                             '("./Configure")
-                             '("./config"))
+                invoke #$@(if (%current-target-system)
+                              #~("./Configure")
+                              #~("./config"))
                 "shared"    ;build shared libraries
                 "--libdir=lib"
 
@@ -387,13 +389,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"))
+                       #~())
                 configure-flags)
                ;; Output the configure variables.
                (invoke "perl" "configdata.pm" "--dump"))))
@@ -428,7 +430,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
@@ -473,7 +475,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")))
@@ -496,9 +498,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"
 
@@ -506,12 +508,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)
@@ -536,7 +538,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