From patchwork Mon Sep 2 15:32:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15232 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 1D4A91734D; Mon, 2 Sep 2019 16:36:08 +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 DA64717329 for ; Mon, 2 Sep 2019 16:36:07 +0100 (BST) Received: from localhost ([::1]:37604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oNC-00030G-RN for patchwork@mira.cbaines.net; Mon, 02 Sep 2019 11:36:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41979) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oLH-0001M9-NO for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4oLG-0002be-LH for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49902) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4oLG-0002bA-GJ for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4oLG-0006Rf-Af for guix-patches@gnu.org; Mon, 02 Sep 2019 11:34:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v3 03/48] gnu: texinfo: Fix cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Sep 2019 15:34: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.156743843424620 (code B ref 36477); Mon, 02 Sep 2019 15:34:06 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Sep 2019 15:33:54 +0000 Received: from localhost ([127.0.0.1]:58692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oL4-0006P0-CY for submit@debbugs.gnu.org; Mon, 02 Sep 2019 11:33:54 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oL1-0006Nu-AR for 36477@debbugs.gnu.org; Mon, 02 Sep 2019 11:33:51 -0400 Received: by mail-wm1-f68.google.com with SMTP id c10so3138064wmc.0 for <36477@debbugs.gnu.org>; Mon, 02 Sep 2019 08:33:51 -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=Ajr8xf2vRDDxJ2Ol3st96lpfnw0F/3sbAMrDymCwnyc=; b=G9JNgFy/kPXx9QN3kl+7W15KcOZc62NKhDneAEG3rctx8dUw5/gTuEXpA3DTtz7Dl5 RRis1A5RXIJAJkhh+3yXclz9v8xToR6+NFN9Usjvyk5JAaYYKu4LOL6AhOf3XXshOJCe Yfv1ENfSJiRrzVGYniQPSDobbVYa6YYu0K43iZlcCA+2ALrKNbyyw4ZrSX36JesTV635 4phXpPped73Gk22jUYTJVQot9Eb5cNF++OFC6M8yGrNO6q57+vNQ19UXpkK/NJ0sneu0 25MFN/j+QZCMa4IGX1mCek9D1FbsjrMG4DCkT0x9kMofaOw//d2Y85HB937oJ82AP6dS fCbw== 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=Ajr8xf2vRDDxJ2Ol3st96lpfnw0F/3sbAMrDymCwnyc=; b=coKua2DZwsnf3eRkfaJ+4gu7VSs9dDkmO/DmciU6wF2Bq09cNAELcQhGy2UrGwZLWX rfqhyPAzByI1ku34kilEOs5V8V57yvkpz4ugob0RumHoNz0JRSdF8ZYdtdzeoPvlUzZ1 aR2KjinU0WIOvPVV/JVGR4SEDtY/qfd9dWgaTxerk/+D2SrKKSOkesz8+dAwXP9hUvIP g/sA/EPJW4QiH0iSET3FUI4NtqEgNloriheHFVyB7DibPiOFAvh6okLkzuGDwY7cNzd8 2KiCTYKxnAy74sWfY4v0WM9OzSpfoa6pD9YgCW6+hKnQ8weYaE1Ld9y++WBdr09Djori t2ZA== X-Gm-Message-State: APjAAAXyEjL96PnqbuCrNKggKJGRN4oCOMR8TMaQpZAYPdaxdKXPcYkT zivV0w5K6BhfB+2+B5/WpXNJA7IA X-Google-Smtp-Source: APXvYqyS/npEVLs7ziY2h4K2z/WDRgEY8uFNv44GS8tRQA93UN5z2ONmEohXL78pUGHUB4FpiRBZfA== X-Received: by 2002:a1c:1aca:: with SMTP id a193mr1882468wma.120.1567438425528; Mon, 02 Sep 2019 08:33:45 -0700 (PDT) Received: from localhost.localdomain ([80.12.63.115]) by smtp.gmail.com with ESMTPSA id b26sm17232265wmj.14.2019.09.02.08.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 08:33:45 -0700 (PDT) From: Mathieu Othacehe Date: Mon, 2 Sep 2019 17:32:48 +0200 Message-Id: <20190902153333.11190-4-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/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 befdd78551..c93c7fc353 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -41,8 +41,28 @@ (base32 "0rixv4c301djr0d0cnsxs8c1wjndi6bf9vi5axz6mwjkv80cmfcv")))) (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.