From patchwork Fri Apr 12 13:15:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 3275 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 4205316E5C; Fri, 12 Apr 2019 14:26:21 +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,URIBL_BLOCKED autolearn=ham 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 B992D16DEE for ; Fri, 12 Apr 2019 14:26:20 +0100 (BST) Received: from localhost ([127.0.0.1]:37299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEwCC-0005Nc-AJ for patchwork@mira.cbaines.net; Fri, 12 Apr 2019 09:26:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEw3P-000203-GL for guix-patches@gnu.org; Fri, 12 Apr 2019 09:17:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEw3L-00054z-0W for guix-patches@gnu.org; Fri, 12 Apr 2019 09:17:13 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42090) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hEw3E-00051m-4u for guix-patches@gnu.org; Fri, 12 Apr 2019 09:17:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hEw3D-0003MF-Vx for guix-patches@gnu.org; Fri, 12 Apr 2019 09:17:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35244] [PATCH 2/6] gnu: groff: Fix cross compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 Apr 2019 13:17:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35244 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35244@debbugs.gnu.org Received: via spool by 35244-submit@debbugs.gnu.org id=B35244.155507497712788 (code B ref 35244); Fri, 12 Apr 2019 13:17:03 +0000 Received: (at 35244) by debbugs.gnu.org; 12 Apr 2019 13:16:17 +0000 Received: from localhost ([127.0.0.1]:55625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hEw2Q-0003Jy-T7 for submit@debbugs.gnu.org; Fri, 12 Apr 2019 09:16:15 -0400 Received: from mail-wr1-f54.google.com ([209.85.221.54]:39598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hEw2L-0003JA-83 for 35244@debbugs.gnu.org; Fri, 12 Apr 2019 09:16:12 -0400 Received: by mail-wr1-f54.google.com with SMTP id j9so11916432wrn.6 for <35244@debbugs.gnu.org>; Fri, 12 Apr 2019 06:16:09 -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=Qev/i/e3Ck90jGWsFFru/WOFtE5ErVTPTWqOcqPMMkg=; b=oEnbpaOhFFGxK/FgvR3L2ff51BDEM/NqeH+hiilRgWhQWpHNfYZDWdRp8lWYhiUuyr xcXt2h1+4we07HkGZeqgin7KlBx5JbPKXOKwFT+Jga0I6C4tp9WPedsUFx0UDd5tnLCi jr33ID9NIRLUvEi7B4w1xauKgfFKLZKTjCyUS2KHaGEcRL32sOdEa0W/jM0qedbbFTPK OSl87G8fUNSHUl3e5KE8j4ymuGYnVfhPNIVc4GCem3QzwXc+zpfvhRi1klcwqWISsbJU cT3p9mR55UZW6j7lX7GhBGUrTrd45tZQB/8sOXVR8jCkKZUBO0jdAlZ1MhE9w9FTmgGF U7rg== 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=Qev/i/e3Ck90jGWsFFru/WOFtE5ErVTPTWqOcqPMMkg=; b=rQr27ZVI0CVIAkQjjlz3bm1M4XMmIPWNyGktHbeCfi8iH2q8lh3WfWMTQb5OufQKYN 4Z/FmkCPYasn1T+ID7d894GEhjZkgEreTM6Fy7oW0kOMqEmvqpKhdkxMNDiWMumA54+F oU3GcsPxuoR1Xxi3z029PpSDkyBGYlF5npwMUvc1w7IpzzLoRPwdWu56fznIodWOr858 bT/oOpD07kJteSkvcGOuKKkYd3Q83kpqOeOjNoe9fkcLNB1FxUGOt7T+SrqzvIwam0ZC JhzhIqbtL6EfDv553wqkZsLf0QLmtGpNPqw8JxmvHgKbStDwfsNW0ULKny6c4XQq+Xc1 tyTw== X-Gm-Message-State: APjAAAVa/gwds0nUxqOi7A5/8vvoBWKOj8MguZiRVyxY7cuQo9Zbl0eF m/4aMjBrjXtiIpW3Df3MqxhTMVfL X-Google-Smtp-Source: APXvYqw2ZJDTfL9Ef+MDte+HpZXvI+Z+mD+cnZ+cX0Zv3WfG9rLMXL6YK/3HtmsJxE00p0mbtXTALg== X-Received: by 2002:a5d:6646:: with SMTP id f6mr13325690wrw.68.1555074963154; Fri, 12 Apr 2019 06:16:03 -0700 (PDT) Received: from fuji.Parrot.Biz (smtp.parrot.biz. [62.23.167.188]) by smtp.gmail.com with ESMTPSA id d4sm35932882wrv.42.2019.04.12.06.16.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 06:16:02 -0700 (PDT) From: Mathieu Othacehe Date: Fri, 12 Apr 2019 15:15:52 +0200 Message-Id: <20190412131556.25282-2-m.othacehe@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190412131556.25282-1-m.othacehe@gmail.com> References: <20190412131556.25282-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-Mailman-Approved-At: Fri, 12 Apr 2019 09:25:07 -0400 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/groff.scm (groff)[arguments]: Replace build phase to pass GROFF_BIN_PATH and GROFFBIN variables when cross-compiling. Also add native groff as an input. --- gnu/packages/groff.scm | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm index cf392f5468..6f01395691 100644 --- a/gnu/packages/groff.scm +++ b/gnu/packages/groff.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Mark H Weaver ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2017 Ludovic Courtès +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -53,6 +54,7 @@ ;; own HTML doc, nor does it change its capabilities, so we removed netpbm ;; from 'inputs'. + (self-native-input? #t) (inputs `(("ghostscript" ,ghostscript))) (native-inputs `(("bison" ,bison) ("perl" ,perl) @@ -65,7 +67,31 @@ (add-after 'unpack 'setenv (lambda _ (setenv "GS_GENERATE_UUIDS" "0") - #t))))) + #t)) + (replace 'build + (lambda* (#:key + make-flags parallel-build? + native-inputs target #:allow-other-keys) + ;; When cross-compiling, native groff is needed, see: + ;; http://www.mail-archive.com/bug-groff@gnu.org/msg01335.html + (let ((parallel + (if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '())) + (flags + (if target + (let ((groff (or + (assoc-ref native-inputs "groff") + (assoc-ref native-inputs "self")))) + (append + make-flags + (list + (string-append "GROFF_BIN_PATH=" groff) + (string-append "GROFFBIN=" groff + "/bin/groff")))) + make-flags))) + (apply invoke `("make" ,@parallel ,@flags))) + #t))))) (synopsis "Typesetting from plain text mixed with formatting commands") (description "Groff is a typesetting package that reads plain text and produces @@ -86,7 +112,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)