GNU bug report logs - #59313
[PATCH] gnu: linux-libre: Enable building html and info doc.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Wed, 16 Nov 2022 16:57:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 59313-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 59313-done <at> debbugs.gnu.org, mail <at> cbaines.net
Subject: Re: bug#59313: [PATCH] gnu: linux-libre: Enable building html and
 info doc.
Date: Thu, 24 Nov 2022 16:37:30 -0500
Hi Ludo,

Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi Maxim,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> * gnu/packages/patches/linux-libre-infodocs-target.patch: New file.
>> * gnu/local.mk (dist_patch_DATA): Register it.
>> (linux-libre-6.0-source, linux-libre-5.15-source)
>> (linux-libre-5.10-source): Apply above patch.
>> (doc-supported?):
>
> Looks like these 3 lines are misplaced.

Fixed.

>
>> * gnu/packages/linux.scm (make-linux-libre) [DOC-SUPPORTED?]: Add new patch in
>> the default patches used.  Add a BUILD-DOC? argument.
>> (make-linux-libre*): Add a BUILD-DOC? argument.  Validate BUILD-DOC? for
>> supported VERSION.
>> [outputs]: New field.
>> [phases]: Conditionally add the build-doc and install-doc phases.
>
> Nitpick: I’d write “[arguments]” rather than “[phases]”.

Adjusted.

>> [native-inputs]: Conditionally add fontconfig, graphviz, python-wrapper,
>> python-sphinx, python-sphinx-rtd-theme, texinfo and which.
>
> [...]
>
>> +                 #~((add-before 'configure 'build-doc
>> +                      (lambda _
>> +                        (substitute* "Documentation/Makefile"
>> +                          ;; Remove problematic environment check script.
>> +                          ((".*scripts/sphinx-pre-install.*") ""))
>> +                        (invoke "make" "infodocs" "htmldocs")))
>> +                    (add-after 'build-doc 'install-doc
>> +                      (lambda _
>> +                        (with-directory-excursion "Documentation/output"
>> +                          (let ((docdir (string-append
>> +                                         #$output:doc
>> +                                         "/share/doc/linux-libre/html")))
>> +                            (mkdir-p docdir)
>> +                            (copy-recursively "html" docdir))
>> +                          (invoke "make" "-C" "texinfo" "install-info"
>> +                                  (string-append "infodir=" #$output
>> +                                                 "/share/info"))))))
>
> I would keep only Info documentation, which is much smaller than HTML.
> This is what we do for every packages where we have that possibility.

Done, like this:

--8<---------------cut here---------------start------------->8---
modified   gnu/packages/linux.scm
@@ -815,8 +815,6 @@ (define* (make-linux-libre* version gnu-revision source supported-systems
     (version version)
     (source source)
     (supported-systems supported-systems)
-    (outputs `("out"
-               ,@(if build-doc? '("doc") '())))
     (build-system gnu-build-system)
     (arguments
      (list
@@ -840,15 +838,10 @@ (define* (make-linux-libre* version gnu-revision source supported-systems
                         (substitute* "Documentation/Makefile"
                           ;; Remove problematic environment check script.
                           ((".*scripts/sphinx-pre-install.*") ""))
-                        (invoke "make" "infodocs" "htmldocs")))
+                        (invoke "make" "infodocs")))
                     (add-after 'build-doc 'install-doc
                       (lambda _
                         (with-directory-excursion "Documentation/output"
-                          (let ((docdir (string-append
-                                         #$output:doc
-                                         "/share/doc/linux-libre/html")))
-                            (mkdir-p docdir)
-                            (copy-recursively "html" docdir))
                           (invoke "make" "-C" "texinfo" "install-info"
                                   (string-append "infodir=" #$output
                                                  "/share/info"))))))
--8<---------------cut here---------------end--------------->8---

(as well as python-sphinx-rtd, not shown above) and pushed.

Thanks for the review!

-- 
Thanks,
Maxim




This bug report was last modified 2 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.