GNU bug report logs - #36477
Add Guix System cross-compilation support

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>

Date: Tue, 2 Jul 2019 15:19:02 UTC

Severity: normal

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mathieu Othacehe <m.othacehe <at> gmail.com>
To: 36477 <at> debbugs.gnu.org
Cc: mbakke <at> fastmail.com, Mathieu Othacehe <m.othacehe <at> gmail.com>, ludo <at> gnu.org
Subject: [bug#36477] [PATCH v3 01/48] gnu: libgpg-error: Fix cross compilation.
Date: Mon,  2 Sep 2019 17:32:46 +0200
* 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 | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 95a35368fa..c7e6aabf79 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -15,7 +15,7 @@
 ;;; Copyright © 2017 Petter <petter <at> mykolab.ch>
 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2018 Marius Bakke <mbakke <at> fastmail.com>
-;;; Copyright © 2018 Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -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
-- 
2.20.1





This bug report was last modified 5 years and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.