From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id yCL2D57ADGQnewEASxT56A (envelope-from ) for ; Sat, 11 Mar 2023 18:55:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qM72D57ADGSFVgEA9RJhRA (envelope-from ) for ; Sat, 11 Mar 2023 18:55:42 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F3477320D0 for ; Sat, 11 Mar 2023 18:55:41 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678557342; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=rk6YfGLU0Asu9ldGJduyjKjHAn7A2pShGjBdEmuOXio=; b=gPP8YJrFMaXrw9yIf5eWbEcxRE5K+C40TYGlZ4OJ9mwGH/pZvlYlaSM8X8nz7HRgPyGwML AcZqKO4UrSCQhl76o/DAJ3ORMuAYsFfBYpODqI1KKPd8uMZSaxju+C0SqlbRbgyihiU9v4 J2DGvnHqjANBm9pk3wdKzgWGnd+ucX/ZSIyDUmoVli0qd4Jbu5R7dJ+6kc4qWec4RZsEaO i1URKC4cCQT5ZyGLfq/Dc0+PS2qWbOMKzHKQlIsyXZKgFMQgIIFdhAdQ0DRnjTeJF6MLxA NoRkXVnDJRNs11V9o0RSPT4kUHoqIV4abA4DNa+7upQL8UgbjEGhTe/rYAny0g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678557342; a=rsa-sha256; cv=none; b=o31StIiPUEJNORQXYkTNhz4mGZSwzIGZf0esu0qOsk4Kj6Z2CUz13/Wu/apOYjLA7oT8wf VQ+9ET5jeDoYcNHkVzAAiMKieEGwmdlF8lbUs/QrRFupaNyQMgRHAVk9ol7q4tvyvmYZhA 46Z5SXSDn9tmnLmplsCJDOKAzyAqiMpRDtEujQgqfA/v2eFManUMhmV/dO1537vLnG0hT5 I+raQb4Vob0pY2pSYqBfT6bCLXX1DiBY+plFlqs+wWyXPCHbXjiS7EmS0eAC7eJJlkjVD+ TI/BLq7qJmATzz0tcGhUKz2oXTTuBihBAwxW6Ie5IpUS/5KzmqFHSkcvyNltew== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pb3Qv-00065H-Ax; Sat, 11 Mar 2023 12:55:05 -0500 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 1pb3Qt-00064t-7q for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pb3Qs-00074l-V0 for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pb3Qs-0003nq-Ra for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61015] [PATCH v2 3/4] gnu: docbook-xml: Use XSLT to patch catalog.xml. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Mar 2023 17:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61015 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61015@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61015-submit@debbugs.gnu.org id=B61015.167855727214554 (code B ref 61015); Sat, 11 Mar 2023 17:55:02 +0000 Received: (at 61015) by debbugs.gnu.org; 11 Mar 2023 17:54:32 +0000 Received: from localhost ([127.0.0.1]:58605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb3QO-0003mf-1H for submit@debbugs.gnu.org; Sat, 11 Mar 2023 12:54:32 -0500 Received: from smtpmciv2.myservices.hosting ([185.26.107.238]:49962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb3QK-0003mH-GW for 61015@debbugs.gnu.org; Sat, 11 Mar 2023 12:54:29 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv2.myservices.hosting (Postfix) with ESMTP id D01DC2094D for <61015@debbugs.gnu.org>; Sat, 11 Mar 2023 18:54:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 72486800A1; Sat, 11 Mar 2023 18:54:24 +0100 (CET) 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 E_5pLVqLGeUh; Sat, 11 Mar 2023 18:54:23 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 233348009F; Sat, 11 Mar 2023 18:54:23 +0100 (CET) From: Bruno Victal Date: Sat, 11 Mar 2023 17:54:12 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: <821b168ca199012a29d7a95961c6380b40e46855.1678557210.git.mirai@makinata.eu> References: <821b168ca199012a29d7a95961c6380b40e46855.1678557210.git.mirai@makinata.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: X-Migadu-Queue-Id: F3477320D0 X-Spam-Score: -3.50 X-Migadu-Spam-Score: -3.50 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: nLcXm/PDhwCC (sxml transforms) are unsuited here due to guile-bug #20339. * gnu/packages/aux-files/xml/patch-catalog-xml.xsl: New file. * Makefile.am: Register it. * gnu/packages/docbook.scm (docbook-xml-5)[native-inputs]: Add libxslt. [arguments]: Add phase to patch catalog.xml using XSLT. --- Makefile.am | 3 ++- .../aux-files/xml/patch-catalog-xml.xsl | 24 +++++++++++++++++++ gnu/packages/docbook.scm | 14 ++++++++++- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/aux-files/xml/patch-catalog-xml.xsl diff --git a/Makefile.am b/Makefile.am index 23b939b674..73369c746c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -436,7 +436,8 @@ AUX_FILES = \ gnu/packages/aux-files/python/sanity-check-next.py \ gnu/packages/aux-files/python/sitecustomize.py \ gnu/packages/aux-files/renpy/renpy.in \ - gnu/packages/aux-files/run-in-namespace.c + gnu/packages/aux-files/run-in-namespace.c \ + gnu/packages/aux-files/xml/patch-catalog-xml.xsl # Templates, examples. EXAMPLES = \ diff --git a/gnu/packages/aux-files/xml/patch-catalog-xml.xsl b/gnu/packages/aux-files/xml/patch-catalog-xml.xsl new file mode 100644 index 0000000000..947517476d --- /dev/null +++ b/gnu/packages/aux-files/xml/patch-catalog-xml.xsl @@ -0,0 +1,24 @@ + + + + + / + + + + + + + + + + + + + + diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 6a8eeec386..2d11333608 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2021 Mark H Weaver ;;; Copyright © 2021 Efraim Flashner ;;; Copyright © 2021 Andrew Whatson +;;; Copyright © 2023 Bruno Victal ;;; ;;; This file is part of GNU Guix. ;;; @@ -71,11 +72,22 @@ (define-public docbook-xml-5 (lambda _ ;; XXX: These files do not need 0755 permission. (for-each (cut chmod <> #o644) (find-files ".")))) + (add-before 'install 'patch-catalog-xml + (lambda* (#:key inputs #:allow-other-keys) + (let ((xsltproc (search-input-file inputs "/bin/xsltproc")) + (dtd-path (string-append #$output "/xml/dtd/docbook"))) + (invoke xsltproc "--nonet" "--noout" + "--stringparam" "prefix" dtd-path + "--output" "catalog.xml.new" + #$(local-file + (search-auxiliary-file "xml/patch-catalog-xml.xsl")) + "catalog.xml") + (rename-file "catalog.xml.new" "catalog.xml")))) (replace 'install (lambda _ (let ((dtd-path (string-append #$output "/xml/dtd/docbook"))) (copy-recursively "." dtd-path))))))) - (native-inputs (list unzip)) + (native-inputs (list libxslt unzip)) (home-page "https://docbook.org") (synopsis "DocBook XML DTDs for document authoring") (description -- 2.39.1