From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:54995) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkQRY-0005RK-53 for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkQRW-0003Cg-Mb for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:20 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49060) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkQRW-0003CY-IC for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:18 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkQRW-0004vU-Ex for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:18 -0400 Subject: [bug#36477] [PATCH 21/31] gnu: mit-krb5: Fix cross-compilation. Resent-Message-ID: From: Mathieu Othacehe Date: Mon, 8 Jul 2019 11:59:03 +0200 Message-Id: <20190708095913.3460-22-m.othacehe@gmail.com> In-Reply-To: <20190708095913.3460-1-m.othacehe@gmail.com> References: <20190708095913.3460-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/kerberos.scm (mit-krb5)[arguments]: Disable tests when cross-compiling. Add cross-compilation specific configure-flags and make-flags. Search for perl in native-inputs or inputs. --- gnu/packages/kerberos.scm | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm index 873f5d8a37..8be4bd1ccc 100644 --- a/gnu/packages/kerberos.scm +++ b/gnu/packages/kerberos.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2017 Alex Vong +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -68,9 +69,23 @@ ("perl" ,perl))) (arguments `(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call - ;; while running the tests in 'src/tests'. - #:tests? ,(string=? (%current-system) "x86_64-linux") + ;; while running the tests in 'src/tests'. Also disable tests when + ;; cross-compiling. + #:tests? ,(and (not (%current-target-system)) + (string=? (%current-system) "x86_64-linux")) + #:configure-flags + (list ,@(if (%current-target-system) + '("krb5_cv_attr_constructor_destructor=yes" + "ac_cv_func_regcomp=yes" + "ac_cv_printf_positional=yes" + "ac_cv_file__etc_environment=yes" + "ac_cv_file__etc_TIMEZONE=no") + '())) + #:make-flags + (list ,@(if (%current-target-system) + '("CFLAGS+=-DDESTRUCTOR_ATTR_WORKS=1") + '())) #:phases (modify-phases %standard-phases (add-after 'unpack 'enter-source-directory @@ -78,8 +93,8 @@ (chdir "src") #t)) (add-before 'check 'pre-check - (lambda* (#:key inputs #:allow-other-keys) - (let ((perl (assoc-ref inputs "perl"))) + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((perl (assoc-ref (or native-inputs inputs) "perl"))) (substitute* "plugins/kdb/db2/libdb2/test/run.test" (("/bin/cat") (string-append perl "/bin/perl")) (("D/bin/sh") (string-append "D" (which "sh"))) -- 2.17.1