unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Miguel Ángel Arruga Vivas" <rosen644835@gmail.com>
To: 45368@debbugs.gnu.org
Subject: [bug#45368] [PATCH core-updates 2/3] gnu: help2man: Add optional dependencies.
Date: Fri, 11 Dec 2020 23:46:58 +0100	[thread overview]
Message-ID: <87wnxaxa6a.fsf@gmail.com> (raw)
In-Reply-To: <875z4uyoz5.fsf@gmail.com> ("Miguel Ángel Arruga Vivas"'s message of "Tue, 22 Dec 2020 14:01:02 +0100")


* gnu/packages/man.scm (help2man)[inputs]: Add perl-gettext and
gettext-minimal to the inputs.
---
 gnu/packages/man.scm | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm
index 0eadd9d153..62cbe49eec 100644
--- a/gnu/packages/man.scm
+++ b/gnu/packages/man.scm
@@ -34,6 +34,7 @@
   #:use-module (gnu packages dbm)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gawk)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages less)
   #:use-module (gnu packages perl)
@@ -270,15 +271,23 @@ Linux kernel and C library interfaces employed by user-space programs.")
         "08q5arxz4j4pyx5q4712c2rn7p7dw7as9xg38yvmsh1c3ynvpy5p"))))
     (build-system gnu-build-system)
     (arguments `(;; There's no `check' target.
-                 #:tests? #f))
+                 #:tests? #f
+                 #:phases
+                 (modify-phases %standard-phases
+                   (add-after 'unpack 'patch-help2man-with-perl-gettext
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (let ((lib (assoc-ref inputs "perl-gettext"))
+                             (fmt "use lib '~a/lib/perl5/site_perl';~%~a"))
+                         (substitute* "help2man.PL"
+                           (("^use Locale::gettext.*$" load)
+                            (format #f fmt lib load))))
+                       #t)))))
     (inputs
      `(("perl" ,perl)
-       ;; TODO: Add these optional dependencies.
-       ;; ("perl-LocaleGettext" ,perl-LocaleGettext)
-       ;; ("gettext" ,gettext-minimal)
-       ))
+       ("perl-gettext" ,perl-gettext)))
     (native-inputs
-     `(("perl" ,perl)))
+     `(("perl" ,perl)
+       ("gettext" ,gettext-minimal)))
     (home-page "https://www.gnu.org/software/help2man/")
     (synopsis "Automatically generate man pages from program --help")
     (description
-- 
2.29.2




  parent reply	other threads:[~2020-12-22 13:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22 13:01 [bug#45368] [PATCH core-updates 0/3] Help2man updates Miguel Ángel Arruga Vivas
2020-12-11 22:45 ` [bug#45368] [PATCH core-updates 1/3] gnu: Add perl-gettext Miguel Ángel Arruga Vivas
2020-12-11 22:46 ` Miguel Ángel Arruga Vivas [this message]
2020-12-11 22:47 ` [bug#45368] [PATCH core-updates 3/3] gnu: help2man: Update to 1.47.16 Miguel Ángel Arruga Vivas
2021-01-03 15:12 ` [bug#45368] [PATCH core-updates 0/3] Help2man updates Ludovic Courtès
2021-01-06 16:45   ` Miguel Ángel Arruga Vivas
2021-01-07 11:00     ` Ludovic Courtès
2021-01-07 12:52       ` Miguel Ángel Arruga Vivas
2021-02-21 22:00         ` Ludovic Courtès
2023-10-21 19:45     ` bug#45368: " Maxim Cournoyer

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=87wnxaxa6a.fsf@gmail.com \
    --to=rosen644835@gmail.com \
    --cc=45368@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).