guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: gnu: mbedtls-apache-for-hiawatha: Fix.


From: guix-commits
Subject: 01/03: gnu: mbedtls-apache-for-hiawatha: Fix.
Date: Mon, 13 Jul 2020 21:57:26 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit 5cdb25c6866014b2c7a7bca64c07712f328486f5
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Tue Jul 14 03:50:47 2020 +0200

    gnu: mbedtls-apache-for-hiawatha: Fix.
    
    There's already a custom embedtls-apache variant for Hiawatha.
    Fix it instead of enabling threading for embedtls-apache.
    
    * gnu/packages/tls.scm (embedtls-for-hiawatha): Fix usage of
    SUBSTITUTE-KEYWORD-ARGUMENTS.  Disable -Wformat-signedness.
    (embedtls-for-hiawatha): Remove ‘enable-features’ phase.
---
 gnu/packages/tls.scm | 38 +++++++++++++++-----------------------
 1 file changed, 15 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 1003ae8..408a9e1 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -891,7 +891,8 @@ then ported to the GNU / Linux environment.")
 (define-public mbedtls-apache
   (package
     (name "mbedtls-apache")
-    ;; XXX Check whether ‘-Wformat-signedness’ below still breaks when 
updating.
+    ;; XXX Check whether ‘-Wformat-signedness’ still breaks 
mbedtls-for-hiawatha
+    ;; when updating.
     (version "2.23.0")
     (source
      (origin
@@ -912,17 +913,6 @@ then ported to the GNU / Linux environment.")
          (add-after 'unpack 'make-source-writable
            (lambda _
              (for-each make-file-writable (find-files "."))
-             #t))
-         (add-before 'configure 'enable-features
-           ;; Some packages like Hiawatha depend on ’less embedded’ features.
-           (lambda _
-             (substitute* "include/mbedtls/config.h"
-               (("//(#define MBEDTLS_THREADING_(C|PTHREAD))"
-                 _ match)
-                match))
-             ;; XXX The above enables code that breaks with -Werror…
-             (substitute* "CMakeLists.txt"
-               ((" -Wformat-signedness") ""))
              #t)))))
     (native-inputs
      `(("perl" ,perl)
@@ -942,17 +932,19 @@ coding footprint.")
    (package
      (inherit mbedtls-apache)
      (arguments
-      (substitute-keyword-arguments
-          `(#:phases
-            (modify-phases %standard-phases
-              (add-after 'configure 'configure-extra-features
-                (lambda _
-                  (for-each (lambda (feature)
-                              (invoke "scripts/config.pl" "set" feature))
-                            (list "MBEDTLS_THREADING_C"
-                                  "MBEDTLS_THREADING_PTHREAD"))
-                  #t)))
-            ,@(package-arguments mbedtls-apache)))))))
+      (substitute-keyword-arguments (package-arguments mbedtls-apache)
+        ((#:phases phases)
+         `(modify-phases ,phases
+            (add-before 'configure 'configure-extra-features
+              (lambda _
+                (for-each (lambda (feature)
+                            (invoke "scripts/config.pl" "set" feature))
+                          (list "MBEDTLS_THREADING_C"
+                                "MBEDTLS_THREADING_PTHREAD"))
+                ;; XXX The above enables code that breaks with -Werror…
+                (substitute* "CMakeLists.txt"
+                  ((" -Wformat-signedness") ""))
+                #t)))))))))
 
 (define-public dehydrated
   (package



reply via email to

[Prev in Thread] Current Thread [Next in Thread]