From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:58544) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0MPW-0006V3-NP for guix-patches@gnu.org; Wed, 21 Aug 2019 04:56:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0MPV-0005Dg-DO for guix-patches@gnu.org; Wed, 21 Aug 2019 04:56:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54068) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i0MPV-0005DV-8c for guix-patches@gnu.org; Wed, 21 Aug 2019 04:56:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i0MPV-0006Xm-5t for guix-patches@gnu.org; Wed, 21 Aug 2019 04:56:05 -0400 Subject: [bug#36477] [PATCH v2 07/61] gnu: libgpg-error: Fix cross compilation. Resent-Message-ID: From: Mathieu Othacehe Date: Wed, 21 Aug 2019 10:54:01 +0200 Message-Id: <20190821085455.18508-7-m.othacehe@gmail.com> In-Reply-To: <20190821085455.18508-1-m.othacehe@gmail.com> References: <20190821085455.18508-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36477@debbugs.gnu.org Cc: Mathieu Othacehe * 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 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018 Marius Bakke -;;; Copyright © 2018 Björn Höfling +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; 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.17.1