From patchwork Fri Feb 24 14:07:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 47258 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 9069416BBC; Fri, 24 Feb 2023 14:09:06 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3CB9016BA9 for ; Fri, 24 Feb 2023 14:09:05 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVYkx-0000yR-NC; Fri, 24 Feb 2023 09:09:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVYkx-0000yI-66 for guix-patches@gnu.org; Fri, 24 Feb 2023 09:09:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVYkw-0001sU-PO for guix-patches@gnu.org; Fri, 24 Feb 2023 09:09:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVYkw-00073N-CH for guix-patches@gnu.org; Fri, 24 Feb 2023 09:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61750] [PATCH 2/2] WIP failing attempt to get the man page while cross-compiling References: <20230224140243.15315-1-attila@lendvai.name> In-Reply-To: <20230224140243.15315-1-attila@lendvai.name> Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Feb 2023 14:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61750@debbugs.gnu.org Cc: Attila Lendvai Received: via spool by 61750-submit@debbugs.gnu.org id=B61750.167724769027049 (code B ref 61750); Fri, 24 Feb 2023 14:09:02 +0000 Received: (at 61750) by debbugs.gnu.org; 24 Feb 2023 14:08:10 +0000 Received: from localhost ([127.0.0.1]:36384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVYk5-00072C-SF for submit@debbugs.gnu.org; Fri, 24 Feb 2023 09:08:10 -0500 Received: from mail-ed1-f49.google.com ([209.85.208.49]:37739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVYk3-00071l-M4 for 61750@debbugs.gnu.org; Fri, 24 Feb 2023 09:08:08 -0500 Received: by mail-ed1-f49.google.com with SMTP id d30so13992850eda.4 for <61750@debbugs.gnu.org>; Fri, 24 Feb 2023 06:08:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=jQo/wNFHulOYlFFgPFqyciUNMTAGHCvwEzLYNMAhuHo=; b=DtYFMS0wQh8Q6ceff5jJZYWSkFiUGKngb0idy2B0pSj/YifJpUyRPQb+lJVVMLaSRU VAebY0fKxhb7F6LnYHZjl0Z7MTepQYKjbKWWM5lKUZNpG4aRml44UYq0HSBYMcYS/fxC jn6blIaMDDkaVtjPS4YarOnsYD78ufnEuOMkp+JtwkzzFugdam/AuCs5viO6Xsfaryxh txww21RjC+D2n6zsQtXesttsa9uGTOWqldf0kGJo8otRUpE8d8XxUuffDcsqcCLfOsB9 jlsNxhinwUVWis8KVGgrXUQ1QqEMGi8T4r8MYWYFnPzN04L7Xjl4qND3ZjW1BlMPqDgY 5peQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jQo/wNFHulOYlFFgPFqyciUNMTAGHCvwEzLYNMAhuHo=; b=Cy2+UvAdXDUXP0+QVZ18B8dgZu7xF8t3aV+W3EnpfnHhQvarWOOCvpxjcJvAzFq1BX gOcgxnS41isAkHcjzA3MU0uyYcZAKLhC+z5vHpZPLf5gtpt+nYxVE5DyX8L+d231uACm Ny9f7Y5rZ7TyZ7lnuWfnlCuopHEa0BNKplCsQr5nZh2AHmC38xl8AYqdHXis00LkjchG OFw9Hz6roKobKVerZngYpQCLAtBvBPdjC1uIo6/KZ1m2Yyj2eb9bygx959XLdKLx1TbO W7bMQUjd7ffbww9csgaB3rSaKUOYMlDvqbjDzIGxp9PaOOZYh2qz4qY2czj28HoFEc2V 82+Q== X-Gm-Message-State: AO0yUKUcJvvq2XXYpBM7JYtWQIhk3qJgXZOEqLJhn+covAIjrsSnoiBx xziJ2Aa+xYOCpqChQR+dblmG8T1Cj3U= X-Google-Smtp-Source: AK7set8w0BwjeFTHuPLSPXhOcIMcctLZP92JTQh2W9dFj+zU75TPm+ajdZQ8rScX5NUw9T0ZgD8vkA== X-Received: by 2002:a17:906:1557:b0:8de:a8c:403c with SMTP id c23-20020a170906155700b008de0a8c403cmr14485535ejd.58.1677247681485; Fri, 24 Feb 2023 06:08:01 -0800 (PST) Received: from lelap.lan (catv-80-98-247-145.catv.fixed.vodafone.hu. [80.98.247.145]) by smtp.gmail.com with ESMTPSA id m11-20020a50930b000000b004a27046b7a7sm7260905eda.73.2023.02.24.06.08.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 06:08:01 -0800 (PST) From: Attila Lendvai Date: Fri, 24 Feb 2023 15:07:42 +0100 Message-Id: <20230224140740.16494-2-attila@lendvai.name> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches --- gnu/packages/admin.scm | 48 +++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 91f98bf48e..6e5082e612 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -343,7 +343,7 @@ (define-public shepherd-0.9 (sha256 (base32 "1pvdpx2mfki8wvhcac54p8fn5idqszicww60ikswszz2cv5d0s11")))) (arguments - (list #:configure-flags #~'("--localstatedir=/var") + (list #:configure-flags #~'("HELP2MAN=true --localstatedir=/var") #:make-flags #~'("GUILE_AUTO_COMPILE=0") #:phases (if (%current-target-system) #~(modify-phases %standard-phases @@ -359,17 +359,45 @@ (define-public shepherd-0.9 (("%FIBERS_OBJECT_DIRECTORY%") #$(file-append (this-package-input "guile-fibers") - "/lib/guile/3.0/site-ccache")))))) + "/lib/guile/3.0/site-ccache"))))) + (add-after 'configure 'copy-man-pages + (lambda* (#:key outputs native-inputs #:allow-other-keys) + ;; Cannot run help2man when cross-compiling, + ;; so let's copy the man pages from the native + ;; build. + (let ((gzip (search-input-file native-inputs + "bin/gzip"))) + ;; TODO + (pk #$(file-append + (this-package-input this-package) + "/man/shepherd.1.gz")) + (invoke gzip "--decompress" "--stdout" + #$(file-append + (this-package-input this-package) + "/man/shepherd.1.gz") + ">doc/shepherd.1")) + #;(copy-file #$(file-append + (this-package-input this-package) + "/man/shepherd.1") + (string-append + (assoc-ref outputs "out") + "/man/shepherd.1")) + #f))) #~%standard-phases))) (native-inputs - (list autoconf - automake - gettext-minimal - guile-3.0 - guile-fibers-1.1 ; for cross-compilation - help2man - pkg-config - texinfo)) + (cons* autoconf + automake + gettext-minimal + guile-3.0 + guile-fibers-1.1 ; for cross-compilation + help2man + pkg-config + texinfo + ;; for the help2man man page when cross-compiling + (if (%current-target-system) + (list gzip + this-package) + '()))) (inputs (list guile-3.0 guile-fibers-1.1))))