all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Bruno Victal <mirai@makinata.eu>
Cc: 65706@debbugs.gnu.org
Subject: [bug#65706] [PATCH v2] gnu: enblend-enfuse: Build documentation.
Date: Wed, 06 Sep 2023 17:01:51 -0400	[thread overview]
Message-ID: <87tts7ow1s.fsf@gmail.com> (raw)
In-Reply-To: <1222de9925d3a85970baf278d17f393b5b14b48b.1693925945.git.mirai@makinata.eu> (Bruno Victal's message of "Tue, 5 Sep 2023 15:59:38 +0100")

Hi,

Bruno Victal <mirai@makinata.eu> writes:

> Notes:
> * transfig is not needed according to the NEWS since 4.2.
> * help2man is not optional.
>
> * gnu/packages/photo.scm (enblend-enfuse)[native-inputs]: Remove libxml2,
> tidy-html and transfig. Replace imagemagick with imagemagick/stable. Add
> graphviz-minimal, font-ghostscript, librsvg, m4, perl-readonly,
> texlive-texloganalyser, texlive-bold-extra, texlive-cm-mf-extra-bold,
> texlive-comment, texlive-float, texlive-enumitem, texlive-mdwtools,
> texlive-hyphenat, texlive-index, texlive-listings, texlive-microtype,
> texlive-etoolbox, texlive-nag, texlive-ragged2e, texlive-shorttoc,
> texlive-bigfoot, texlive-xstring and hevea.
> [arguments]<#:phases>: Restyle. Add 'fontconfig-cache, 'exclude-doc-from-check
> and 'install-doc. Replace 'build and 'install.
> [outputs]: Add 'doc.

[...]

>      (inputs
>       (list boost
>             gsl
> @@ -395,16 +419,61 @@ (define-public enblend-enfuse
>             vigra
>             zlib))
>      (arguments
> -     (list #:configure-flags
> -           #~(list "--enable-openmp")
> -           #:phases
> -           #~(modify-phases %standard-phases
> -               (add-after 'unpack 'add-missing-include
> -                 (lambda _
> -                   (substitute* "src/minimizer.h"
> -                     ;; Fix error: ‘numeric_limits’ is not a member of ‘std’.
> -                     (("#include <vector>" line)
> -                      (string-append line "\n#include <limits>"))))))))
> +     (list
> +      #:configure-flags
> +      #~(list "--enable-openmp")
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'add-missing-include
> +            (lambda _
> +              (substitute* "src/minimizer.h"
> +                ;; Fix error: ‘numeric_limits’ is not a member of ‘std’.
> +                (("#include <vector>" line)
> +                 (string-append line "\n#include <limits>")))))
> +          (add-before 'build 'fontconfig-cache
> +            (lambda _
> +              (setenv "XDG_CACHE_HOME" (mkdtemp "/tmp/cache-XXXXXX"))))
> +          ;; XXX: There's some extreme sillyness when building the
> +          ;; documentation. It gets rebuilt thrice, during build, check and
> +          ;; install, possibly due to the effects of the invocation of
> +          ;; UPDATED_ON in doc/Makefile.
> +          ;; I suspect the package might also have reproducibility issues
> +          ;; with the manual and src/DefaultSig.pm. (not an exhaustive list)
> +          ;; It's worth asking upstream for help with adding support
> +          ;; for SOURCE_DATE_EPOCH.

Stylistic nitpick: we don't voice the comments using the first person
(e.g. 'I') in the code typically; we try to stick to being descriptive
and factual.

If it's worth asking upstream, we should ask them now, and link to the
upstream issue in the comment to track its resolution :-).

> +          (add-after 'configure 'exclude-doc-from-check
> +            (lambda _
> +              (substitute* "doc/Makefile"
> +                (("^(check:).+$" _ rule)
> +                 (string-append rule "\n")))))
> +          ;; XXX: Skip building the docs since they're rebuilt again
> +          ;; during install.
> +          (replace 'build
> +            (lambda args
> +              (with-directory-excursion "src"
> +                (apply (assoc-ref %standard-phases 'build) args))))
> +          ;; XXX: Save another doc rebuild when installing.
> +          (replace 'install
> +            ;; Intercept and insert a make-flag for this phase only.
> +            (lambda* (#:key make-flags #:allow-other-keys)
> +              (apply invoke "make" "install"
> +                     (cons "MAYBE_DOC=" make-flags))))
> +          ;; XXX: 'make install' doesn't install the docs.
> +          (add-after 'install 'install-doc
> +            (lambda* (#:key make-flags #:allow-other-keys)
> +              ;; Install examples first, for which the 'install' rule works.
> +              (with-directory-excursion "doc/examples"
> +                (apply invoke "make" "install" make-flags))
> +              ;; The docs have to be installed with specific rules.
> +              (with-directory-excursion "doc"
> +                (apply invoke "make"
> +                       "install-ps-local"
> +                       "install-html-local"
> +                       "install-dvi-local"
> +                       ;; Do not overwhelm the console by printing the source
> +                       ;; to stdout.
> +                       (cons "V=0" make-flags))))))))
> +    (outputs '("out" "doc"))

nitpick: it's more conventional to have the 'outputs' field before the
'build-system' one.

Otherwise, I built it locally and it LGTM.

-- 
Thanks,
Maxim




  reply	other threads:[~2023-09-06 21:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-02 21:38 [bug#65706] [PATCH] gnu: enblend-enfuse: Build documentation Bruno Victal
2023-09-05 13:14 ` Maxim Cournoyer
2023-09-05 14:59 ` [bug#65706] [PATCH v2] " Bruno Victal
2023-09-06 21:01   ` Maxim Cournoyer [this message]
2023-09-16 16:49 ` [bug#65706] [PATCH v3 1/2] gnu: enblend-enfuse: Backport upstream fixes Bruno Victal
2023-09-16 16:49 ` [bug#65706] [PATCH v3 2/2] gnu: enblend-enfuse: Build documentation Bruno Victal
2023-09-17 20:27   ` bug#65706: " 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tts7ow1s.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=65706@debbugs.gnu.org \
    --cc=mirai@makinata.eu \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.