From patchwork Mon Sep 2 15:33:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15231 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BF3671734D; Mon, 2 Sep 2019 16:35:59 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 80D4517329 for ; Mon, 2 Sep 2019 16:35:59 +0100 (BST) Received: from localhost ([::1]:37596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oN4-0002py-Jf for patchwork@mira.cbaines.net; Mon, 02 Sep 2019 11:35:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42613) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oMG-0002Ee-He for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4oME-0004Jc-9T for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50029) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4oME-0004JD-6T for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4oME-0006d3-2V for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v3 22/48] gnu: git: Fix cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Sep 2019 15:35:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36477 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 36477@debbugs.gnu.org Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.156743847125138 (code B ref 36477); Mon, 02 Sep 2019 15:35:06 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Sep 2019 15:34:31 +0000 Received: from localhost ([127.0.0.1]:58779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oLe-0006XH-U9 for submit@debbugs.gnu.org; Mon, 02 Sep 2019 11:34:31 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oLL-0006Rb-2v for 36477@debbugs.gnu.org; Mon, 02 Sep 2019 11:34:11 -0400 Received: by mail-wr1-f65.google.com with SMTP id g7so14486489wrx.2 for <36477@debbugs.gnu.org>; Mon, 02 Sep 2019 08:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4Y/ydxnmL4y0uCr03V0jUgPtiBT/HQ4Ex9qdOFEtzwE=; b=V5XrbOf9CAaaihrEL0EdOBve8kJFn/0tWnPXD/l7jP4U5eMAYR4juGS58JYpq7byqc ZznqtnIK1Ygx13f2646WTNG5niJ26h3Cqg9c+J6ZL9s+5wFi43b3QGtWVWpzxjgICIwj YvalFYQ0Hsjku3fQ62R11SNbiJzmBnmmldudbwPOfnWWdruSjBKS+ZF1a8eBLZ8MUX0s OBX/gLPcPQegAqAF7sAdaHqL9Zjh9FJgYGde0gUSSJ4Au6H5Gq+N6i7B7Hf1479Aj2/P QxhrDu0np3fQ0gUrrRHWPWQEl+Y6/AY3BjSTt2svQsK4DIGPq35AdSVudbUg3TvsD3OT S4Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4Y/ydxnmL4y0uCr03V0jUgPtiBT/HQ4Ex9qdOFEtzwE=; b=Kh37Pf2lKEmMl9t01to0bCM6P+bKl7QTdaL6FJNsRspVd/V4Kuq2/m131WDnisCrwa jfvPNm2GoPheLupD7WRffUN0TkU1pP4/AiBe4owOM2m/l4e2z3gFgtWz3+NE1A3GZHCe sysDX5zECoqVRc65xjcc5IQMkR9CdJBD42XzkWuQrES7r4JJo6BLcWXSmqupoLAw9pgk X5Lg4yU8BGGPPb+HoDBMegnLDxxWR/wtYFWgEIluaGXetBsYDsgnSyod7kJgcq6ZCybY czCQhFNYTuG1k9YKYC5SizN4TE0ggxg9EeTebvNsYhQZ21jdEstPquB5UR0sHpmLgjg8 6cMg== X-Gm-Message-State: APjAAAWsEkxKJdrhsVCRK3jnyEe3D+ZdQ94Zn/qeXaFJ2ibZrDWoY2IZ 4jGtd5M0Bu8dVVibzPcOkIlNDHsJ X-Google-Smtp-Source: APXvYqz6uUz3L0PeQYTLUAtGySdfE1C6TPaSpfIOzuWvaJzcB/cZkoaKX9srq98iYClcLawJdL//iw== X-Received: by 2002:a5d:6588:: with SMTP id q8mr16714705wru.184.1567438445182; Mon, 02 Sep 2019 08:34:05 -0700 (PDT) Received: from localhost.localdomain ([80.12.63.115]) by smtp.gmail.com with ESMTPSA id b26sm17232265wmj.14.2019.09.02.08.34.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 08:34:04 -0700 (PDT) From: Mathieu Othacehe Date: Mon, 2 Sep 2019 17:33:07 +0200 Message-Id: <20190902153333.11190-23-m.othacehe@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190902153333.11190-1-m.othacehe@gmail.com> References: <20190902153333.11190-1-m.othacehe@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mathieu Othacehe Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/version-control.scm (git-cross-configure-flags): New variable, (git)[arguments]: add it to configure-flags. Also add cross curl-config script to PATH. (git-minimal): Add previous variable to configure-flags. --- gnu/packages/version-control.scm | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 192fa666d9..947873e6d5 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -141,6 +141,10 @@ changes to project files over time. It supports both a distributed workflow as well as the classic centralized workflow.") (license license:gpl2+))) +(define git-cross-configure-flags + '("ac_cv_fread_reads_directories=yes" + "ac_cv_snprintf_returns_bogus=no")) + (define-public git (package (name "git") @@ -233,7 +237,10 @@ as well as the classic centralized workflow.") ;; absolute file name to 'wish'. #:configure-flags (list (string-append "--with-tcltk=" (assoc-ref %build-inputs "tk") - "/bin/wish8.6")) ; XXX + "/bin/wish8.6") ; XXX + ,@(if (%current-target-system) + git-cross-configure-flags + '())) #:modules ((srfi srfi-1) (srfi srfi-26) @@ -250,6 +257,15 @@ as well as the classic centralized workflow.") (remove (cut string-prefix? bash-full <>) path) ":")) #t))) + ;; Add cross curl-config script to PATH when cross-compiling. + ,@(if (%current-target-system) + '((add-before 'configure 'add-cross-curl-config + (lambda* (#:key inputs #:allow-other-keys) + (setenv "PATH" + (string-append (assoc-ref inputs "curl") "/bin:" + (getenv "PATH"))) + #t))) + '()) (add-after 'configure 'patch-makefiles (lambda _ (substitute* "Makefile" @@ -506,7 +522,10 @@ everything from small to very large projects with speed and efficiency.") (string-append out "/share/gitweb")) #t))))) ((#:configure-flags flags) - ''()) + `(list + ,@(if (%current-target-system) + git-cross-configure-flags + '()))) ((#:disallowed-references lst '()) `(,perl ,@lst)))) (outputs '("out"))