From patchwork Tue Mar 8 04:38:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 37643 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 BA0FC27BBEA; Tue, 8 Mar 2022 04:39:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 524EE27BBE9 for ; Tue, 8 Mar 2022 04:39:14 +0000 (GMT) Received: from localhost ([::1]:37798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRRcv-0005J7-FQ for patchwork@mira.cbaines.net; Mon, 07 Mar 2022 23:39:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRRck-0005Ih-3B for guix-patches@gnu.org; Mon, 07 Mar 2022 23:39:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:32874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRRcj-0007Cn-RI for guix-patches@gnu.org; Mon, 07 Mar 2022 23:39:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nRRcj-00079A-MY for guix-patches@gnu.org; Mon, 07 Mar 2022 23:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54235] [PATCH v2 1/3] gnu: docbook-xml-4.1.2: Install an XML catalog file. References: <20220303135326.28867-1-maxim.cournoyer@gmail.com> In-Reply-To: <20220303135326.28867-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Mar 2022 04:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54235 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54235@debbugs.gnu.org Cc: maximedevos@telenet.be, Maxim Cournoyer Received: via spool by 54235-submit@debbugs.gnu.org id=B54235.164671430927402 (code B ref 54235); Tue, 08 Mar 2022 04:39:01 +0000 Received: (at 54235) by debbugs.gnu.org; 8 Mar 2022 04:38:29 +0000 Received: from localhost ([127.0.0.1]:54998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRRcD-00077t-AH for submit@debbugs.gnu.org; Mon, 07 Mar 2022 23:38:29 -0500 Received: from mail-qt1-f176.google.com ([209.85.160.176]:42953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRRcB-00077c-7I for 54235@debbugs.gnu.org; Mon, 07 Mar 2022 23:38:28 -0500 Received: by mail-qt1-f176.google.com with SMTP id 11so15188113qtt.9 for <54235@debbugs.gnu.org>; Mon, 07 Mar 2022 20:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P0iUHZcyzaGrE6mqI1mcLkmFPkpFJBn+Z4UC+oDsf6k=; b=QKgZikSJBlD+hjOnvkqPoW3FHJQPBpG3WzHpY4Zo4hPV1DpVogphceh7Dz6/rxXp2X RMVyTAHm6H4W9m+npCeODaovBR1vfXOIfPzIIROo953AAQbOMJUewA4oNxnIcL+ECfc5 J0OzRwTJi0xQo78ajuzo1tSHpMTnXHc1eqLXiUf9KYp9IHHaKyZD50L18TT6KfAZBpur 7CeHL+tizy1huMEXfgJP9jVfKHSAYcveYdWBxAtcUEHc65pzfV9680HThXrAlTGHPbqS +0iCerP91l2ilPaZgfx0SbQohOTpfZusUuIWrEdHQzjp3IMAQO0/FIk+Li57ior2HKmS XA2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P0iUHZcyzaGrE6mqI1mcLkmFPkpFJBn+Z4UC+oDsf6k=; b=xiyvQOHicyDXwOzJSlhazcVhSatzVogNYsG8DQFeyiwAsBvwr0GOzlZyrWcdRSAbvA uOLEWOnrjfEtMdQeQ7aMu7wKHeli/n7n3A6uB3JP4prXsrYZApiciuqUorjsSY2aWwkK 1XJPqrmVB6uw8VjtPvB0qxj90IwwptdKKwVjZBsHughwZ5Ewn5hkbg5sEGhOWhP3lr1r /fTUqw05C5lpcgHAeRzwhHKe7DF81PkP3AYMCuspSTHTTg51FPwd/E/IZ5NvNIoaVBMw cPleAECNs0Jlu5Ltd3mzB3shToYRLlhYP8g6PtSCGmRAvCtf6LEvLgDjoLo82SgOdxTf /RQw== X-Gm-Message-State: AOAM533X4v9GqMAHgn3aYWeegbDmkZwGKFHND3Le3c1xYQXGwn8pRS6G bbGBoH2VtHDD0Wi8C0T7Wy8QUAxqtrI= X-Google-Smtp-Source: ABdhPJwvhcnsB+pSmBRjk04fT42E2WR1ye5CnJguogv+Z5ffPjlj54ZCBfaL+jit0G/pmn6I+Nq8ng== X-Received: by 2002:a05:622a:d0:b0:2de:2bf1:dd2d with SMTP id p16-20020a05622a00d000b002de2bf1dd2dmr12343531qtw.676.1646714301506; Mon, 07 Mar 2022 20:38:21 -0800 (PST) Received: from localhost.localdomain (dsl-205-151-56-54.b2b2c.ca. [205.151.56.54]) by smtp.gmail.com with ESMTPSA id y11-20020ac85f4b000000b002de4b0a015asm10369332qta.5.2022.03.07.20.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Mar 2022 20:38:21 -0800 (PST) From: Maxim Cournoyer Date: Mon, 7 Mar 2022 23:38:07 -0500 Message-Id: <20220308043809.31394-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/docbook.scm (docbook-xml-4.1.2)[builder]: Generate a catalog file. [native-inputs]: Add libxml2. --- gnu/packages/docbook.scm | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 6575bf2d75..0a8d2e2aed 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2020 Marius Bakke -;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021, 2022 Maxim Cournoyer ;;; Copyright © 2021 Mark H Weaver ;;; Copyright © 2021 Efraim Flashner ;;; Copyright © 2021 Andrew Whatson @@ -153,7 +153,8 @@ (define-public docbook-xml-4.2 "18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c")))))) (define-public docbook-xml-4.1.2 - (package (inherit docbook-xml) + (package + (inherit docbook-xml) (version "4.1.2") (source (origin (method url-fetch) @@ -167,13 +168,22 @@ (define-public docbook-xml-4.1.2 #:builder (begin (use-modules (guix build utils)) - (let ((source (assoc-ref %build-inputs "source")) - (unzip (string-append (assoc-ref %build-inputs "unzip") - "/bin/unzip")) - (dtd (string-append (assoc-ref %outputs "out") - "/xml/dtd/docbook"))) + (let* ((source (assoc-ref %build-inputs "source")) + (unzip (string-append (assoc-ref %build-inputs "unzip") + "/bin/unzip")) + (xmlcatalog (string-append (assoc-ref %build-inputs "libxml2") + "/bin/xmlcatalog")) + (dtd (string-append (assoc-ref %outputs "out") + "/xml/dtd/docbook")) + (catalog.xml (string-append dtd "/catalog.xml"))) (mkdir-p dtd) - (invoke unzip source "-d" dtd))))))) + (invoke unzip source "-d" dtd) + ;; Create a minimal XML catalog, to use with libxml2 tools. + (invoke xmlcatalog "--noout" "--create" catalog.xml) + (invoke xmlcatalog "--noout" "--add" "public" + "-//OASIS//DTD DocBook XML V4.1.2//EN" + (string-append dtd "/docbookx.dtd") catalog.xml))))) + (native-inputs (list libxml2 unzip)))) (define-public docbook-xsl (package