summary refs log tree commit diff
path: root/gnu/packages/tls.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-10-04 14:55:49 +0000
committerMathieu Othacehe <othacehe@gnu.org>2021-10-05 08:46:57 +0000
commit1a244b7814ed4ddb4a02a262e1a61022a506b963 (patch)
tree5fa013863a64d1002fe9717a397b324f2fedafc1 /gnu/packages/tls.scm
parent9211d4324c2f981ce8aa83c2906cbce6aeb99f7b (diff)
downloadguix-1a244b7814ed4ddb4a02a262e1a61022a506b963.tar.gz
gnu: p11-kit: Fix Hurd build.
* gnu/packages/patches/p11-kit-hurd.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/tls.scm (p11-kit)[native-inputs]: Add autoconf, automake,
gettext and libtool when targeting Hurd.
[inputs]: Add libbsd and hurd-patch when targeting hurd.
[arguments]: Add 'apply-hurd-patch and 'bootstrap phases when targeting Hurd.
Diffstat (limited to 'gnu/packages/tls.scm')
-rw-r--r--gnu/packages/tls.scm23
1 files changed, 22 insertions, 1 deletions
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index c73559cb73..9e2b4419bd 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -57,6 +57,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages dns)
   #:use-module (gnu packages gawk)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages hurd)
   #:use-module (gnu packages libbsd)
@@ -143,13 +144,33 @@ in intelligent transportation networks.")
        (base32 "1dn6br4v033d3gp2max9lsr3y4q0nj6iyr1yq3kzi8ym7lal13wa"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(,@(if (hurd-target?)
+             `(("autoconf" ,autoconf)
+               ("automake" ,automake)
+               ("gettext" ,gettext-minimal) ;for autopoint
+               ("libtool" ,libtool))
+             '())
+       ("pkg-config" ,pkg-config)))
     (inputs
      `(("libffi" ,libffi)
+       ,@(if (hurd-target?)
+             `(("libbsd" ,libbsd)
+               ("hurd-patch" ,(search-patch "p11-kit-hurd.patch")))
+             '())
        ("libtasn1" ,libtasn1)))
     (arguments
      `(#:configure-flags '("--without-trust-paths")
        #:phases (modify-phases %standard-phases
+                  ,@(if (hurd-target?)
+                        '((add-after 'unpack 'apply-hurd-patch
+                            (lambda* (#:key inputs #:allow-other-keys)
+                              (let ((patch (assoc-ref inputs "hurd-patch")))
+                                (invoke "patch" "-p1" "--batch" "-i"
+                                        patch))))
+                          (replace 'bootstrap
+                            (lambda _
+                              (invoke "autoreconf" "-fiv"))))
+                        '())
                   (add-before 'check 'prepare-tests
                     (lambda _
                       ;; "test-runtime" expects XDG_RUNTIME_DIR to be set up