From patchwork Mon Jul 8 09:58:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 14512 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 6B522171D5; Mon, 8 Jul 2019 11:00:52 +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 3235E171D2 for ; Mon, 8 Jul 2019 11:00:52 +0100 (BST) Received: from localhost ([::1]:40002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkQRv-0005Ua-SH for patchwork@mira.cbaines.net; Mon, 08 Jul 2019 06:00:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54830) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkQRS-0005EU-Al for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkQRR-00036M-6w for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:14 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49044) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkQRR-00036E-31 for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:13 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkQRQ-0004tu-Rk for guix-patches@gnu.org; Mon, 08 Jul 2019 06:00:12 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH 11/31] gnu: texinfo: Fix cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Jul 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 Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.156257998918529 (code B ref 36477); Mon, 08 Jul 2019 10:00:12 +0000 Received: (at 36477) by debbugs.gnu.org; 8 Jul 2019 09:59:49 +0000 Received: from localhost ([127.0.0.1]:57814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkQR2-0004of-Ck for submit@debbugs.gnu.org; Mon, 08 Jul 2019 05:59:48 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkQQu-0004le-0g for 36477@debbugs.gnu.org; Mon, 08 Jul 2019 05:59:40 -0400 Received: by mail-wr1-f68.google.com with SMTP id p13so16307778wru.10 for <36477@debbugs.gnu.org>; Mon, 08 Jul 2019 02:59:39 -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; bh=DOxMSgg2WGPwxlricP6bTgOv198KMI+3refWBLSNE7U=; b=CG/C/m1aHNNK+kWhBXK9WgyFyBiM76npoCtxFUYOcCKTWMbttquVLSNcoh9ZCWSo47 /A5KUs2jslm2IcEv4hZ4EbODISeJowZL5BDybM2Uz0hu8bBGKXoxGwqR3Vb69XDfZdZz 6uDQR20l4PeO4tDGHd4v071gOMLUQ+fYoNCKVjuVhw9H7ZIq6Ev6IPYLxJeat6ZYDawh EvOj7ci9b/jBGYn2ZX2V27zM4G5kx/ZJe3N0ZUbRO4K3zqStzIslmlSviRWgbUd6EF/Y BlusSG/cBSDp6In4Hc5+nTUfPqTa9OnhAdZ8FQlHuM7Lz1fbNh/K25f0nuBdIAb9sM8v W9rg== 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; bh=DOxMSgg2WGPwxlricP6bTgOv198KMI+3refWBLSNE7U=; b=DfDXZ3dpqw53jvmEhEgeCoNNgg97MioE0A/w0H4hVfMx+Zn7rKEG18SkdQqqWAO3Ct zx/jJkmroIceqMjNbYkTy81Y24gJcXDhVYM/wr++7tQcfmru/mYX+ZQS0KZMcM+wAB3P 8J7LBQfuqeATQNupBbPD7M+cK1HgAQanR4TbE8+OLp+rN8z/aX1h40GYPZVO+9TWXAO5 W6EHnQIJbfbscwzZPMRfSxO3VSIAHeqd6na7by1nJFLtLDfWGv+3Y+F8lez1LpCxwbXS h2oaNgfqHVO65OmQr+aYIf3M1MPgK8K7uU8BG1BmhgqrVNIS8EjqaMlDAMSv7+7/iU6i TCfA== X-Gm-Message-State: APjAAAVrb73q1RrYbfVFmdmTMAhW+Ns55KfQlyv5KUUL4ivzzCrFVMoS cbHF4xI9A4Hvftzwi5xT3cft1IbF X-Google-Smtp-Source: APXvYqxaeqo++zlbjIC3Nx7shM7Ehi/vu6uqzjfdVcCBf/5kanYWvG5xEtuO/T82Y04k3lUHN/Tzsw== X-Received: by 2002:adf:e705:: with SMTP id c5mr18675581wrm.270.1562579973729; Mon, 08 Jul 2019 02:59:33 -0700 (PDT) Received: from fuji.Parrot.Biz (smtp.parrot.biz. [62.23.167.188]) by smtp.gmail.com with ESMTPSA id i66sm3165127wmi.11.2019.07.08.02.59.32 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 08 Jul 2019 02:59:33 -0700 (PDT) From: Mathieu Othacehe Date: Mon, 8 Jul 2019 11:58:53 +0200 Message-Id: <20190708095913.3460-12-m.othacehe@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190708095913.3460-1-m.othacehe@gmail.com> References: <20190708095913.3460-1-m.othacehe@gmail.com> 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/texinfo.scm (texinfo)[arguments]: Do not reset environment before running configure with the native compiler, in a cross-compilation context, [inputs]: move perl from here ... [native-inputs]: ... to here. Also add ncurses that is needed in a cross-compilation context to build texinfo native tools. --- gnu/packages/texinfo.scm | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index fa98bd56b8..36bb9132d9 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -42,8 +42,28 @@ (base32 "0qjzvbvnv9003xdrcpi3jp7y68j4hq2ciw9frh2hghh698zlnxvp")))) (build-system gnu-build-system) - (inputs `(("ncurses" ,ncurses) - ("perl" ,perl))) + (arguments + ;; When cross-compiling, the package is configured twice: once with the + ;; native compiler and once with the cross-compiler. During the configure + ;; with the native compiler, the environment is reset. This leads to + ;; multiple environment variables missing. Do not reset the environment + ;; to prevent that. + `(,@(if (%current-target-system) + '(#:phases + (modify-phases %standard-phases + (add-before 'configure 'fix-cross-configure + (lambda _ + (substitute* "configure" + (("env -i") + "env ")) + #t)))) + '()))) + (inputs `(("ncurses" ,ncurses))) + ;; When cross-compiling, texinfo will build some of it's own binaries with + ;; the native compiler. This means ncurses is needed both in both inputs + ;; and native-inputs. + (native-inputs `(("perl" ,perl) + ("ncurses" ,ncurses))) (native-search-paths ;; This is the variable used by the standalone Info reader.