From patchwork Wed Oct 2 09:58:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15563 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 A3FE21749E; Wed, 2 Oct 2019 11:01:20 +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 5E3861749E for ; Wed, 2 Oct 2019 11:01:20 +0100 (BST) Received: from localhost ([::1]:53152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbRf-0004TN-1R for patchwork@mira.cbaines.net; Wed, 02 Oct 2019 06:01:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51006) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbQW-0003i2-TW for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFbQV-0008Tf-QL for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54913) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFbQV-0008Tb-My for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iFbQV-0000YG-Mf for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v4 03/23] gnu: groff: 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:07 +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.15700103721776 (code B ref 36477); Wed, 02 Oct 2019 10:00:07 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Oct 2019 09:59:32 +0000 Received: from localhost ([127.0.0.1]:35441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbPv-0000SU-ON for submit@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:32 -0400 Received: from mail-wm1-f47.google.com ([209.85.128.47]:54629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbPr-0000RO-UT for 36477@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:28 -0400 Received: by mail-wm1-f47.google.com with SMTP id p7so6485050wmp.4 for <36477@debbugs.gnu.org>; Wed, 02 Oct 2019 02:59:27 -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=I2r7lgWbIpNroSEdP6SwJdKsGrlgbLjO8ONRgr2+d6U=; b=ZF0slDCb6rtLxzzbgPQ4774BdJQ06XyHtKCrGRO0P0U9nYBjuJ11oRh0G7q3V0idhC qKhgLvyMcmpn5+Uhg+ZtWiE8KJoKKvXAQaxPtpPv1AFckdSFBNAJ0IvZq8gan8+ScKz0 FfizVPL3hXhVeEs1Cu95XLoNrhmUyuWDRvzvoh88aOEEGcusa9Mx3bYS5d0svsGaRS4x my6wy9F0LibRqIJPfJoifPiiNEn403s3TNTnkwVYkEv/get3lcKLmbJ9RpsTgOBzMSi6 DmT+h+UjNF/8+E8ZUuuJ9xz5TIPlto4jriEgRwEOyoqLQlHqwOEs2aeNl4n9mzZXX2PL /2CA== 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=I2r7lgWbIpNroSEdP6SwJdKsGrlgbLjO8ONRgr2+d6U=; b=selIWkgk1KV4kvNFpvckHrsSMKjVIBGheFaJLrzv8qMHqv20CVQkDyJcHdfYW1FxIy zkg3iunr8j93CT609YdcK3cAKBSOLokCySXVb4XYWojsqbVzE4IBldEuCd3oUMdQ64Js Wm+Tb3cEuMxS9su5COU5ei/pB3wwUajrrItiKEu+PI202QoA00p3jc1lL4dl2QfkIcDz YjyUx0ictrtIjGQZFpu5oxRGLgnEn8U9FHh+gyGrlzoVOfg7C3wurZpLISwDVqOBChRq GR/6glxWzpCRlEhhAIkAEDWxisR7oNan7XpMuvEL2FXi56swOpAJVQLIaUmThkiOPOiK yQog== X-Gm-Message-State: APjAAAV3uloZY+UQtESAh6CIYA+zyN9uDofkcIc90MJD47Qj9p8wyAk8 X7NVNc6DdckG/Ht9XYCvuZH5Ywwl X-Google-Smtp-Source: APXvYqwSbhxXqV/2NKePq6LZ1Egj8rYhyR2A+9HWCDvgdc260K6waFwFFvFebX9Yk360J9QOCmaPgA== X-Received: by 2002:a1c:cfc9:: with SMTP id f192mr2047740wmg.85.1570010361911; Wed, 02 Oct 2019 02:59:21 -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.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 02:59:21 -0700 (PDT) From: Mathieu Othacehe Date: Wed, 2 Oct 2019 11:58:44 +0200 Message-Id: <20191002095904.6325-4-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/groff.scm (groff)[native-inputs]: Add self, [arguments]: set GROFF_BIN_PATH and GROFFBIN variables when cross-compiling. (groff-minimal)[native-inputs]: Add groff. --- gnu/packages/groff.scm | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm index 98f17914bf..5fe353a901 100644 --- a/gnu/packages/groff.scm +++ b/gnu/packages/groff.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017 Ludovic Courtès ;;; Copyright © 2019 Efraim Flashner ;;; Copyright © 2019 Eric Bavier +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -55,12 +56,28 @@ ;; from 'inputs'. (inputs `(("ghostscript" ,ghostscript))) - (native-inputs `(("bison" ,bison) + + ;; When cross-compiling, this package depends upon a native install of + ;; itself. + (native-inputs `(,@(if (%current-target-system) + `(("self" ,this-package)) + '()) + ("bison" ,bison) ("perl" ,perl) ("psutils" ,psutils) ("texinfo" ,texinfo))) (arguments `(#:parallel-build? #f ; parallel build fails + ,@(if (%current-target-system) + `(#:make-flags + ;; In groff-minimal package, that inherits from this package, + ;; we'll need to locate "groff" instead of "self". + (let ((groff (or (assoc-ref %build-host-inputs "groff") + (assoc-ref %build-host-inputs "self")))) + (list + (string-append "GROFF_BIN_PATH=" groff) + (string-append "GROFFBIN=" groff "/bin/groff")))) + '()) #:phases (modify-phases %standard-phases (add-after 'unpack 'disable-relocatability @@ -115,7 +132,8 @@ is usually the formatter of \"man\" documentation pages.") ;; Omit the DVI, PS, PDF, and HTML backends. (inputs '()) (native-inputs `(("bison" ,bison) - ("perl" ,perl))) + ("perl" ,perl) + ("groff" ,groff))) (arguments `(#:disallowed-references (,perl)