From patchwork Wed Oct 2 09:58:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15565 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 BDA7E1749F; Wed, 2 Oct 2019 11:01:26 +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 81F691749D for ; Wed, 2 Oct 2019 11:01:26 +0100 (BST) Received: from localhost ([::1]:53154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbRl-0004Z8-2d for patchwork@mira.cbaines.net; Wed, 02 Oct 2019 06:01:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51112) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbQb-0003n4-UD for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFbQa-00009C-M2 for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:13 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54921) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFbQa-000093-IB for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:12 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iFbQa-0000a8-Fj for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:12 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v4 11/23] gnu: git: Fix cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 02 Oct 2019 10:00:12 +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 Cc: Mathieu Othacehe Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.15700103861897 (code B ref 36477); Wed, 02 Oct 2019 10:00:12 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Oct 2019 09:59:46 +0000 Received: from localhost ([127.0.0.1]:35465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbQA-0000UR-0i for submit@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:46 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:36240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbQ2-0000Sn-7N for 36477@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:38 -0400 Received: by mail-wr1-f45.google.com with SMTP id y19so18915822wrd.3 for <36477@debbugs.gnu.org>; Wed, 02 Oct 2019 02:59:38 -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=JBAmS30eGz9uKxS+VCM5cx8on0WnEsVZH7Tw8ALKKPg=; b=ZHwVzFAjP8JptVDPu+3zD7AoChgRr+ItzFeaJrBOwn3gy8FsTv4UHoFvIXhP83wvKk q2n1qw6HJLNkWdXcCGRULUl7uqvIWGigYKIAWzrKsxhzIMaCzoxruFX6PrOc/S0YY0vi hmAA3+B791tvz8EC3q1mmjIB+5VDJjS2wf/T+3AhT4z5Vm2TDDHjM+mxUoCrCxgGETWY Xs727l6PnylN3YRqnzyovTlnjYUR1BLT9a9SOnLyBIF5IVhv1qDi/CeZ5bzLS0Pg1Yip +DgzYg6tneUmgBJhxvfK3gfef4gAq9yE066CFm5w+QL7mZ0XOCJzV6X4B6t4+/b4L0gj Lexg== 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=JBAmS30eGz9uKxS+VCM5cx8on0WnEsVZH7Tw8ALKKPg=; b=lWFSoBPQudTMhny6PZ5Va2kveMTfdczdmuWhLkxYYMYzigrzPfCj4COnlMhV3C0Tut n4SPZZGAnm5O9DVrw4G1H6VX+ZvDVSbQl4AiSIy2mWPZsQqxod7Y+ksRNEPTFM7efjBE 8BmKb7dQ8dWSK+WUexewvXE8iCpENUjU0BrUylnv4cunt/G/c1LIFNj/ZcdWrY8K+/e0 Quz/dSJPckpLd4kJjbponbICWYoeSHQLyx074fkYlsOebYkxo0jkAknxtt5cRrFkPhYl FdyoUDwtrxae4ATB09+qVq99sAcgSpingnwHUlERj9E84tv5S2EqKCeyXYrLgU07n5Rq aTPw== X-Gm-Message-State: APjAAAVcDc3fCjfQDJ1JIl7ygT0cy+FUpZJkhKYp8R/WKBVePKfXyQH6 oA6viI7perX0mR8wMl5Xei1Td0Wk X-Google-Smtp-Source: APXvYqwSKdv76qHF1XhuF3TLMrLSWo1CHUd2lDR9iJd0RbE/8FhoiNstxTto864hzcHTUa+mpHyFXQ== X-Received: by 2002:a5d:52c5:: with SMTP id r5mr1991475wrv.160.1570010371394; Wed, 02 Oct 2019 02:59:31 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:fa:a50:21e:67ff:fe5b:4283]) by smtp.gmail.com with ESMTPSA id w12sm29621318wrg.47.2019.10.02.02.59.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 02:59:30 -0700 (PDT) From: Mathieu Othacehe Date: Wed, 2 Oct 2019 11:58:52 +0200 Message-Id: <20191002095904.6325-12-m.othacehe@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191002095904.6325-1-m.othacehe@gmail.com> References: <20191002095904.6325-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: , 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"))