From patchwork Sat Sep 16 16:49:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 53964 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1003927BBEA; Sat, 16 Sep 2023 17:50:38 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DC3B527BBE2 for ; Sat, 16 Sep 2023 17:50:36 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhYUZ-0003af-50; Sat, 16 Sep 2023 12:49:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhYUW-0003aH-Su for guix-patches@gnu.org; Sat, 16 Sep 2023 12:49:56 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhYUW-0003Ig-LC for guix-patches@gnu.org; Sat, 16 Sep 2023 12:49:56 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qhYUd-0003mk-AY for guix-patches@gnu.org; Sat, 16 Sep 2023 12:50:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65706] [PATCH v3 2/2] gnu: enblend-enfuse: Build documentation. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 16 Sep 2023 16:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65706 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65706@debbugs.gnu.org Cc: Bruno Victal , maxim.cournoyer@gmail.com Received: via spool by 65706-submit@debbugs.gnu.org id=B65706.169488299014520 (code B ref 65706); Sat, 16 Sep 2023 16:50:03 +0000 Received: (at 65706) by debbugs.gnu.org; 16 Sep 2023 16:49:50 +0000 Received: from localhost ([127.0.0.1]:48415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhYUP-0003m6-Uv for submit@debbugs.gnu.org; Sat, 16 Sep 2023 12:49:50 -0400 Received: from smtpm5.myservices.hosting ([185.26.105.236]:38024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhYUK-0003ln-HJ for 65706@debbugs.gnu.org; Sat, 16 Sep 2023 12:49:48 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm5.myservices.hosting (Postfix) with ESMTP id 0483A20D15; Sat, 16 Sep 2023 18:49:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 5CBBC8009D; Sat, 16 Sep 2023 18:49:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id rvsqxyD-uhLT; Sat, 16 Sep 2023 18:49:33 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 8044F8009B; Sat, 16 Sep 2023 18:49:33 +0200 (CEST) From: Bruno Victal Date: Sat, 16 Sep 2023 17:49:28 +0100 Message-ID: <889b910e360872c0a9df5deccf5995a0eb31353b.1694882968.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: <66a797d5df3863da27f73a623ddede95b737f310.1693690639.git.mirai@makinata.eu> References: <66a797d5df3863da27f73a623ddede95b737f310.1693690639.git.mirai@makinata.eu> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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(-) 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 ;;; Copyright © 2022, 2023 John Kehayias ;;; Copyright © 2022 Sharlatan Hellseher +;;; Copyright © 2023 Bruno Victal ;;; ;;; 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: + (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