guix-commits
[Top][All Lists]
Advanced

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

04/06: gnu: libcacard: Update to 2.8.0.


From: guix-commits
Subject: 04/06: gnu: libcacard: Update to 2.8.0.
Date: Sun, 13 Jun 2021 09:41:32 -0400 (EDT)

mbakke pushed a commit to branch master
in repository guix.

commit 84b238c8f23a9379fccdede66034836ef8a29e1d
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Sun Jun 13 14:52:08 2021 +0200

    gnu: libcacard: Update to 2.8.0.
    
    * gnu/packages/patches/libcacard-unknown-variable.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
    * gnu/packages/spice.scm (libcacard): Update to 2.8.0.
    [source](patches): New field.
    [arguments]: Remove trailing #t.
---
 gnu/local.mk                                       |  1 +
 .../patches/libcacard-unknown-variable.patch       | 50 ++++++++++++++++++++++
 gnu/packages/spice.scm                             | 12 +++---
 3 files changed, 57 insertions(+), 6 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 73556cc..db6cd96 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1324,6 +1324,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/libbonobo-activation-test-race.patch    \
   %D%/packages/patches/libcaca-CVE-2021-3410-pt1.patch         \
   %D%/packages/patches/libcaca-CVE-2021-3410-pt2.patch         \
+  %D%/packages/patches/libcacard-unknown-variable.patch                \
   %D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \
   %D%/packages/patches/libcanberra-wayland-crash.patch \
   %D%/packages/patches/libcroco-CVE-2020-12825.patch           \
diff --git a/gnu/packages/patches/libcacard-unknown-variable.patch 
b/gnu/packages/patches/libcacard-unknown-variable.patch
new file mode 100644
index 0000000..830a3ee
--- /dev/null
+++ b/gnu/packages/patches/libcacard-unknown-variable.patch
@@ -0,0 +1,50 @@
+Fix Meson error when test dependencies are missing.
+
+Based on this upstream commit, with some adjustments to apply on 2.8.0:
+https://gitlab.freedesktop.org/spice/libcacard/-/commit/cf6121deb47e437aa566cfeb29a03da93c432394
+
+diff --git a/tests/meson.build b/tests/meson.build
+index 87945a2..baefaf5 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -9,15 +9,6 @@ modutil_dep = find_program('modutil', required: false)
+ openssl_dep = find_program('openssl', required: false)
+ softhsm_util_dep = find_program('softhsm2-util', required: false)
+ 
+-if pkcs11_tool_dep.found() and p11tool_dep.found() and modutil_dep.found() 
and openssl_dep.found() and softhsm_util_dep.found()
+-  softhsm = custom_target(
+-    'softhsm2.conf',
+-    command: find_program('setup-softhsm2.sh'),
+-    capture: true,
+-    output: 'setup-softhsm2.log',
+-  )
+-endif
+-
+ libcacard_test = executable(
+   'libcacard',
+   ['libcacard.c', 'common.c'],
+@@ -64,9 +55,18 @@ hwtests_test = executable(
+   dependencies: [libcacard_dep],
+ )
+ 
+-test(
+-  'hwtests',
+-  hwtests_test,
+-  depends: [softhsm],
+-  env: env,
+-)
++if pkcs11_tool_dep.found() and p11tool_dep.found() and modutil_dep.found() 
and openssl_dep.found() and softhsm_util_dep.found()
++  softhsm = custom_target(
++    'softhsm2.conf',
++    command: find_program('setup-softhsm2.sh'),
++    capture: true,
++    output: 'setup-softhsm2.log',
++  )
++
++  test(
++    'hwtests',
++    hwtests_test,
++    depends: [softhsm],
++    env: env,
++  )
++endif
diff --git a/gnu/packages/spice.scm b/gnu/packages/spice.scm
index 9833dda..561f4e4c 100644
--- a/gnu/packages/spice.scm
+++ b/gnu/packages/spice.scm
@@ -329,17 +329,18 @@ resolution scaling on graphical console window resize.")
 (define-public libcacard
   (package
     (name "libcacard")
-    (version "2.7.0")
+    (version "2.8.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
                     "https://gitlab.freedesktop.org/spice/libcacard/uploads/";
-                    "56cb2499198e78e560a1d4c716cd8ab1"
+                    "9d8f24b131bcbbd7846727ea92952cb5"
                     "/libcacard-" version ".tar.xz"))
+              (patches (search-patches "libcacard-unknown-variable.patch"))
               (sha256
                (base32
-                "0vyvkk4b6xjwq1ccggql13c1x7g4y90clpkqw28257azgn2a1c8n"))))
-    (build-system gnu-build-system)
+                "0azj3rqr2smg0lai24xrn3zr628xmjfrzcggay877zrr64ybj1c0"))))
+    (build-system meson-build-system)
     (arguments
      '(#:tests? #f                      ; TODO Tests require gnutls built with
                                         ; p11-kit
@@ -350,8 +351,7 @@ resolution scaling on graphical console window resize.")
              (substitute* "tests/setup-softhsm2.sh"
                (("\\/usr\\/lib64\\/pkcs11\\/libsofthsm2\\.so")
                 (string-append (assoc-ref inputs "softhsm")
-                               "/lib/softhsm/libsofthsm2.so")))
-             #t)))))
+                               "/lib/softhsm/libsofthsm2.so"))))))))
     (propagated-inputs
      `(("glib" ,glib)                   ; Requires: in the pkg-config file
        ("nss" ,nss)))                   ; Requires.private: in the pkg-config



reply via email to

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