aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/gnupg.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/gnupg.scm')
-rw-r--r--gnu/packages/gnupg.scm60
1 files changed, 44 insertions, 16 deletions
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index b31280e39b..4e8869a658 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -97,6 +98,31 @@
(("namespace=errnos") "pkg_namespace=errnos"))
#t))))
(build-system gnu-build-system)
+ (arguments
+ (if (%current-target-system)
+ `(#:modules ((ice-9 match)
+ (guix build gnu-build-system)
+ (guix build utils))
+ #:phases
+ (modify-phases %standard-phases
+ ;; When cross-compiling, some platform specific properties cannot
+ ;; be detected. Create a symlink to the appropriate platform
+ ;; file. See Cross-Compiling section at:
+ ;; https://github.com/gpg/libgpg-error/blob/master/README
+ (add-after 'unpack 'cross-symlinks
+ (lambda* (#:key target inputs #:allow-other-keys)
+ (let ((triplet
+ (match (string-take target
+ (string-index target #\-))
+ ("armhf" "arm-unknown-linux-gnueabi")
+ (x
+ (string-append x "-unknown-linux-gnu")))))
+ (symlink
+ (string-append "lock-obj-pub." triplet ".h")
+ "src/syscfg/lock-obj-pub.linux-gnu.h"))
+ #t))))
+ '()))
+ (native-inputs `(("gettext" ,gettext-minimal)))
(home-page "https://gnupg.org")
(synopsis "Library of error values for GnuPG components")
(description
@@ -111,15 +137,14 @@ Daemon and possibly more in the future.")
(define-public libgcrypt
(package
(name "libgcrypt")
- (version "1.8.4")
- (replacement libgcrypt-1.8.5)
+ (version "1.8.5")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
version ".tar.bz2"))
(sha256
(base32
- "09r27ywj9zplq6n9qw3mn7zmvf6y2jdmwx5d1kg8yqkj0qx18f7n"))))
+ "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv"))))
(build-system gnu-build-system)
(propagated-inputs
`(("libgpg-error-host" ,libgpg-error)))
@@ -145,18 +170,6 @@ generation.")
(properties '((ftp-server . "ftp.gnupg.org")
(ftp-directory . "/gcrypt/libgcrypt")))))
-(define-public libgcrypt-1.8.5
- (package
- (inherit libgcrypt)
- (version "1.8.5")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
- version ".tar.bz2"))
- (sha256
- (base32
- "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv"))))))
-
(define-public libassuan
(package
(name "libassuan")
@@ -468,11 +481,26 @@ gpgpme starting with version 1.7.")
"0n232iyayc46f7hywmjw0jr7pbmmz5h4b04jskhkzz9gxz0ci99c"))
(file-name (string-append name "-" version "-checkout"))))
(build-system gnu-build-system)
+ (arguments
+ ;; When cross-compiling, the bash script libgcrypt-config provided by
+ ;; libgcrypt must be accessible during configure phase.
+ `(,@(if (%current-target-system)
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'add-libgrypt-config
+ (lambda _
+ (setenv "PATH" (string-append
+ (assoc-ref %build-inputs "libgcrypt")
+ "/bin:"
+ (getenv "PATH")))
+ #t))))
+ '())))
(native-inputs
`(("pkg-config" ,pkg-config)
("autoconf" ,autoconf)
("automake" ,automake)
- ("texinfo" ,texinfo)))
+ ("texinfo" ,texinfo)
+ ("guile" ,guile-2.2)))
(inputs
`(("guile" ,guile-2.2)
("libgcrypt" ,libgcrypt)))