From c45a821a63b73e1655314c028315114f34b26417 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 27 Jan 2021 11:51:43 +0100 Subject: gnu: guile-gcrypt: Refer to the right libgcrypt when cross-compiling. Fixes a regression introduced in 5e163ba00969e7ba05897840a1199b967252b4ae where (gcrypt package-config) would end up referring to the native libgcrypt.so instead of the target one. * gnu/packages/gnupg.scm (guile-gcrypt)[arguments]: Reintroduce 'add-libgrypt-config' phase. [native-inputs]: Remove LIBGCRYPT. --- gnu/packages/gnupg.scm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'gnu/packages/gnupg.scm') diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 5c8207e875..6e80ca339f 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -436,14 +436,24 @@ gpgpme starting with version 1.7.") (arguments ;; Work around to achieve reproducible ;; builds. - '(#:parallel-build? #f)) + '(#:parallel-build? #f + + #:phases + (modify-phases %standard-phases + (add-before 'configure 'add-libgrypt-config + (lambda* (#:key inputs target #:allow-other-keys) + (when target + ;; When cross-compiling, the bash script 'libgcrypt-config' + ;; must be accessible during the configure phase. + (setenv "PATH" + (string-append (assoc-ref inputs "libgcrypt") + "/bin:" (getenv "PATH"))))))))) (native-inputs `(("pkg-config" ,pkg-config) ("autoconf" ,autoconf) ("automake" ,automake) ("texinfo" ,texinfo) - ("guile" ,guile-3.0) - ("libgcrypt" ,libgcrypt))) ;for 'libgcrypt-config' + ("guile" ,guile-3.0))) (inputs `(("guile" ,guile-3.0) ("libgcrypt" ,libgcrypt))) -- cgit 1.4.1