[PATCH] gnu: enblend-enfuse: Build documentation.

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Bruno Victal
Owner
unassigned
Submitted by
Bruno Victal
Severity
normal
B
B
Bruno Victal wrote on 2 Sep 2023 23:38
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
66a797d5df3863da27f73a623ddede95b737f310.1693690639.git.mirai@makinata.eu
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.
---

Notes regarding the phases:
* Saves approx ? of the total build time by not rebuilding the docs
over and over again.

gnu/packages/photo.scm | 100 ++++++++++++++++++++++++++++++++++-------
1 file changed, 84 insertions(+), 16 deletions(-)

Toggle diff (147 lines)
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index b290e2b29a..323be6f28a 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 @@ (define-module (gnu packages photo)
#: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 @@ (define-module (gnu packages photo)
#: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)
@@ -376,14 +380,34 @@ (define-public enblend-enfuse
(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
@@ -395,16 +419,60 @@ (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.
+ (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))))))))
(home-page "https://enblend.sourceforge.net/")
(synopsis "Tools for combining and blending images")
(description

base-commit: 5ff0c8997a2ddf71af477883584a5f9ccd9b757f
--
2.40.1
M
M
Maxim Cournoyer wrote on 5 Sep 2023 15:14
(name . Bruno Victal)(address . mirai@makinata.eu)(address . 65706@debbugs.gnu.org)
875y4on4ni.fsf@gmail.com
Hi Bruno,

Bruno Victal <mirai@makinata.eu> writes:

Toggle quote (16 lines)
> 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.
> ---

Should the doc be installed under a 'doc' output (at least if there's
more than man pages or info manuals) ?

--
Thanks,
Maxim
B
B
Bruno Victal wrote on 5 Sep 2023 16:59
[PATCH v2] gnu: enblend-enfuse: Build documentation.
(address . 65706@debbugs.gnu.org)
1222de9925d3a85970baf278d17f393b5b14b48b.1693925945.git.mirai@makinata.eu
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.
---
gnu/packages/photo.scm | 101 ++++++++++++++++++++++++++++++++++-------
1 file changed, 85 insertions(+), 16 deletions(-)

Toggle diff (148 lines)
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index b290e2b29a..5157a24fb9 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 @@ (define-module (gnu packages photo)
#: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 @@ (define-module (gnu packages photo)
#: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)
@@ -376,14 +380,34 @@ (define-public enblend-enfuse
(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
@@ -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.
+ (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

base-commit: 5ff0c8997a2ddf71af477883584a5f9ccd9b757f
--
2.40.1
M
M
Maxim Cournoyer wrote on 6 Sep 2023 23:01
(name . Bruno Victal)(address . mirai@makinata.eu)(address . 65706@debbugs.gnu.org)
87tts7ow1s.fsf@gmail.com
Hi,

Bruno Victal <mirai@makinata.eu> writes:

Toggle quote (16 lines)
> 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.

[...]

Toggle quote (40 lines)
> (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 :-).

Toggle quote (34 lines)
> + (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
B
B
Bruno Victal wrote on 16 Sep 2023 18:49
[PATCH v3 2/2] gnu: enblend-enfuse: Build documentation.
(address . 65706@debbugs.gnu.org)
889b910e360872c0a9df5deccf5995a0eb31353b.1694882968.git.mirai@makinata.eu
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.
---
gnu/packages/photo.scm | 82 +++++++++++++++++++++++++++++++++++++-----
1 file changed, 74 insertions(+), 8 deletions(-)

Toggle diff (134 lines)
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 @@ (define-module (gnu packages photo)
#: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 @@ (define-module (gnu packages photo)
#: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 @@ (define-module (gnu packages photo)
#: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 @@ (define-public enblend-enfuse
(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 @@ (define-public enblend-enfuse
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
--
2.41.0
B
B
Bruno Victal wrote on 16 Sep 2023 18:49
[PATCH v3 1/2] gnu: enblend-enfuse: Backport upstream fixes.
(address . 65706@debbugs.gnu.org)
6663204b50992dfb75d0a6226ed7731b085d8901.1694882968.git.mirai@makinata.eu
Backport changes for reproducible builds & missing include.

* gnu/packages/patches/enblend-enfuse-reproducible.patch: New file.
* gnu/local.mk: Register it.
* gnu/packages/photo.scm (enblend-enfuse)[source]: Use newly added patch. Add
snippet to fix missing header.
[arguments]<#:phases>: Remove 'add-missing-include.
---
gnu/local.mk | 1 +
.../patches/enblend-enfuse-reproducible.patch | 44 +++++++++++++++++++
gnu/packages/photo.scm | 25 ++++++-----
3 files changed, 59 insertions(+), 11 deletions(-)
create mode 100644 gnu/packages/patches/enblend-enfuse-reproducible.patch

Toggle diff (109 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 672050723f..54217fbd5a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1113,6 +1113,7 @@ dist_patch_DATA = \
%D%/packages/patches/emacs-kv-fix-tests.patch \
%D%/packages/patches/emacs-pgtk-super-key-fix.patch \
%D%/packages/patches/emacs-xelb-ignore-length-element.patch \
+ %D%/packages/patches/enblend-enfuse-reproducible.patch \
%D%/packages/patches/enjarify-setup-py.patch \
%D%/packages/patches/enlightenment-fix-setuid-path.patch \
%D%/packages/patches/erlang-man-path.patch \
diff --git a/gnu/packages/patches/enblend-enfuse-reproducible.patch b/gnu/packages/patches/enblend-enfuse-reproducible.patch
new file mode 100644
index 0000000000..8bd6a3aeda
--- /dev/null
+++ b/gnu/packages/patches/enblend-enfuse-reproducible.patch
@@ -0,0 +1,44 @@
+# HG changeset patch
+# User Bernhard M. Wiedemann <bwiedemann@suse.de>
+# Date 1502609999 -7200
+# Sun Aug 13 09:39:59 2017 +0200
+# Node ID a98e00eed893f62dd8349fc2894abca3aff4b33a
+# Parent 41ce01b7d413b3654211da0147857e7d6a1495de
+Facilitate reproducible builds
+by allowing to externally hold constant the build date and time.
+See
+ https://reproducible-builds.org/specs/source-date-epoch/
+
+Backport asap.
+
+diff -r 41ce01b7d413 -r a98e00eed893 NEWS
+--- a/NEWS Sun Aug 13 09:39:56 2017 +0200
++++ b/NEWS Sun Aug 13 09:39:59 2017 +0200
+@@ -48,6 +48,12 @@
+ https://github.com/akrzemi1/Optional
+ where only "optional.hpp" is needed.
+
++- The environment variable SOURCE_DATE_EPOCH overrides the build
++ timestamp as recorded by the signatures. See
++ https://reproducible-builds.org/specs/source-date-epoch/
++ for details.
++
++
+
+ * Version 4.2 "Compressor Road"
+
+diff -r 41ce01b7d413 -r a98e00eed893 src/DefaultSig.pm
+--- a/src/DefaultSig.pm Sun Aug 13 09:39:56 2017 +0200
++++ b/src/DefaultSig.pm Sun Aug 13 09:39:59 2017 +0200
+@@ -109,9 +109,10 @@
+ sub update_date_and_time {
+ my $self = shift;
+
++ my $now = $ENV{SOURCE_DATE_EPOCH} || time;
+ my ($second, $minute, $hour,
+ $day_of_month, $month, $year,
+- $day_of_week) = $self->is_using_gmt() ? gmtime : localtime;
++ $day_of_week) = $self->is_using_gmt() ? gmtime($now) : localtime($now);
+
+ $self->{DATE} = $self->format_date($day_of_month, $month, $year + 1900, $day_of_week,
+ $self->weekdays->[$day_of_week],
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index b290e2b29a..39f4ce10d6 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -370,7 +370,18 @@ (define-public enblend-enfuse
name "-" version ".tar.gz"))
(sha256
(base32
- "0j5x011ilalb47ssah50ag0a4phgh1b0wdgxdbbp1gcyjcjf60w7"))))
+ "0j5x011ilalb47ssah50ag0a4phgh1b0wdgxdbbp1gcyjcjf60w7"))
+ (patches
+ ;; TODO: Remove when updating.
+ ;; Fixed upstream with a98e00eed893f62dd8349fc2894abca3aff4b33a.
+ (search-patches "enblend-enfuse-reproducible.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; TODO: Remove when updating.
+ ;; Fixed upstream with 81e25afe71146aaaf5058c604034f35d57e3be9d.
+ #~(substitute* "src/minimizer.cc"
+ (("^#include <gsl/gsl_errno\\.h>" all)
+ (string-append all "\n#include <limits>"))))))
(build-system gnu-build-system)
(native-inputs
(list pkg-config
@@ -395,16 +406,8 @@ (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")))
(home-page "https://enblend.sourceforge.net/")
(synopsis "Tools for combining and blending images")
(description

base-commit: 0dc83ce53b8bad8473c80689ba212d9f9bb712b3
--
2.41.0
M
M
Maxim Cournoyer wrote on 17 Sep 2023 22:27
Re: [PATCH v3 2/2] gnu: enblend-enfuse: Build documentation.
(name . Bruno Victal)(address . mirai@makinata.eu)(address . 65706-done@debbugs.gnu.org)
87ttrs7dft.fsf@gmail.com
Hi,

Bruno Victal <mirai@makinata.eu> writes:

Toggle quote (16 lines)
> 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.

Installed, thanks.

--
Thanks,
Maxim
Closed
?