From: Attila Lendvai <attila@lendvai.name>
To: 61750@debbugs.gnu.org
Cc: Attila Lendvai <attila@lendvai.name>
Subject: [bug#61750] [PATCH 2/2] WIP failing attempt to get the man page while cross-compiling
Date: Fri, 24 Feb 2023 15:07:42 +0100 [thread overview]
Message-ID: <20230224140740.16494-2-attila@lendvai.name> (raw)
In-Reply-To: <20230224140243.15315-1-attila@lendvai.name>
---
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))))
--
2.38.1
next prev parent reply other threads:[~2023-02-24 14:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 14:02 [bug#61750] [PATCH 1/2] gnu: shepherd: Build Shepherd from git Attila Lendvai
2023-02-24 14:07 ` Attila Lendvai [this message]
2023-07-29 14:31 ` [bug#61750] [PATCH] " Attila Lendvai
2023-10-31 17:03 ` Attila Lendvai
2023-11-05 14:47 ` Ludovic Courtès
2023-11-13 9:38 ` Attila Lendvai
2023-11-17 15:26 ` Attila Lendvai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230224140740.16494-2-attila@lendvai.name \
--to=attila@lendvai.name \
--cc=61750@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).