From patchwork Sat Sep 23 14:19:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54190 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 D3C0A27BBE2; Sat, 23 Sep 2023 15:23:03 +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=unavailable 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 BEDD927BBEA for ; Sat, 23 Sep 2023 15:22:57 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qk3WE-0006zJ-RC; Sat, 23 Sep 2023 10:22:02 -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 1qk3WB-0006we-1u for guix-patches@gnu.org; Sat, 23 Sep 2023 10:21:59 -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 1qk3WA-0003A7-Pf for guix-patches@gnu.org; Sat, 23 Sep 2023 10:21:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qk3WL-00083j-Uk for guix-patches@gnu.org; Sat, 23 Sep 2023 10:22:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v2 18/62] gnu: dblatex: Fix missing texlive binaries. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Sep 2023 14:22:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal , Nicolas Goaziou Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.169547892130825 (code B ref 65479); Sat, 23 Sep 2023 14:22:09 +0000 Received: (at 65479) by debbugs.gnu.org; 23 Sep 2023 14:22:01 +0000 Received: from localhost ([127.0.0.1]:40208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qk3WC-00080z-74 for submit@debbugs.gnu.org; Sat, 23 Sep 2023 10:22:00 -0400 Received: from smtpmciv5.myservices.hosting ([185.26.107.241]:42578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qk3W1-0007zT-U2 for 65479@debbugs.gnu.org; Sat, 23 Sep 2023 10:21:50 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv5.myservices.hosting (Postfix) with ESMTP id B667420DE6; Sat, 23 Sep 2023 16:21:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 2875C80099; Sat, 23 Sep 2023 16:21:25 +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 gl3ufLv0_28z; Sat, 23 Sep 2023 16:21:24 +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 6B43580095; Sat, 23 Sep 2023 16:21:22 +0200 (CEST) From: Bruno Victal Date: Sat, 23 Sep 2023 15:19:53 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 The binaries for dblatex aren't provided by texlive-updmap.cfg but by texlive-bin. * gnu/packages/patches/dblatex-inkscape-1.0.patch: New file. * gnu/local.mk: Register it. * gnu/packages/docbook.scm (dblatex)[source]: Use dblatex-inkscape-1.0.patch. [arguments]<#:tests?>: Enable tests. <#:phases>: Rename 'set-path to 'wrap-dblatex. Wrap with texlive-bin rather than texlive-updmap.cfg in PATH and wrap GUIX_TEXMF in 'wrap-dblatex. Add 'check-wrap phase. [native-inputs]: Add docbook-mathml-1.0. [inputs]: Restyle. Add texlive-bin. Replace inkscape/stable with inkscape. Within texlive-updmap.cfg add previously missing: texlive-amsmath, texlive-auxhook, texlive-bigintcalc, texlive-bin, texlive-bitset, texlive-bookmark, texlive-colortbl, texlive-courier, texlive-eepic, texlive-epstopdf-pkg, texlive-eso-pic, texlive-etexcmds, texlive-fancyhdr, texlive-gettitlestring, texlive-graphics, texlive-graphics-cfg, texlive-helvetic, texlive-hycolor, texlive-hyperref, texlive-infwarerr, texlive-intcalc, texlive-kpathsea, texlive-kvdefinekeys, texlive-kvoptions, texlive-kvsetkeys, texlive-l3backend, texlive-latex, texlive-latex-bin, texlive-letltxmacro, texlive-ltxcmds, texlive-pdfescape, texlive-pdflscape, texlive-pdftexcmds, texlive-psnfss, texlive-rerunfilecheck, texlive-symbol, texlive-times, texlive-tools, texlive-uniquecounter, texlive-url and texlive-zapfding. (dblatex/stable)[inputs]: Replace inkscape with inkscape/stable. Co-authored-by: Nicolas Goaziou --- gnu/local.mk | 3 +- gnu/packages/docbook.scm | 115 +++++++++++++----- .../patches/dblatex-inkscape-1.0.patch | 39 ++++++ 3 files changed, 125 insertions(+), 32 deletions(-) create mode 100644 gnu/packages/patches/dblatex-inkscape-1.0.patch diff --git a/gnu/local.mk b/gnu/local.mk index 8d4d64a591..e6dbde6f8f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1056,7 +1056,8 @@ dist_patch_DATA = \ %D%/packages/patches/date-output-pkg-config-files.patch \ %D%/packages/patches/datefudge-gettimeofday.patch \ %D%/packages/patches/dbacl-include-locale.h.patch \ - %D%/packages/patches/dbacl-icheck-multiple-definitions.patch \ + %D%/packages/patches/dbacl-icheck-multiple-definitions.patch \ + %D%/packages/patches/dblatex-inkscape-1.0.patch \ %D%/packages/patches/dbus-helper-search-path.patch \ %D%/packages/patches/dbus-c++-gcc-compat.patch \ %D%/packages/patches/dbus-c++-threading-mutex.patch \ diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 8cabaa780d..1b24c3522e 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -50,7 +50,8 @@ (define-module (gnu packages docbook) #:use-module (guix git-download) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) - #:use-module (guix build-system python)) + #:use-module (guix build-system python) + #:use-module (srfi srfi-26)) ;; The fetch-plan, install-plan and phases for docbook-xml tend to vary ;; between releases therefore we use a “template” package for the @@ -749,7 +750,9 @@ (define-public dblatex version ".tar.bz2")) (sha256 (base32 - "0yd09nypswy3q4scri1dg7dr99d7gd6r2dwx0xm81l9f4y32gs0n")))) + "0yd09nypswy3q4scri1dg7dr99d7gd6r2dwx0xm81l9f4y32gs0n")) + (patches + (search-patches "dblatex-inkscape-1.0.patch")))) (build-system python-build-system) (arguments (list @@ -762,7 +765,6 @@ (define-public dblatex ;; See this thread for details: ;; https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00030.html #:use-setuptools? #f - #:tests? #f ;no test suite #:phases #~(modify-phases %standard-phases (add-after 'install 'split-outputs @@ -771,40 +773,90 @@ (define-public dblatex (new (string-append #$output:doc "/share/doc"))) (mkdir-p (dirname new)) (rename-file old new)))) - (add-after 'wrap 'set-path + (add-after 'wrap 'wrap-dblatex (lambda* (#:key inputs #:allow-other-keys) - (let ((path (map (lambda (x) - (string-append (assoc-ref inputs x) - "/bin")) - (list "libxslt" - "imagemagick" "inkscape" - "texlive-updmap.cfg")))) + (let ((path + (search-path-as-list + '("bin") + '#$(map (cut this-package-input <>) + (list "libxslt" "imagemagick" "inkscape" + "texlive-bin"))))) ;; dblatex executes helper programs at runtime. (wrap-program (string-append #$output "/bin/dblatex") - `("PATH" ":" prefix ,path)))))))) + `("PATH" ":" prefix ,path) + `("GUIX_TEXMF" prefix (,(getenv "GUIX_TEXMF"))))))) + (add-after 'check 'check-wrap + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (unsetenv "GUIX_TEXMF") + (invoke/quiet (string-append #$output "/bin/dblatex") + "--quiet" "tests/mathml/mmltest2.xml"))))))) + (native-inputs (list docbook-mathml-1.0)) (inputs - (list (texlive-updmap.cfg (list texlive-anysize - texlive-appendix - texlive-changebar - texlive-fancybox - texlive-fancyvrb - texlive-float - texlive-footmisc - texlive-jknapltx - texlive-listings - texlive-multirow - texlive-overpic - texlive-pdfpages - texlive-refcount - texlive-rsfs - texlive-stmaryrd - texlive-subfigure - texlive-titlesec - texlive-wasysym)) + (list texlive-bin + (texlive-updmap.cfg (list texlive-amsmath + texlive-anysize + texlive-appendix + texlive-auxhook + texlive-bigintcalc + texlive-bin + texlive-bitset + texlive-bookmark + texlive-changebar + texlive-colortbl + texlive-courier + texlive-eepic + texlive-epstopdf-pkg + texlive-eso-pic + texlive-etexcmds + texlive-fancybox + texlive-fancyhdr + texlive-fancyvrb + texlive-float + texlive-footmisc + texlive-gettitlestring + texlive-graphics + texlive-graphics-cfg + texlive-helvetic + texlive-hycolor + texlive-hyperref + texlive-infwarerr + texlive-intcalc + texlive-jknapltx + texlive-kpathsea + texlive-kvdefinekeys + texlive-kvoptions + texlive-kvsetkeys + texlive-l3backend + texlive-latex + texlive-latex-bin + texlive-letltxmacro + texlive-listings + texlive-ltxcmds + texlive-multirow + texlive-overpic + texlive-pdfescape + texlive-pdflscape + texlive-pdfpages + texlive-pdftexcmds + texlive-psnfss + texlive-refcount + texlive-rerunfilecheck + texlive-rsfs + texlive-stmaryrd + texlive-subfigure + texlive-symbol + texlive-times + texlive-titlesec + texlive-tools + texlive-uniquecounter + texlive-url + texlive-wasysym + texlive-zapfding)) ;; FIXME: transfig causes the build to fail. ;;transfig ;for fig2dev imagemagick ;for convert - inkscape/stable ;for svg conversion + inkscape ;for svg conversion docbook-xml libxslt)) ;for xsltproc (outputs '("out" "doc")) @@ -833,7 +885,8 @@ (define-public dblatex/stable (hidden-package (package/inherit dblatex (inputs (modify-inputs (package-inputs dblatex) - (replace "imagemagick" imagemagick/stable)))))) + (replace "imagemagick" imagemagick/stable) + (replace "inkscape" inkscape/stable)))))) (define-public docbook-utils (package diff --git a/gnu/packages/patches/dblatex-inkscape-1.0.patch b/gnu/packages/patches/dblatex-inkscape-1.0.patch new file mode 100644 index 0000000000..634c99481a --- /dev/null +++ b/gnu/packages/patches/dblatex-inkscape-1.0.patch @@ -0,0 +1,39 @@ +# Imported from + +# HG changeset patch +# User Jan Tojnar +# Date 1588714251 -7200 +# Tue May 05 23:30:51 2020 +0200 +# Branch inkscape1 +# Node ID 611cc4a4a878d57f5877f2d418864560f68d25cf +# Parent 3ddf5d6cedcbc9c8b98c4da77fd545b2478d90a3 +Port to Inkscape 1.0 + +Inkscape revamped the CLI flags: + +https://gitlab.com/inkscape/inbox/issues/2416 + +diff -r 3ddf5d6cedcb -r 611cc4a4a878 docs/custom/dblatex.xconf +--- a/docs/custom/dblatex.xconf Tue Sep 10 00:40:26 2019 +0200 ++++ b/docs/custom/dblatex.xconf Tue May 05 23:30:51 2020 +0200 +@@ -18,7 +18,7 @@ + + + +- inkscape -z -D --export-dpi=600 --export-%(dst)s=%(output)s %(input)s ++ inkscape -D --export-dpi=600 --export-type=%(dst)s --export-filename=%(output)s %(input)s + + + +diff -r 3ddf5d6cedcb -r 611cc4a4a878 lib/dbtexmf/core/imagedata.py +--- a/lib/dbtexmf/core/imagedata.py Tue Sep 10 00:40:26 2019 +0200 ++++ b/lib/dbtexmf/core/imagedata.py Tue May 05 23:30:51 2020 +0200 +@@ -178,7 +178,7 @@ + class SvgConverter(ImageConverter): + def __init__(self, imgsrc, imgdst="", docformat="", backend=""): + ImageConverter.__init__(self, imgsrc="svg", imgdst=imgdst) +- self.add_command(["inkscape", "-z", "-D", "--export-%(dst)s=%(output)s", ++ self.add_command(["inkscape", "-D", "--export-type=%(dst)s", "--export-filename=%(output)s", + "%(input)s"]) + +