diff options
author | Bruno Victal <mirai@makinata.eu> | 2023-09-16 17:49:28 +0100 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-09-17 16:22:04 -0400 |
commit | 33e300508947d831b1d63c018e92325ae4c4f959 (patch) | |
tree | 137e01cc16a5f6bc6188e97cdd5b25b8d2c6a009 /gnu/packages/photo.scm | |
parent | 8202adbceeba6c43dd5af5ffaa35e780cc9c5429 (diff) |
gnu: enblend-enfuse: Build documentation.
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>: Add 'fontconfig-cache, 'exclude-doc-from-check
and 'install-doc. Replace 'build and 'install.
[outputs]: Add 'doc.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu/packages/photo.scm')
-rw-r--r-- | gnu/packages/photo.scm | 82 |
1 files changed, 74 insertions, 8 deletions
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index 39f4ce10d6..78ae61c799 100644 --- a/gnu/packages/photo.scm +++ b/gnu/packages/photo.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2020. 2021, 2022 Vinicius Monego <monego@posteo.net> ;;; Copyright © 2022, 2023 John Kehayias <john.kehayias@protonmail.com> ;;; Copyright © 2022 Sharlatan Hellseher <sharlatanus@gmail.com> +;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu> ;;; ;;; This file is part of GNU Guix. ;;; @@ -60,6 +61,7 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages glib) #:use-module (gnu packages graphics) + #:use-module (gnu packages graphviz) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) #:use-module (gnu packages image) @@ -70,8 +72,10 @@ #:use-module (gnu packages libusb) #:use-module (gnu packages llvm) #:use-module (gnu packages lua) + #:use-module (gnu packages m4) #:use-module (gnu packages man) #:use-module (gnu packages maths) + #:use-module (gnu packages ocaml) #:use-module (gnu packages opencl) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -89,7 +93,6 @@ #:use-module (gnu packages video) #:use-module (gnu packages web) #:use-module (gnu packages wxwidgets) - #:use-module (gnu packages xfig) #:use-module (gnu packages xorg) #:use-module (gnu packages xml) #:use-module ((srfi srfi-1) #:hide (zip)) @@ -387,14 +390,34 @@ overlapping images, as well as some command line tools.") (list pkg-config perl perl-timedate + help2man ;; For building the documentation. gnuplot - help2man - imagemagick - libxml2 - (texlive-updmap.cfg) - tidy-html - transfig)) + graphviz-minimal ; for 'dot' + font-ghostscript + imagemagick/stable + librsvg + m4 + perl-readonly + texlive-texloganalyser + (texlive-updmap.cfg + (list 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 ;used but not propagated by microtype + texlive-nag + texlive-ragged2e + texlive-shorttoc + texlive-bigfoot + texlive-xstring)) + hevea)) (inputs (list boost gsl @@ -407,7 +430,50 @@ overlapping images, as well as some command line tools.") zlib)) (arguments (list - #:configure-flags #~(list "--enable-openmp"))) + #:configure-flags #~(list "--enable-openmp") + #:phases + #~(modify-phases %standard-phases + (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. + ;; Reported: <URL:https://bugs.launchpad.net/enblend/+bug/2036319> + (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")) (home-page "https://enblend.sourceforge.net/") (synopsis "Tools for combining and blending images") (description |