guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: libgpg-error: Fix cross compilation.


From: guix-commits
Subject: 01/01: gnu: libgpg-error: Fix cross compilation.
Date: Fri, 20 Sep 2019 03:31:27 -0400 (EDT)

mothacehe pushed a commit to branch core-updates-next
in repository guix.

commit 91acbda224d0f6bb89de067009ce8f8ffc9b281d
Author: Mathieu Othacehe <address@hidden>
Date:   Fri Sep 20 09:30:24 2019 +0200

    gnu: libgpg-error: Fix cross compilation.
    
    * gnu/packages/gnupg.scm (libgpg-error)[arguments]: Add a lock-obj header to
    the target platform when cross-compiling,
    [native-inputs]: add gettext that is needed when cross-compiling.
---
 gnu/packages/gnupg.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 2c67c01..0367bf7 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -96,6 +96,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



reply via email to

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