[PATCH core-updates 00/61] The Draining of the XML & DocBook Swamp.

  • Done
  • quality assurance status badge
Details
6 participants
  • Liliana Marie Prikler
  • Ludovic Courtès
  • Maxim Cournoyer
  • Bruno Victal
  • Maxim Cournoyer <maxim.cournoyer@gmail.com>n
  • Simon Tournier
Owner
unassigned
Submitted by
Bruno Victal
Severity
normal
B
B
Bruno Victal wrote on 24 Aug 2023 00:33
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
cover.1692828533.git.mirai@makinata.eu
This is a follow-up for https://issues.guix.gnu.org/63081 and brings
several QoL improvements for handling XML/XSL dependencies in packages.

Notable changes:
* Rebased against core-updates.
* Fixes profile conflicts for docbook-xml packages by using versioned paths.
This is required for multiple docbook-xml packages to coexist within the
same profile, a must when authoring or validating DocBook documents.
* Stores the schema files correctly rather than lumping it all within .../dtd/.
* New search-paths: $XML_CATALOG_FILES and $SGML_CATALOG_FILES.
* Reduces direct dependencies on libxml2.
* Integrates some patches from Debian for docbook2x and docbook-utils.
* Fixes dblatex not finding the necessary binaries and texlive extensions.
* Several packages are now able to build their manpage and info docs.

Notes:
* Integrates the first patch from https://issues.guix.gnu.org/63854.

Bruno Victal (61):
gnu: docbook-xml: Fix installation paths.
gnu: Add docbook-xml-5.0.1.
gnu: docbook-xml-5.1: Fix URIs in catalog.xml.
gnu: docbook-xsl: Add compatibility entry.
gnu: docbook-xsl: Add rewrite entries for http.
gnu: docbook: Remove leftovers.
gnu: docbook-utils: Import patches from debian.
gnu: docbook2x: Import patches from debian.
gnu: docbook2x: Fix sgml2xml-isoent and add test dependencies.
gnu: docbook2x: Split documentation.
gnu: libxml2: Rewrite using G-Expressions.
search-paths: Add $XML_CATALOG_FILES and $SGML_CATALOG_FILES.
gnu: libxml2: Add SGML_CATALOG_FILES to native-search-path.
gnu: libxslt: Set search-paths for XML and SGML catalogs.
gnu: dblatex: Add libxslt native-search-paths to its own.
gnu: dblatex: Split documentation.
gnu: Add docbook-mathml-1.0.
gnu: dblatex: Fix missing texlive binaries.
gnu: lilypond: Use dblatex/stable.
gnu: docbook2x: Set search-paths for XML and SGML catalogs.
gnu: xmlto: Rewrite with G-Expressions.
gnu: xmlto: Add libxslt native-search-paths to its own.
gnu: gtk-doc: Add libxslt native-search-paths to its own.
gnu: docbook2x: Drop docbook-xml workarounds.
gnu: secilc: Drop xmlto workaround.
gnu: xdg-utils: Drop docbook workarounds.
gnu: xdg-user-dirs: Drop docbook workaround.
gnu: udisks: Rewrite using G-Expressions.
gnu: udisks: Drop docbook workaround.
gnu: colord-gtk: Build documentation.
gnu: criu: Drop xmlto workaround.
gnu: gtk: Drop docbook workaround.
gnu: git-crypt: Remove docbook workarounds.
gnu: gnome-session: Build documentation.
gnu: metapixel: Drop docbook workaround.
gnu: metapixel: Rewrite with G-Expressions.
gnu: libxkbcommon: Add doc output.
gnu: libxkbcommon: Faux propagate libxml2.
gnu: gnome-session: Remove libxml2.
gnu: sssd: Drop xmllint workaround.
gnu: tdb: Build manpages.
gnu: drumstick: Drop docbook workaround.
gnu: vmpk: Drop docbook workaround.
gnu: iputils: Drop docbook workarounds.
gnu: iputils: Restyle.
gnu: libnotify: Drop docbook workarounds.
gnu: libnotify: Split documentation.
gnu: alsa-utils: Build manpages.
gnu: alsa-utils: Rewrite with G-Expressions.
gnu: tunctl: Update comment.
gnu: gdcm: Build manpages.
gnu: git: Drop docbook workarounds.
gnu: gtk-doc: Rewrite with G-Expressions.
gnu: gtk-doc: Wrap XML_CATALOG_FILES.
gnu: gtk-doc: Remove leftovers.
gnu: libstdc++-doc: Rewrite with G-Expressions.
gnu: libstdc++-doc: Build libstdc++ info documentation.
gnu: perf: Remove libxml2.
gnu: Remove unneeded libxml2 from native-inputs. (libxslt)
gnu: Remove unneeded libxml2 from native-inputs. (xmlto)
gnu: Remove unneeded libxml2 from native-inputs. (gtk-doc)

doc/guix.texi | 24 +-
gnu/local.mk | 19 +-
gnu/packages/benchmark.scm | 1 -
gnu/packages/bioinformatics.scm | 6 +-
gnu/packages/cluster.scm | 1 -
gnu/packages/databases.scm | 6 +-
gnu/packages/docbook.scm | 684 ++++++++++++------
gnu/packages/freedesktop.scm | 194 ++---
gnu/packages/gcc.scm | 59 +-
gnu/packages/glib.scm | 1 -
gnu/packages/gnome.scm | 37 +-
gnu/packages/gtk.scm | 53 +-
gnu/packages/image-processing.scm | 51 +-
gnu/packages/linux.scm | 58 +-
gnu/packages/moreutils.scm | 2 +-
gnu/packages/music.scm | 30 +-
gnu/packages/networking.scm | 63 +-
gnu/packages/ocr.scm | 1 -
.../patches/dblatex-inkscape-1.0.patch | 39 +
.../docbook-utils-documentation-edits.patch | 100 +++
.../docbook-utils-escape-characters.patch | 34 +
.../docbook-utils-remove-jade-sp.patch | 215 ++++++
...book-utils-respect-refentry-for-name.patch | 34 +
.../docbook-utils-source-date-epoch.patch | 29 +
.../docbook-utils-use-date-element.patch | 61 ++
...ocbook-xsl-nonrecursive-string-subst.patch | 40 -
.../patches/docbook-xsl-support-old-url.patch | 17 -
.../patches/docbook2x-filename-handling.patch | 42 ++
.../patches/docbook2x-manpage-typo.patch | 24 +
.../docbook2x-preprocessor-declaration.patch | 89 +++
.../docbook2x-static-datadir-evaluation.patch | 19 +
...gcc-13.2.0-libstdc++-docbook-xsl-uri.patch | 50 ++
...cc-13.2.0-libstdc++-info-install-fix.patch | 70 ++
.../gcc-5.5.0-libstdc++-xmlcatalog.patch | 402 ++++++++++
.../patches/libsepol-versioned-docbook.patch | 56 ++
gnu/packages/perl.scm | 7 +-
gnu/packages/polkit.scm | 1 -
gnu/packages/rpm.scm | 3 +-
gnu/packages/samba.scm | 3 +-
gnu/packages/security-token.scm | 5 +-
gnu/packages/selinux.scm | 13 +-
gnu/packages/sssd.scm | 8 +-
gnu/packages/terminals.scm | 1 -
gnu/packages/version-control.scm | 53 +-
gnu/packages/virtualization.scm | 10 -
gnu/packages/wm.scm | 3 +-
gnu/packages/xdisorg.scm | 32 +-
gnu/packages/xml.scm | 83 +--
guix/search-paths.scm | 25 +
49 files changed, 2084 insertions(+), 774 deletions(-)
create mode 100644 gnu/packages/patches/dblatex-inkscape-1.0.patch
create mode 100644 gnu/packages/patches/docbook-utils-documentation-edits.patch
create mode 100644 gnu/packages/patches/docbook-utils-escape-characters.patch
create mode 100644 gnu/packages/patches/docbook-utils-remove-jade-sp.patch
create mode 100644 gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch
create mode 100644 gnu/packages/patches/docbook-utils-source-date-epoch.patch
create mode 100644 gnu/packages/patches/docbook-utils-use-date-element.patch
delete mode 100644 gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
delete mode 100644 gnu/packages/patches/docbook-xsl-support-old-url.patch
create mode 100644 gnu/packages/patches/docbook2x-filename-handling.patch
create mode 100644 gnu/packages/patches/docbook2x-manpage-typo.patch
create mode 100644 gnu/packages/patches/docbook2x-preprocessor-declaration.patch
create mode 100644 gnu/packages/patches/docbook2x-static-datadir-evaluation.patch
create mode 100644 gnu/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch
create mode 100644 gnu/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch
create mode 100644 gnu/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch
create mode 100644 gnu/packages/patches/libsepol-versioned-docbook.patch


base-commit: c365cc69881f3aec633b88ba22c7fe8faec3597e
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:34
[PATCH core-updates 04/61] gnu: docbook-xsl: Add compatibility entry.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
ea8bd84b73d478a4cd36a11bb9635159a1f08198.1692830149.git.mirai@makinata.eu

* gnu/packages/docbook.scm (docbook-xsl)[arguments]<#:phases>: Add
compatibility entry.
---
gnu/packages/docbook.scm | 41 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)

Toggle diff (54 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 4a0104c253..55f99aae62 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -388,7 +388,46 @@ (define-public docbook-xsl
"http://docbook.sourceforge.net/release/xsl/current/"
store-uri
catalog))
- (list "rewriteSystem" "rewriteURI")))
+ (list "rewriteSystem" "rewriteURI"))
+
+ ;; Originally the
+ ;; "http://docbook.sourceforge.net/release/xsl/"
+ ;; URI referred to the non-namespaced docbook-xsl,
+ ;; with its namespaced version using a URI differing in
+ ;; the path component as '…/xsl-ns/'.
+ ;; At some point the namespaced version was made the
+ ;; canonical docbook-xsl package whilst preserving the
+ ;; original URI.
+ ;;
+ ;; For compatibility with XML files that still specify
+ ;; the legacy namespaced docbook-xsl URIs we re-add them
+ ;; here.
+ (for-each
+ (lambda (type)
+ ;; Remap /xsl-ns/ to /xsl/.
+ ;; Note: URI resolutions are not recursive.
+ ;; A rewrite rule from:
+ ;; 'http://docbook.sourceforge.net/release/xsl-ns/'
+ ;; to
+ ;; 'http://docbook.sourceforge.net/release/xsl/'
+ ;; will not trigger the rewrite rule that ultimately
+ ;; remaps to a /gnu/store URI, as can be seen by
+ ;; invoking:
+ ;; $ xmlcatalog "" \
+ ;; 'http://docbook.sourceforge.net/release/xsl-ns/current/'
+ ;; http://docbook.sourceforge.net/release/xsl/current/
+ ;; $ xmlcatalog "" \
+ ;; 'http://docbook.sourceforge.net/release/xsl/current/'
+ ;; file://gnu/store/…/xml/xsl/…
+ ;;
+ ;; See XML Catalog specification, item 7.2.2. for
+ ;; details.
+ (invoke xmlcatalog "--noout"
+ "--add" type
+ "http://docbook.sourceforge.net/release/xsl-ns/current/"
+ store-uri
+ catalog))
+ (list "rewriteSystem" "rewriteURI")))
catalog-files))))
(replace 'install
(lambda _
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:34
[PATCH core-updates 01/61] gnu: docbook-xml: Fix installation paths.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
943b678133cfef78ab30417b7b0184408b8d962a.1692830149.git.mirai@makinata.eu
Using xml/dtd/docbook as installation path had two problems:
* The paths would conflict in profile, which made it impossible
for two different docbook-xml packages to coexist within the XML_CATALOG_FILES
variable.
* It was technically incorrect since non-DTD schemas were also placed here.

This commit makes docbook-xml use versioned paths instead.

* gnu/packages/docbook.scm
(docbook-xml-package, docbook-xml-4.x-package): New procedure.
(docbook-xml): Make docbook-xml an alias for docbook-xml-5.1.
(docbook-xml-5.1): New variable.
(docbook-xml-4.5, docbook-xml-4.4, docbook-xml-4.3, docbook-xml-4.2)
(docbook-xml-4.1.2): Refactor to use docbook-xml-4.x-package procedure.
---
gnu/packages/docbook.scm | 265 ++++++++++++++++++++++++---------------
1 file changed, 163 insertions(+), 102 deletions(-)

Toggle diff (309 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 4461293e1e..329d19a05d 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -50,17 +50,17 @@ (define-module (gnu packages docbook)
#:use-module (guix build-system trivial)
#:use-module (guix build-system python))
-(define-public docbook-xml
+;; The fetch-plan, install-plan and phases for docbook-xml tend to vary
+;; between releases therefore we use a “template” package for the
+;; transformations that are common to these packages.
+(define* (docbook-xml-package source version)
+ "Return a package for a docbook-xml package version @var{version} and
+downloading from @var{source}, where @var{version} is a string and
+@var{source} is a @code{<origin>} record."
(package
(name "docbook-xml")
- (version "5.1")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://docbook.org/xml/" version
- "/docbook-v" version "-os.zip"))
- (sha256
- (base32
- "0zqy9prj9wam9dn7v3mgr7ld1axqxdhgrmv06dviwg00ahv43wxk"))))
+ (version version)
+ (source source)
(build-system copy-build-system)
(arguments
(list
@@ -71,23 +71,27 @@ (define-public docbook-xml
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-permissions
(lambda _
- ;; XXX: These files do not need 0755 permission.
+ ;; 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)))))))
+ (xslt-file #$(local-file
+ (search-auxiliary-file
+ "xml/patch-catalog-xml.xsl")))
+ ;; Avoid profile conflicts by installing to a
+ ;; versioned path.
+ (dest-path
+ (format #f "~a/xml/docbook/~a" #$output #$version)))
+ (for-each
+ (lambda (catalog)
+ (let ((catalog* (string-append catalog ".new")))
+ (invoke xsltproc "--nonet" "--novalid" "--noout"
+ "--stringparam" "prefix" dest-path
+ "--output" catalog*
+ xslt-file catalog)
+ (rename-file catalog* catalog)))
+ (find-files "." "catalog\\.xml$"))))))))
(native-inputs (list libxslt unzip))
(home-page "https://docbook.org")
(synopsis "DocBook XML DTDs for document authoring")
@@ -97,95 +101,152 @@ (define-public docbook-xml
by no means limited to these applications.) This package provides XML DTDs.")
(license (license:x11-style "" "See file headers."))))
+(define-public docbook-xml-5.1
+ (let* ((version "5.1")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbook-v" version "-os.zip"))
+ (sha256
+ (base32
+ "0zqy9prj9wam9dn7v3mgr7ld1axqxdhgrmv06dviwg00ahv43wxk"))))
+ (template (docbook-xml-package source version)))
+ (package
+ (inherit template)
+ (arguments
+ (let ((dest-dir (format #f "xml/docbook/~a/" version)))
+ (substitute-keyword-arguments (package-arguments template)
+ ;; XXX: A default value must be provided otherwise this
+ ;; substitution has no effect.
+ ((#:install-plan _ #f)
+ #~`(("schemas/" #$dest-dir)))))))))
+;; XXX: docbook-xml-4.x versions use the same #:install-plan but since the
+;; paths are versioned we can't use (inherit …).
+(define* (docbook-xml-4.x-package source version)
+ "Return a template for a docbook-xml-4.x package version @var{version} and
+downloading from @var{source}, where @var{version} is a string and
+@var{source} is a @code{<origin>} record."
+ (let ((base-template (docbook-xml-package source version)))
+ (package
+ (inherit base-template)
+ (arguments
+ (let* ((dest-dir (format #f "xml/docbook/~a/" version)))
+ (substitute-keyword-arguments (package-arguments base-template)
+ ((#:phases phases)
+ ;; Some programs, such as kdoctools, instead of using
+ ;; XML_CATALOG_FILES, prefer to use cmake to locate
+ ;; the DTDs for docbook-xml-4.x packages but
+ ;; since there's no agreed standard as to where these files
+ ;; should be placed, in practice the .cmake files
+ ;; end up searching for paths that are distribution specific.
+ #~(modify-phases #$phases
+ (add-after 'install 'symlink-alternate-path
+ (lambda _
+ ;; kdoctools searches under xml/dtd/docbook/
+ ;; which is the convention used by Nix.
+ (mkdir-p (string-append #$output "/xml/dtd"))
+ (symlink (string-append #$output "/" #$dest-dir)
+ (string-append #$output "/xml/dtd/docbook"))))))
+ ((#:install-plan _ #f)
+ #~`(("./" #$dest-dir
+ #:exclude-regexp ("ChangeLog$"
+ "README$"
+ "docbook\\.cat$"
+ "\\.txt$"))))))))))
+
(define-public docbook-xml-4.5
- (package
- (inherit docbook-xml)
- (version "4.5")
- (source (origin
- (method url-fetch/zipbomb)
- (uri (string-append "https://docbook.org/xml/" version
- "/docbook-xml-" version ".zip"))
- (sha256
- (base32
- "1d671lcjckjri28xfbf6dq7y3xnkppa910w1jin8rjc35dx06kjf"))))))
+ (let* ((version "4.5")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbook-xml-" version ".zip"))
+ (sha256
+ (base32
+ "1d671lcjckjri28xfbf6dq7y3xnkppa910w1jin8rjc35dx06kjf")))))
+ (docbook-xml-4.x-package source version)))
(define-public docbook-xml-4.4
- (package (inherit docbook-xml)
- (version "4.4")
- (source (origin
- (method url-fetch/zipbomb)
- (uri (string-append "https://docbook.org/xml/" version
- "/docbook-xml-" version ".zip"))
- (sha256
- (base32
- "141h4zsyc71sfi2zzd89v4bb4qqq9ca1ri9ix2als9f4i3mmkw82"))))))
+ (let* ((version "4.4")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbook-xml-" version ".zip"))
+ (sha256
+ (base32
+ "141h4zsyc71sfi2zzd89v4bb4qqq9ca1ri9ix2als9f4i3mmkw82")))))
+ (docbook-xml-4.x-package source version)))
(define-public docbook-xml-4.3
- (package (inherit docbook-xml)
- (version "4.3")
- (source (origin
- (method url-fetch/zipbomb)
- (uri (string-append "https://docbook.org/xml/" version
- "/docbook-xml-" version ".zip"))
- (sha256
- (base32
- "0r1l2if1z4wm2v664sqdizm4gak6db1kx9y50jq89m3gxaa8l1i3"))))))
+ (let* ((version "4.3")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbook-xml-" version ".zip"))
+ (sha256
+ (base32
+ "0r1l2if1z4wm2v664sqdizm4gak6db1kx9y50jq89m3gxaa8l1i3")))))
+ (docbook-xml-4.x-package source version)))
(define-public docbook-xml-4.2
- (package (inherit docbook-xml)
- (version "4.2")
- (source (origin
- (method url-fetch/zipbomb)
- (uri (string-append "https://docbook.org/xml/" version
- "/docbook-xml-" version ".zip"))
- (sha256
- (base32
- "18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c"))))))
+ (let* ((version "4.2")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbook-xml-" version ".zip"))
+ (sha256
+ (base32
+ "18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c")))))
+ (docbook-xml-4.x-package source version)))
(define-public docbook-xml-4.1.2
- (package
- (inherit docbook-xml)
- (version "4.1.2")
- (source (origin
- (method url-fetch/zipbomb)
- (uri (string-append "https://docbook.org/xml/" version
- "/docbkx412.zip"))
- (sha256
- (base32
- "0wkp5rvnqj0ghxia0558mnn4c7s3n501j99q2isp3sp0ci069w1h"))))
- (arguments
- (substitute-keyword-arguments (package-arguments docbook-xml)
- ((#:phases phases)
- #~(modify-phases #$phases
- (add-after 'unpack 'copy-catalog-file
- ;; docbook-xml-4.1.2 is unique in the fact that it doesn't come
- ;; with a catalog.xml file, requiring it to be generated by hand
- ;; from the docbook.cat SGML catalog. We could automatically
- ;; generate it here at the cost of enlarging the package
- ;; definition with a rudimentary (PEG) parser for the SGML
- ;; catalog but this is overkill since this file is unlikely to
- ;; change, therefore we ship a pre-generated catalog.xml.
- (lambda _
- (copy-file
- #$(local-file
- (search-auxiliary-file
- "xml/docbook-xml/catalog-4.1.2.xml"))
- "catalog.xml")))
- (add-after 'patch-catalog-xml 'add-rewrite-entries
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((xmlcatalog (search-input-file inputs "/bin/xmlcatalog"))
- (dtd-path (string-append #$output "/xml/dtd/docbook")))
- (for-each
- (lambda (type)
- (invoke xmlcatalog "--noout"
- "--add" type
- "http://www.oasis-open.org/docbook/xml/4.1.2/"
- (string-append "file://" dtd-path "/")
- "catalog.xml"))
- (list "rewriteSystem" "rewriteURI")))))))))
- (native-inputs
- (modify-inputs (package-native-inputs docbook-xml)
- (prepend libxml2)))))
+ (let* ((version "4.1.2")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbkx412.zip"))
+ (sha256
+ (base32
+ "0wkp5rvnqj0ghxia0558mnn4c7s3n501j99q2isp3sp0ci069w1h"))))
+ (template (docbook-xml-4.x-package source version)))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'copy-catalog-file
+ ;; docbook-xml-4.1.2 is unique in the fact that it doesn't come
+ ;; with a catalog.xml file, requiring it to be generated by hand
+ ;; from the docbook.cat SGML catalog. We could automatically
+ ;; generate it here at the cost of enlarging the package
+ ;; definition with a rudimentary (PEG) parser for the SGML
+ ;; catalog but this is overkill since this file is unlikely to
+ ;; change, therefore we ship a pre-generated catalog.xml.
+ (lambda _
+ (copy-file
+ #$(local-file
+ (search-auxiliary-file
+ "xml/docbook-xml/catalog-4.1.2.xml"))
+ "catalog.xml")))
+ (add-after 'patch-catalog-xml 'add-rewrite-entries
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((xmlcatalog (search-input-file inputs
+ "/bin/xmlcatalog"))
+ (dtd-path (format #f "~a/xml/docbook/~a"
+ #$output #$version)))
+ (for-each
+ (lambda (type)
+ (invoke xmlcatalog "--noout"
+ "--add" type
+ "http://www.oasis-open.org/docbook/xml/4.1.2/"
+ (string-append "file://" dtd-path "/")
+ "catalog.xml"))
+ (list "rewriteSystem" "rewriteURI")))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs template)
+ (prepend libxml2))))))
+
+(define-public docbook-xml docbook-xml-5.1)
;;; There's an issue in docbook-xsl 1.79.2 that causes manpages to be
;;; generated incorrectly and embed raw nroff syntax such as '.PP' when there

base-commit: c365cc69881f3aec633b88ba22c7fe8faec3597e
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:34
[PATCH core-updates 02/61] gnu: Add docbook-xml-5.0.1.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
ba143c688e39b94af2798ba742545cd75e38f102.1692830149.git.mirai@makinata.eu
* gnu/packages/docbook.xml (docbook-xml-5.0.1): New variable.
---
gnu/packages/docbook.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 329d19a05d..ec1b9acb36 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -120,6 +120,30 @@ (define-public docbook-xml-5.1
;; substitution has no effect.
((#:install-plan _ #f)
#~`(("schemas/" #$dest-dir)))))))))
+
+(define-public docbook-xml-5.0.1
+ (let* ((version "5.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbook-" version ".zip"))
+ (sha256
+ (base32
+ "1iz3hq1lqgnshvlz4j9gvh4jy1ml74qf90vqf2ikbq0h4i2xzybs"))))
+ (template (docbook-xml-package source version)))
+ (package
+ (inherit template)
+ (arguments
+ (let ((dest-dir (format #f "xml/docbook/~a/" version)))
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:install-plan _ #f)
+ #~`(("catalog.xml" #$dest-dir)
+ ("docbook.nvdl" #$dest-dir)
+ ("dtd" #$dest-dir)
+ ("rng" #$dest-dir)
+ ("sch" #$dest-dir)
+ ("xsd" #$dest-dir)))))))))
+
;; XXX: docbook-xml-4.x versions use the same #:install-plan but since the
;; paths are versioned we can't use (inherit …).
(define* (docbook-xml-4.x-package source version)
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 08/61] gnu: docbook2x: Import patches from debian.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
b12e2391d88de365b8104a0fc9f0a35a6530b5fb.1692830149.git.mirai@makinata.eu
* gnu/packages/docbook.scm (docbook2x)[source]: Import patches from
debian. Prefer patching in source over 'patch-sources phase.
[arguments]<#:phases>: Drop 'patch-sources phase. Add 'autoreconf phase.
[inputs]: Move after arguments. Relocate docbook-xml-4.5 to …
[natine-inputs]: … here. Add autoconf, automake and libtool.
* gnu/packages/patches/docbook2x-filename-handling.patch: New file.
* gnu/packages/patches/docbook2x-manpage-typo.patch: Ditto.
* gnu/packages/patches/docbook2x-preprocessor-declaration.patch: Ditto.
* gnu/packages/patches/docbook2x-static-datadir-evaluation.patch: Ditto.
* gnu/local.mk: Register it.
---
gnu/local.mk | 4 +
gnu/packages/docbook.scm | 47 ++++++----
.../patches/docbook2x-filename-handling.patch | 42 +++++++++
.../patches/docbook2x-manpage-typo.patch | 24 +++++
.../docbook2x-preprocessor-declaration.patch | 89 +++++++++++++++++++
.../docbook2x-static-datadir-evaluation.patch | 19 ++++
6 files changed, 206 insertions(+), 19 deletions(-)
create mode 100644 gnu/packages/patches/docbook2x-filename-handling.patch
create mode 100644 gnu/packages/patches/docbook2x-manpage-typo.patch
create mode 100644 gnu/packages/patches/docbook2x-preprocessor-declaration.patch
create mode 100644 gnu/packages/patches/docbook2x-static-datadir-evaluation.patch

Toggle diff (301 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 565a1860ea..08b3904128 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1069,6 +1069,10 @@ dist_patch_DATA = \
%D%/packages/patches/docbook-utils-respect-refentry-for-name.patch \
%D%/packages/patches/docbook-utils-source-date-epoch.patch \
%D%/packages/patches/docbook-utils-use-date-element.patch \
+ %D%/packages/patches/docbook2x-filename-handling.patch \
+ %D%/packages/patches/docbook2x-manpage-typo.patch \
+ %D%/packages/patches/docbook2x-preprocessor-declaration.patch \
+ %D%/packages/patches/docbook2x-static-datadir-evaluation.patch \
%D%/packages/patches/doc++-include-directives.patch \
%D%/packages/patches/doc++-segfault-fix.patch \
%D%/packages/patches/dovecot-opensslv3.patch \
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 994aa57f18..6a138dcb77 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -27,6 +27,7 @@
(define-module (gnu packages docbook)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages imagemagick)
@@ -867,32 +868,25 @@ (define-public docbook2x
version "/docbook2X-" version ".tar.gz"))
(sha256
(base32
- "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0"))))
+ "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0"))
+ (patches
+ (search-patches "docbook2x-filename-handling.patch"
+ "docbook2x-manpage-typo.patch"
+ "docbook2x-preprocessor-declaration.patch"
+ "docbook2x-static-datadir-evaluation.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Fix a failing test (maybe it worked with old texinfo?)
+ #~(substitute* "test/complete-manuals/at1.xml"
+ (("<bridgehead>")
+ "<bridgehead renderas=\"sect2\">")))))
(build-system gnu-build-system)
- (inputs
- (list bash-minimal
- docbook-xml-4.5
- perl
- perl-xml-namespacesupport
- perl-xml-parser
- perl-xml-sax
- perl-xml-sax-base
- texinfo
- libxslt))
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'configure 'patch-sources
(lambda* (#:key inputs #:allow-other-keys)
- ;; Fix failed substitution in config.pl
- (substitute* "perl/config.pl"
- (("\\$\\{prefix\\}")
- #$output))
- ;; Fix a failing test (maybe it worked with old texinfo?)
- (substitute* "test/complete-manuals/at1.xml"
- (("<bridgehead>")
- "<bridgehead renderas=\"sect2\">"))
;; Patch all the tests use DocBook 4.5
(substitute* (find-files "test" "\\.xml$")
(("\"-//OASIS//DTD DocBook XML V4\\..+//EN\"")
@@ -903,6 +897,9 @@ (define-public docbook2x
(setenv "XML_CATALOG_FILES"
(string-append (assoc-ref inputs "docbook-xml")
"/xml/dtd/docbook/catalog.xml"))))
+ (add-after 'unpack 'autoreconf
+ (lambda _
+ (invoke "autoreconf" "-vif")))
(add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((programs
@@ -936,6 +933,18 @@ (define-public docbook2x
(symlink prog (string-append #$output
"/bin/db2x_" prog)))
'("docbook2man" "docbook2texi")))))))
+ (inputs
+ (list bash-minimal
+ perl
+ perl-xml-namespacesupport
+ perl-xml-parser
+ perl-xml-sax
+ perl-xml-sax-base
+ texinfo
+ libxslt))
+ (native-inputs
+ (list autoconf automake libtool
+ docbook-xml-4.5))
(home-page "https://docbook2x.sourceforge.net")
(synopsis "Convert DocBook to man page and Texinfo format")
(description
diff --git a/gnu/packages/patches/docbook2x-filename-handling.patch b/gnu/packages/patches/docbook2x-filename-handling.patch
new file mode 100644
index 0000000000..b6895dd0d3
--- /dev/null
+++ b/gnu/packages/patches/docbook2x-filename-handling.patch
@@ -0,0 +1,42 @@
+## 03_fix_420153_filename_whitespace_handling.dpatch by
+## Daniel Leidert (dale) <daniel.leidert@wgdd.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Peter Eisentraut reported a regression in the whitespace handling of
+## DP: refentrytitle content during filename creation:
+## DP: http://bugs.debian.org/420153. The problem is, that upstream first
+## DP: replaces all spaces (but not linebreaks btw) with underlines and then
+## DP: it tries to normalize the result. This means, that a linebreak with
+## DP: additional whitespaces results in manpage names like 'foo_ ____bar.9'.
+## DP: So what we basically do in this patch is, that we first normalize the
+## DP: refentrytitle and then replace any spaces left with underlines.
+
+Edit by Bruno Victal <mirai@makinata.eu>:
+ Removed dpatch lines.
+
+--- docbook2x-0.8.8~/xslt/man/manpage.xsl 2006-04-20 15:45:55.000000000 +0200
++++ docbook2x-0.8.8/xslt/man/manpage.xsl 2007-04-20 16:19:28.000000000 +0200
+@@ -30,7 +30,7 @@
+
+ <xsl:template name="manpage-filename">
+ <xsl:param name="filename" />
+- <xsl:value-of select="normalize-space(translate($filename, &quot; /&quot;, &quot;__&quot;))" />
++ <xsl:value-of select="translate(normalize-space($filename), ' /', '__')" />
+ </xsl:template>
+
+
+--- docbook2x-0.8.8~/xslt/man/refentry.xsl 2006-04-21 04:39:55.000000000 +0200
++++ docbook2x-0.8.8/xslt/man/refentry.xsl 2007-04-20 16:21:53.000000000 +0200
+@@ -38,7 +38,11 @@
+ <xsl:template name="refentry-filename">
+ <xsl:param name="title" />
+
+- <xsl:variable name="title2" select="translate($title, &quot; /&quot;, &quot;__&quot;)" />
++ <xsl:variable name="title2">
++ <xsl:call-template name="manpage-filename">
++ <xsl:with-param name="filename" select="$title" />
++ </xsl:call-template>
++ </xsl:variable>
+
+ <!-- not using gentext here since man page names tend not to have
+ accented chars / non-Latin chars ...
diff --git a/gnu/packages/patches/docbook2x-manpage-typo.patch b/gnu/packages/patches/docbook2x-manpage-typo.patch
new file mode 100644
index 0000000000..5be21bdf9b
--- /dev/null
+++ b/gnu/packages/patches/docbook2x-manpage-typo.patch
@@ -0,0 +1,24 @@
+Author: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+
+--- docbook2x-0.8.8.orig/doc/docbook2man.1
++++ docbook2x-0.8.8/doc/docbook2man.1
+@@ -187,7 +187,7 @@ parameter instead.
+
+ However, inside a custom stylesheet
+ (\fInot on the command-line\fR)
+-this paramter can be set to the XPath expression
++this parameter can be set to the XPath expression
+ \*(T<document('')\*(T>,
+ which will cause the custom translations
+ directly embedded inside the custom stylesheet to be read.
+--- docbook2x-0.8.8.orig/doc/docbook2texi.1
++++ docbook2x-0.8.8/doc/docbook2texi.1
+@@ -230,7 +230,7 @@ parameter instead.
+
+ However, inside a custom stylesheet
+ (\fInot on the command-line\fR)
+-this paramter can be set to the XPath expression
++this parameter can be set to the XPath expression
+ \*(T<document('')\*(T>,
+ which will cause the custom translations
+ directly embedded inside the custom stylesheet to be read.
diff --git a/gnu/packages/patches/docbook2x-preprocessor-declaration.patch b/gnu/packages/patches/docbook2x-preprocessor-declaration.patch
new file mode 100644
index 0000000000..938f20617a
--- /dev/null
+++ b/gnu/packages/patches/docbook2x-preprocessor-declaration.patch
@@ -0,0 +1,89 @@
+## 04_fix_442782_preprocessor_declaration_syntax.dpatch by Colin Watson <cjwatson@debian.org>.
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Conventionally, preprocessor declarations should start with
+## DP: '\"
+## DP: rather than
+## DP: .\"
+## DP: Current man-db only supports the first (and recommended) syntax. So
+## DP: Colin Watson provided this patch to fix docbook2x.
+## DP:
+## DP: <URL:http://bugs.debian.org/442782>
+## DP: <URL:http://lists.gnu.org/archive/html/groff/2007-11/msg00023.html>
+
+Edit by Bruno Victal <mirai@makinata.eu>:
+ Removed dpatch lines.
+
+--- trunk~/perl/db2x_manxml.pl 2006-04-22 17:21:32.000000000 +0200
++++ trunk/perl/db2x_manxml.pl 2007-11-24 01:27:37.000000000 +0100
+@@ -342,6 +342,25 @@
+ $self->{line_start} = 1;
+ }
+
++#
++# Print a comment in the output, without causing a break.
++# Params: comment - the comment text.
++# May use any characters; they need not be escaped.
++#
++sub comment_nobreak
++{
++ my ($self, $comment) = @_;
++ $self->write("\n") unless $self->{line_start};
++
++ foreach my $line (split(/\n/, $comment)) {
++ $self->write('\'\" ');
++ $self->write($line);
++ $self->write("\n");
++ }
++
++ $self->{line_start} = 1;
++}
++
+
+ #
+ # Use a roff "escape" i.e. commands embedded in text starting with \
+@@ -510,16 +529,20 @@
+
+ $self->{'adjust-stack'} = [ 'b' ];
+
+- $self->{rw}->comment($elem->attr('preprocessors'))
+- if($elem->attr('preprocessors') ne '');
+-
++ my $preprocessors = $elem->attr('preprocessors');
+ # I've dug through the Internet to see if there was any
+ # standard way to specify encoding with man pages.
+ # The following seems to be a reasonable proposal:
+ # <URL:http://mail.nl.linux.org/linux-utf8/2001-04/msg00168.html>
+ my $encoding = $self->{options}->{'encoding'};
+ $encoding =~ s#//TRANSLIT$##i;
+- $self->{rw}->comment("-*- coding: $encoding -*-");
++ $encoding = "-*- coding: $encoding -*-";
++ if ($preprocessors eq '') {
++ $preprocessors = $encoding;
++ } else {
++ $preprocessors = "$preprocessors $encoding";
++ }
++ $self->{rw}->comment_nobreak($preprocessors);
+
+ # Define escapes for switching to and from monospace fonts (groff only)
+ $self->{rw}->request(qw{ .if \n(.g .ds T< \\\\FC});
+--- trunk~/xslt/backend/db2x_manxml.xsl 2006-04-23 16:44:52.000000000 +0200
++++ trunk/xslt/backend/db2x_manxml.xsl 2007-11-24 01:27:37.000000000 +0100
+@@ -528,7 +528,7 @@
+ <exslt:document method="text"
+ encoding="{$encoding}"
+ href="{$path}">
+- <xsl:text>.\" -*- coding: </xsl:text>
++ <xsl:text>'\" -*- coding: </xsl:text>
+ <xsl:value-of select="$encoding" />
+ <xsl:text> -*-&#10;</xsl:text>
+ <xsl:copy-of select="$content" />
+@@ -538,7 +538,7 @@
+ <saxon:output method="text"
+ encoding="{$encoding}"
+ href="{$path}">
+- <xsl:text>.\" -*- coding: </xsl:text>
++ <xsl:text>'\" -*- coding: </xsl:text>
+ <xsl:value-of select="$encoding" />
+ <xsl:text> -*-&#10;</xsl:text>
+ <xsl:copy-of select="$content" />
diff --git a/gnu/packages/patches/docbook2x-static-datadir-evaluation.patch b/gnu/packages/patches/docbook2x-static-datadir-evaluation.patch
new file mode 100644
index 0000000000..5241dc30a7
--- /dev/null
+++ b/gnu/packages/patches/docbook2x-static-datadir-evaluation.patch
@@ -0,0 +1,19 @@
+Description:
+ 01_fix_static_datadir_evaluation.dpatch by Daniel Leidert (dale) <daniel.leidert@wgdd.de>
+ All lines beginning with `## DP:' are a description of the patch.
+ The evaluation of datadir results in "${prefix}/share" without
+ evaluation of the ${prefix} variable with autoconf 2.60.
+
+Index: docbook2X-0.8.8/configure.ac
+===================================================================
+--- docbook2X-0.8.8.orig/configure.ac
++++ docbook2X-0.8.8/configure.ac
+@@ -148,7 +148,7 @@
+ dnl they will reside and should use these static_* values.
+ dnl Ensure that all static_* are fully expanded.
+
+-eval static_datadir="$datadir"
++eval eval static_datadir="$datadir"
+
+ eval static_bindir="$bindir"
+ old_val=""
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:34
[PATCH core-updates 05/61] gnu: docbook-xsl: Add rewrite entries for http.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
74a2b06314c7715c7121a63e398141a19d913295.1692830149.git.mirai@makinata.eu
Refactored 'patch-catalog.xml to reduce code duplication.
The catalog for docbook-xsl hosted on the CDN [1] have entries for the 'http'
scheme yet when building from source only 'https' entries are generated.
Patch the XML catalog to provide them both.


* gnu/packages/docbook.scm (docbook-xsl)[arguments]<#:phases>: Rename
'patch-catalog-xml to 'patch-catalog.xml. Refactor this phase for
deduplication and add 'https' entries.
---
gnu/packages/docbook.scm | 140 +++++++++++++++++----------------------
1 file changed, 59 insertions(+), 81 deletions(-)

Toggle diff (159 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 55f99aae62..83a5496a0e 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -342,93 +342,71 @@ (define-public docbook-xsl
(add-before 'install 'generate-catalog.xml
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "-C" "xsl" "catalog.xml" make-flags)))
- (add-before 'install 'patch-catalog-xml
+ (add-after 'generate-catalog.xml 'patch-catalog.xml
+ ;; Note: URI resolutions are not recursive.
+ ;; A rewrite rule from:
+ ;; 'http://docbook.sourceforge.net/release/xsl-ns/'
+ ;; to
+ ;; 'http://docbook.sourceforge.net/release/xsl/'
+ ;; will not trigger the rewrite rule that ultimately
+ ;; remaps to a /gnu/store URI, as can be seen by
+ ;; invoking:
+ ;; $ xmlcatalog "" \
+ ;; 'http://docbook.sourceforge.net/release/xsl-ns/current/'
+ ;; http://docbook.sourceforge.net/release/xsl/current/
+ ;; $ xmlcatalog "" \
+ ;; 'http://docbook.sourceforge.net/release/xsl/current/'
+ ;; file://gnu/store/…/xml/xsl/…
+ ;;
+ ;; See XML Catalog specification, item 7.2.2. for
+ ;; details.
(lambda* (#:key inputs #:allow-other-keys)
(let ((xmlcatalog (search-input-file inputs
"/bin/xmlcatalog"))
- (catalog-files (find-files "." "catalog\\.xml$"))
+ (catalog-file "xsl/catalog.xml")
(store-uri (string-append "file://" dest-path "/")))
+ ;; Remove /snapshot/ references.
(for-each
- (lambda (catalog)
- ;; Replace /snapshot/ reference with one based on
- ;; BASE-VERSION.
- (let ((versioned-uri
- (format
- #f "https://cdn.docbook.org/release/xsl/~a/"
- #$base-version)))
- (invoke xmlcatalog "--noout"
- "--del"
- "https://cdn.docbook.org/release/xsl/snapshot/"
- catalog)
- (for-each
- (lambda (type)
- (invoke xmlcatalog "--noout"
- "--add" type
- versioned-uri
- store-uri
- catalog))
- (list "rewriteSystem" "rewriteURI")))
-
- ;; Patch /current/ references to point to /gnu/store/….
- (for-each
- (lambda (type)
- (invoke xmlcatalog "--noout"
- "--add" type
- "https://cdn.docbook.org/release/xsl/current/"
- store-uri
- catalog))
- (list "rewriteSystem" "rewriteURI"))
-
- ;; Re-add the no longer present compatibility entries for
- ;; v.1.79.1 or earlier URIs.
- (for-each
- (lambda (type)
- (invoke xmlcatalog "--noout"
- "--add" type
- "http://docbook.sourceforge.net/release/xsl/current/"
- store-uri
- catalog))
- (list "rewriteSystem" "rewriteURI"))
-
- ;; Originally the
- ;; "http://docbook.sourceforge.net/release/xsl/"
- ;; URI referred to the non-namespaced docbook-xsl,
- ;; with its namespaced version using a URI differing in
- ;; the path component as '…/xsl-ns/'.
- ;; At some point the namespaced version was made the
- ;; canonical docbook-xsl package whilst preserving the
- ;; original URI.
- ;;
- ;; For compatibility with XML files that still specify
- ;; the legacy namespaced docbook-xsl URIs we re-add them
- ;; here.
+ (lambda (scheme)
+ (invoke xmlcatalog "--noout"
+ "--del"
+ (string-append
+ scheme
+ "://cdn.docbook.org/release/xsl/snapshot/")
+ catalog-file))
+ (list "http" "https"))
+ ;; Rewrite both http:// and https:// URIs.
+ (for-each
+ (lambda (path)
(for-each
- (lambda (type)
- ;; Remap /xsl-ns/ to /xsl/.
- ;; Note: URI resolutions are not recursive.
- ;; A rewrite rule from:
- ;; 'http://docbook.sourceforge.net/release/xsl-ns/'
- ;; to
- ;; 'http://docbook.sourceforge.net/release/xsl/'
- ;; will not trigger the rewrite rule that ultimately
- ;; remaps to a /gnu/store URI, as can be seen by
- ;; invoking:
- ;; $ xmlcatalog "" \
- ;; 'http://docbook.sourceforge.net/release/xsl-ns/current/'
- ;; http://docbook.sourceforge.net/release/xsl/current/
- ;; $ xmlcatalog "" \
- ;; 'http://docbook.sourceforge.net/release/xsl/current/'
- ;; file://gnu/store/…/xml/xsl/…
- ;;
- ;; See XML Catalog specification, item 7.2.2. for
- ;; details.
- (invoke xmlcatalog "--noout"
- "--add" type
- "http://docbook.sourceforge.net/release/xsl-ns/current/"
- store-uri
- catalog))
- (list "rewriteSystem" "rewriteURI")))
- catalog-files))))
+ (lambda (scheme)
+ (for-each
+ (lambda (entry-type)
+ (let ((uri (string-append scheme "://" path)))
+ (invoke xmlcatalog "--noout"
+ "--add" entry-type uri store-uri
+ catalog-file)))
+ (list "rewriteSystem" "rewriteURI")))
+ (list "http" "https")))
+ (list #$(format #f "cdn.docbook.org/release/xsl/~a/"
+ base-version)
+ "cdn.docbook.org/release/xsl/current/"
+ ;; Re-add the no longer present compatibility entries for
+ ;; v.1.79.1 or earlier URIs.
+ "docbook.sourceforge.net/release/xsl/current/"
+ ;; Originally the
+ ;; "http://docbook.sourceforge.net/release/xsl/"
+ ;; URI referred to the non-namespaced docbook-xsl,
+ ;; with its namespaced version using a URI differing in
+ ;; the path component as '…/xsl-ns/'.
+ ;; At some point the namespaced version was made the
+ ;; canonical docbook-xsl package whilst preserving the
+ ;; original URI.
+ ;;
+ ;; For compatibility with XML files that still specify
+ ;; the legacy namespaced docbook-xsl URIs we re-add them
+ ;; here.
+ "docbook.sourceforge.net/release/xsl-ns/current/")))))
(replace 'install
(lambda _
(let ((select-rx (make-regexp
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:34
[PATCH core-updates 06/61] gnu: docbook: Remove leftovers.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
65fd1b35abc1b81ae36e4ed52bad3173d71a8f0a.1692830149.git.mirai@makinata.eu
docbook-xsl patches are probably remnants from
1f7d94597f1e78776f854eeca46c03a3aded8466.

* gnu/packages/docbook.scm: Remove unused import.
* gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch: Remove.
* gnu/packages/patches/docbook-xsl-support-old-url.patch: Ditto.
* gnu/local.mk: Unregister it.
* gnu/packages/moreutils.scm (moreutils)[native-inputs]: Drop obsolete
comment.
---
gnu/local.mk | 2 -
gnu/packages/docbook.scm | 1 -
gnu/packages/moreutils.scm | 2 +-
...ocbook-xsl-nonrecursive-string-subst.patch | 40 -------------------
.../patches/docbook-xsl-support-old-url.patch | 17 --------
5 files changed, 1 insertion(+), 61 deletions(-)
delete mode 100644 gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
delete mode 100644 gnu/packages/patches/docbook-xsl-support-old-url.patch

Toggle diff (109 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 6dcacd3d6e..b229b21603 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1063,8 +1063,6 @@ dist_patch_DATA = \
%D%/packages/patches/diffutils-fix-signal-processing.patch \
%D%/packages/patches/directfb-davinci-glibc-228-compat.patch \
%D%/packages/patches/dkimproxy-add-ipv6-support.patch \
- %D%/packages/patches/docbook-xsl-nonrecursive-string-subst.patch \
- %D%/packages/patches/docbook-xsl-support-old-url.patch \
%D%/packages/patches/doc++-include-directives.patch \
%D%/packages/patches/doc++-segfault-fix.patch \
%D%/packages/patches/dovecot-opensslv3.patch \
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 83a5496a0e..47d3a04479 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -47,7 +47,6 @@ (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 trivial)
#:use-module (guix build-system python))
;; The fetch-plan, install-plan and phases for docbook-xml tend to vary
diff --git a/gnu/packages/moreutils.scm b/gnu/packages/moreutils.scm
index d219c78d4f..d7f4a8522a 100644
--- a/gnu/packages/moreutils.scm
+++ b/gnu/packages/moreutils.scm
@@ -71,7 +71,7 @@ (define-public moreutils
;; For building the manual pages.
(native-inputs
(list docbook-xml-4.4
- docbook-xsl ;without -next, man pages are corrupted
+ docbook-xsl
libxml2
libxslt))
(home-page "https://joeyh.name/code/moreutils/")
diff --git a/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch b/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
deleted file mode 100644
index fed4b76429..0000000000
--- a/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Use a non-recursive replace function when the parser supports it.
-
-https://bugs.gnu.org/29782
-https://bugzilla.samba.org/show_bug.cgi?id=9515
-https://bugzilla.gnome.org/show_bug.cgi?id=736077 (for xsltproc)
-
-Patch copied from Debian:
-https://salsa.debian.org/debian/docbook-xsl/-/blob/master/debian/patches/765567_non-recursive_string_subst.patch
-
-Description: use EXSLT "replace" function when available
- A recursive implementation of string.subst is problematic,
- long strings with many matches will cause stack overflows.
-Author: Peter De Wachter <pdewacht@gmail.com>
-Bug-Debian: https://bugs.debian.org/750593
-
---- a/lib/lib.xsl
-+++ b/lib/lib.xsl
-@@ -6,7 +6,11 @@
-
- This module implements DTD-independent functions
-
-- ******************************************************************** --><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-+ ******************************************************************** -->
-+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-+ xmlns:str="http://exslt.org/strings"
-+ exclude-result-prefixes="str"
-+ version="1.0">
-
- <xsl:template name="dot.count">
- <!-- Returns the number of "." characters in a string -->
-@@ -52,6 +56,9 @@
- <xsl:param name="replacement"/>
-
- <xsl:choose>
-+ <xsl:when test="function-available('str:replace')">
-+ <xsl:value-of select="str:replace($string, string($target), string($replacement))"/>
-+ </xsl:when>
- <xsl:when test="contains($string, $target)">
- <xsl:variable name="rest">
- <xsl:call-template name="string.subst">
diff --git a/gnu/packages/patches/docbook-xsl-support-old-url.patch b/gnu/packages/patches/docbook-xsl-support-old-url.patch
deleted file mode 100644
index 5b7dda458f..0000000000
--- a/gnu/packages/patches/docbook-xsl-support-old-url.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Docbook 1.79.2 makes very few changes apart from changing the canonical URL
-to cdn.docbook.org. This patch adds support for the previous URL to avoid
-breaking packages that still use that.
-
-Adapted from Debian:
-https://salsa.debian.org/debian/docbook-xsl/-/blob/master/debian/patches/0005-catalog.xml-Compatibility-with-1.79.1-or-earlier.patch
-
---- a/catalog.xml
-+++ b/catalog.xml
-@@ -5,4 +5,7 @@
- <rewriteSystem systemIdStartString="http://cdn.docbook.org/release/xsl/current/" rewritePrefix="./"/>
- <rewriteURI uriStartString="http://cdn.docbook.org/release/xsl/1.79.2/" rewritePrefix="./"/>
- <rewriteSystem systemIdStartString="http://cdn.docbook.org/release/xsl/1.79.2/" rewritePrefix="./"/>
-+ <!-- Also support old URI of v1.79.1 or earlier -->
-+ <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
-+ <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
- </catalog>
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 09/61] gnu: docbook2x: Fix sgml2xml-isoent and add test dependencies.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
c158b9ccdac64bf378b11d5af04e5b3ee73481da.1692830149.git.mirai@makinata.eu
* gnu/packages/docbook.scm (docbook2x)[arguments]<#:phases>: Add 'sgml-check
phase.
[inputs]: Add opensp.
[native-inputs]: Add docbook-xml-4.1.2, docbook-xml-4.2, docbook-xml-4.4,
tidy-html, groff-minimal and libxml2.
---
gnu/packages/docbook.scm | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 6a138dcb77..2d1c1f00ad 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -30,6 +30,7 @@ (define-module (gnu packages docbook)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages groff)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages inkscape)
#:use-module (gnu packages tex)
@@ -37,6 +38,7 @@ (define-module (gnu packages docbook)
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
#:use-module (gnu packages base)
+ #:use-module (gnu packages web)
#:use-module (gnu packages web-browsers)
#:use-module (gnu packages xfig)
#:use-module (gnu packages xml)
@@ -924,6 +926,12 @@ (define-public docbook2x
`("PERL5LIB" ":" prefix ,perl5lib)
`("XML_CATALOG_FILES" " " prefix ,xml-catalog-files)))
programs))))
+ (add-after 'install 'sgml-check
+ ;; This is not covered by 'make check'.
+ ;; Test that 'sgml2xml-isoent' works.
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "make" "installcheck"))))
(add-after 'install 'create-symlinks
(lambda _
;; Create db2x_* symlinks to satisfy some configure scripts
@@ -935,6 +943,7 @@ (define-public docbook2x
'("docbook2man" "docbook2texi")))))))
(inputs
(list bash-minimal
+ opensp
perl
perl-xml-namespacesupport
perl-xml-parser
@@ -944,7 +953,11 @@ (define-public docbook2x
libxslt))
(native-inputs
(list autoconf automake libtool
- docbook-xml-4.5))
+ tidy-html
+ ;; For tests
+ docbook-xml-4.1.2 docbook-xml-4.2 docbook-xml-4.4
+ docbook-xml-4.5
+ groff-minimal libxml2))
(home-page "https://docbook2x.sourceforge.net")
(synopsis "Convert DocBook to man page and Texinfo format")
(description
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 11/61] gnu: libxml2: Rewrite using G-Expressions.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
b22ef26b9451a474f89816b1d7b9d1de53729cbd.1692830149.git.mirai@makinata.eu
* gnu/packages/xml.scm (libxml2): Use G-Expressions.
---
gnu/packages/xml.scm | 47 ++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 23 deletions(-)

Toggle diff (67 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 555f0ab624..d5c3c75cb9 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -194,29 +195,29 @@ (define-public libxml2
(build-system gnu-build-system)
(outputs '("out" "static" "doc"))
(arguments
- `(#:phases (modify-phases %standard-phases
- (add-after 'install 'use-other-outputs
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((src (assoc-ref outputs "out"))
- (doc (string-append (assoc-ref outputs "doc") "/share"))
- (dst (string-append (assoc-ref outputs "static")
- "/lib")))
- (mkdir-p doc)
- (mkdir-p dst)
- (for-each (lambda (dir)
- (rename-file (string-append src "/share/" dir)
- (string-append doc "/" dir)))
- '("gtk-doc"))
- (for-each (lambda (ar)
- (rename-file ar (string-append dst "/"
- (basename ar))))
- (find-files (string-append src "/lib") "\\.a$"))
-
- ;; Remove reference to the static library from the .la
- ;; file such that Libtool does the right thing when both
- ;; the shared and static variants are available.
- (substitute* (string-append src "/lib/libxml2.la")
- (("^old_library='libxml2.a'") "old_library=''"))))))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'use-other-outputs
+ (lambda _
+ (let ((doc (string-append #$output:doc "/share/"))
+ (static (string-append #$output:static "/lib/")))
+ (for-each mkdir-p (list doc static))
+
+ (rename-file (string-append #$output "/share/gtk-doc")
+ (string-append doc "/gtk-doc"))
+
+ (for-each
+ (lambda (ar)
+ (rename-file ar
+ (string-append static (basename ar))))
+ (find-files (string-append #$output "/lib") "\\.a$"))
+
+ ;; Remove reference to the static library from the .la
+ ;; file such that Libtool does the right thing when both
+ ;; the shared and static variants are available.
+ (substitute* (string-append #$output "/lib/libxml2.la")
+ (("^old_library='libxml2.a'") "old_library=''"))))))))
(home-page "http://www.xmlsoft.org/")
(synopsis "C parser for XML")
(inputs (list xz))
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 13/61] gnu: libxml2: Add SGML_CATALOG_FILES to native-search-path.
(address . 65479@debbugs.gnu.org)
dd7fd2ca8cdcf584dfe52a2c005e29aa8b94447a.1692830149.git.mirai@makinata.eu
According to the xmllint manpage it also makes use of the SGML_CATALOG_FILES
environment variable.

* gnu/packages/xml.scm (libxml2)[native-search-paths]: Add SGML_CATALOG_FILES.

Co-authored-by: gemmaro <gemmaro.dev@gmail.com>
---
gnu/packages/xml.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index b3112918ef..ec3de82765 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -224,7 +224,8 @@ (define-public libxml2
(inputs (list xz))
(propagated-inputs (list zlib)) ; libxml2.la says '-lz'.
(native-inputs (list perl))
- (native-search-paths (list $XML_CATALOG_FILES))
+ (native-search-paths
+ (list $SGML_CATALOG_FILES $XML_CATALOG_FILES))
(search-paths native-search-paths)
(description
"Libxml2 is the XML C parser and toolkit developed for the Gnome
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 10/61] gnu: docbook2x: Split documentation.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
14a48854705a29c41699654199d3e24ccbccba49.1692830149.git.mirai@makinata.eu
* gnu/packages/docbook.scm (docbook2x)[arguments]<#:phases>: Add
'split-outputs phase.
[outputs]: Add 'doc output.
---
gnu/packages/docbook.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 2d1c1f00ad..37eaac0a59 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -902,6 +902,12 @@ (define-public docbook2x
(add-after 'unpack 'autoreconf
(lambda _
(invoke "autoreconf" "-vif")))
+ (add-after 'install 'split-outputs
+ (lambda _
+ (let* ((old (string-append #$output "/share/doc"))
+ (new (string-append #$output:doc "/share/doc")))
+ (mkdir-p (dirname new))
+ (rename-file old new))))
(add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((programs
@@ -958,6 +964,7 @@ (define-public docbook2x
docbook-xml-4.1.2 docbook-xml-4.2 docbook-xml-4.4
docbook-xml-4.5
groff-minimal libxml2))
+ (outputs '("out" "doc"))
(home-page "https://docbook2x.sourceforge.net")
(synopsis "Convert DocBook to man page and Texinfo format")
(description
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:34
[PATCH core-updates 07/61] gnu: docbook-utils: Import patches from debian.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
40aa16c4ec5e774fa7ad47a488eb1c89250490b1.1692830149.git.mirai@makinata.eu
* gnu/packages/docbook.scm (docbook-utils)[source]: Import patches from debian.
Drop snippet for patching OpenSP and OpenJade.
[arguments]<:phases>: Add 'autoreconf phase.
[native-inputs]: Add autoconf, automake and libtool.
* gnu/packages/patches/docbook-utils-documentation-edits.patch: New file.
* gnu/packages/patches/docbook-utils-escape-characters.patch: Ditto.
* gnu/packages/patches/docbook-utils-remove-jade-sp.patch: Ditto.
* gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch: Ditto.
* gnu/packages/patches/docbook-utils-source-date-epoch.patch: Ditto.
* gnu/packages/patches/docbook-utils-use-date-element.patch: Ditto.
* gnu/local.mk: Register them.
---
gnu/local.mk | 6 +
gnu/packages/docbook.scm | 24 +-
.../docbook-utils-documentation-edits.patch | 100 ++++++++
.../docbook-utils-escape-characters.patch | 34 +++
.../docbook-utils-remove-jade-sp.patch | 215 ++++++++++++++++++
...book-utils-respect-refentry-for-name.patch | 34 +++
.../docbook-utils-source-date-epoch.patch | 29 +++
.../docbook-utils-use-date-element.patch | 61 +++++
8 files changed, 496 insertions(+), 7 deletions(-)
create mode 100644 gnu/packages/patches/docbook-utils-documentation-edits.patch
create mode 100644 gnu/packages/patches/docbook-utils-escape-characters.patch
create mode 100644 gnu/packages/patches/docbook-utils-remove-jade-sp.patch
create mode 100644 gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch
create mode 100644 gnu/packages/patches/docbook-utils-source-date-epoch.patch
create mode 100644 gnu/packages/patches/docbook-utils-use-date-element.patch

Toggle diff (449 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index b229b21603..565a1860ea 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1063,6 +1063,12 @@ dist_patch_DATA = \
%D%/packages/patches/diffutils-fix-signal-processing.patch \
%D%/packages/patches/directfb-davinci-glibc-228-compat.patch \
%D%/packages/patches/dkimproxy-add-ipv6-support.patch \
+ %D%/packages/patches/docbook-utils-documentation-edits.patch \
+ %D%/packages/patches/docbook-utils-escape-characters.patch \
+ %D%/packages/patches/docbook-utils-remove-jade-sp.patch \
+ %D%/packages/patches/docbook-utils-respect-refentry-for-name.patch \
+ %D%/packages/patches/docbook-utils-source-date-epoch.patch \
+ %D%/packages/patches/docbook-utils-use-date-element.patch \
%D%/packages/patches/doc++-include-directives.patch \
%D%/packages/patches/doc++-segfault-fix.patch \
%D%/packages/patches/dovecot-opensslv3.patch \
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 47d3a04479..994aa57f18 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -773,18 +773,20 @@ (define-public docbook-utils
(sha256
(base32
"1scj5vgw1xz872pq54a89blcxqqm11p90yzv8a9mqq57x27apyj8"))
+ (patches
+ (search-patches "docbook-utils-documentation-edits.patch"
+ "docbook-utils-escape-characters.patch"
+ "docbook-utils-remove-jade-sp.patch"
+ "docbook-utils-respect-refentry-for-name.patch"
+ "docbook-utils-use-date-element.patch"
+ "docbook-utils-source-date-epoch.patch"))
(modules '((guix build utils)))
(snippet
#~(begin
;; Patch build system.
- (substitute* (find-files "." "\\.in$")
+ (substitute* (find-files "." "\\.((in)|(am))$")
;; Do not hard-code SGML_CATALOG_FILES.
- ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") "")
- ;; Use OpenSP and OpenJade.
- (("\\bjade\\b")
- "openjade")
- (("\\bnsgmls\\b")
- "onsgmls"))
+ ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") ""))
;; Do not override the SGML_CATALOG_FILES environment
;; variable.
@@ -805,6 +807,14 @@ (define-public docbook-utils
"CONVERT=")
(("\\[ -x /usr/bin/([^ ]+) \\]" _ command)
(format #f "command -v ~a > /dev/null" command)))))))
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'autoreconf
+ (lambda _
+ (invoke "autoreconf" "-vif"))))))
+ (native-inputs (list autoconf automake libtool))
(build-system gnu-build-system)
;; Propagated for convenience. All these tools are used at run time to
;; provide the complete functionality of the docbook-utils commands.
diff --git a/gnu/packages/patches/docbook-utils-documentation-edits.patch b/gnu/packages/patches/docbook-utils-documentation-edits.patch
new file mode 100644
index 0000000000..03c0a4abcf
--- /dev/null
+++ b/gnu/packages/patches/docbook-utils-documentation-edits.patch
@@ -0,0 +1,100 @@
+Description: Fix some typos in man pages
+Author: Mathieu Malaterre <malat@debian.org>
+
+Index: docbook-utils-0.6.14/doc/man/docbook2man-spec.pl.1
+===================================================================
+--- docbook-utils-0.6.14.orig/doc/man/docbook2man-spec.pl.1 2012-05-09 18:39:17.932819095 +0200
++++ docbook-utils-0.6.14/doc/man/docbook2man-spec.pl.1 2012-05-09 18:39:24.780818845 +0200
+@@ -17,7 +17,7 @@
+ .SH "DESCRIPTION"
+ .PP
+ \fBdocbook2man\fR is a sgmlspl spec file that produced man
+-pages (using the -man macros) from DocBook RefEntry markup.
++pages (using the \-man macros) from DocBook RefEntry markup.
+ .PP
+ The program reads ESIS produced by nsgmls (or other SGML parsers) from
+ standard input. Markup not found in RefEntry is discarded.
+Index: docbook-utils-0.6.14/doc/man/frontend-spec.7
+===================================================================
+--- docbook-utils-0.6.14.orig/doc/man/frontend-spec.7 2012-05-09 18:41:45.172813778 +0200
++++ docbook-utils-0.6.14/doc/man/frontend-spec.7 2012-05-09 18:42:03.176813129 +0200
+@@ -10,7 +10,7 @@
+ .SH "DESCRIPTION"
+ .PP
+ \fBjw\fR(1) calls frontends like
+-\fIfrontends/docbook\fR to get the informations
++\fIfrontends/docbook\fR to get the information
+ specific to a given input format. The frontend knows which information
+ to return from the first command line parameter. It gets all necessary
+ data via environment variables ready to use.
+Index: docbook-utils-0.6.14/doc/man/jw.1
+===================================================================
+--- docbook-utils-0.6.14.orig/doc/man/jw.1 2012-05-09 18:39:35.612818456 +0200
++++ docbook-utils-0.6.14/doc/man/jw.1 2012-05-09 18:40:51.736815708 +0200
+@@ -142,7 +142,7 @@
+ The following options apply to the conversion script:
+ .TP
+ \fB -f \fIfrontend\fB | --frontend \fIfrontend\fB \fR
+-Allows to specify another frontend than default \fIdocbook\fR\&.
++Allows one to specify another frontend than default \fIdocbook\fR\&.
+ The list of currently available frontends is:
+ .RS
+ .TP
+@@ -156,13 +156,13 @@
+ .RE
+ .TP
+ \fB -b \fIbackend\fB | --backend \fIbackend\fB \fR
+-Allows to specify another backend than default
++Allows one to specify another backend than default
+ \fIHTML\fR\&. The list of currently available
+ backends is:
+ .RS
+ .TP
+ \fB\fIdvi\fB\fR
+-Converts to DVI (DeVice Independant
++Converts to DVI (DeVice Independent
+ files) by calling \fBJade\fR or
+ \fBOpenJade\fR\&.
+ .TP
+@@ -210,7 +210,7 @@
+ .RE
+ .TP
+ \fB -c \fIfile\fB | --cat \fIfile\fB \fR
+-Allows to use an extra SGML Open Catalog that will list
++Allows one to use an extra SGML Open Catalog that will list
+ other files like customization style sheets, adaptations to the
+ DocBook Document Type Definition, special character entities,
+ etc. This catalog is added to the list of catalogs determined
+@@ -241,7 +241,7 @@
+ are specified on the command line.
+ .TP
+ \fB -d \fIfile\fB|default|none | --dsl \fIfile\fB|default|none \fR
+-Allows to use a customized style sheet instead
++Allows one to use a customized style sheet instead
+ of the default one.
+
+ A "target" starting with a hash mark "#" can be appended
+Index: docbook-utils-0.6.14/doc/man/sgmldiff.1
+===================================================================
+--- docbook-utils-0.6.14.orig/doc/man/sgmldiff.1 2012-05-09 18:41:13.316814927 +0200
++++ docbook-utils-0.6.14/doc/man/sgmldiff.1 2012-05-09 18:41:38.032814038 +0200
+@@ -17,7 +17,7 @@
+
+ .SH "DESCRIPTION"
+ .PP
+-This perl script allows to determine the structural differences
++This perl script allows one to determine the structural differences
+ between two SGML files. It compares the files, regardless of what
+ is in between the tags, to only focus on the markup. Its output
+ is similar to \fBdiff\fR(1)\&.
+@@ -62,8 +62,8 @@
+ Lines 5 to 7 of the first file have been changed
+ into lines 8 to 10 of the second line.
+ In addition to those summaries, the lines of the first file are
+-shown preceeded by '<' and the lines of the second file are
+-shown preceeded by '>".
++shown preceded by '<' and the lines of the second file are
++shown preceded by '>".
+ .SH "OPTIONS"
+ .PP
+ Here is the list of actions that can be requested to
diff --git a/gnu/packages/patches/docbook-utils-escape-characters.patch b/gnu/packages/patches/docbook-utils-escape-characters.patch
new file mode 100644
index 0000000000..58fca8bace
--- /dev/null
+++ b/gnu/packages/patches/docbook-utils-escape-characters.patch
@@ -0,0 +1,34 @@
+Description: incorrectly strips whitespace (patch included)
+ In the previous upload, docbook2man was patched to escape the special
+ characters . and ' at the beginning of a line (see #399947).
+ Unfortunately that patch was incorrect -- as well as escaping the special
+ characters, it also removes all whitespace from the beginning of
+ affected lines. As a result, if you are in a block where whitespace
+ matters (such as <screen>...</screen>) then the output is now incorrect.
+
+ This is very easy to fix -- just match the whitespace and preserve it,
+ instead of tossing it away. The full patch (just two lines) is included
+ below.
+Author: Ben Burton <bab@debian.org>
+Forwarded: not-needed
+Bug-Debian: http://bugs.debian.org/528334
+
+Edit by Bruno Victal <mirai@makinata.eu>:
+ Patch was edited so that it could be applied against the original
+ docbook-utils-0.6.14 sources.
+
+Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
+===================================================================
+--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl 2012-05-09 18:59:42.584774885 +0200
++++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl 2012-05-09 19:00:34.788773002 +0200
+@@ -1212,8 +1212,8 @@
+ $_[0] =~ s/\\/\\\\/g;
+
+ # Escape dots and single quotes in column 1
+- $_[0] =~ s/^\./\\\&\./;
+- $_[0] =~ s/^\'/\\\&\'/;
++ $_[0] =~ s/^([ \t]*)\./$1\\\&\./;
++ $_[0] =~ s/^([ \t]*)\'/$1\\\&\'/;
+
+ # In non-'pre'-type elements:
+ if(!$nocollapse_whitespace) {
diff --git a/gnu/packages/patches/docbook-utils-remove-jade-sp.patch b/gnu/packages/patches/docbook-utils-remove-jade-sp.patch
new file mode 100644
index 0000000000..8aae51373f
--- /dev/null
+++ b/gnu/packages/patches/docbook-utils-remove-jade-sp.patch
@@ -0,0 +1,215 @@
+Description: Change dependencies on jade and sp to openjade and opensp
+Author: Neil Roeth <neil@debian.org>
+Last-Update: 2016-07-24
+
+Edit by Bruno Victal <mirai@makinata.eu>:
+ Patch was edited so that it could be applied against the original
+ docbook-utils-0.6.14 sources.
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/doc/HTML/Makefile.am
++++ b/doc/HTML/Makefile.am
+@@ -1,4 +1,4 @@
+-htmldir = $(docdir)/html/docbook-utils-@VERSION@
++htmldir = $(docdir)/html
+ html_DATA = api.html \
+ backend-spec.html \
+ docbook2man.html \
+@@ -25,6 +25,6 @@
+ $(top_srcdir)/doc/refentry/sgmldiff.sgml
+ SGML_CATALOG_FILES=/etc/sgml/catalog \
+ SGML_SEARCH_PATH=$(top_srcdir):$(top_srcdir)/doc:.. \
+- jade -t sgml -i html -d $(top_srcdir)/docbook-utils.dsl\#html \
++ openjade -t sgml -i html -d $(top_srcdir)/docbook-utils.dsl\#html \
+ -V '%use-id-as-filename%' $<
+
+--- a/doc/man/Makefile.am
++++ b/doc/man/Makefile.am
+@@ -12,5 +12,5 @@
+ $(top_srcdir)/helpers/docbook2man-spec.pl
+ SGML_CATALOG_FILES=/etc/sgml/catalog \
+ SGML_SEARCH_PATH=$(top_srcdir)/doc:.. \
+- nsgmls $< | \
++ onsgmls $< | \
+ sgmlspl $(top_srcdir)/helpers/docbook2man-spec.pl
+--- a/backends/man.in
++++ b/backends/man.in
+@@ -7,8 +7,8 @@
+ TMPDIR=`mktemp -d /tmp/man.XXXXXX` || \
+ { echo >&2 "man backend: could not create secure temporary directory"; exit 1;}
+ trap 'rm -rf "${TMPDIR}"' EXIT
+-nsgmls $SGML_FILE > "${TMPDIR}/nsgmls.tmp"
+-sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp" 2>"${TMPDIR}/errs"
++onsgmls $SGML_FILE > "${TMPDIR}/onsgmls.tmp"
++sgmlspl $HELPER <"${TMPDIR}/onsgmls.tmp" 2>"${TMPDIR}/errs"
+ if [ $? -ne 0 ]
+ then
+ cat "${TMPDIR}/errs"
+@@ -18,7 +18,7 @@
+ if grep unresolved "${TMPDIR}/errs" >/dev/null 2>&1
+ then
+ echo "Resolving references.."
+- sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp"
++ sgmlspl $HELPER <"${TMPDIR}/onsgmls.tmp"
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
+--- a/backends/texi.in
++++ b/backends/texi.in
+@@ -3,7 +3,7 @@
+ # This program is under GPL license. See LICENSE file for details.
+
+ # Convert to texinfo
+-nsgmls $SGML_FILE | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi
++onsgmls $SGML_FILE | sgmlspl docbook2texi-spec.pl >$SGML_FILE_NAME.texi
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
+--- a/bin/sgmldiff.in
++++ b/bin/sgmldiff.in
+@@ -22,13 +22,13 @@
+
+ use strict;
+ use integer;
+-use vars qw($nsgmls $errors $errorlog $VERSION);
++use vars qw($onsgmls $errors $errorlog $VERSION);
+ use Getopt::Long 2.01;
+
+ $VERSION = 1.03;
+
+-my $nsgmls;
+-$nsgmls = "@jade_bindir@/nsgmls";
++my $onsgmls;
++$onsgmls = "@jade_bindir@/onsgmls";
+
+ #----------------------------------------------------------------------
+ # TODO:
+@@ -37,7 +37,7 @@
+ # - Wait for suggestions ;-)
+ #
+ # Note: the input file need not be valid, nor is it necessary to have
+-# the DTDs. nsgmls always returns a structure.
++# the DTDs. onsgmls always returns a structure.
+ #----------------------------------------------------------------------
+
+ # Get file name
+@@ -141,11 +141,11 @@
+ unlink $diff2;
+
+ #---------------------------------------------------------------------
+-# Process nsgmls output: keep all stuff that is important for the
++# Process onsgmls output: keep all stuff that is important for the
+ # structure comparison. Make two structures: one that is diffed
+ # (without text) (DIFF) and one that is used to present the
+ # differences to the user (@full). For more info: see SP
+-# documentation, nsgmls output format.
++# documentation, onsgmls output format.
+
+ sub prepare {
+ my($filename,$todiffname) = @_;
+@@ -161,7 +161,7 @@
+ my @line_numbered = ();
+ my $line = 0;
+
+- open(ESIS, "$nsgmls -l $errors $errorlog -onotation-sysid -oid -oempty $filename | "); #-oentity generates strange output; ? -ononsgml
++ open(ESIS, "$onsgmls -l $errors $errorlog -onotation-sysid -oid -oempty $filename | "); #-oentity generates strange output; ? -ononsgml
+ open(DIFF, "> $todiffname");
+ while (<ESIS>) {
+ chomp $_;
+@@ -375,7 +375,7 @@
+ };
+
+ #----------------------------------------------------------------------
+-# Normalise data text from nsgmls (i.e. don't print the escaped text).
++# Normalise data text from onsgmls (i.e. don't print the escaped text).
+ sub normalise_text {
+ my($string,$prefix) = @_;
+ my $result = "$prefix";
+--- a/configure.in
++++ b/configure.in
+@@ -21,7 +21,7 @@
+
+ dnl Checks for programs.
+ jade_bindirs="/usr/bin /usr/local/bin"
+-AC_FIND_PROGRAM(nsgmls, $jade_bindirs, jade_bindir)
++AC_FIND_PROGRAM(onsgmls, $jade_bindirs, jade_bindir)
+ AC_SUBST(jade_bindir)
+
+ perl_bindirs="/usr/bin /usr/local/bin"
+--- a/doc/refentry/docbook2man-spec.pl.sgml
++++ b/doc/refentry/docbook2man-spec.pl.sgml
+@@ -19,7 +19,7 @@
+ <!-- docbook2man-spec.pl BREAKAGE HERE! -->
+
+ <CmdSynopsis>
+-<Command>nsgmls</command>
++<Command>onsgmls</command>
+ <Arg><Replaceable>sgml document</replaceable></Arg>
+ <Command>| sgmlspl</command>
+ <Arg choice=req>docbook2man-spec.pl</arg>
+@@ -35,7 +35,7 @@
+ </Para>
+
+ <Para>
+-The program reads ESIS produced by nsgmls (or other SGML parsers) from
++The program reads ESIS produced by onsgmls (or other SGML parsers) from
+ standard input. Markup not found in RefEntry is discarded.
+ </Para>
+
+--- a/doc/refentry/docbook2texi-spec.pl.sgml
++++ b/doc/refentry/docbook2texi-spec.pl.sgml
+@@ -20,7 +20,7 @@
+ <!-- docbook2man-spec.pl BREAKAGE HERE! -->
+
+ <CmdSynopsis>
+-<Command>nsgmls</command>
++<Command>onsgmls</command>
+ <Arg><Replaceable>sgml document</replaceable></Arg>
+ <Command>| sgmlspl</command>
+ <Arg choice=req>docbook2texi-spec.pl</arg>
+@@ -37,7 +37,7 @@
+ </Para>
+
+ <Para>
+-The program reads ESIS produced by nsgmls (or other SGML parsers) from
++The program reads ESIS produced by onsgmls (or other SGML parsers) from
+ standard input. Currently the document element must be <SGMLTag>Book</sgmltag>,
+ otherwise the results are undefined.
+ </Para>
+--- a/doc/refentry/jw.sgml
++++ b/doc/refentry/jw.sgml
+@@ -630,7 +630,7 @@
+ <manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>install-catalog</refentrytitle>
+ <manvolnum>8</manvolnum></citerefentry>,
+- <citerefentry><refentrytitle>nsgmls</refentrytitle>
++ <citerefentry><refentrytitle>onsgmls</refentrytitle>
+ <manvolnum>1</manvolnum></citerefentry>, <ulink
+ url="http://sources.redhat.com/docbook-tools/">docbook-utils
+ homepage</ulink>.</para>
+--- a/doc/refentry/sgmldiff.sgml
++++ b/doc/refentry/sgmldiff.sgml
+@@ -238,10 +238,10 @@
+ <glossterm>
+ <!-- Next line is a hack to force a paragraph break in the man-page. -->
+ <cmdsynopsis> <command></command> </cmdsynopsis>
+- <citerefentry> <refentrytitle>nsgmls</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>
++ <citerefentry> <refentrytitle>onsgmls</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>
+ </glossterm>
+ <glossdef>
+- <para>a base component of <application>Jade</application> DSSSL engine</para>
++ <para>a base component of <application>OpenJade</application> DSSSL engine</para>
+ </glossdef>
+ </glossentry>
+
+--- a/helpers/docbook2man-spec.pl
++++ b/helpers/docbook2man-spec.pl
+@@ -7,7 +7,7 @@
+ The SGMLSpm package from CPAN. This contains the sgmlspl script which
+ is used to grok this file. Use it like this:
+
+-nsgmls some-docbook-document.sgml | sgmlspl docbook2man-spec.pl
++onsgmls some-docbook-document.sgml | sgmlspl docbook2man-spec.pl
+
+ =head1 DESCRIPTION
+
diff --git a/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch b/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch
new file mode 100644
index 0000000000..d577fed748
--- /dev/null
+++ b/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch
@@ -0,0 +1,34 @@
+Description: docbook2man should translate the NAME section according to the REFENTRY's lang attribute
+ Currently, docbook2man translates the NAME section according to the lang
+ attribute provided to the REFNAMEDIV tag.
+ When a lang attribute is specified in the REFENTRY tag and no lang
+ attribute is specified with the REFNAMEDIV, the lang attribute of the
+ REFENTRY should be used.
+Author: Nicolas François <nicolas.francois@centraliens.net>
+Forwarded: not-needed
+Bug-Debian: http://bugs.debian.org/394511
+
+Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
+==============
This message was truncated. Download the full message here.
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 12/61] search-paths: Add $XML_CATALOG_FILES and $SGML_CATALOG_FILES.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
177010abd728f75aeb8958f617572e57034ee67c.1692830149.git.mirai@makinata.eu
These variables are used by some packages for XML/SGML catalog lookups.

* guix/search-paths ($XML_CATALOG_FILES, $SGML_CATALOG_FILES): New variable,
extracted from …
* gnu/packages/xml.scm (libxml2, opensp)[native-search-paths]: … here. Refer
to the variables from (guix search-paths) respectively.
* gnu/packages/perl.scm (perl-app-xml-docbook-builder)[native-search-paths]:
Use $XML_CATALOG_FILES.
* doc/guix.texi (Search Paths): Update documentation to reflect changes.
---
doc/guix.texi | 24 +++++++++++-------------
gnu/packages/perl.scm | 7 +------
gnu/packages/xml.scm | 19 +++----------------
guix/search-paths.scm | 25 +++++++++++++++++++++++++
4 files changed, 40 insertions(+), 35 deletions(-)

Toggle diff (156 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 58cc3d7aad..65b5cf6cab 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11057,17 +11057,14 @@ contain a list of @file{catalog.xml} files (not directories), which are
to be found in @file{xml} sub-directories---nothing less. The search
path specification looks like this:
+@c This is defined at (guix search-paths) as $XML_CATALOG_FILES.
@lisp
-(package
- (name "libxml2")
- ;; some fields omitted
- (native-search-paths
- (list (search-path-specification
- (variable "XML_CATALOG_FILES")
- (separator " ")
- (files '("xml"))
- (file-pattern "^catalog\\.xml$")
- (file-type 'regular)))))
+(search-path-specification
+ (variable "XML_CATALOG_FILES")
+ (separator " ")
+ (files '("xml"))
+ (file-pattern "^catalog\\.xml$")
+ (file-type 'regular))
@end lisp
Worry not, search path specifications are usually not this tricky.
@@ -11103,15 +11100,16 @@ The type of file being matched---@code{'directory} or @code{'regular},
though it can be any symbol returned by @code{stat:type} (@pxref{File
System, @code{stat},, guile, GNU Guile Reference Manual}).
-In the libxml2 example above, we would match regular files; in the
-Python example, we would match directories.
+In the @env{XML_CATALOG_FILES} example above, we would match regular
+files; in the Python example, we would match directories.
@item @code{file-pattern} (default: @code{#f})
This must be either @code{#f} or a regular expression specifying
files to be matched @emph{within} the sub-directories specified by the
@code{files} field.
-Again, the libxml2 example shows a situation where this is needed.
+Again, the @env{XML_CATALOG_FILES} example shows a situation where this
+is needed.
@end table
@end deftp
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 6175a38365..7f9b19b6ee 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -602,12 +602,7 @@ (define-public perl-app-xml-docbook-builder
(list perl-class-xsaccessor perl-test-trap))
(native-search-paths
;; xsltproc's search paths, to avoid propagating libxslt.
- (list (search-path-specification
- (variable "XML_CATALOG_FILES")
- (separator " ")
- (files '("xml"))
- (file-pattern "^catalog\\.xml$")
- (file-type 'regular))))
+ (list $XML_CATALOG_FILES))
(home-page "https://www.shlomifish.org/open-source/projects/docmake/")
(synopsis "Translate DocBook/XML documentation into other file formats")
(description
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index d5c3c75cb9..b3112918ef 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -83,6 +83,7 @@ (define-module (gnu packages xml)
#:use-module (guix build-system python)
#:use-module (guix deprecation)
#:use-module (guix utils)
+ #:use-module (guix search-paths)
#:use-module (gnu packages linux)
#:use-module (gnu packages pkg-config))
@@ -223,14 +224,7 @@ (define-public libxml2
(inputs (list xz))
(propagated-inputs (list zlib)) ; libxml2.la says '-lz'.
(native-inputs (list perl))
- ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
- ;; sub-directory of any given package.
- (native-search-paths (list (search-path-specification
- (variable "XML_CATALOG_FILES")
- (separator " ")
- (files '("xml"))
- (file-pattern "^catalog\\.xml$")
- (file-type 'regular))))
+ (native-search-paths (list $XML_CATALOG_FILES))
(search-paths native-search-paths)
(description
"Libxml2 is the XML C parser and toolkit developed for the Gnome
@@ -1782,14 +1776,7 @@ (define-public opensp
(("^\tOSGMLNORM=`echo osgmlnorm\\|sed '\\$\\(transform\\)'`\\\\")
"\tOSGMLNORM=`echo osgmlnorm|sed '$(transform)'`")
(("^\t\\$\\(SHELL\\)\n") "")))))))
- ;; $SGML_CATALOG_FILES lists 'catalog' or 'CATALOG' or '*.cat' files found
- ;; under the 'sgml' sub-directory of any given package.
- (native-search-paths (list (search-path-specification
- (variable "SGML_CATALOG_FILES")
- (separator ":")
- (files '("sgml"))
- (file-pattern "^catalog$|^CATALOG$|^.*\\.cat$")
- (file-type 'regular))))
+ (native-search-paths (list $SGML_CATALOG_FILES))
(home-page "https://openjade.sourceforge.net/")
(synopsis "Suite of SGML/XML processing tools")
(description "OpenSP is an object-oriented toolkit for SGML parsing and
diff --git a/guix/search-paths.scm b/guix/search-paths.scm
index fcbe7b7953..9af71db402 100644
--- a/guix/search-paths.scm
+++ b/guix/search-paths.scm
@@ -37,6 +37,8 @@ (define-module (guix search-paths)
$PKG_CONFIG_PATH
$SSL_CERT_DIR
$SSL_CERT_FILE
+ $SGML_CATALOG_FILES
+ $XML_CATALOG_FILES
search-path-specification->sexp
sexp->search-path-specification
@@ -114,6 +116,29 @@ (define $SSL_CERT_FILE
(separator #f) ;single entry
(files '("etc/ssl/certs/ca-certificates.crt"))))
+;; Some packages (notably libxml2) make use of 'XML_CATALOG_FILES'
+;; and 'SGML_CATALOG_FILES' for remapping URI references or public/system
+;; identifiers to other URI references.
+(define $SGML_CATALOG_FILES
+ ;; $SGML_CATALOG_FILES lists 'catalog' or 'CATALOG' or '*.cat' files found
+ ;; under the 'sgml' sub-directory of any given package.
+ (search-path-specification
+ (variable "SGML_CATALOG_FILES")
+ (separator ":")
+ (files '("sgml"))
+ (file-pattern "^catalog$|^CATALOG$|^.*\\.cat$")
+ (file-type 'regular)))
+
+(define $XML_CATALOG_FILES
+ ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
+ ;; sub-directory of any given package.
+ (search-path-specification
+ (variable "XML_CATALOG_FILES")
+ (separator " ")
+ (files '("xml"))
+ (file-pattern "^catalog\\.xml$")
+ (file-type 'regular)))
+
(define (search-path-specification->sexp spec)
"Return an sexp representing SPEC, a <search-path-specification>. The sexp
corresponds to the arguments expected by `set-path-environment-variable'."
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 20/61] gnu: docbook2x: Set search-paths for XML and SGML catalogs.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
a9592e21102e43f1f799c28e740af1b2a598d882.1692830149.git.mirai@makinata.eu
According to the manpage, it has both XML and SGML catalog support through the
XML_CATALOG_FILES (resp. SGML_CATALOG_FILES) environment variables.

* gnu/packages/docbook.scm (docbook2x)[arguments]<#:phases>: Don't hardcode
XML_CATALOG_FILES environmment variable.
[native-search-paths]: Add $XML_CATALOG_FILES and $SGML_CATALOG_FILES.
---
gnu/packages/docbook.scm | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 1b24c3522e..2f221866cc 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -43,6 +43,7 @@ (define-module (gnu packages docbook)
#:use-module (gnu packages xfig)
#:use-module (gnu packages xml)
#:use-module (guix gexp)
+ #:use-module (guix search-paths)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
@@ -1048,14 +1049,10 @@ (define-public docbook2x
'("perl-xml-namespacesupport"
"perl-xml-parser"
"perl-xml-sax"
- "perl-xml-sax-base")))
- (xml-catalog-files
- (list (search-input-file
- inputs "xml/dtd/docbook/catalog.xml"))))
+ "perl-xml-sax-base"))))
(map (lambda (program)
(wrap-program program
- `("PERL5LIB" ":" prefix ,perl5lib)
- `("XML_CATALOG_FILES" " " prefix ,xml-catalog-files)))
+ `("PERL5LIB" ":" prefix ,perl5lib)))
programs))))
(add-after 'install 'sgml-check
;; This is not covered by 'make check'.
@@ -1089,6 +1086,7 @@ (define-public docbook2x
docbook-xml-4.1.2 docbook-xml-4.2 docbook-xml-4.4
docbook-xml-4.5
groff-minimal libxml2))
+ (native-search-paths (list $XML_CATALOG_FILES $SGML_CATALOG_FILES))
(outputs '("out" "doc"))
(home-page "https://docbook2x.sourceforge.net")
(synopsis "Convert DocBook to man page and Texinfo format")
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 17/61] gnu: Add docbook-mathml-1.0.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
3971596b65c5520b349e80cff4e07f67a840131b.1692830149.git.mirai@makinata.eu
* gnu/packages/docbook.scm (docbook-mathml-1.0): New variable.
---
gnu/packages/docbook.scm | 59 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)

Toggle diff (72 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 91b3eeeccb..8cabaa780d 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -278,6 +278,65 @@ (define-public docbook-xml-4.1.2
(modify-inputs (package-native-inputs template)
(prepend libxml2))))))
+(define-public docbook-mathml-1.0
+ (package
+ (name "docbook-mathml")
+ (version "1.0")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://www.oasis-open.org/docbook/xml/mathml/"
+ version "/dbmathml.dtd"))
+ (sha256
+ (base32
+ "10vmyl29j829w4xn928rznh163pf47gyzbbjjwqrbg2bidfnk7vp"))))
+ (build-system copy-build-system)
+ (arguments
+ (let ((target (format #f "xml/docbook/mathml/~a/" version)))
+ (list
+ #:modules '((guix build copy-build-system)
+ (guix build utils)
+ (sxml simple)
+ (srfi srfi-1))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'generate-catalog.xml
+ (lambda _
+ (let ((store-uri (string-append "file://"
+ #$output "/"
+ #$target "dbmathml.dtd")))
+ (call-with-output-file "catalog.xml"
+ (lambda (port)
+ (sxml->xml
+ `(*TOP*
+ (*PI* xml "version='1.0'")
+ (catalog (@ (xmlns "urn:oasis:names:tc:entity:xmlns:xml:catalog"))
+ (public (@ (publicId "-//OASIS//DTD DocBook MathML Module V1.0//EN")
+ (uri ,store-uri)))
+ ,@(map
+ (lambda (scheme)
+ `(system
+ (@ (systemId
+ ,(string-append scheme
+ "://www.oasis-open.org/docbook/xml/"
+ "mathml/1.0/dbmathml.dtd"))
+ (uri ,store-uri))))
+ '("http" "https"))))
+ port)))))))
+ #:install-plan
+ #~`(("catalog.xml" #$target)
+ ("dbmathml.dtd" #$target)))))
+ (propagated-inputs
+ ;; These must be propagated for the package to make sense.
+ ;; TODO: Package MathML2 DTD and propagate it as well.
+ (list docbook-xml-4.1.2))
+ (home-page
+ "https://www.oasis-open.org/docbook/xml/mathml/1.0/index.1.shtml")
+ (synopsis "MathML support for DocBook XML V4.1.2.")
+ (description "The DocBook MathML Module is an extension to DocBook XML
+V4.1.2 that adds support for MathML in equation markup.")
+ (license (license:non-copyleft "" "See file headers."))))
+
(define-public docbook-xml docbook-xml-5.1)
;;; There's an issue in docbook-xsl 1.79.2 that causes manpages to be
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 14/61] gnu: libxslt: Set search-paths for XML and SGML catalogs.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
9b7c69b6933edffbc1125c81d3a2e8b58dc9e17b.1692830149.git.mirai@makinata.eu
According to xsltproc manpage it supports both XML_CATALOG_FILES and
SGML_CATALOG_FILES for catalog lookup.

* gnu/packages/xml.scm (libxslt)[native-search-paths]: Add SGML_CATALOG_FILES
and XML_CATALOG_FILES.
[search-paths]: Likewise.
* gnu/packages/perl.scm (perl-app-xml-docbook-builder)[native-search-paths]:
Refer to libxslt native-search-paths.
---
gnu/packages/perl.scm | 2 +-
gnu/packages/xml.scm | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 7f9b19b6ee..5995aa0346 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -602,7 +602,7 @@ (define-public perl-app-xml-docbook-builder
(list perl-class-xsaccessor perl-test-trap))
(native-search-paths
;; xsltproc's search paths, to avoid propagating libxslt.
- (list $XML_CATALOG_FILES))
+ (package-native-search-paths libxslt))
(home-page "https://www.shlomifish.org/open-source/projects/docmake/")
(synopsis "Translate DocBook/XML documentation into other file formats")
(description
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index ec3de82765..bbae6dd766 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -363,6 +363,9 @@ (define-public libxslt
xz))
(native-inputs
(list pkg-config))
+ (native-search-paths
+ (list $SGML_CATALOG_FILES $XML_CATALOG_FILES))
+ (search-paths native-search-paths)
(description
"Libxslt is an XSLT C library developed for the GNOME project. It is
based on libxml for XML parsing, tree manipulation and XPath support.")
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 39/61] gnu: gnome-session: Remove libxml2.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
342d9e90ba1716a7f494f438fa08389827b61014.1692830150.git.mirai@makinata.eu
Observations:
1. No longer required for XML_CATALOG_FILES.
These are already adequately set within the used dependencies

2. It's not required for gnome-session but by libxkbcommon.
libxkbcommon was fixed to convey this by use of a symlink.

2.1. Shouldn't count as a native-input but as a regular input.
… since this is a dependency for xkbregistry (from libxkbcommon).

* gnu/packages/gnome.scm (gnome-session)[native-inputs]: Remove libxml2.
---
gnu/packages/gnome.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 85252e4031..6a63bb36b4 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7625,7 +7625,6 @@ (define-public gnome-session
docbook-xsl
`(,glib "bin") ; for glib-compile-schemas, etc.
intltool
- libxml2 ;for 'XML_CATALOG_FILES'
libxslt
pkg-config
xmlto))
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 19/61] gnu: lilypond: Use dblatex/stable.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
8af84f529be2b724fe2abfcd179927d5b63766e6.1692830149.git.mirai@makinata.eu
* gnu/packages/music.scm (lilypond)[native-inputs]: Replace dblatex with
dblatex/stable.
---
gnu/packages/music.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 8656716fd3..169d2b7d0a 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1496,7 +1496,7 @@ (define-public lilypond
python))
(native-inputs
(list bison
- dblatex
+ dblatex/stable
flex
fontforge
gettext-minimal
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:34
[PATCH core-updates 03/61] gnu: docbook-xml-5.1: Fix URIs in catalog.xml.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
0c3332e82119f2674bca5f4d0183dab75e187953.1692830149.git.mirai@makinata.eu
* gnu/packages/docbook.scm (docbook-xml-5.1)[source]: Patch version in URI.
---
gnu/packages/docbook.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index ec1b9acb36..4a0104c253 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -109,7 +109,13 @@ (define-public docbook-xml-5.1
"/docbook-v" version "-os.zip"))
(sha256
(base32
- "0zqy9prj9wam9dn7v3mgr7ld1axqxdhgrmv06dviwg00ahv43wxk"))))
+ "0zqy9prj9wam9dn7v3mgr7ld1axqxdhgrmv06dviwg00ahv43wxk"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; The .zip release mistakenly uses '5.1CR4' instead of
+ ;; '5.1' as intended by <https://docbook.org/xml/5.1/catalog.xml>.
+ #~(substitute* "schemas/catalog.xml"
+ (("5\\.1CR4") #$version)))))
(template (docbook-xml-package source version)))
(package
(inherit template)
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 38/61] gnu: libxkbcommon: Faux propagate libxml2.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
2eebd497a8959b0abaa2e8805fde263edf2b58fd.1692830150.git.mirai@makinata.eu
xkbregistry.pc lists libxml2 as a requirement.
Use a symlink for the libxml-2.0.pc to avoid setting libxml2 as a
propagated-input.

* gnu/packages/xdisorg.scm (libxkbcommon)[arguments]<#:phases>: Add
symlink-pc.
---
gnu/packages/xdisorg.scm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 501a55c9cf..05b6d2dc76 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -539,7 +539,15 @@ (define-public libxkbcommon
(let ((old (string-append #$output "/share/doc"))
(new (string-append #$output:doc "/share/doc")))
(mkdir-p (dirname new))
- (rename-file old new)))))))
+ (rename-file old new))))
+ (add-after 'install 'symlink-pc
+ ;; in Requires.private of xkbregistry.pc
+ ;; XXX: Symlink libxml-2.0.pc in order to avoid putting
+ ;; libxml2 as a propagated input.
+ (lambda _
+ (let ((stem "/lib/pkgconfig/libxml-2.0.pc"))
+ (symlink (string-append #$(this-package-input "libxml2") stem)
+ (string-append #$output stem))))))))
(outputs '("out" "doc"))
(home-page "https://xkbcommon.org/")
(synopsis "Library to handle keyboard descriptions")
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 16/61] gnu: dblatex: Split documentation.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
986bad59cde03edca033dff2af2fe6533a6a7540.1692830149.git.mirai@makinata.eu
* gnu/packages/docbook.scm (dblatex)[arguments]<#:phases>: Add split-outputs.
[outputs]: Add doc.
---
gnu/packages/docbook.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 0ecaefe253..91b3eeeccb 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -706,6 +706,12 @@ (define-public dblatex
#:tests? #f ;no test suite
#:phases
#~(modify-phases %standard-phases
+ (add-after 'install 'split-outputs
+ (lambda _
+ (let ((old (string-append #$output "/share/doc"))
+ (new (string-append #$output:doc "/share/doc")))
+ (mkdir-p (dirname new))
+ (rename-file old new))))
(add-after 'wrap 'set-path
(lambda* (#:key inputs #:allow-other-keys)
(let ((path (map (lambda (x)
@@ -742,6 +748,7 @@ (define-public dblatex
inkscape/stable ;for svg conversion
docbook-xml
libxslt)) ;for xsltproc
+ (outputs '("out" "doc"))
;; lib/dbtexmf/xslt/4xslt.py shows that this package
;; makes use of XML_CATALOG_FILES.
;; It also invokes xsltproc, that already has it
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 24/61] gnu: docbook2x: Drop docbook-xml workarounds.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
664353eda4e220bbacb9ebd7175600e37472f7c9.1692830149.git.mirai@makinata.eu
* gnu/packages/docbook.scm (docbook2x)[arguments]<#:phases>: Drop
'patch-sources.
[native-inputs]: Remove docbook-xml-4.5.
---
gnu/packages/docbook.scm | 13 -------------
1 file changed, 13 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 2f221866cc..e3de6bc00a 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -1013,18 +1013,6 @@ (define-public docbook2x
(list
#:phases
#~(modify-phases %standard-phases
- (add-after 'configure 'patch-sources
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Patch all the tests use DocBook 4.5
- (substitute* (find-files "test" "\\.xml$")
- (("\"-//OASIS//DTD DocBook XML V4\\..+//EN\"")
- "\"-//OASIS//DTD DocBook XML V4.5//EN\"")
- (("\"http://www\\.oasis-open\\.org/docbook/xml/4\\..+/docbookx.dtd\"")
- "\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\""))
- ;; Set XML catalogs for tests to pass
- (setenv "XML_CATALOG_FILES"
- (string-append (assoc-ref inputs "docbook-xml")
- "/xml/dtd/docbook/catalog.xml"))))
(add-after 'unpack 'autoreconf
(lambda _
(invoke "autoreconf" "-vif")))
@@ -1084,7 +1072,6 @@ (define-public docbook2x
tidy-html
;; For tests
docbook-xml-4.1.2 docbook-xml-4.2 docbook-xml-4.4
- docbook-xml-4.5
groff-minimal libxml2))
(native-search-paths (list $XML_CATALOG_FILES $SGML_CATALOG_FILES))
(outputs '("out" "doc"))
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 46/61] gnu: libnotify: Drop docbook workarounds.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
3f11425573fe8a8e6c5db64dae5ffca6c1587dde.1692830150.git.mirai@makinata.eu
* gnu/packages/gnome.scm (libnotify)[arguments]<#:phases>: Drop 'fix-docbook
phase.
---
gnu/packages/gnome.scm | 10 ----------
1 file changed, 10 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 6a63bb36b4..2a0c2a8e2c 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3069,16 +3069,6 @@ (define-public libnotify
(list
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'fix-docbook
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Don't attempt to download XSL schema.
- (substitute* "meson.build"
- (("http://docbook.sourceforge.net/release/xsl-ns/current\
-/manpages/docbook.xsl")
- (string-append #$(this-package-native-input "docbook-xsl")
- "/xml/xsl/docbook-xsl-"
- #$(package-version docbook-xsl)
- "/manpages/docbook.xsl"))))))))
(propagated-inputs (list gdk-pixbuf glib)) ;in Requires of libnotify.pc.
(inputs (list gtk+ libpng))
(native-inputs
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 15/61] gnu: dblatex: Add libxslt native-search-paths to its own.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
50ee9ef3617cf71b7d8e8a0a2acb594452fd0211.1692830149.git.mirai@makinata.eu
* gnu/packages/xml.scm (dblatex)[native-search-paths]: Add libxslt
native-search-paths to its own.
---
gnu/packages/docbook.scm | 6 ++++++
1 file changed, 6 insertions(+)

Toggle diff (19 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 37eaac0a59..0ecaefe253 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -742,6 +742,12 @@ (define-public dblatex
inkscape/stable ;for svg conversion
docbook-xml
libxslt)) ;for xsltproc
+ ;; lib/dbtexmf/xslt/4xslt.py shows that this package
+ ;; makes use of XML_CATALOG_FILES.
+ ;; It also invokes xsltproc, that already has it
+ ;; in its native-search-path so we don't need to
+ ;; reinclude it.
+ (native-search-paths (package-native-search-paths libxslt))
(home-page "https://dblatex.sourceforge.net")
(synopsis "DocBook to LaTeX Publishing")
(description
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 18/61] gnu: dblatex: Fix missing texlive binaries.
(address . 65479@debbugs.gnu.org)
42abfd4d4d494f69e2df3bde8931dfb28cd39c86.1692830149.git.mirai@makinata.eu
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 <mail@nicolasgoaziou.fr>
---
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

Toggle diff (222 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 08b3904128..d4d5f6d3a8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1048,7 +1048,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 <https://sourceforge.net/p/dblatex/dblatex/merge-requests/4/>
+
+# HG changeset patch
+# User Jan Tojnar <jtojnar@gmail.com>
+# 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 @@
+ <imagedata>
+ <converter src="svg" dst="*" docformat="pdf">
+ <command>
+- 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
+ </command>
+ </converter>
+ </imagedata>
+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"])
+
+
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 29/61] gnu: udisks: Drop docbook workaround.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
0c86d3b22a71d514f9aa88109cb4cf500c8a050e.1692830150.git.mirai@makinata.eu
XML_CATALOG_FILES is already set by xsltproc.

* gnu/packages/freedesktop.scm (udisks)[arguments]<#:make-flags>: Remove.
---
gnu/packages/freedesktop.scm | 14 --------------
1 file changed, 14 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 61d830d74b..9b5a714be9 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1528,20 +1528,6 @@ (define-public udisks
(string-append "--with-html-dir=" #$output:doc
"/share/doc/udisks/html")
(string-append "--with-udevdir=" #$output "/lib/udev"))
- #:make-flags
- #~(let* ((docbook-xsl-name-version
- #$(string-append (package-name docbook-xsl) "-"
- (package-version docbook-xsl)))
- (docbook-xsl-catalog-file
- (string-append #$(this-package-native-input "docbook-xsl")
- "/xml/xsl/" docbook-xsl-name-version
- "/catalog.xml"))
- (docbook-xml-catalog-file
- #$(file-append (this-package-native-input "docbook-xml")
- "/xml/dtd/docbook/catalog.xml")))
- ;; Reference the catalog files required to build the manpages.
- (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file
- " " docbook-xml-catalog-file)))
#:phases
#~(modify-phases %standard-phases
(add-before 'configure 'fix-girdir
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 40/61] gnu: sssd: Drop xmllint workaround.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
7c4a67fa3459979f3262aef9eb2c8b26c775199e.1692830150.git.mirai@makinata.eu
* gnu/packages/sssd.scm (sssd)[arguments]<#:make-flags>: Drop XMLLINT_FLAGS.
[native-inputs]: Add docbook-xml-4.4.
---
gnu/packages/sssd.scm | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/packages/sssd.scm b/gnu/packages/sssd.scm
index 251275312f..b8f564693f 100644
--- a/gnu/packages/sssd.scm
+++ b/gnu/packages/sssd.scm
@@ -163,10 +163,7 @@ (define-public sssd
#$(this-package-native-input "docbook-xsl")
"/xml/xsl/docbook-xsl-"
#$(package-version (this-package-native-input "docbook-xsl"))
- "/manpages/docbook.xsl")
- ;; Remove "--postvalid" option, because that requires access to
- ;; online DTDs.
- "XMLLINT_FLAGS = --catalogs --nonet --noent --xinclude --noout")
+ "/manpages/docbook.xsl"))
#:configure-flags
#~(list "--localstatedir=/var" ; for /var/lib/sss, /var/run/sssd.pid, etc.
"--sysconfdir=/etc" ; /etc/sssd
@@ -283,7 +280,7 @@ (define-public sssd
bc ; for tests
check ; for tests
cmocka ; for tests
- docbook-xml
+ docbook-xml-4.4
docbook-xsl
doxygen
gettext-minimal
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 33/61] gnu: git-crypt: Remove docbook workarounds.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
475f054e21f72827383d83df85f03f92390d78f2.1692830150.git.mirai@makinata.eu
* gnu/packages/version-control.scm (git-crypt)[arguments]: Use G-Expressions.
<#:phases>: Refactored into …
<#:make-flags>: … here.
[native-inputs]: Add docbook-xml-4.2.
---
gnu/packages/version-control.scm | 41 +++++++++++---------------------
1 file changed, 14 insertions(+), 27 deletions(-)

Toggle diff (62 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 27be78b3ac..9342b68177 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -48,6 +48,7 @@
;;; Copyright © 2022 Dhruvin Gandhi <contact@dhruvin.dev>
;;; Copyright © 2015, 2022 David Thompson <davet@gnu.org>
;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -939,34 +940,20 @@ (define-public git-crypt
(inputs
(list git openssl))
(native-inputs
- (list docbook-xsl libxslt))
+ (list docbook-xml-4.2 docbook-xsl libxslt))
(arguments
- `(#:tests? #f ; No tests.
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (add-after 'unpack 'patch-makefile
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "Makefile"
- (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
- (string-append (assoc-ref inputs "docbook-xsl")
- "/xml/xsl/docbook-xsl-"
- ,(package-version docbook-xsl)
- "/manpages/docbook.xsl")))
- #t))
- (replace 'build
- (lambda _
- ;; Add flag to work around OpenSSL 3 incompatibility.
- ;; See <https://github.com/AGWA/git-crypt/issues/232>.
- (setenv "CXXFLAGS" "-DOPENSSL_API_COMPAT=0x30000000L")
-
- (invoke "make" "ENABLE_MAN=yes")))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (invoke "make" "install"
- "ENABLE_MAN=yes"
- (string-append "PREFIX=" out))))))))
+ (list
+ #:tests? #f ; No tests.
+ #:make-flags
+ #~(list
+ "ENABLE_MAN=yes"
+ ;; Add flag to work around OpenSSL 3 incompatibility.
+ ;; See <https://github.com/AGWA/git-crypt/issues/232>.
+ "CXXFLAGS+=-DOPENSSL_API_COMPAT=0x30000000L"
+ (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure))))
(home-page "https://www.agwa.name/projects/git-crypt/")
(synopsis "Transparent encryption of files in a git repository")
(description "git-crypt enables transparent encryption and decryption of
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 47/61] gnu: libnotify: Split documentation.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
f44441912fc73a5c7c79c18434b6096ffa71a47f.1692830150.git.mirai@makinata.eu
* gnu/packages/gnome.scm (libnotify)[arguments]<#:phases>: Add 'split-outputs
phase.
[outputs]: Add 'doc output.
---
gnu/packages/gnome.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 2a0c2a8e2c..dda0a959cf 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3069,6 +3069,12 @@ (define-public libnotify
(list
#:phases
#~(modify-phases %standard-phases
+ (add-after 'install 'split-outputs
+ (lambda _
+ (let* ((old (string-append #$output "/share/gtk-doc"))
+ (new (string-append #$output:doc "/share/gtk-doc")))
+ (mkdir-p (dirname new))
+ (rename-file old new)))))))
(propagated-inputs (list gdk-pixbuf glib)) ;in Requires of libnotify.pc.
(inputs (list gtk+ libpng))
(native-inputs
@@ -3080,6 +3086,7 @@ (define-public libnotify
gtk-doc/stable
libxslt
docbook-xsl))
+ (outputs '("out" "doc"))
(home-page "https://developer-next.gnome.org/libnotify/")
(synopsis "GNOME desktop notification library")
(description
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 21/61] gnu: xmlto: Rewrite with G-Expressions.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
fc83a3861bc14ed952dc2845efed6ffdcc09983b.1692830149.git.mirai@makinata.eu
* gnu/packages/xml.scm (xmlto)[arguments]: Rewrite with G-Expressions.
---
gnu/packages/xml.scm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index bbae6dd766..4654a2b387 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -1123,10 +1123,11 @@ (define-public xmlto
(build-system gnu-build-system)
(arguments
;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
- '(#:configure-flags (list (string-append "GETOPT="
- (assoc-ref %build-inputs
- "util-linux")
- "/bin/getopt"))))
+ (list
+ #:configure-flags
+ #~(list (string-append "GETOPT="
+ #$(this-package-input "util-linux")
+ "/bin/getopt"))))
(native-inputs
(list util-linux))
(inputs
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 32/61] gnu: gtk: Drop docbook workaround.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
f021b0cb5251f23ef2b752efa1fd009f2f248d15.1692830150.git.mirai@makinata.eu
* gnu/packages/gtk.scm (gtk)[arguments]<#:phases>: Drop docbook workaround.
---
gnu/packages/gtk.scm | 5 -----
1 file changed, 5 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index fd7caabfc9..f842f0e15a 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1154,11 +1154,6 @@ (define-public gtk
"find_program('rst2man.py'"))))
(add-after 'unpack 'patch
(lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
- ;; Correct DTD resources of docbook.
- (substitute* (find-files "docs" "\\.xml$")
- (("http://www.oasis-open.org/docbook/xml/4.3/")
- (string-append #$(this-package-native-input "docbook-xml")
- "/xml/dtd/docbook/")))
;; Disable building of icon cache.
(substitute* "meson.build"
(("gtk_update_icon_cache: true")
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 42/61] gnu: drumstick: Drop docbook workaround.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
2deed21de687f2afa1e49a701a573a9c35db981b.1692830150.git.mirai@makinata.eu
* gnu/packages/music.scm (drumstick)[arguments]<#:phases>: Drop 'fix-docbook
phase.
---
gnu/packages/music.scm | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 169d2b7d0a..591f9fc11b 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3095,18 +3095,7 @@ (define-public drumstick
"1rs248pkgn6d29nkvw9ab6dvi1vsz220jdmz1ddzr29cpyc0adfh"))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #f ; no test target
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'fix-docbook
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "cmake_admin/CreateManpages.cmake"
- (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
- (string-append (assoc-ref inputs "docbook-xsl")
- "/xml/xsl/docbook-xsl-"
- ,(package-version docbook-xsl)
- "/manpages/docbook.xsl")))
- #t)))))
+ `(#:tests? #f)) ; no test target
(inputs
(list qtbase-5 qtsvg-5 qttools-5 alsa-lib))
(native-inputs
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 49/61] gnu: alsa-utils: Rewrite with G-Expressions.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
014c20e1d7e087b0e8fe4397b0d248f36f38a694.1692830150.git.mirai@makinata.eu
* gnu/packages/linux.scm (alsa-utils)[arguments]: Rewrite with G-Expressions.
<#:phases>: Drop obsolete 'disable-broken-test phase. Drop trailing #t.
---
gnu/packages/linux.scm | 35 +++++++++++++----------------------
1 file changed, 13 insertions(+), 22 deletions(-)

Toggle diff (48 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 55c7f8b7a8..140d2e4dd3 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2920,28 +2920,19 @@ (define-public alsa-utils
"09m4dnn4kplawprd2bl15nwa0b4r1brab3x44ga7f1fyk7aw5zwq"))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags (list ;; The udev rule is responsible for restoring
- ;; the volume.
- (string-append "--with-udev-rules-dir="
- (assoc-ref %outputs "out")
- "/lib/udev/rules.d"))
- #:phases
- (modify-phases %standard-phases
- (add-before 'check 'disable-broken-test
- (lambda _
- ;; XXX: The 1.1.8 release tarball is missing a header that's
- ;; required for this test to work. Fixed in 1.1.9.
- (substitute* "axfer/test/Makefile"
- ((".*container-test.*") ""))
- #t))
- (add-before
- 'install 'pre-install
- (lambda _
- ;; Don't try to mkdir /var/lib/alsa.
- (substitute* "Makefile"
- (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
- "true\n"))
- #t)))))
+ (list
+ #:configure-flags
+ #~(list
+ ;; The udev rule is responsible for restoring the volume.
+ (string-append "--with-udev-rules-dir=" #$output "/lib/udev/rules.d"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'pre-install
+ (lambda _
+ ;; Don't try to mkdir /var/lib/alsa.
+ (substitute* "Makefile"
+ (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*")
+ "true\n")))))))
(native-inputs
(list docbook-xml-4.2 docbook-xsl xmlto
gettext-minimal))
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 22/61] gnu: xmlto: Add libxslt native-search-paths to its own.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
97e640eb49a2dfe5ac8d62b1283332de9f5a477c.1692830149.git.mirai@makinata.eu
Otherwise when xmlto invokes xsltproc it will fail to find the XML catalog
files.

* gnu/packages/xml.scm (xmlto)[native-search-paths]: Add libxslt
native-search-paths to its own.
---
gnu/packages/xml.scm | 3 +++
1 file changed, 3 insertions(+)

Toggle diff (16 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 4654a2b387..37ff374d86 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -1134,6 +1134,9 @@ (define-public xmlto
(list util-linux ; for 'getopt'
libxml2 ; for 'xmllint'
libxslt)) ; for 'xsltproc'
+ (native-search-paths
+ ;; For finding XML/SGML catalogs used by 'xsltproc' and 'xmllint'.
+ (package-native-search-paths libxslt))
(home-page "http://cyberelk.net/tim/software/xmlto/")
(synopsis "Front-end to an XSL toolchain")
(description
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 35/61] gnu: metapixel: Drop docbook workaround.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
2d424368daa0ea41d900ee30c33c991ad748f627.1692830150.git.mirai@makinata.eu
* gnu/packages/image-processing.scm (metapixel)[arguments]<#:phases>: Drop
'make-local-docbook-xml phase.
[native-inputs]: Use docbook-xml-4.2 instead of docbook-xml.
---
gnu/packages/image-processing.scm | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index 965eca82b7..e3c3bf56bf 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -1516,7 +1516,7 @@ (define-public metapixel
("perl" ,perl)))
(native-inputs
`(("pkg-config" ,pkg-config)
- ("docbook-xml" ,docbook-xml)
+ ("docbook-xml" ,docbook-xml-4.2)
("docbook-xsl" ,docbook-xsl)
("xsltproc" ,libxslt)))
(arguments
@@ -1529,13 +1529,6 @@ (define-public metapixel
#:phases
(modify-phases %standard-phases
(delete 'configure)
- (add-before 'install 'make-local-docbook-xml
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "metapixel.xml"
- (("http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd")
- (string-append (assoc-ref inputs "docbook-xml")
- "/xml/dtd/docbook/docbookx.dtd")))
- #t))
(add-before 'install 'fix-directory-creation
(lambda* (#:key outputs #:allow-other-keys)
(mkdir-p (string-append (assoc-ref outputs "out") "/share/man/man1"))
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 23/61] gnu: gtk-doc: Add libxslt native-search-paths to its own.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
d538d0f37fcf20e0653f86a5eb0abdf8260ef540.1692830149.git.mirai@makinata.eu
Grepping through the built package, gtk-doc invokes 'xsltproc' so we propagate
the search paths in order for 'xsltproc' to find the XML/SGML catalog files.
Note that due to a module cycle we must duplicate it instead of using
'(package-native-search-paths libxslt)'.

* gnu/packages/gtk.scm (gtk-doc)[native-search-paths]: Add $SGML_CATALOG_FILES
and $XML_CATALOG_FILES.
---
gnu/packages/gtk.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 848ed91d96..fd7caabfc9 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -60,6 +60,7 @@ (define-module (gnu packages gtk)
#:use-module (guix download)
#:use-module (guix bzr-download)
#:use-module (guix git-download)
+ #:use-module (guix search-paths)
#:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix build-system cmake)
#:use-module (guix build-system glib-or-gtk)
@@ -2227,6 +2228,12 @@ (define-public gtk-doc
python-pygments
source-highlight
yelp-tools))
+ (native-search-paths
+ ;; xsltproc's search paths, to avoid propagating libxslt.
+ ;; XXX: There's a module cycle as (gnu packages xml) imports
+ ;; (gnu packages gtk) so we can't use (package-native-search-paths …)
+ ;; and must duplicate it here instead.
+ (list $SGML_CATALOG_FILES $XML_CATALOG_FILES))
(home-page "https://wiki.gnome.org/DocumentationProject/GtkDoc")
(synopsis "GTK+ DocBook Documentation Generator")
(description "GtkDoc is a tool used to extract API documentation from C-code
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 25/61] gnu: secilc: Drop xmlto workaround.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
53f15f25ae12f0c21a03cb3e6fc3848bc8520b8e.1692830149.git.mirai@makinata.eu
The xmlto error[1] was due to libsepol using an unversioned PUBLIC identifier
for DocBook 4.2.


* gnu/packages/patches/libsepol-versioned-docbook.patch: New file.
* gnu/local.mk: Register it.
* gnu/packages/selinux.scm (libsepol)[source]: Apply it.
(secilc)[arguments]: Drop xmlto workaround.
[native-inputs]: Add docbook-xml-4.2.
---
gnu/local.mk | 1 +
.../patches/libsepol-versioned-docbook.patch | 56 +++++++++++++++++++
gnu/packages/selinux.scm | 13 +----
3 files changed, 60 insertions(+), 10 deletions(-)
create mode 100644 gnu/packages/patches/libsepol-versioned-docbook.patch

Toggle diff (114 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index d4d5f6d3a8..300881d567 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1527,6 +1527,7 @@ dist_patch_DATA = \
%D%/packages/patches/libqalculate-3.8.0-libcurl-ssl-fix.patch \
%D%/packages/patches/libquicktime-ffmpeg.patch \
%D%/packages/patches/librecad-support-for-boost-1.76.patch \
+ %D%/packages/patches/libsepol-versioned-docbook.patch \
%D%/packages/patches/libtar-CVE-2013-4420.patch \
%D%/packages/patches/libtgvoip-disable-sse2.patch \
%D%/packages/patches/libtgvoip-disable-webrtc.patch \
diff --git a/gnu/packages/patches/libsepol-versioned-docbook.patch b/gnu/packages/patches/libsepol-versioned-docbook.patch
new file mode 100644
index 0000000000..6b39de0a5b
--- /dev/null
+++ b/gnu/packages/patches/libsepol-versioned-docbook.patch
@@ -0,0 +1,56 @@
+# Sent upstream: <https://lore.kernel.org/selinux/260cd39c55ff2d13f5ac916b508f023bedecfce9.1692025627.git.mirai@makinata.eu/>
+
+From 260cd39c55ff2d13f5ac916b508f023bedecfce9 Mon Sep 17 00:00:00 2001
+Message-Id: <260cd39c55ff2d13f5ac916b508f023bedecfce9.1692827278.git.mirai@makinata.eu>
+From: Bruno Victal <mirai@makinata.eu>
+Date: Mon, 14 Aug 2023 15:51:05 +0100
+Subject: [PATCH] secilc: Use versioned DocBook public identifier.
+
+Fix xml validation issues that often crop up since the XML catalogs
+for DocBook often only contain versioned public identifiers.
+
+Signed-off-by: Bruno Victal <mirai@makinata.eu>
+---
+ secilc/secil2conf.8.xml | 2 +-
+ secilc/secil2tree.8.xml | 2 +-
+ secilc/secilc.8.xml | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/secilc/secil2conf.8.xml b/secilc/secil2conf.8.xml
+index 33646f97..330b6a07 100644
+--- a/secilc/secil2conf.8.xml
++++ b/secilc/secil2conf.8.xml
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML//EN"
++<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+ <refentry>
+diff --git a/secilc/secil2tree.8.xml b/secilc/secil2tree.8.xml
+index e95a8947..d7bb177e 100644
+--- a/secilc/secil2tree.8.xml
++++ b/secilc/secil2tree.8.xml
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML//EN"
++<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+ <refentry>
+diff --git a/secilc/secilc.8.xml b/secilc/secilc.8.xml
+index e9a121e2..5c0680a8 100644
+--- a/secilc/secilc.8.xml
++++ b/secilc/secilc.8.xml
+@@ -1,5 +1,5 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML//EN"
++<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+ <refentry>
+
+base-commit: f6dc6acfa00707ce25c6357169111937f12512dd
+--
+2.40.1
+
diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm
index c45570744a..3fc88154fa 100644
--- a/gnu/packages/selinux.scm
+++ b/gnu/packages/selinux.scm
@@ -60,7 +60,8 @@ (define-public libsepol
(file-name (git-file-name "selinux" version))
(sha256
(base32
- "1lcmgmfr0q7g5cwg6b7jm6ncw8cw6c1jblkm93v1g37bfhcgrqc0"))))
+ "1lcmgmfr0q7g5cwg6b7jm6ncw8cw6c1jblkm93v1g37bfhcgrqc0"))
+ (patches (search-patches "libsepol-versioned-docbook.patch"))))
(build-system gnu-build-system)
(arguments
(list
@@ -231,14 +232,6 @@ (define-public secilc
(name "secilc")
(arguments
(substitute-keyword-arguments (package-arguments libsepol)
- ((#:make-flags flags)
- #~(let ((xsl (search-input-directory %build-inputs "xml/xsl")))
- (cons (string-append "XMLTO=xmlto --skip-validation -x "
- xsl "/docbook-xsl-"
- #$(package-version
- (this-package-native-input "docbook-xsl"))
- "/manpages/docbook.xsl")
- #$flags)))
((#:phases phases)
#~(modify-phases #$phases
(delete 'portability)
@@ -247,7 +240,7 @@ (define-public secilc
(inputs
(list libsepol))
(native-inputs
- (list xmlto docbook-xsl))
+ (list docbook-xml-4.2 docbook-xsl xmlto))
(synopsis "SELinux common intermediate language (CIL) compiler")
(description "The SELinux CIL compiler is a compiler that converts the
@dfn{common intermediate language} (CIL) into a kernel binary policy file.")
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 26/61] gnu: xdg-utils: Drop docbook workarounds.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
eb28b77832576129c70b9a966ca9cdbdbd621954.1692830150.git.mirai@makinata.eu
* gnu/packages/freedesktop.scm (xdg-utils)[arguments]<#:phases>: Drop
locate-catalog-files.
[modules]: Properly import gnu-build-system modules.
[native-inputs]: Reorder.
---
gnu/packages/freedesktop.scm | 33 +++++----------------------------
1 file changed, 5 insertions(+), 28 deletions(-)

Toggle diff (67 lines)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 0e80550492..85935545f9 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022 muradm <mail@muradm.net>
;;; Copyright © 2023 Alex Devaure <ajadevaure@gmail.com>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -480,7 +481,8 @@ (define-public xdg-utils
"1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
(build-system gnu-build-system)
(native-inputs
- (list docbook-xsl docbook-xml-4.1.2 libxslt w3m-for-tests xmlto))
+ (list docbook-xsl docbook-xml-4.1.2
+ libxslt xmlto w3m-for-tests))
(inputs
(list bash-minimal ;for 'wrap-program'
coreutils
@@ -496,7 +498,8 @@ (define-public xdg-utils
(list
#:tests? #f ;no check target
#:modules `((srfi srfi-26)
- ,@%gnu-build-system-modules)
+ (guix build gnu-build-system)
+ (guix build utils))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-hardcoded-paths
@@ -507,32 +510,6 @@ (define-public xdg-utils
(substitute* "scripts/xdg-open.in"
(("/usr/bin/printf")
(search-input-file inputs "bin/printf")))))
- (add-before 'build 'locate-catalog-files
- (lambda* (#:key native-inputs inputs #:allow-other-keys)
- (let* ((native (or native-inputs inputs))
- (xmldoc (search-input-directory native
- "xml/dtd/docbook"))
- (xsldoc (search-input-directory
- native
- (string-append "xml/xsl/docbook-xsl-"
- #$(package-version
- (this-package-native-input
- "docbook-xsl"))))))
- (for-each (lambda (file)
- (substitute* file
- (("http://.*/docbookx\\.dtd")
- (string-append xmldoc "/docbookx.dtd"))))
- (find-files "scripts/desc" "\\.xml$"))
- (substitute* "scripts/Makefile"
- ;; Apparently `xmlto' does not bother to looks up the stylesheets
- ;; specified in the XML, unlike the above substitition. Instead it
- ;; uses a hard-coded URL. Work around it here, but if this is
- ;; common perhaps we should hardcode this path in xmlto itself.
- (("\\$\\(XMLTO\\) man")
- (string-append "$(XMLTO) -x " xsldoc
- "/manpages/docbook.xsl man")))
- (setenv "STYLESHEET"
- (string-append xsldoc "/html/docbook.xsl")))))
(add-after 'install 'wrap-executables
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((dependencies '("awk" "grep" "hostname" "ls" "mimeopen"
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 28/61] gnu: udisks: Rewrite using G-Expressions.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
28df5a47c71c3f9a517f6fe22dea0acbad354d8b.1692830150.git.mirai@makinata.eu
* gnu/packages/freedesktop.scm (udisks)[arguments]: Rewrite using
G-Expressions. Drop trailing #t.
[native-inputs]: Drop labels.
---
gnu/packages/freedesktop.scm | 120 +++++++++++++++++------------------
1 file changed, 58 insertions(+), 62 deletions(-)

Toggle diff (140 lines)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index cf7c2fbd4d..61d830d74b 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1491,15 +1491,15 @@ (define-public udisks
"06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
(build-system gnu-build-system)
(native-inputs
- `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
- ("docbook-xsl" ,docbook-xsl)
- ("glib:bin" ,glib "bin") ; for glib-mkenums
- ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
- ("gobject-introspection" ,gobject-introspection)
- ("gtk-doc" ,gtk-doc/stable)
- ("intltool" ,intltool)
- ("pkg-config" ,pkg-config)
- ("xsltproc" ,libxslt)))
+ (list docbook-xml-4.3 ; to build the manpages
+ docbook-xsl
+ `(,glib "bin") ; for glib-mkenums
+ gnome-common ; TODO: Why is this needed?
+ gobject-introspection
+ gtk-doc/stable
+ intltool
+ pkg-config
+ libxslt))
(propagated-inputs
(list glib)) ; required by udisks2.pc
(inputs
@@ -1517,59 +1517,55 @@ (define-public udisks
(outputs '("out"
"doc")) ;5 MiB of gtk-doc HTML
(arguments
- `(#:tests? #f ; requiring system message dbus
- #:disallowed-references ("doc") ;enforce separation of "doc"
- #:configure-flags
- (list "--enable-man"
- "--enable-available-modules" ; Such as lvm2, btrfs, etc.
- "--localstatedir=/var"
- "--enable-fhs-media" ;mount devices in /media, not /run/media
- (string-append "--with-html-dir="
- (assoc-ref %outputs "doc")
- "/share/doc/udisks/html")
- (string-append "--with-udevdir=" %output "/lib/udev"))
- #:make-flags
- (let* ((docbook-xsl-name-version ,(string-append
- (package-name docbook-xsl) "-"
- (package-version docbook-xsl)))
- (docbook-xsl-catalog-file (string-append
- (assoc-ref %build-inputs "docbook-xsl")
- "/xml/xsl/"
- docbook-xsl-name-version
- "/catalog.xml"))
- (docbook-xml-catalog-file (string-append
- (assoc-ref %build-inputs "docbook-xml")
- "/xml/dtd/docbook/catalog.xml")))
- ;; Reference the catalog files required to build the manpages.
- (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
- docbook-xml-catalog-file)))
- #:phases
- (modify-phases %standard-phases
- (add-before
- 'configure 'fix-girdir
- (lambda _
- ;; Install introspection data to its own output.
- (substitute* "udisks/Makefile.in"
- (("girdir = .*")
- "girdir = $(datadir)/gir-1.0\n")
- (("typelibsdir = .*")
- "typelibsdir = $(libdir)/girepository-1.0\n"))))
- (add-after 'install 'wrap-udisksd
- (lambda* (#:key outputs inputs #:allow-other-keys)
- ;; Tell 'udisksd' where to find the 'mount' command.
- (let ((out (assoc-ref outputs "out"))
- (utils (assoc-ref inputs "util-linux"))
- (cryptsetup (assoc-ref inputs "cryptsetup"))
- (parted (assoc-ref inputs "parted")))
- (wrap-program (string-append out "/libexec/udisks2/udisksd")
- `("PATH" ":" prefix
- (,(string-append utils "/bin") ;for 'mount'
- ;; cryptsetup is required for setting encrypted
- ;; partitions, e.g. in gnome-disks
- ,(string-append cryptsetup "/sbin")
- "/run/current-system/profile/bin"
- "/run/current-system/profile/sbin")))
- #t))))))
+ (list
+ #:tests? #f ; requiring system message dbus
+ #:disallowed-references '("doc") ;enforce separation of "doc"
+ #:configure-flags
+ #~(list "--enable-man"
+ "--enable-available-modules" ; Such as lvm2, btrfs, etc.
+ "--localstatedir=/var"
+ "--enable-fhs-media" ;mount devices in /media, not /run/media
+ (string-append "--with-html-dir=" #$output:doc
+ "/share/doc/udisks/html")
+ (string-append "--with-udevdir=" #$output "/lib/udev"))
+ #:make-flags
+ #~(let* ((docbook-xsl-name-version
+ #$(string-append (package-name docbook-xsl) "-"
+ (package-version docbook-xsl)))
+ (docbook-xsl-catalog-file
+ (string-append #$(this-package-native-input "docbook-xsl")
+ "/xml/xsl/" docbook-xsl-name-version
+ "/catalog.xml"))
+ (docbook-xml-catalog-file
+ #$(file-append (this-package-native-input "docbook-xml")
+ "/xml/dtd/docbook/catalog.xml")))
+ ;; Reference the catalog files required to build the manpages.
+ (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file
+ " " docbook-xml-catalog-file)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'fix-girdir
+ (lambda _
+ ;; Install introspection data to its own output.
+ (substitute* "udisks/Makefile.in"
+ (("girdir = .*")
+ "girdir = $(datadir)/gir-1.0\n")
+ (("typelibsdir = .*")
+ "typelibsdir = $(libdir)/girepository-1.0\n"))))
+ (add-after 'install 'wrap-udisksd
+ (lambda _
+ ;; Tell 'udisksd' where to find the 'mount' command.
+ (let ((utils #$(this-package-input "util-linux"))
+ (cryptsetup #$(this-package-input "cryptsetup"))
+ (parted #$(this-package-input "parted")))
+ (wrap-program (string-append #$output "/libexec/udisks2/udisksd")
+ `("PATH" ":" prefix
+ (,(string-append utils "/bin") ;for 'mount'
+ ;; cryptsetup is required for setting encrypted
+ ;; partitions, e.g. in gnome-disks
+ ,(string-append cryptsetup "/sbin")
+ "/run/current-system/profile/bin"
+ "/run/current-system/profile/sbin")))))))))
(home-page "https://www.freedesktop.org/wiki/Software/udisks/")
(synopsis "Disk manager service")
(description
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 30/61] gnu: colord-gtk: Build documentation.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
43485e82605e5136bd7179c94999717fadbed4ed.1692830150.git.mirai@makinata.eu
* gnu/packages/freedesktop.scm (colord-gtk): Build documentation.
[arguments]<#:configure-flags>: Remove.
<#:phases>: Add 'split-package phase.
[native-inputs]: Add docbook-xsl, gtk-doc/stable and libxslt.
[outputs]: Add 'doc output.
---
gnu/packages/freedesktop.scm | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 9b5a714be9..667635bab3 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -2007,13 +2007,23 @@ (define-public colord-gtk
(base32
"1l61ydb0zv2ffilwpapgz5mm3bznr28zl16xqbxnz6kdsrb6cimr"))))
(build-system meson-build-system)
- (arguments '(#:tests? #f ;require the colord system service
- ;; Building documentation fails with: "Cannot build man pages
- ;; without docbook-xsl-ns".
- #:configure-flags (list "-Ddocs=false" "-Dman=false")))
+ (arguments
+ (list
+ #:tests? #f ;require the colord system service
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'split-package
+ (lambda _
+ (let* ((old (string-append #$output "/share/gtk-doc"))
+ (new (string-append #$output:doc "/share/gtk-doc")))
+ (mkdir-p (dirname new))
+ (rename-file old new)))))))
(native-inputs
- (list gettext-minimal
+ (list docbook-xsl
+ gettext-minimal
gobject-introspection
+ gtk-doc/stable
+ libxslt
pkg-config
vala))
(inputs
@@ -2021,6 +2031,7 @@ (define-public colord-gtk
(propagated-inputs
;; colord-gtk.pc refers to all these.
(list colord gtk))
+ (outputs (list "out" "doc"))
(synopsis "GTK integration for libcolord")
(home-page "https://www.freedesktop.org/software/colord/")
(description
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 27/61] gnu: xdg-user-dirs: Drop docbook workaround.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
dce458b5adc84d8926de17651630d87a5d7a03ff.1692830150.git.mirai@makinata.eu
* gnu/packages/freedesktop.scm (xdg-user-dirs)[arguments]: Remove.
[native-inputs]: Remove labels.
---
gnu/packages/freedesktop.scm | 27 ++++-----------------------
1 file changed, 4 insertions(+), 23 deletions(-)

Toggle diff (40 lines)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 85935545f9..cf7c2fbd4d 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -2219,29 +2219,10 @@ (define-public xdg-user-dirs
(base32 "13216b8rfkzak5k6bvpx6jvqv3cnbgpijnjwj8a8d3kq4cl0a1ra"))))
(build-system gnu-build-system)
(native-inputs
- `(("gettext" ,gettext-minimal)
- ("docbook-xsl" ,docbook-xsl)
- ("docbook-xml" ,docbook-xml-4.3)
- ("xsltproc" ,libxslt)))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'build 'locate-catalog-files
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
- "/xml/dtd/docbook"))
- (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
- "/xml/xsl/docbook-xsl-"
- ,(package-version docbook-xsl))))
- (for-each (lambda (file)
- (substitute* file
- (("http://.*/docbookx\\.dtd")
- (string-append xmldoc "/docbookx.dtd"))))
- (find-files "man" "\\.xml$"))
- (substitute* "man/Makefile"
- (("http://.*/docbook\\.xsl")
- (string-append xsldoc "/manpages/docbook.xsl")))
- #t))))))
+ (list gettext-minimal
+ docbook-xsl
+ docbook-xml-4.3
+ libxslt))
(home-page "https://www.freedesktop.org/wiki/Software/xdg-user-dirs/")
(synopsis "Tool to help manage \"well known\" user directories")
(description "xdg-user-dirs is a tool to help manage \"well known\" user
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 31/61] gnu: criu: Drop xmlto workaround.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
a5714a6008ff51691170507f773b80aa95dcfd3c.1692830150.git.mirai@makinata.eu
* gnu/packages/virtualization.scm (criu)[arguments]<#:phases>: Remove
'fix-documentation phase.
---
gnu/packages/virtualization.scm | 10 ----------
1 file changed, 10 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 9556fbc61e..cfc1bf9ee7 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1755,16 +1755,6 @@ (define-public criu
#:phases
(modify-phases %standard-phases
(delete 'configure) ; no configure script
- (add-after 'unpack 'fix-documentation
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* "Documentation/Makefile"
- (("-m custom.xsl")
- (string-append
- "-m custom.xsl --skip-validation -x "
- (assoc-ref inputs "docbook-xsl") "/xml/xsl/"
- ,(package-name docbook-xsl) "-"
- ,(package-version docbook-xsl)
- "/manpages/docbook.xsl")))))
(add-after 'unpack 'hardcode-variables
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Hardcode arm version detection
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 34/61] gnu: gnome-session: Build documentation.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
3c4a5132714f0447f6d3e3c07b3f5953884479b8.1692830150.git.mirai@makinata.eu
* gnu/packages/gnome.scm (gnome-session)[native-inputs]: Replace docbook-xml
with docbook-xml-4.1.2.
[arguments]<#:configure-flags>: Build documentation.
---
gnu/packages/gnome.scm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index d38ed41291..85252e4031 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7615,15 +7615,13 @@ (define-public gnome-session
(,(dirname (search-input-file (or native-inputs inputs)
"bin/gdbus"))))))))
#:configure-flags
- '("-Ddocbook=false" ; FIXME: disabled because of docbook validation error
- "-Dman=false" ; FIXME: disabled because of docbook validation error
- "-Delogind=true"
+ '("-Delogind=true"
"-Dsystemd=false"
"-Dsystemd_session=disable"
"-Dsystemd_journal=false")))
(build-system meson-build-system)
(native-inputs
- (list docbook-xml
+ (list docbook-xml-4.1.2
docbook-xsl
`(,glib "bin") ; for glib-compile-schemas, etc.
intltool
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 41/61] gnu: tdb: Build manpages.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
565373718bc1bcd8cdc4cbc5cb3926d2630fe397.1692830150.git.mirai@makinata.eu
* gnu/packages/databases.scm (tdb)[native-inputs]: Add docbook-xsl and
libxslt.
---
gnu/packages/databases.scm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 762d8bd402..7fb48424f8 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1900,10 +1900,8 @@ (define-public tdb
(invoke "./configure"
(string-append "--prefix=" out))))))))
(native-inputs
- (list ;; TODO: Build the documentation.
- ;; ("docbook-xsl" ,docbook-xsl)
- ;; ("libxml2" ,libxml2)
- ;; ("libxslt" ,libxslt)
+ (list docbook-xsl
+ libxslt
python ;for the Waf build system
which))
(home-page "https://tdb.samba.org/")
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 50/61] gnu: tunctl: Update comment.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
d6c725301a4660812d8e858bbb9960772b837b27.1692830150.git.mirai@makinata.eu
The actual dependency is docbook-to-man which is a completely different
project [1]. (unrelated to docbook2x and docbook-utils)


* gnu/packages/networking.scm (tunctl): Update comment.
---
gnu/packages/networking.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 9685a7a747..42eb37ea8e 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -4151,7 +4151,8 @@ (define-public tunctl
(lambda _
(setenv "CC" "gcc")
(invoke "make" "tunctl")))
- ;; TODO: Requires docbook2x to generate man page from SGML.
+ ;; TODO: Requires docbook-to-man (unrelated to docbook2x and
+ ;; docbook-utils) to generate man page from SGML.
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 51/61] gnu: gdcm: Build manpages.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
c72147d20c085aa96d1e114df252e061301020da.1692830150.git.mirai@makinata.eu
* gnu/packages/bioinformatics.scm (gdcm)[arguments]<#:configure-flags>:
Re-enable manpages.
[native-inputs]: Add libxslt.
---
gnu/packages/bioinformatics.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 34e8565788..b5fca44347 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -83,6 +83,7 @@ (define-module (gnu packages bioinformatics)
#:use-module (gnu packages cran)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages curl)
+ #:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
#:use-module (gnu packages databases)
#:use-module (gnu packages datastructures)
@@ -20475,9 +20476,8 @@ (define-public gdcm
"-DGDCM_DOCUMENTATION:BOOL=ON"
"-DGDCM_PDF_DOCUMENTATION:BOOL=OFF"
(string-append "-DGDCM_INSTALL_DOC_DIR="
- #$output:doc "/share/doc/" #$name)
- "-DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF"))) ; TODO: need ‘xsl-ns’
- (native-inputs (list doxygen graphviz))
+ #$output:doc "/share/doc/" #$name))))
+ (native-inputs (list docbook-xsl doxygen graphviz libxslt))
(home-page "https://gdcm.sourceforge.net/wiki/index.php/Main_Page")
(synopsis "Grassroots DICOM library")
(description
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 52/61] gnu: git: Drop docbook workarounds.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
f8fd6a7fc594d8fac5c3fb668af1a9df6b6203c4.1692830150.git.mirai@makinata.eu
* gnu/packages/version-control.scm (git)[arguments]<#:phases>: Drop
docbook-xsl related substitution.
[native-inputs]: Add docbook-xml-4.5.
---
gnu/packages/version-control.scm | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9342b68177..77f50458be 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -259,6 +259,7 @@ (define-public git
;; For subtree documentation.
("asciidoc" ,asciidoc)
("docbook2x" ,docbook2x)
+ ("docbook-xml" ,docbook-xml-4.5)
("docbook-xsl" ,docbook-xsl)
("libxslt" ,libxslt)
("pkg-config" ,pkg-config)
@@ -379,17 +380,6 @@ (define-public git
(add-after 'build 'build-subtree
(lambda* (#:key inputs #:allow-other-keys)
(with-directory-excursion "contrib/subtree"
- (substitute* "Makefile"
- ;; Apparently `xmlto' does not bother to looks up the stylesheets
- ;; specified in the XML, unlike the above substitution. Instead it
- ;; uses a hard-coded URL. Work around it here, but if this is
- ;; common perhaps we should hardcode this path in xmlto itself.
- (("\\$\\(XMLTO\\) -m \\$\\(MANPAGE_XSL\\)")
- (string-append "$(XMLTO) -x "
- (string-append (assoc-ref inputs "docbook-xsl")
- "/xml/xsl/docbook-xsl-"
- ,(package-version docbook-xsl))
- "/manpages/docbook.xsl -m $(MANPAGE_XSL)")))
(invoke "make")
(invoke "make" "install")
(invoke "make" "install-doc")
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 43/61] gnu: vmpk: Drop docbook workaround.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
c5571e8d7315236df00281fbb1264ae811c38275.1692830150.git.mirai@makinata.eu
* gnu/packages/music.scm (vmpk)[arguments]<#:phases>: Drop 'fix-docbook
phase.
[native-inputs]: Add docbook-xml-4.4.
---
gnu/packages/music.scm | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 591f9fc11b..ebda406bd7 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3128,23 +3128,12 @@ (define-public vmpk
"0kh8pns9pla9c47y2nwckjpiihczg6rpg96aignsdsd7vkql69s9"))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #f ; no test target
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'fix-docbook
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "cmake_admin/CreateManpages.cmake"
- (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
- (string-append (assoc-ref inputs "docbook-xsl")
- "/xml/xsl/docbook-xsl-"
- ,(package-version docbook-xsl)
- "/manpages/docbook.xsl")))
- #t)))))
+ `(#:tests? #f)) ; no test target
(inputs
(list drumstick qtbase-5 qtsvg-5 qtx11extras))
(native-inputs
(list libxslt ;for xsltproc
- docbook-xsl qttools-5 pkg-config))
+ docbook-xml-4.4 docbook-xsl qttools-5 pkg-config))
(home-page "https://vmpk.sourceforge.io/")
(synopsis "Virtual MIDI piano keyboard")
(description
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 00:35
[PATCH core-updates 61/61] gnu: Remove unneeded libxml2 from native-inputs. (gtk-doc)
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
df19c8070d67389fb19c44871d8b253bedd13f47.1692830150.git.mirai@makinata.eu
The gtk-doc wrapped binaries use XML_CATALOG_FILES to perform XML catalog
lookup and come with docbook-xsl within the variable which fixes the
docbook-xsl stylesheet lookup related failures with these packages.
This makes it unnecessary to include libxml2 as the cause of error was usually
with the gtk-doc binaries.

* gnu/packages/gnome.scm (gupnp-igd, dee, zeitgeist, libnma)[native-inputs]:
Remove libxml2.
* gnu/packages/rpm.scm (libmodulemd)[native-inputs]: Ditto.
* gnu/packages/security-token.scm (libu2f-host)[native-inputs]: Ditto.
---
gnu/packages/gnome.scm | 4 ----
gnu/packages/rpm.scm | 3 +--
gnu/packages/security-token.scm | 5 ++---
3 files changed, 3 insertions(+), 9 deletions(-)

Toggle diff (70 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index f5b975f514..31be773416 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -281,7 +281,6 @@ (define-public gupnp-igd
gobject-introspection
gsettings-desktop-schemas
gtk-doc/stable
- libxml2 ;for XML_CATALOG_FILES
pkg-config))
(propagated-inputs
;; These libraries are required by the .pc file.
@@ -663,7 +662,6 @@ (define-public dee
gtk-doc/stable
;; Would only be required by configure flag "--enable-extended-tests".
;;gtx
- libxml2 ;for XML_CATALOG_FILES
pkg-config
python-pygobject
python-wrapper
@@ -725,7 +723,6 @@ (define-public zeitgeist
gobject-introspection
gtk-doc/stable
libtool
- libxml2 ;for XML_CATALOG_FILES
pkg-config
vala
xorg-server-for-tests))
@@ -1772,7 +1769,6 @@ (define-public libnma
`(,glib "bin")
gtk-doc/stable
gobject-introspection
- libxml2 ;for XML_CATALOG_FILES
pkg-config
vala))
(inputs
diff --git a/gnu/packages/rpm.scm b/gnu/packages/rpm.scm
index b7802e3ecd..3df5756ef4 100644
--- a/gnu/packages/rpm.scm
+++ b/gnu/packages/rpm.scm
@@ -116,9 +116,8 @@ (define-public libmodulemd
`(,glib "bin")
`(,glib-with-documentation "doc")
gobject-introspection ;for g-ir-scanner
- gtk-doc
+ gtk-doc/stable
help2man
- libxml2 ;for XML_CATALOG_FILES
pkg-config
python)) ;for 'site-packages' call
(inputs
diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 6d7f5c9ab2..c6d7a1ea1f 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -593,10 +593,9 @@ (define-public libu2f-host
(list help2man
gengetopt
pkg-config
- gtk-doc
+ gtk-doc/stable
docbook-xml-4.3
- eudev
- libxml2)) ;for XML_CATALOG_FILES
+ eudev))
(home-page "https://developers.yubico.com/libu2f-host/")
;; TRANSLATORS: The U2F protocol has a "server side" and a "host side".
(synopsis "U2F host-side C library and tool")
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 06:15
[PATCH 36/61] gnu: metapixel: Rewrite with G-Expressions.
(address . 65479@debbugs.gnu.org)
e345c00168945f74f5fd30083efd0d4b30805ab4.1692828533.git.mirai@makinata.eu
* gnu/packages/image-processing.scm (metapixel)[arguments]: Rewrite with
G-Expressions.
[inputs, native-inputs]: Drop labels.
---
gnu/packages/image-processing.scm | 44 +++++++++++++++----------------
1 file changed, 22 insertions(+), 22 deletions(-)

Toggle diff (59 lines)
diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index e3c3bf56bf..1b025a6d61 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -1509,30 +1509,30 @@ (define-public metapixel
(sha256
(base32 "0r7n3a6bvcxkbpda4mwmrpicii09iql5z69nkjqygkwxw7ny3309"))))
(build-system gnu-build-system)
+ (arguments
+ (list
+ #:tests? #f ; No tests.
+ #:make-flags
+ #~(list
+ (string-append "PREFIX=" #$output)
+ (format #f "MANPAGE_XSL=~a/xml/xsl/~a-~a/manpages/docbook.xsl"
+ #$(this-package-native-input "docbook-xsl")
+ #$(package-name
+ (this-package-native-input "docbook-xsl"))
+ #$(package-version
+ (this-package-native-input "docbook-xsl"))))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'install 'fix-directory-creation
+ (lambda _
+ (mkdir-p (string-append #$output "/share/man/man1")))))))
(inputs
- `(("giflib" ,giflib)
- ("libjpeg" ,libjpeg-turbo)
- ("libpng" ,libpng)
- ("perl" ,perl)))
+ (list giflib libjpeg-turbo libpng
+ perl))
(native-inputs
- `(("pkg-config" ,pkg-config)
- ("docbook-xml" ,docbook-xml-4.2)
- ("docbook-xsl" ,docbook-xsl)
- ("xsltproc" ,libxslt)))
- (arguments
- `(#:tests? #f ; No tests.
- #:make-flags (list
- (string-append "PREFIX=" (assoc-ref %outputs "out"))
- (string-append "MANPAGE_XSL="
- (assoc-ref %build-inputs "docbook-xsl")
- "/xml/xsl/docbook-xsl-*/manpages/docbook.xsl"))
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (add-before 'install 'fix-directory-creation
- (lambda* (#:key outputs #:allow-other-keys)
- (mkdir-p (string-append (assoc-ref outputs "out") "/share/man/man1"))
- #t)))))
+ (list docbook-xml-4.2 docbook-xsl
+ libxslt pkg-config))
(home-page "https://www.complang.tuwien.ac.at/schani/metapixel/")
(synopsis "Photomosaics generator")
(description "Metapixel is a program for generating photomosaics. It can
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 06:15
[PATCH 37/61] gnu: libxkbcommon: Add doc output.
(address . 65479@debbugs.gnu.org)
796c97cb209997cf698f72de1a251529d9c41ccf.1692828533.git.mirai@makinata.eu
* gnu/packages/xdisorg.scm (libxkbcommon)[arguments]: Restyle.
<#:phases>: Add 'split-outputs.
[outputs]: Add doc.
---
gnu/packages/xdisorg.scm | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index da5ca76e10..501a55c9cf 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -524,13 +524,23 @@ (define-public libxkbcommon
;; wayland-scanner is required at build time.
wayland))
(arguments
- (list #:configure-flags
- #~(list (string-append "-Dxkb-config-root="
- (search-input-directory
- %build-inputs "share/X11/xkb"))
- (string-append "-Dx-locale-root="
- (search-input-directory
- %build-inputs "share/X11/locale")))))
+ (list
+ #:configure-flags
+ #~(list (string-append "-Dxkb-config-root="
+ (search-input-directory
+ %build-inputs "share/X11/xkb"))
+ (string-append "-Dx-locale-root="
+ (search-input-directory
+ %build-inputs "share/X11/locale")))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'split-outputs
+ (lambda _
+ (let ((old (string-append #$output "/share/doc"))
+ (new (string-append #$output:doc "/share/doc")))
+ (mkdir-p (dirname new))
+ (rename-file old new)))))))
+ (outputs '("out" "doc"))
(home-page "https://xkbcommon.org/")
(synopsis "Library to handle keyboard descriptions")
(description "Xkbcommon is a library to handle keyboard descriptions,
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 06:16
[PATCH 48/61] gnu: alsa-utils: Build manpages.
(address . 65479@debbugs.gnu.org)
1bcfdcaf3d9f8ddb40d6910932c30a63db04a349.1692828533.git.mirai@makinata.eu
* gnu/packages/linux.scm (alsa-utils)[arguments]<#:configure-flags>: Re-enable
xmlto for building manpages.
[inputs]: Move xmlto to …
[native-inputs]: … here and restyle. Add docbook-xml-4.2 and docbook-xsl.
---
gnu/packages/linux.scm | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

Toggle diff (31 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 7d379882d2..55c7f8b7a8 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2920,10 +2920,7 @@ (define-public alsa-utils
"09m4dnn4kplawprd2bl15nwa0b4r1brab3x44ga7f1fyk7aw5zwq"))))
(build-system gnu-build-system)
(arguments
- ;; XXX: Disable man page creation until we have DocBook.
- '(#:configure-flags (list "--disable-xmlto"
-
- ;; The udev rule is responsible for restoring
+ '(#:configure-flags (list ;; The udev rule is responsible for restoring
;; the volume.
(string-append "--with-udev-rules-dir="
(assoc-ref %outputs "out")
@@ -2946,9 +2943,10 @@ (define-public alsa-utils
"true\n"))
#t)))))
(native-inputs
- `(("gettext" ,gettext-minimal)))
+ (list docbook-xml-4.2 docbook-xsl xmlto
+ gettext-minimal))
(inputs
- (list libsamplerate ncurses alsa-lib xmlto))
+ (list libsamplerate ncurses alsa-lib))
(home-page "http://www.alsa-project.org/")
(synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)")
(description
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 06:16
[PATCH 53/61] gnu: gtk-doc: Rewrite with G-Expressions.
(address . 65479@debbugs.gnu.org)
3088135f835891277e1d968ba047eb18d2e740b2.1692828533.git.mirai@makinata.eu
* gnu/packages/gtk.scm (gtk-doc): Rewrite with G-Expressions.
---
gnu/packages/gtk.scm | 46 +++++++++++++++++++++++---------------------
1 file changed, 24 insertions(+), 22 deletions(-)

Toggle diff (67 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index f842f0e15a..a89d5709cc 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -2170,36 +2170,38 @@ (define-public gtk-doc
(search-patches "gtk-doc-respect-xml-catalog.patch"))))
(build-system meson-build-system)
(arguments
- `(#:parallel-tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-gtk-doc-scan
- (lambda* (#:key inputs #:allow-other-keys)
+ (list
+ #:parallel-tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-gtk-doc-scan
+ ;; Use a substitution to avoid setting docbook-xsl as a
+ ;; propagated input.
+ (lambda _
(substitute* "gtk-doc.xsl"
(("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
- (string-append (assoc-ref inputs "docbook-xsl")
- "/xml/xsl/docbook-xsl-"
- ,(package-version docbook-xsl)
- "/html/chunk.xsl"))
+ #$(let ((docbook-xsl (this-package-input "docbook-xsl")))
+ (file-append docbook-xsl
+ "/xml/xsl/" (package-name docbook-xsl)
+ "-" (package-version docbook-xsl)
+ "/html/chunk.xsl")))
(("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
- (string-append (assoc-ref inputs "docbook-xsl")
- "/xml/xsl/docbook-xsl-"
- ,(package-version docbook-xsl)
- "/common/en.xml")))
- #t))
+ #$(let ((docbook-xsl (this-package-input "docbook-xsl")))
+ (file-append docbook-xsl
+ "/xml/xsl/" (package-name docbook-xsl)
+ "-" (package-version docbook-xsl)
+ "/common/en.xsl"))))))
(add-after 'unpack 'disable-failing-tests
(lambda _
(substitute* "tests/Makefile.am"
(("annotations.sh bugs.sh empty.sh fail.sh gobject.sh program.sh")
- ""))
- #t))
+ ""))))
(add-after 'install 'wrap-executables
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (for-each (lambda (prog)
- (wrap-program prog
- `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
- (find-files (string-append out "/bin")))))))))
+ (lambda _
+ (for-each (lambda (prog)
+ (wrap-program prog
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
+ (find-files (string-append #$output "/bin"))))))))
(native-inputs
(list gettext-minimal
`(,glib "bin")
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 06:16
[PATCH 54/61] gnu: gtk-doc: Wrap XML_CATALOG_FILES.
(address . 65479@debbugs.gnu.org)
b7158ab02d48e6bbf265ed56e23cae6224b49075.1692828533.git.mirai@makinata.eu
Prefer XML catalog resolution over substitutions on XML files.

* gnu/packages/gtk.scm (gtk-doc)[arguments]<#:phases>: Remove
'patch-gtk-doc-scan. Wrap XML_CATALOG_FILES within 'wrap-executables.
---
gnu/packages/gtk.scm | 32 +++++++++++---------------------
1 file changed, 11 insertions(+), 21 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index a89d5709cc..508f836077 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -2174,23 +2174,6 @@ (define-public gtk-doc
#:parallel-tests? #f
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'patch-gtk-doc-scan
- ;; Use a substitution to avoid setting docbook-xsl as a
- ;; propagated input.
- (lambda _
- (substitute* "gtk-doc.xsl"
- (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl")
- #$(let ((docbook-xsl (this-package-input "docbook-xsl")))
- (file-append docbook-xsl
- "/xml/xsl/" (package-name docbook-xsl)
- "-" (package-version docbook-xsl)
- "/html/chunk.xsl")))
- (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
- #$(let ((docbook-xsl (this-package-input "docbook-xsl")))
- (file-append docbook-xsl
- "/xml/xsl/" (package-name docbook-xsl)
- "-" (package-version docbook-xsl)
- "/common/en.xsl"))))))
(add-after 'unpack 'disable-failing-tests
(lambda _
(substitute* "tests/Makefile.am"
@@ -2198,10 +2181,17 @@ (define-public gtk-doc
""))))
(add-after 'install 'wrap-executables
(lambda _
- (for-each (lambda (prog)
- (wrap-program prog
- `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))
- (find-files (string-append #$output "/bin"))))))))
+ (let ((docbook-xsl-catalog
+ #$(let ((docbook-xsl (this-package-input "docbook-xsl")))
+ (file-append docbook-xsl
+ "/xml/xsl/" (package-name docbook-xsl)
+ "-" (package-version docbook-xsl)
+ "/catalog.xml"))))
+ (for-each (lambda (prog)
+ (wrap-program prog
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
+ `("XML_CATALOG_FILES" " " suffix (,docbook-xsl-catalog))))
+ (find-files (string-append #$output "/bin")))))))))
(native-inputs
(list gettext-minimal
`(,glib "bin")
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 06:16
[PATCH 55/61] gnu: gtk-doc: Remove leftovers.
(address . 65479@debbugs.gnu.org)
9728adb5679174454e2a4660ab5033fff2f6b1f5.1692828533.git.mirai@makinata.eu
No longer needed, package passes tests without these parameters.

* gnu/packages/gtk.scm (gtk-doc)[arguments]<#:parallel-tests?>: Re-enable.
<#:phases>: Remove 'disable-failing-tests.
---
gnu/packages/gtk.scm | 6 ------
1 file changed, 6 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 508f836077..51f7d675f4 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -2171,14 +2171,8 @@ (define-public gtk-doc
(build-system meson-build-system)
(arguments
(list
- #:parallel-tests? #f
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'disable-failing-tests
- (lambda _
- (substitute* "tests/Makefile.am"
- (("annotations.sh bugs.sh empty.sh fail.sh gobject.sh program.sh")
- ""))))
(add-after 'install 'wrap-executables
(lambda _
(let ((docbook-xsl-catalog
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 06:16
[PATCH 57/61] gnu: libstdc++-doc: Build libstdc++ info documentation.
(address . 65479@debbugs.gnu.org)
f07a4d4f31fd1154e738229fa4efccfb34dd777f.1692828533.git.mirai@makinata.eu
* gnu/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch: New file.
* gnu/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch: Ditto.
* gnu/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch: Ditto.
* gnu/local.mk: Register them.
* gnu/packages/gcc.scm
(gcc-5)[source]: Use gcc-5.5.0-libstdc++-xmlcatalog.patch,
gcc-13.2.0-libstdc++-docbook-xsl-uri.patch and
gcc-13.2.0-libstdc++-info-install-fix.patch.
(gcc-9)[source]: Use gcc-13.2.0-libstdc++-docbook-xsl-uri.patch and
gcc-13.2.0-libstdc++-info-install-fix.patch.
(make-libstdc++-doc)[arguments]<#:phases>: Remove 'set-xsl-directory.
Adjust 'build and 'install for info documentation and to respect make-flags.
[native-inputs]: Add docbook2x.
---
gnu/local.mk | 3 +
gnu/packages/gcc.scm | 38 +-
...gcc-13.2.0-libstdc++-docbook-xsl-uri.patch | 50 +++
...cc-13.2.0-libstdc++-info-install-fix.patch | 70 +++
.../gcc-5.5.0-libstdc++-xmlcatalog.patch | 402 ++++++++++++++++++
5 files changed, 542 insertions(+), 21 deletions(-)
create mode 100644 gnu/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch
create mode 100644 gnu/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch
create mode 100644 gnu/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch

Toggle diff (446 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 300881d567..320c568194 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1211,6 +1211,7 @@ dist_patch_DATA = \
%D%/packages/patches/gcc-5-fix-powerpc64le-build.patch \
%D%/packages/patches/gcc-5-source-date-epoch-1.patch \
%D%/packages/patches/gcc-5-source-date-epoch-2.patch \
+ %D%/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch \
%D%/packages/patches/gcc-6-arm-none-eabi-multilib.patch \
%D%/packages/patches/gcc-6-cross-environment-variables.patch \
%D%/packages/patches/gcc-6-source-date-epoch-1.patch \
@@ -1229,6 +1230,8 @@ dist_patch_DATA = \
%D%/packages/patches/gcc-12-cross-environment-variables.patch \
%D%/packages/patches/gcc-10-tree-sra-union-handling.patch \
%D%/packages/patches/gcc-11-libstdc++-powerpc.patch \
+ %D%/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch \
+ %D%/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch \
%D%/packages/patches/gcolor3-update-libportal-usage.patch \
%D%/packages/patches/gd-fix-tests-on-i686.patch \
%D%/packages/patches/gd-brect-bounds.patch \
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 76ecc4bd33..d5f0617ba1 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -514,6 +514,9 @@ (define-public gcc-5
"gcc-5.0-libvtv-runpath.patch"
"gcc-5-source-date-epoch-1.patch"
"gcc-5-source-date-epoch-2.patch"
+ "gcc-5.5.0-libstdc++-xmlcatalog.patch"
+ "gcc-13.2.0-libstdc++-docbook-xsl-uri.patch"
+ "gcc-13.2.0-libstdc++-info-install-fix.patch"
"gcc-6-libsanitizer-mode-size.patch"
"gcc-fix-texi2pod.patch"
"gcc-5-hurd.patch"
@@ -698,7 +701,9 @@ (define-public gcc-9
(sha256
(base32
"13ygjmd938m0wmy946pxdhz9i1wq7z4w10l6pvidak0xxxj9yxi7"))
- (patches (search-patches "gcc-9-strmov-store-file-names.patch"
+ (patches (search-patches "gcc-13.2.0-libstdc++-docbook-xsl-uri.patch"
+ "gcc-13.2.0-libstdc++-info-install-fix.patch"
+ "gcc-9-strmov-store-file-names.patch"
"gcc-9-asan-fix-limits-include.patch"
"gcc-5.0-libvtv-runpath.patch"))
(modules '((guix build utils)))
@@ -1326,6 +1331,7 @@ (define (make-libstdc++-doc gcc)
libxslt
docbook-xml
docbook-xsl
+ docbook2x
graphviz)) ;for 'dot', invoked by 'doxygen'
(inputs '())
(propagated-inputs '())
@@ -1338,28 +1344,18 @@ (define (make-libstdc++-doc gcc)
(add-before 'configure 'chdir
(lambda _
(chdir "libstdc++-v3")))
- (add-before 'configure 'set-xsl-directory
- (lambda _
- (substitute* (find-files "doc"
- "^Makefile\\.in$")
- (("@XSL_STYLE_DIR@")
- (string-append #$(this-package-native-input "docbook-xsl")
- "/xml/xsl/"
- (strip-store-file-name docbook))))))
(replace 'build
- (lambda _
- ;; XXX: There's also a 'doc-info' target, but it
- ;; relies on docbook2X, which itself relies on
- ;; DocBook 4.1.2, which is not really usable
- ;; (lacks a catalog.xml.)
- (invoke "make"
- "doc-html"
- "doc-man")))
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke `("make" ,@make-flags
+ "doc-info"
+ "doc-html"
+ "doc-man"))))
(replace 'install
- (lambda _
- (invoke "make"
- "doc-install-html"
- "doc-install-man"))))))
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke `("make" ,@make-flags
+ "doc-install-info"
+ "doc-install-html"
+ "doc-install-man")))))))
(properties (alist-delete 'hidden? (package-properties gcc)))))
(define-public libstdc++-doc-5
diff --git a/gnu/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch b/gnu/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch
new file mode 100644
index 0000000000..9252b6920a
--- /dev/null
+++ b/gnu/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch
@@ -0,0 +1,50 @@
+# Upstreamed <https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628047.html>
+
+From 2748b8df7a241c5fd6a7c2de6621c5cc56bb6ae1 Mon Sep 17 00:00:00 2001
+Message-Id: <2748b8df7a241c5fd6a7c2de6621c5cc56bb6ae1.1692808412.git.mirai@makinata.eu>
+In-Reply-To: <2db0606adfdb800f3fcc95f2cb6c13ff76246e5f.1692808412.git.mirai@makinata.eu>
+References: <2db0606adfdb800f3fcc95f2cb6c13ff76246e5f.1692808412.git.mirai@makinata.eu>
+From: Bruno Victal <mirai@makinata.eu>
+Date: Mon, 21 Aug 2023 20:58:43 +0100
+Subject: [PATCH 2/2] libstdc++: Update docbook xsl URI.
+
+The URI for namespaced docbook-xsl was updated to reflect the current
+DocBook upstream at <https://cdn.docbook.org/>.
+
+libstdc++-v3/Changelog:
+ * acinclude.m4: Update docbook xsl URI.
+ * configure: Regenerate.
+---
+ libstdc++-v3/acinclude.m4 | 2 +-
+ libstdc++-v3/configure | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
+index b25378eaace..152811fd00d 100644
+--- a/libstdc++-v3/acinclude.m4
++++ b/libstdc++-v3/acinclude.m4
+@@ -604,7 +604,7 @@ dnl XSL_STYLE_DIR
+ dnl
+ AC_DEFUN([GLIBCXX_CONFIGURE_DOCBOOK], [
+
+-glibcxx_docbook_url=http://docbook.sourceforge.net/release/xsl-ns/current/
++glibcxx_docbook_url=http://cdn.docbook.org/release/xsl/current/
+
+ AC_MSG_CHECKING([for local stylesheet directory])
+ glibcxx_local_stylesheets=no
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index c4da56c3042..d967b137ea1 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -73923,7 +73923,7 @@ fi
+
+
+
+-glibcxx_docbook_url=http://docbook.sourceforge.net/release/xsl-ns/current/
++glibcxx_docbook_url=http://cdn.docbook.org/release/xsl/current/
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local stylesheet directory" >&5
+ $as_echo_n "checking for local stylesheet directory... " >&6; }
+--
+2.40.1
+
diff --git a/gnu/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch b/gnu/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch
new file mode 100644
index 0000000000..abc4cc877f
--- /dev/null
+++ b/gnu/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch
@@ -0,0 +1,70 @@
+# Upstreamed <https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628047.html>
+
+From 2db0606adfdb800f3fcc95f2cb6c13ff76246e5f Mon Sep 17 00:00:00 2001
+Message-Id: <2db0606adfdb800f3fcc95f2cb6c13ff76246e5f.1692808412.git.mirai@makinata.eu>
+From: Bruno Victal <mirai@makinata.eu>
+Date: Mon, 21 Aug 2023 20:58:22 +0100
+Subject: [PATCH 1/2] libstdc++: Fix 'doc-install-info' rule.
+
+The info manual isn't moved to the expected location after
+generation which causes the install rule for it to fail.
+
+libstdc++-v3/Changelog:
+
+ * doc/Makefile.in: Regenerate.
+ * doc/Makefile.am: Fix 'doc-install-info' rule.
+ Fix typo in commment.
+---
+ libstdc++-v3/doc/Makefile.am | 4 ++--
+ libstdc++-v3/doc/Makefile.in | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libstdc++-v3/doc/Makefile.am b/libstdc++-v3/doc/Makefile.am
+index 8371441c62e..373522d593d 100644
+--- a/libstdc++-v3/doc/Makefile.am
++++ b/libstdc++-v3/doc/Makefile.am
+@@ -598,7 +598,7 @@ stamp-pdf-docbook: doc-pdf-docbook-pre doc-xml-single-docbook
+ doc-pdf-docbook: stamp-pdf-docbook
+
+ # TEXINFO, via docbook2X
+-# NB: Both experimental and tempermental
++# NB: Both experimental and temperamental
+ manual_texi = ${docbook_outdir}/texinfo/libstdc++-manual.texi
+ manual_info = ${docbook_outdir}/texinfo/libstdc++-manual.info
+ DB2TEXI_FLAGS = \
+@@ -615,7 +615,7 @@ stamp-texinfo-docbook: stamp-xml-single-docbook ${docbook_outdir}/texinfo
+
+ stamp-info-docbook: stamp-texinfo-docbook
+ @echo "Generating info files..."
+- $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi}
++ $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi} -o ${manual_info}
+ $(STAMP) stamp-info-docbook
+
+ doc-texinfo-docbook: stamp-texinfo-docbook
+diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in
+index 21ad8557f7a..c19e3e3044c 100644
+--- a/libstdc++-v3/doc/Makefile.in
++++ b/libstdc++-v3/doc/Makefile.in
+@@ -645,7 +645,7 @@ manual_pdf = ${docbook_outdir}/pdf/libstdc++-manual.pdf
+ DBLATEX_FLAGS = --verbose --pdf --dump --debug --tmpdir=${docbook_outdir}/latex
+
+ # TEXINFO, via docbook2X
+-# NB: Both experimental and tempermental
++# NB: Both experimental and temperamental
+ manual_texi = ${docbook_outdir}/texinfo/libstdc++-manual.texi
+ manual_info = ${docbook_outdir}/texinfo/libstdc++-manual.info
+ DB2TEXI_FLAGS = \
+@@ -1096,7 +1096,7 @@ stamp-texinfo-docbook: stamp-xml-single-docbook ${docbook_outdir}/texinfo
+
+ stamp-info-docbook: stamp-texinfo-docbook
+ @echo "Generating info files..."
+- $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi}
++ $(MAKEINFO) $(MAKEINFOFLAGS) ${manual_texi} -o ${manual_info}
+ $(STAMP) stamp-info-docbook
+
+ doc-texinfo-docbook: stamp-texinfo-docbook
+
+base-commit: f9ff6fa58217294d63f255dd02abfcc8a074f509
+--
+2.40.1
+
diff --git a/gnu/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch b/gnu/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch
new file mode 100644
index 0000000000..473e08e240
--- /dev/null
+++ b/gnu/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch
@@ -0,0 +1,402 @@
+From 7f792d2acc0d3eeb95c6f8e0acd72ae304cec9be Mon Sep 17 00:00:00 2001
+Message-Id: <7f792d2acc0d3eeb95c6f8e0acd72ae304cec9be.1692813549.git.mirai@makinata.eu>
+From: Jonathan Wakely <jwakely@redhat.com>
+Date: Wed, 27 Feb 2019 11:25:44 +0000
+Subject: [PATCH] PR libstdc++/89466 avoid slow xsltproc command in configure
+
+Note: Backported from a4395a846a9343960714568e7cf8af4425e63a50.
+
+Certain broken versions of xsltproc ignore the --nonet option and will
+attempt to fetch the docbook stylesheet from the WWW when it isn't in
+the local XML catalog.
+
+This patch checks for the local stylesheet directory first, and doesn't
+use xsltproc if no local stylesheets are found. Checking for the local
+directory is done using xmlcatalog if available, only checking the
+hardcoded list of directories if xmlcatalog fails. The right directory
+for Suse is added to the hardcoded list.
+
+This should avoid doing an xsltproc check that would need to download
+the stylesheet, so no network connection is made even if a broken
+xsltproc is present.
+
+ PR libstdc++/89466
+ * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
+ stylesheet directories before check for xsltproc. Try to use
+ xmlcatalog to find local stylesheet directory before trying hardcoded
+ paths. Add path used by suse to hardcoded paths. Adjust xsltproc
+ check to look for the same stylesheet as doc/Makefile.am uses. Don't
+ use xsltproc if xmlcatalog fails to find a local stylesheet.
+ * configure.ac: Check for xmlcatalog.
+ * Makefile.in: Regenerate.
+ * configure: Likewise.
+ * doc/Makefile.in: Likewise.
+ * include/Makefile.in: Likewise.
+ * libsupc++/Makefile.in: Likewise.
+ * po/Makefile.in: Likewise.
+ * python/Makefile.in: Likewise.
+ * src/Makefile.in: Likewise.
+ * src/c++11/Makefile.in: Likewise.
+ * src/c++98/Makefile.in: Likewise.
+ * src/filesystem/Makefile.in: Likewise.
+ * testsuite/Makefile.in: Likewise.
+
+From-SVN: r269249
+Modified-by: Bruno Victal <mirai@makinata.eu>
+---
+ libstdc++-v3/Makefile.in | 1 +
+ libstdc++-v3/acinclude.m4 | 47 +++++++------
+ libstdc++-v3/configure | 90 +++++++++++++++++++------
+ libstdc++-v3/configure.ac | 1 +
+ libstdc++-v3/doc/Makefile.in | 1 +
+ libstdc++-v3/include/Makefile.in | 1 +
+ libstdc++-v3/libsupc++/Makefile.in | 1 +
+ libstdc++-v3/po/Makefile.in | 1 +
+ libstdc++-v3/python/Makefile.in | 1 +
+ libstdc++-v3/src/Makefile.in | 1 +
+ libstdc++-v3/src/c++11/Makefile.in | 1 +
+ libstdc++-v3/src/c++98/Makefile.in | 1 +
+ libstdc++-v3/src/filesystem/Makefile.in | 1 +
+ libstdc++-v3/testsuite/Makefile.in | 1 +
+ 14 files changed, 109 insertions(+), 40 deletions(-)
+
+diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
+index a9451e19a96..6aee8281f77 100644
+--- a/libstdc++-v3/Makefile.in
++++ b/libstdc++-v3/Makefile.in
+@@ -230,6 +230,7 @@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@
+ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@
+ WARN_FLAGS = @WARN_FLAGS@
+ WERROR = @WERROR@
++XMLCATALOG = @XMLCATALOG@
+ XMLLINT = @XMLLINT@
+ XSLTPROC = @XSLTPROC@
+ XSL_STYLE_DIR = @XSL_STYLE_DIR@
+diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
+index 18b7b6638ec..fde3fb6da6e 100644
+--- a/libstdc++-v3/acinclude.m4
++++ b/libstdc++-v3/acinclude.m4
+@@ -674,34 +674,43 @@ dnl XSL_STYLE_DIR
+ dnl
+ AC_DEFUN([GLIBCXX_CONFIGURE_DOCBOOK], [
+
+-AC_MSG_CHECKING([for docbook stylesheets for documentation creation])
+-glibcxx_stylesheets=no
+-if test x${XSLTPROC} = xyes && echo '<title/>' | xsltproc --noout --nonet --xinclude http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/docbook.xsl - 2>/dev/null; then
+- glibcxx_stylesheets=yes
+-fi
+-AC_MSG_RESULT($glibcxx_stylesheets)
++glibcxx_docbook_url=http://docbook.sourceforge.net/release/xsl-ns/current/
+
+ AC_MSG_CHECKING([for local stylesheet directory])
+ glibcxx_local_stylesheets=no
+-if test x"$glibcxx_stylesheets" = x"yes"; then
+- if test -d /usr/share/sgml/docbook/xsl-ns-stylesheets; then
+- glibcxx_local_stylesheets=yes
+- XSL_STYLE_DIR=/usr/share/sgml/docbook/xsl-ns-stylesheets
+- fi
+- if test -d /usr/share/xml/docbook/stylesheet/docbook-xsl-ns; then
+- glibcxx_local_stylesheets=yes
+- XSL_STYLE_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns
+- fi
+- if test -d /usr/share/xml/docbook/stylesheet/nwalsh5/current; then
+- glibcxx_local_stylesheets=yes
+- XSL_STYLE_DIR=/usr/share/xml/docbook/stylesheet/nwalsh5/current
+- fi
++if test x${XMLCATALOG} = xyes && xsl_style_dir=`xmlcatalog "" $glibcxx_docbook_url 2>/dev/null`
++then
++ XSL_STYLE_DIR=`echo $xsl_style_dir | sed -n 's;^file://;;p'`
++ glibcxx_local_stylesheets=yes
++else
++ for dir in \
++ /usr/share/sgml/docbook/xsl-ns-stylesheets \
++ /usr/share/xml/docbook/stylesheet/docbook-xsl-ns \
++ /usr/share/xml/docbook/stylesheet/nwalsh5/current \
++ /usr/share/xml/docbook/stylesheet/nwalsh/current
++ do
++ if test -d $dir; then
++ glibcxx_local_stylesheets=yes
++ XSL_STYLE_DIR=$dir
++ break
++ fi
++ done
+ fi
+ AC_MSG_RESULT($glibcxx_local_stylesheets)
+
+ if test x"$glibcxx_local_stylesheets" = x"yes"; then
+ AC_SUBST(XSL_STYLE_DIR)
+ AC_MSG_NOTICE($XSL_STYLE_DIR)
++
++ AC_MSG_CHECKING([for docbook stylesheets for documentation creation])
++ glibcxx_stylesheets=no
++ if test x${XMLCATALOG} = xno || xmlcatalog "" $glibcxx_docbook_url/xhtml/docbook.xsl >/dev/null 2>&1; then
++ if test x${XSLTPROC} = xyes && echo '<title/>' | xsltproc --noout --nonet --xinclude $glibcxx_docbook_url/xhtml/docbook.xsl - 2>/dev/null; then
++ glibcxx_stylesheets=yes
++ fi
++ fi
++ AC_MSG_RESULT($glibcxx_stylesheets)
++
+ else
+ glibcxx_stylesheets=no
+ fi
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index a51dfe6eb13..0c462490b81 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -634,6 +634,7 @@ BUILD_EPUB_TRUE
+ XSL_STYLE_DIR
+ XMLLINT
+ XSLTPROC
++XMLCATALOG
+ DOT
+ DOXYGEN
+ BUILD_INFO_FALSE
+@@ -79678,6 +79679,44 @@ fi
+
+
+ # Check for docbook
++# Extract the first word of "xmlcatalog", so it can be a program name with args.
++set dummy xmlcatalog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_XMLCATALOG+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$XMLCATALOG"; then
++ ac_cv_prog_XMLCATALOG="$XMLCATALOG" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_XMLCATALOG="yes"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_prog_XMLCATALOG" && ac_cv_prog_XMLCATALOG="no"
++fi
++fi
++XMLCATALOG=$ac_cv_prog_XMLCATALOG
++if test -n "$XMLCATALOG"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLCATALOG" >&5
++$as_echo "$XMLCATALOG" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
+ # Extract the first word of "xsltproc", so it can be a program name with args.
+ set dummy xsltproc; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+@@ -79756,31 +79795,28 @@ fi
+
+
+
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for docbook stylesheets for documentation creation" >&5
+-$as_echo_n "checking for docbook stylesheets for documentation creation... " >&6; }
+-glibcxx_stylesheets=no
+-if test x${XSLTPROC} = xyes && echo '<title/>' | xsltproc --noout --nonet --xinclude http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/docbook.xsl - 2>/dev/null; then
+- glibcxx_stylesheets=yes
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_stylesheets" >&5
+-$as_echo "$glibcxx_stylesheets" >&6; }
++glibcxx_docbook_url=http://docbook.sourceforge.net/release/xsl-ns/current/
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local stylesheet directory" >&5
+ $as_echo_n "checking for local stylesheet directory... " >&6; }
+ glib
This message was truncated. Download the full message here.
B
B
Bruno Victal wrote on 24 Aug 2023 06:16
[PATCH 56/61] gnu: libstdc++-doc: Rewrite with G-Expressions.
(address . 65479@debbugs.gnu.org)
2b5c34de0ab84d17c1009156d7bef26d201ce37b.1692828533.git.mirai@makinata.eu
* gnu/packages/gcc.scm (make-libstdc++-doc): Rewrite arguments with
G-Expressions.
---
gnu/packages/gcc.scm | 61 ++++++++++++++++++++++----------------------
1 file changed, 31 insertions(+), 30 deletions(-)

Toggle diff (81 lines)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 862fdd79c3..76ecc4bd33 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1329,36 +1330,36 @@ (define (make-libstdc++-doc gcc)
(inputs '())
(propagated-inputs '())
(arguments
- '(#:out-of-source? #t
- #:tests? #f ;it's just documentation
- #:phases (modify-phases %standard-phases
- (add-before 'configure 'chdir
- (lambda _
- (chdir "libstdc++-v3")))
- (add-before 'configure 'set-xsl-directory
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((docbook (assoc-ref inputs "docbook-xsl")))
- (substitute* (find-files "doc"
- "^Makefile\\.in$")
- (("@XSL_STYLE_DIR@")
- (string-append
- docbook "/xml/xsl/"
- (strip-store-file-name docbook)))))))
- (replace 'build
- (lambda _
- ;; XXX: There's also a 'doc-info' target, but it
- ;; relies on docbook2X, which itself relies on
- ;; DocBook 4.1.2, which is not really usable
- ;; (lacks a catalog.xml.)
- (invoke "make"
- "doc-html"
- "doc-man")))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (invoke "make"
- "doc-install-html"
- "doc-install-man")))))))
+ (list
+ #:out-of-source? #t
+ #:tests? #f ;it's just documentation
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "libstdc++-v3")))
+ (add-before 'configure 'set-xsl-directory
+ (lambda _
+ (substitute* (find-files "doc"
+ "^Makefile\\.in$")
+ (("@XSL_STYLE_DIR@")
+ (string-append #$(this-package-native-input "docbook-xsl")
+ "/xml/xsl/"
+ (strip-store-file-name docbook))))))
+ (replace 'build
+ (lambda _
+ ;; XXX: There's also a 'doc-info' target, but it
+ ;; relies on docbook2X, which itself relies on
+ ;; DocBook 4.1.2, which is not really usable
+ ;; (lacks a catalog.xml.)
+ (invoke "make"
+ "doc-html"
+ "doc-man")))
+ (replace 'install
+ (lambda _
+ (invoke "make"
+ "doc-install-html"
+ "doc-install-man"))))))
(properties (alist-delete 'hidden? (package-properties gcc)))))
(define-public libstdc++-doc-5
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 06:16
[PATCH 59/61] gnu: Remove unneeded libxml2 from native-inputs. (libxslt)
(address . 65479@debbugs.gnu.org)
45e6c673ee7f659cf050e297b62563d91206565e.1692828533.git.mirai@makinata.eu
XML_CATALOG_FILES is already set within libxslt so it's unnecessary to include
libxml2 for the same effect.

* gnu/packages/freedesktop.scm (wayland): Remove obsolete comment.
(farstream, elogind, packagekit, accountsservice, plymouth)[native-inputs]:
Remove libxml2.
* gnu/packages/benchmark.scm (sysbench)[native-inputs]: Ditto.
* gnu/packages/cluster.scm (drbd-utils)[native-inputs]: Ditto.
* gnu/packages/glib.scm (dbus)[native-inputs]: Ditto.
* gnu/packages/gnome.scm (gnome-keyring, glade3, dconf, libsecret, colord)
(upower, gnome-settings-daemon)[native-inputs]: Ditto.
* gnu/packages/gtk.scm (gdk-pixbuf)[native-inputs]: Ditto.
* gnu/packages/linux.scm (eudev)[native-inputs]: Ditto.
* gnu/packages/networking.scm (iputils)[native-inputs]: Ditto.
* gnu/packages/ocr.scm (tesseract-ocr)[native-inputs]: Ditto.
* gnu/packages/polkit.scm (polkit)[native-inputs]: Ditto.
* gnu/packages/samba.scm (samba/pinned)[native-inputs]: Ditto.
* gnu/packages/sssd.scm (adcli)[native-inputs]: Ditto.
* gnu/packages/terminals.scm (kmscon)[native-inputs]: Ditto.
---
gnu/packages/benchmark.scm | 1 -
gnu/packages/cluster.scm | 1 -
gnu/packages/freedesktop.scm | 7 +------
gnu/packages/glib.scm | 1 -
gnu/packages/gnome.scm | 9 +--------
gnu/packages/gtk.scm | 1 -
gnu/packages/linux.scm | 1 -
gnu/packages/networking.scm | 4 +---
gnu/packages/ocr.scm | 1 -
gnu/packages/polkit.scm | 1 -
gnu/packages/samba.scm | 3 +--
gnu/packages/sssd.scm | 1 -
gnu/packages/terminals.scm | 1 -
13 files changed, 4 insertions(+), 28 deletions(-)

Toggle diff (254 lines)
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index a1ffec7810..8bfb2bb0b3 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -648,7 +648,6 @@ (define-public sysbench
python-wrapper
which
;; For documentation
- libxml2 ;for XML_CATALOG_FILES
libxslt
docbook-xml
docbook-xsl))
diff --git a/gnu/packages/cluster.scm b/gnu/packages/cluster.scm
index 6d10d73859..5e522cf18d 100644
--- a/gnu/packages/cluster.scm
+++ b/gnu/packages/cluster.scm
@@ -133,7 +133,6 @@ (define-public drbd-utils
docbook-xml
docbook-xml-4.4 ;used by documentation/ra2refentry.xsl
docbook-xsl
- libxml2 ;for XML_CATALOG_FILES
libxslt ;for xsltproc
ruby-asciidoctor))
(home-page "https://www.linbit.com/drbd/")
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 667635bab3..89ce194a8b 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -274,7 +274,6 @@ (define-public farstream
gobject-introspection
gtk-doc/stable
libtool
- libxml2 ;for XML_CATALOG_FILES
libxslt
perl
pkg-config
@@ -737,7 +736,6 @@ (define-public elogind
("docbook-xsl" ,docbook-xsl)
("gettext" ,gettext-minimal)
("gperf" ,gperf)
- ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
("m4" ,m4)
("pkg-config" ,pkg-config)
("python" ,python)
@@ -966,7 +964,6 @@ (define-public packagekit
gettext-minimal
`(,glib "bin")
gobject-introspection
- libxml2 ;for XML_CATALOG_FILES
libxslt
pkg-config
python-wrapper
@@ -1172,7 +1169,7 @@ (define-public wayland
(list pkg-config-for-build
this-package) ;for wayland-scanner
'())))
- (inputs (list expat libxml2)) ;for XML_CATALOG_FILES
+ (inputs (list expat libxml2))
(propagated-inputs (list libffi))
(home-page "https://wayland.freedesktop.org/")
(synopsis "Core Wayland window system code and protocol")
@@ -1616,7 +1613,6 @@ (define-public accountsservice
`(,glib "bin") ; for gdbus-codegen, etc.
gobject-introspection
gtk-doc
- libxml2 ;for XML_CATALOG_FILES
libxslt
pkg-config
vala
@@ -2482,7 +2478,6 @@ (define-public plymouth
(native-inputs
(list gettext-minimal
pkg-config
- libxml2 ;for XML_CATALOG_FILES
libxslt
docbook-xsl
docbook-xml))
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index a0b85b15d1..26c1ede2ea 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -152,7 +152,6 @@ (define dbus
docbook-xsl
doxygen
xmlto
- libxml2 ;for XML_CATALOG_FILES
libxslt
yelp-tools))
(inputs
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index dda0a959cf..f5b975f514 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -2583,7 +2583,6 @@ (define-public gnome-keyring
gettext-minimal
`(,glib "bin")
glib ;for m4 macros
- libxml2 ;for XML_CATALOG_FILES
libxslt ;for documentation
pkg-config
python-wrapper)) ;for tests
@@ -3237,7 +3236,6 @@ (define-public glade3
gobject-introspection
hicolor-icon-theme
itstool
- libxml2 ;for XML_CATALOG_FILES
libxslt ;for xsltproc
python
python-pygobject
@@ -4694,7 +4692,6 @@ (define-public dconf
(native-inputs
(list bash-completion
libxslt ;for xsltproc
- libxml2 ;for XML_CATALOG_FILES
docbook-xml-4.2
docbook-xsl
`(,glib "bin")
@@ -5206,7 +5203,6 @@ (define-public libsecret
gettext-minimal
`(,glib "bin") ;for gdbus-codegen, etc.
gobject-introspection
- libxml2 ;for XML_CATALOG_FILES
libxslt
pkg-config
python
@@ -5662,7 +5658,6 @@ (define-public colord
(append bash-completion
docbook-xsl-1.79.1
gtk-doc/stable
- libxml2 ;for XML_CATALOG_FILES
libxslt
sane-backends
vala))))) ;for VAPI, needed by simple-scan
@@ -5824,8 +5819,7 @@ (define-public upower
umockdev
;; For man pages.
docbook-xsl
- libxslt ; for 'xsltproc'
- libxml2)) ; for 'XML_CATALOG_FILES'
+ libxslt)) ; for 'xsltproc'
(inputs
(list dbus-glib libgudev libusb))
(propagated-inputs
@@ -6010,7 +6004,6 @@ (define-public gnome-settings-daemon
docbook-xsl
gettext-minimal
`(,glib "bin") ;for glib-mkenums
- libxml2 ;for XML_CATALOG_FILES
libxslt
perl
pkg-config))
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 51f7d675f4..43cb8f2e49 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -738,7 +738,6 @@ (define-public gdk-pixbuf
;; For the documentation.
docbook-xml-4.3
docbook-xsl
- libxml2 ;for XML_CATALOG_FILES
libxslt)) ;for xsltproc
(native-search-paths
;; This file is produced by the gdk-pixbuf-loaders-cache-file
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5b117bb029..d5b90db0c1 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4328,7 +4328,6 @@ (define-public eudev
;; For documentation.
docbook-xml-4.2
docbook-xsl
- libxml2 ;for $XML_CATALOG_FILES
libxslt))
(inputs
;; When linked against libblkid, eudev can populate /dev/disk/by-label
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 42eb37ea8e..e6b35417e2 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1593,9 +1593,7 @@ (define-public iputils
`(#:configure-flags '("-DBUILD_RARPD=true")))
(native-inputs
(list docbook-xsl docbook-xml-5.0.1
- gettext-minimal
- libxml2 ;for XML_CATALOG_FILES
- libxslt pkg-config))
+ gettext-minimal libxslt pkg-config))
(inputs
(list libcap libidn2 openssl))
(synopsis "Collection of network utilities")
diff --git a/gnu/packages/ocr.scm b/gnu/packages/ocr.scm
index 99ebc9d4f7..10b4459d1c 100644
--- a/gnu/packages/ocr.scm
+++ b/gnu/packages/ocr.scm
@@ -160,7 +160,6 @@ (define-public tesseract-ocr
libarchive
libtiff
libtool
- libxml2 ;for XML_CATALOG_FILES
libxslt
pkg-config
tesseract-ocr-tessdata-fast))
diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
index 6fe7824a57..c1162679ff 100644
--- a/gnu/packages/polkit.scm
+++ b/gnu/packages/polkit.scm
@@ -157,7 +157,6 @@ (define-public polkit
`(,glib "bin") ;for glib-mkenums
docbook-xsl ;for man page generation
gobject-introspection
- libxml2 ;for XML_CATALOG_FILES
libxslt ;for man page generation
perl
pkg-config
diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
index c8b8d03521..e40fa9f7db 100644
--- a/gnu/packages/samba.scm
+++ b/gnu/packages/samba.scm
@@ -278,8 +278,7 @@ (define-public samba/pinned
;; For generating man pages.
docbook-xml-4.2
docbook-xsl
- libxslt
- libxml2))) ;for XML_CATALOG_FILES
+ libxslt)))
(home-page "https://www.samba.org/")
(synopsis
"The standard Windows interoperability suite of programs for GNU and Unix")
diff --git a/gnu/packages/sssd.scm b/gnu/packages/sssd.scm
index b8f564693f..cf54497f75 100644
--- a/gnu/packages/sssd.scm
+++ b/gnu/packages/sssd.scm
@@ -92,7 +92,6 @@ (define-public adcli
docbook-xml-4.3
docbook-xsl
libtool
- libxml2 ;for XML_CATALOG_FILES
libxslt
util-linux ;For `rev` command used in tests.
xmlto))
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 1bfec73477..13654cb1ff 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -359,7 +359,6 @@ (define-public kmscon
automake
libtool
libxslt ;to build the man page
- libxml2 ;for XML_CATALOG_FILES
docbook-xsl))
(inputs
`(("libdrm" ,libdrm)
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 06:17
[PATCH 60/61] gnu: Remove unneeded libxml2 from native-inputs. (xmlto)
(address . 65479@debbugs.gnu.org)
06ccc83c68072d005d13b139b5ed2b8434b7ec9e.1692828533.git.mirai@makinata.eu
The native-search-paths from libxslt are reused within xmlto to provide
XML_CATALOG_FILES and SGML_CATALOG_FILES so it's unnecessary to include
libxml2 for the same effect.

* gnu/packages/wm.scm (i3status, awesome)[native-inputs]: Remove libxml2.
* gnu/packages/xml.scm (opensp)[native-inputs]: Ditto.
---
gnu/packages/wm.scm | 3 +--
gnu/packages/xml.scm | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index f2c050408e..507fffb340 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -305,7 +305,7 @@ (define-public i3status
(list asciidoc
perl
pkg-config
- docbook-xsl libxml2 ; for XML_CATALOG_FILES
+ docbook-xsl
xmlto))
(home-page "https://i3wm.org/i3status/")
(synopsis "Status bar for i3bar, dzen2, xmobar or similar programs")
@@ -1186,7 +1186,6 @@ (define-public awesome
doxygen
gperf
imagemagick
- libxml2 ;for XML_CATALOG_FILES
lua-ldoc
pkg-config
xmlto))
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 37ff374d86..7bf13737bd 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -1746,7 +1746,6 @@ (define-public opensp
(native-inputs
(list docbook-xml-4.1.2
docbook-xsl
- libxml2 ;for XML_CATALOG_DIR
xmlto
;; Dependencies to regenerate the 'configure' script.
autoconf
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 06:15
[PATCH 44/61] gnu: iputils: Drop docbook workarounds.
(address . 65479@debbugs.gnu.org)
855eb2fb2b07cbca8ac7936147fff681004b2fc4.1692828533.git.mirai@makinata.eu
* gnu/packages/networking.scm (iputils)[arguments]<#:phases>: Drop
'fix-docbook-url phase.
[native-inputs]: Use docbook-xml-5.0.1 over docbook-xml.
---
gnu/packages/networking.scm | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 488d015107..f0ba9925c9 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1590,27 +1590,12 @@ (define-public iputils
"04bp4af15adp79ipxmiakfp0ij6hx5qam266flzbr94pr8z8l693"))))
(build-system meson-build-system)
(arguments
- `(#:configure-flags '("-DBUILD_RARPD=true")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-docbook-url
- (lambda* (#:key inputs #:allow-other-keys)
- (let* ((docbook-xsl (assoc-ref inputs "docbook-xsl"))
- (uri (string-append docbook-xsl "/xml/xsl/docbook-xsl-"
- ,(package-version docbook-xsl))))
- (for-each
- (lambda (file)
- (substitute* file
- (("http://docbook\\.sourceforge\\.net/release/xsl-ns/current")
- uri)))
- (cons "doc/meson.build"
- (find-files "doc" "\\.xsl$")))
- #t))))))
+ `(#:configure-flags '("-DBUILD_RARPD=true")))
(native-inputs
`(("gettext" ,gettext-minimal)
("pkg-config" ,pkg-config)
("docbook-xsl" ,docbook-xsl)
- ("docbook-xml" ,docbook-xml)
+ ("docbook-xml" ,docbook-xml-5.0.1)
("libxml2" ,libxml2) ;for XML_CATALOG_FILES
("xsltproc" ,libxslt)))
(inputs
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 06:16
[PATCH 58/61] gnu: perf: Remove libxml2.
(address . 65479@debbugs.gnu.org)
e11973e68cbadc9db5c1cf9c25b3b3784e728e99.1692828533.git.mirai@makinata.eu
XML_CATALOG_FILES is already set within xmlto which is a requirement for
building the documentation.

Note: perf depends on zlib which was propagated by libxml2 so we must re-add
it here.

* gnu/packages/linux.scm (perf)[inputs]: Remove libxml2. Add zlib. Relocate
docbook-xsl, xmlto and asciidoc to …
[native-inputs]: … here.
---
gnu/packages/linux.scm | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

Toggle diff (34 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 140d2e4dd3..5b117bb029 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5046,20 +5046,20 @@ (define-public perf
;; There are build scripts written in these languages.
perl
python-2
- python-3))
+ python-3
+ ;; Documentation
+ docbook-xsl
+ xmlto
+ asciidoc))
(inputs
(list slang ;for the interactive TUI
+ zlib
;; newt
python-2 ;'perf' links against libpython
elfutils
libiberty ;used alongside BDF for symbol demangling
libunwind ;better stack walking
- numactl ;for 'perf bench numa mem'
- ;; Documentation.
- libxml2 ;for $XML_CATALOG_FILES
- docbook-xsl
- xmlto
- asciidoc))
+ numactl)) ;for 'perf bench numa mem'
(home-page "https://perf.wiki.kernel.org/")
(synopsis "Linux profiling with performance counters")
(description
--
2.40.1
B
B
Bruno Victal wrote on 24 Aug 2023 06:16
[PATCH 45/61] gnu: iputils: Restyle.
(address . 65479@debbugs.gnu.org)
d65ab39e3659b0fc923d643108205a09dcc9fa36.1692828533.git.mirai@makinata.eu
* gnu/packages/networking.scm (iputils)[native-inputs]: Drop input labels.
[description]: Use @table over @itemize.
---
gnu/packages/networking.scm | 45 ++++++++++++++++++++-----------------
1 file changed, 24 insertions(+), 21 deletions(-)

Toggle diff (64 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index f0ba9925c9..9685a7a747 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1592,33 +1592,36 @@ (define-public iputils
(arguments
`(#:configure-flags '("-DBUILD_RARPD=true")))
(native-inputs
- `(("gettext" ,gettext-minimal)
- ("pkg-config" ,pkg-config)
- ("docbook-xsl" ,docbook-xsl)
- ("docbook-xml" ,docbook-xml-5.0.1)
- ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
- ("xsltproc" ,libxslt)))
+ (list docbook-xsl docbook-xml-5.0.1
+ gettext-minimal
+ libxml2 ;for XML_CATALOG_FILES
+ libxslt pkg-config))
(inputs
(list libcap libidn2 openssl))
(synopsis "Collection of network utilities")
(description
"This package contains a variety of tools for dealing with network
configuration, troubleshooting, or servers. Utilities included are:
-
-@itemize @bullet
-@item @command{arping}: Ping hosts using the @dfn{Address Resolution Protocol}.
-@item @command{clockdiff}: Compute time difference between network hosts
-using ICMP TSTAMP messages.
-@item @command{ninfod}: Daemon that responds to IPv6 Node Information Queries.
-@item @command{ping}: Use ICMP ECHO messages to measure round-trip delays
-and packet loss across network paths.
-@item @command{rarpd}: Answer RARP requests from clients.
-@item @command{rdisc}: Populate network routing tables with information from
-the ICMP router discovery protocol.
-@item @command{tftpd}: Trivial file transfer protocol server.
-@item @command{tracepath}: Trace network path to an IPv4 or IPv6 address and
-discover MTU along the way.
-@end itemize")
+@table @command
+@item arping
+Ping hosts using @acronym{ARP, Address Resolution Protocol}.
+@item clockdiff
+Compute time difference between network hosts using ICMP TSTAMP messages.
+@item ninfod
+Daemon that responds to IPv6 Node Information Queries.
+@item ping
+Use ICMP ECHO messages to measure round-trip delays and packet loss across
+network paths.
+@item rarpd
+Answer RARP requests from clients.
+@item rdisc
+Populate network routing tables with information from the ICMP router
+discovery protocol.
+@item tftpd
+Trivial file transfer protocol server.
+@item tracepath
+Trace network path to an IPv4 or IPv6 address and discover MTU along the way.
+@end table")
;; The various utilities are covered by different licenses, see LICENSE
;; for details.
(license (list license:gpl2+ ;arping, rarpd, tracepath
--
2.40.1
B
B
Bruno Victal wrote on 16 Sep 2023 19:03
Re: [PATCH core-updates 04/61] gnu: docbook-xsl: Add compatibility entry.
(name . Bruno Victal)(address . mirai@makinata.eu)(address . 65479@debbugs.gnu.org)
f34108c6-7a8d-4cf9-80a4-29341ce38a86@makinata.eu
It turns out that we have been inserting incorrect entries in the XML
catalog for docbook-xsl.

since the docbook-xsl package only provides the namespaced version.

I will prepare a v2 to fix this inaccuracy by adding a docbook-xsl-nons
package and rectify the catalog entries in both packages.



--
Furthermore, I consider that nonfree software must be eradicated.

Cheers,
Bruno.
B
B
Bruno Victal wrote on 23 Sep 2023 14:30
(name . Bruno Victal)(address . mirai@makinata.eu)(address . 65479@debbugs.gnu.org)
359a2d29-0932-4fe4-b741-083b3f56f01f@makinata.eu
On 2023-09-16 18:03, Bruno Victal wrote:
Toggle quote (10 lines)
> It turns out that we have been inserting incorrect entries in the XML
> catalog for docbook-xsl.
>
> The URIs 'http://docbook.sourceforge.net/release/xsl/current/' and
> 'http://cdn.docbook.org/release/xsl/current/' are NOT interchangeable [1]
> since the docbook-xsl package only provides the namespaced version.
>
> I will prepare a v2 to fix this inaccuracy by adding a docbook-xsl-nons
> package and rectify the catalog entries in both packages.

On second thought I'm leaving this part out from the series as removing the
inaccurate entry will cause every dependent package to fail, though this
is easily fixed by having these packages use the (not yet packaged)
docbook-xsl-nons package.

This means that we're still going to keep using the wrong XSL package but
in practice this hasn't revealed to be a problem for the currently packaged
programs.


PS: I'm leaving it out from this as the series is already getting very large
and addressing the inaccuracy here is better done separately for patch
management reasons.

--
Furthermore, I consider that nonfree software must be eradicated.

Cheers,
Bruno.
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 00/62] Docbook & XML/SGML improvements.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
cover.1695478390.git.mirai@makinata.eu
Notable changes since v1:
* Rebased against core-updates (70b0f2b9134b2db286f707835394798de039c277).
* Removed obsolete docbook-xsl-1.79.1.

Bruno Victal (62):
gnu: docbook-xml: Fix installation paths.
gnu: Add docbook-xml-5.0.1.
gnu: docbook-xml-5.1: Fix URIs in catalog.xml.
gnu: docbook-xsl: Add compatibility entry.
gnu: docbook-xsl: Add rewrite entries for http.
gnu: docbook: Remove leftovers.
gnu: docbook-utils: Import patches from debian.
gnu: docbook2x: Import patches from debian.
gnu: docbook2x: Fix sgml2xml-isoent and add test dependencies.
gnu: docbook2x: Split documentation.
gnu: libxml2: Rewrite using G-Expressions.
search-paths: Add $XML_CATALOG_FILES and $SGML_CATALOG_FILES.
gnu: libxml2: Add SGML_CATALOG_FILES to native-search-path.
gnu: libxslt: Set search-paths for XML and SGML catalogs.
gnu: dblatex: Add libxslt native-search-paths to its own.
gnu: dblatex: Split documentation.
gnu: Add docbook-mathml-1.0.
gnu: dblatex: Fix missing texlive binaries.
gnu: lilypond: Use dblatex/stable.
gnu: docbook2x: Set search-paths for XML and SGML catalogs.
gnu: xmlto: Rewrite with G-Expressions.
gnu: xmlto: Add libxslt native-search-paths to its own.
gnu: gtk-doc: Add libxslt native-search-paths to its own.
gnu: docbook2x: Drop docbook-xml workarounds.
gnu: secilc: Drop xmlto workaround.
gnu: xdg-utils: Drop docbook workarounds.
gnu: xdg-user-dirs: Drop docbook workaround.
gnu: udisks: Rewrite using G-Expressions.
gnu: udisks: Drop docbook workaround.
gnu: colord-gtk: Build documentation.
gnu: criu: Drop xmlto workaround.
gnu: gtk: Drop docbook workaround.
gnu: git-crypt: Remove docbook workarounds.
gnu: gnome-session: Build documentation.
gnu: metapixel: Drop docbook workaround.
gnu: metapixel: Rewrite with G-Expressions.
gnu: libxkbcommon: Add doc output.
gnu: libxkbcommon: Faux propagate libxml2.
gnu: gnome-session: Remove libxml2.
gnu: sssd: Drop xmllint workaround.
gnu: tdb: Build manpages.
gnu: drumstick: Drop docbook workaround.
gnu: vmpk: Drop docbook workaround.
gnu: iputils: Use docbook-xml-5.0.1.
gnu: iputils: Restyle description and native-inputs.
gnu: libnotify: Drop docbook workarounds.
gnu: libnotify: Split documentation.
gnu: alsa-utils: Build manpages.
gnu: alsa-utils: Rewrite with G-Expressions.
gnu: tunctl: Update comment.
gnu: gdcm: Build manpages.
gnu: git: Drop docbook workarounds.
gnu: gtk-doc: Rewrite with G-Expressions.
gnu: gtk-doc: Wrap XML_CATALOG_FILES.
gnu: gtk-doc: Remove leftovers.
gnu: libstdc++-doc: Rewrite with G-Expressions.
gnu: libstdc++-doc: Build libstdc++ info documentation.
gnu: perf: Remove libxml2.
gnu: Remove unneeded libxml2 from native-inputs. (libxslt)
gnu: Remove unneeded libxml2 from native-inputs. (xmlto)
gnu: Remove unneeded libxml2 from native-inputs. (gtk-doc)
gnu: Remove docbook-xsl-1.79.1.

doc/guix.texi | 24 +-
gnu/local.mk | 19 +-
gnu/packages/benchmark.scm | 1 -
gnu/packages/bioinformatics.scm | 6 +-
gnu/packages/cluster.scm | 1 -
gnu/packages/databases.scm | 6 +-
gnu/packages/docbook.scm | 770 +++++++++++-------
gnu/packages/freedesktop.scm | 194 ++---
gnu/packages/gcc.scm | 59 +-
gnu/packages/glib.scm | 1 -
gnu/packages/gnome.scm | 39 +-
gnu/packages/gtk.scm | 53 +-
gnu/packages/image-processing.scm | 51 +-
gnu/packages/linux.scm | 58 +-
gnu/packages/moreutils.scm | 2 +-
gnu/packages/music.scm | 30 +-
gnu/packages/networking.scm | 41 +-
gnu/packages/ocr.scm | 1 -
.../patches/dblatex-inkscape-1.0.patch | 39 +
.../docbook-utils-documentation-edits.patch | 100 +++
.../docbook-utils-escape-characters.patch | 34 +
.../docbook-utils-remove-jade-sp.patch | 215 +++++
...book-utils-respect-refentry-for-name.patch | 34 +
.../docbook-utils-source-date-epoch.patch | 29 +
.../docbook-utils-use-date-element.patch | 61 ++
...ocbook-xsl-nonrecursive-string-subst.patch | 40 -
.../patches/docbook-xsl-support-old-url.patch | 17 -
.../patches/docbook2x-filename-handling.patch | 42 +
.../patches/docbook2x-manpage-typo.patch | 24 +
.../docbook2x-preprocessor-declaration.patch | 89 ++
.../docbook2x-static-datadir-evaluation.patch | 19 +
...gcc-13.2.0-libstdc++-docbook-xsl-uri.patch | 50 ++
...cc-13.2.0-libstdc++-info-install-fix.patch | 70 ++
.../gcc-5.5.0-libstdc++-xmlcatalog.patch | 402 +++++++++
.../patches/libsepol-versioned-docbook.patch | 56 ++
gnu/packages/perl.scm | 7 +-
gnu/packages/polkit.scm | 1 -
gnu/packages/rpm.scm | 3 +-
gnu/packages/samba.scm | 3 +-
gnu/packages/security-token.scm | 5 +-
gnu/packages/selinux.scm | 13 +-
gnu/packages/sssd.scm | 8 +-
gnu/packages/terminals.scm | 1 -
gnu/packages/version-control.scm | 53 +-
gnu/packages/virtualization.scm | 10 -
gnu/packages/wm.scm | 3 +-
gnu/packages/xdisorg.scm | 32 +-
gnu/packages/xml.scm | 83 +-
guix/search-paths.scm | 25 +
49 files changed, 2084 insertions(+), 840 deletions(-)
create mode 100644 gnu/packages/patches/dblatex-inkscape-1.0.patch
create mode 100644 gnu/packages/patches/docbook-utils-documentation-edits.patch
create mode 100644 gnu/packages/patches/docbook-utils-escape-characters.patch
create mode 100644 gnu/packages/patches/docbook-utils-remove-jade-sp.patch
create mode 100644 gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch
create mode 100644 gnu/packages/patches/docbook-utils-source-date-epoch.patch
create mode 100644 gnu/packages/patches/docbook-utils-use-date-element.patch
delete mode 100644 gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
delete mode 100644 gnu/packages/patches/docbook-xsl-support-old-url.patch
create mode 100644 gnu/packages/patches/docbook2x-filename-handling.patch
create mode 100644 gnu/packages/patches/docbook2x-manpage-typo.patch
create mode 100644 gnu/packages/patches/docbook2x-preprocessor-declaration.patch
create mode 100644 gnu/packages/patches/docbook2x-static-datadir-evaluation.patch
create mode 100644 gnu/packages/patches/gcc-13.2.0-libstdc++-docbook-xsl-uri.patch
create mode 100644 gnu/packages/patches/gcc-13.2.0-libstdc++-info-install-fix.patch
create mode 100644 gnu/packages/patches/gcc-5.5.0-libstdc++-xmlcatalog.patch
create mode 100644 gnu/packages/patches/libsepol-versioned-docbook.patch


base-commit: 70b0f2b9134b2db286f707835394798de039c277
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 03/62] gnu: docbook-xml-5.1: Fix URIs in catalog.xml.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
52bffd0b261be7dd2452c72d0cb498446b677ae0.1695478390.git.mirai@makinata.eu
* gnu/packages/docbook.scm (docbook-xml-5.1)[source]: Patch version in URI.
---
gnu/packages/docbook.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index ec1b9acb36..4a0104c253 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -109,7 +109,13 @@ (define-public docbook-xml-5.1
"/docbook-v" version "-os.zip"))
(sha256
(base32
- "0zqy9prj9wam9dn7v3mgr7ld1axqxdhgrmv06dviwg00ahv43wxk"))))
+ "0zqy9prj9wam9dn7v3mgr7ld1axqxdhgrmv06dviwg00ahv43wxk"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; The .zip release mistakenly uses '5.1CR4' instead of
+ ;; '5.1' as intended by <https://docbook.org/xml/5.1/catalog.xml>.
+ #~(substitute* "schemas/catalog.xml"
+ (("5\\.1CR4") #$version)))))
(template (docbook-xml-package source version)))
(package
(inherit template)
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 01/62] gnu: docbook-xml: Fix installation paths.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
41989879ab49bc0fcc437d5f52839a3c57434ccc.1695478390.git.mirai@makinata.eu
Using xml/dtd/docbook as installation path had two problems:
* The paths would conflict in profile, which made it impossible
for two different docbook-xml packages to coexist within the XML_CATALOG_FILES
variable.
* It was technically incorrect since non-DTD schemas were also placed here.

This commit makes docbook-xml use versioned paths instead.

* gnu/packages/docbook.scm
(docbook-xml-package, docbook-xml-4.x-package): New procedure.
(docbook-xml): Make docbook-xml an alias for docbook-xml-5.1.
(docbook-xml-5.1): New variable.
(docbook-xml-4.5, docbook-xml-4.4, docbook-xml-4.3, docbook-xml-4.2)
(docbook-xml-4.1.2): Refactor to use docbook-xml-4.x-package procedure.
---
gnu/packages/docbook.scm | 265 ++++++++++++++++++++++++---------------
1 file changed, 163 insertions(+), 102 deletions(-)

Toggle diff (307 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 4461293e1e..329d19a05d 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -50,17 +50,17 @@ (define-module (gnu packages docbook)
#:use-module (guix build-system trivial)
#:use-module (guix build-system python))
-(define-public docbook-xml
+;; The fetch-plan, install-plan and phases for docbook-xml tend to vary
+;; between releases therefore we use a “template” package for the
+;; transformations that are common to these packages.
+(define* (docbook-xml-package source version)
+ "Return a package for a docbook-xml package version @var{version} and
+downloading from @var{source}, where @var{version} is a string and
+@var{source} is a @code{<origin>} record."
(package
(name "docbook-xml")
- (version "5.1")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://docbook.org/xml/" version
- "/docbook-v" version "-os.zip"))
- (sha256
- (base32
- "0zqy9prj9wam9dn7v3mgr7ld1axqxdhgrmv06dviwg00ahv43wxk"))))
+ (version version)
+ (source source)
(build-system copy-build-system)
(arguments
(list
@@ -71,23 +71,27 @@ (define-public docbook-xml
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-permissions
(lambda _
- ;; XXX: These files do not need 0755 permission.
+ ;; 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)))))))
+ (xslt-file #$(local-file
+ (search-auxiliary-file
+ "xml/patch-catalog-xml.xsl")))
+ ;; Avoid profile conflicts by installing to a
+ ;; versioned path.
+ (dest-path
+ (format #f "~a/xml/docbook/~a" #$output #$version)))
+ (for-each
+ (lambda (catalog)
+ (let ((catalog* (string-append catalog ".new")))
+ (invoke xsltproc "--nonet" "--novalid" "--noout"
+ "--stringparam" "prefix" dest-path
+ "--output" catalog*
+ xslt-file catalog)
+ (rename-file catalog* catalog)))
+ (find-files "." "catalog\\.xml$"))))))))
(native-inputs (list libxslt unzip))
(home-page "https://docbook.org")
(synopsis "DocBook XML DTDs for document authoring")
@@ -97,95 +101,152 @@ (define-public docbook-xml
by no means limited to these applications.) This package provides XML DTDs.")
(license (license:x11-style "" "See file headers."))))
+(define-public docbook-xml-5.1
+ (let* ((version "5.1")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbook-v" version "-os.zip"))
+ (sha256
+ (base32
+ "0zqy9prj9wam9dn7v3mgr7ld1axqxdhgrmv06dviwg00ahv43wxk"))))
+ (template (docbook-xml-package source version)))
+ (package
+ (inherit template)
+ (arguments
+ (let ((dest-dir (format #f "xml/docbook/~a/" version)))
+ (substitute-keyword-arguments (package-arguments template)
+ ;; XXX: A default value must be provided otherwise this
+ ;; substitution has no effect.
+ ((#:install-plan _ #f)
+ #~`(("schemas/" #$dest-dir)))))))))
+;; XXX: docbook-xml-4.x versions use the same #:install-plan but since the
+;; paths are versioned we can't use (inherit …).
+(define* (docbook-xml-4.x-package source version)
+ "Return a template for a docbook-xml-4.x package version @var{version} and
+downloading from @var{source}, where @var{version} is a string and
+@var{source} is a @code{<origin>} record."
+ (let ((base-template (docbook-xml-package source version)))
+ (package
+ (inherit base-template)
+ (arguments
+ (let* ((dest-dir (format #f "xml/docbook/~a/" version)))
+ (substitute-keyword-arguments (package-arguments base-template)
+ ((#:phases phases)
+ ;; Some programs, such as kdoctools, instead of using
+ ;; XML_CATALOG_FILES, prefer to use cmake to locate
+ ;; the DTDs for docbook-xml-4.x packages but
+ ;; since there's no agreed standard as to where these files
+ ;; should be placed, in practice the .cmake files
+ ;; end up searching for paths that are distribution specific.
+ #~(modify-phases #$phases
+ (add-after 'install 'symlink-alternate-path
+ (lambda _
+ ;; kdoctools searches under xml/dtd/docbook/
+ ;; which is the convention used by Nix.
+ (mkdir-p (string-append #$output "/xml/dtd"))
+ (symlink (string-append #$output "/" #$dest-dir)
+ (string-append #$output "/xml/dtd/docbook"))))))
+ ((#:install-plan _ #f)
+ #~`(("./" #$dest-dir
+ #:exclude-regexp ("ChangeLog$"
+ "README$"
+ "docbook\\.cat$"
+ "\\.txt$"))))))))))
+
(define-public docbook-xml-4.5
- (package
- (inherit docbook-xml)
- (version "4.5")
- (source (origin
- (method url-fetch/zipbomb)
- (uri (string-append "https://docbook.org/xml/" version
- "/docbook-xml-" version ".zip"))
- (sha256
- (base32
- "1d671lcjckjri28xfbf6dq7y3xnkppa910w1jin8rjc35dx06kjf"))))))
+ (let* ((version "4.5")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbook-xml-" version ".zip"))
+ (sha256
+ (base32
+ "1d671lcjckjri28xfbf6dq7y3xnkppa910w1jin8rjc35dx06kjf")))))
+ (docbook-xml-4.x-package source version)))
(define-public docbook-xml-4.4
- (package (inherit docbook-xml)
- (version "4.4")
- (source (origin
- (method url-fetch/zipbomb)
- (uri (string-append "https://docbook.org/xml/" version
- "/docbook-xml-" version ".zip"))
- (sha256
- (base32
- "141h4zsyc71sfi2zzd89v4bb4qqq9ca1ri9ix2als9f4i3mmkw82"))))))
+ (let* ((version "4.4")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbook-xml-" version ".zip"))
+ (sha256
+ (base32
+ "141h4zsyc71sfi2zzd89v4bb4qqq9ca1ri9ix2als9f4i3mmkw82")))))
+ (docbook-xml-4.x-package source version)))
(define-public docbook-xml-4.3
- (package (inherit docbook-xml)
- (version "4.3")
- (source (origin
- (method url-fetch/zipbomb)
- (uri (string-append "https://docbook.org/xml/" version
- "/docbook-xml-" version ".zip"))
- (sha256
- (base32
- "0r1l2if1z4wm2v664sqdizm4gak6db1kx9y50jq89m3gxaa8l1i3"))))))
+ (let* ((version "4.3")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbook-xml-" version ".zip"))
+ (sha256
+ (base32
+ "0r1l2if1z4wm2v664sqdizm4gak6db1kx9y50jq89m3gxaa8l1i3")))))
+ (docbook-xml-4.x-package source version)))
(define-public docbook-xml-4.2
- (package (inherit docbook-xml)
- (version "4.2")
- (source (origin
- (method url-fetch/zipbomb)
- (uri (string-append "https://docbook.org/xml/" version
- "/docbook-xml-" version ".zip"))
- (sha256
- (base32
- "18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c"))))))
+ (let* ((version "4.2")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbook-xml-" version ".zip"))
+ (sha256
+ (base32
+ "18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c")))))
+ (docbook-xml-4.x-package source version)))
(define-public docbook-xml-4.1.2
- (package
- (inherit docbook-xml)
- (version "4.1.2")
- (source (origin
- (method url-fetch/zipbomb)
- (uri (string-append "https://docbook.org/xml/" version
- "/docbkx412.zip"))
- (sha256
- (base32
- "0wkp5rvnqj0ghxia0558mnn4c7s3n501j99q2isp3sp0ci069w1h"))))
- (arguments
- (substitute-keyword-arguments (package-arguments docbook-xml)
- ((#:phases phases)
- #~(modify-phases #$phases
- (add-after 'unpack 'copy-catalog-file
- ;; docbook-xml-4.1.2 is unique in the fact that it doesn't come
- ;; with a catalog.xml file, requiring it to be generated by hand
- ;; from the docbook.cat SGML catalog. We could automatically
- ;; generate it here at the cost of enlarging the package
- ;; definition with a rudimentary (PEG) parser for the SGML
- ;; catalog but this is overkill since this file is unlikely to
- ;; change, therefore we ship a pre-generated catalog.xml.
- (lambda _
- (copy-file
- #$(local-file
- (search-auxiliary-file
- "xml/docbook-xml/catalog-4.1.2.xml"))
- "catalog.xml")))
- (add-after 'patch-catalog-xml 'add-rewrite-entries
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((xmlcatalog (search-input-file inputs "/bin/xmlcatalog"))
- (dtd-path (string-append #$output "/xml/dtd/docbook")))
- (for-each
- (lambda (type)
- (invoke xmlcatalog "--noout"
- "--add" type
- "http://www.oasis-open.org/docbook/xml/4.1.2/"
- (string-append "file://" dtd-path "/")
- "catalog.xml"))
- (list "rewriteSystem" "rewriteURI")))))))))
- (native-inputs
- (modify-inputs (package-native-inputs docbook-xml)
- (prepend libxml2)))))
+ (let* ((version "4.1.2")
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://docbook.org/xml/" version
+ "/docbkx412.zip"))
+ (sha256
+ (base32
+ "0wkp5rvnqj0ghxia0558mnn4c7s3n501j99q2isp3sp0ci069w1h"))))
+ (template (docbook-xml-4.x-package source version)))
+ (package
+ (inherit template)
+ (arguments
+ (substitute-keyword-arguments (package-arguments template)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'copy-catalog-file
+ ;; docbook-xml-4.1.2 is unique in the fact that it doesn't come
+ ;; with a catalog.xml file, requiring it to be generated by hand
+ ;; from the docbook.cat SGML catalog. We could automatically
+ ;; generate it here at the cost of enlarging the package
+ ;; definition with a rudimentary (PEG) parser for the SGML
+ ;; catalog but this is overkill since this file is unlikely to
+ ;; change, therefore we ship a pre-generated catalog.xml.
+ (lambda _
+ (copy-file
+ #$(local-file
+ (search-auxiliary-file
+ "xml/docbook-xml/catalog-4.1.2.xml"))
+ "catalog.xml")))
+ (add-after 'patch-catalog-xml 'add-rewrite-entries
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((xmlcatalog (search-input-file inputs
+ "/bin/xmlcatalog"))
+ (dtd-path (format #f "~a/xml/docbook/~a"
+ #$output #$version)))
+ (for-each
+ (lambda (type)
+ (invoke xmlcatalog "--noout"
+ "--add" type
+ "http://www.oasis-open.org/docbook/xml/4.1.2/"
+ (string-append "file://" dtd-path "/")
+ "catalog.xml"))
+ (list "rewriteSystem" "rewriteURI")))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs template)
+ (prepend libxml2))))))
+
+(define-public docbook-xml docbook-xml-5.1)
;;; There's an issue in docbook-xsl 1.79.2 that causes manpages to be
;;; generated incorrectly and embed raw nroff syntax such as '.PP' when there
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 04/62] gnu: docbook-xsl: Add compatibility entry.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
d59b0acc6d2a6952993bcfe6a3e0baa0bb1aa5d2.1695478390.git.mirai@makinata.eu

* gnu/packages/docbook.scm (docbook-xsl)[arguments]<#:phases>: Add
compatibility entry.
---
gnu/packages/docbook.scm | 41 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)

Toggle diff (54 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 4a0104c253..55f99aae62 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -388,7 +388,46 @@ (define-public docbook-xsl
"http://docbook.sourceforge.net/release/xsl/current/"
store-uri
catalog))
- (list "rewriteSystem" "rewriteURI")))
+ (list "rewriteSystem" "rewriteURI"))
+
+ ;; Originally the
+ ;; "http://docbook.sourceforge.net/release/xsl/"
+ ;; URI referred to the non-namespaced docbook-xsl,
+ ;; with its namespaced version using a URI differing in
+ ;; the path component as '…/xsl-ns/'.
+ ;; At some point the namespaced version was made the
+ ;; canonical docbook-xsl package whilst preserving the
+ ;; original URI.
+ ;;
+ ;; For compatibility with XML files that still specify
+ ;; the legacy namespaced docbook-xsl URIs we re-add them
+ ;; here.
+ (for-each
+ (lambda (type)
+ ;; Remap /xsl-ns/ to /xsl/.
+ ;; Note: URI resolutions are not recursive.
+ ;; A rewrite rule from:
+ ;; 'http://docbook.sourceforge.net/release/xsl-ns/'
+ ;; to
+ ;; 'http://docbook.sourceforge.net/release/xsl/'
+ ;; will not trigger the rewrite rule that ultimately
+ ;; remaps to a /gnu/store URI, as can be seen by
+ ;; invoking:
+ ;; $ xmlcatalog "" \
+ ;; 'http://docbook.sourceforge.net/release/xsl-ns/current/'
+ ;; http://docbook.sourceforge.net/release/xsl/current/
+ ;; $ xmlcatalog "" \
+ ;; 'http://docbook.sourceforge.net/release/xsl/current/'
+ ;; file://gnu/store/…/xml/xsl/…
+ ;;
+ ;; See XML Catalog specification, item 7.2.2. for
+ ;; details.
+ (invoke xmlcatalog "--noout"
+ "--add" type
+ "http://docbook.sourceforge.net/release/xsl-ns/current/"
+ store-uri
+ catalog))
+ (list "rewriteSystem" "rewriteURI")))
catalog-files))))
(replace 'install
(lambda _
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 08/62] gnu: docbook2x: Import patches from debian.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
c295546b3f9c6f11757b1653de7aa2862b82b9d9.1695478390.git.mirai@makinata.eu
* gnu/packages/docbook.scm (docbook2x)[source]: Import patches from
debian. Prefer patching in source over 'patch-sources phase.
[arguments]<#:phases>: Drop 'patch-sources phase. Add 'autoreconf phase.
[inputs]: Move after arguments. Relocate docbook-xml-4.5 to …
[natine-inputs]: … here. Add autoconf, automake and libtool.
* gnu/packages/patches/docbook2x-filename-handling.patch: New file.
* gnu/packages/patches/docbook2x-manpage-typo.patch: Ditto.
* gnu/packages/patches/docbook2x-preprocessor-declaration.patch: Ditto.
* gnu/packages/patches/docbook2x-static-datadir-evaluation.patch: Ditto.
* gnu/local.mk: Register it.
---
gnu/local.mk | 4 +
gnu/packages/docbook.scm | 47 ++++++----
.../patches/docbook2x-filename-handling.patch | 42 +++++++++
.../patches/docbook2x-manpage-typo.patch | 24 +++++
.../docbook2x-preprocessor-declaration.patch | 89 +++++++++++++++++++
.../docbook2x-static-datadir-evaluation.patch | 19 ++++
6 files changed, 206 insertions(+), 19 deletions(-)
create mode 100644 gnu/packages/patches/docbook2x-filename-handling.patch
create mode 100644 gnu/packages/patches/docbook2x-manpage-typo.patch
create mode 100644 gnu/packages/patches/docbook2x-preprocessor-declaration.patch
create mode 100644 gnu/packages/patches/docbook2x-static-datadir-evaluation.patch

Toggle diff (301 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ea923be41d..8d4d64a591 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1076,6 +1076,10 @@ dist_patch_DATA = \
%D%/packages/patches/docbook-utils-respect-refentry-for-name.patch \
%D%/packages/patches/docbook-utils-source-date-epoch.patch \
%D%/packages/patches/docbook-utils-use-date-element.patch \
+ %D%/packages/patches/docbook2x-filename-handling.patch \
+ %D%/packages/patches/docbook2x-manpage-typo.patch \
+ %D%/packages/patches/docbook2x-preprocessor-declaration.patch \
+ %D%/packages/patches/docbook2x-static-datadir-evaluation.patch \
%D%/packages/patches/doc++-include-directives.patch \
%D%/packages/patches/doc++-segfault-fix.patch \
%D%/packages/patches/dovecot-opensslv3.patch \
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 994aa57f18..6a138dcb77 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -27,6 +27,7 @@
(define-module (gnu packages docbook)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages imagemagick)
@@ -867,32 +868,25 @@ (define-public docbook2x
version "/docbook2X-" version ".tar.gz"))
(sha256
(base32
- "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0"))))
+ "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0"))
+ (patches
+ (search-patches "docbook2x-filename-handling.patch"
+ "docbook2x-manpage-typo.patch"
+ "docbook2x-preprocessor-declaration.patch"
+ "docbook2x-static-datadir-evaluation.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Fix a failing test (maybe it worked with old texinfo?)
+ #~(substitute* "test/complete-manuals/at1.xml"
+ (("<bridgehead>")
+ "<bridgehead renderas=\"sect2\">")))))
(build-system gnu-build-system)
- (inputs
- (list bash-minimal
- docbook-xml-4.5
- perl
- perl-xml-namespacesupport
- perl-xml-parser
- perl-xml-sax
- perl-xml-sax-base
- texinfo
- libxslt))
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'configure 'patch-sources
(lambda* (#:key inputs #:allow-other-keys)
- ;; Fix failed substitution in config.pl
- (substitute* "perl/config.pl"
- (("\\$\\{prefix\\}")
- #$output))
- ;; Fix a failing test (maybe it worked with old texinfo?)
- (substitute* "test/complete-manuals/at1.xml"
- (("<bridgehead>")
- "<bridgehead renderas=\"sect2\">"))
;; Patch all the tests use DocBook 4.5
(substitute* (find-files "test" "\\.xml$")
(("\"-//OASIS//DTD DocBook XML V4\\..+//EN\"")
@@ -903,6 +897,9 @@ (define-public docbook2x
(setenv "XML_CATALOG_FILES"
(string-append (assoc-ref inputs "docbook-xml")
"/xml/dtd/docbook/catalog.xml"))))
+ (add-after 'unpack 'autoreconf
+ (lambda _
+ (invoke "autoreconf" "-vif")))
(add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((programs
@@ -936,6 +933,18 @@ (define-public docbook2x
(symlink prog (string-append #$output
"/bin/db2x_" prog)))
'("docbook2man" "docbook2texi")))))))
+ (inputs
+ (list bash-minimal
+ perl
+ perl-xml-namespacesupport
+ perl-xml-parser
+ perl-xml-sax
+ perl-xml-sax-base
+ texinfo
+ libxslt))
+ (native-inputs
+ (list autoconf automake libtool
+ docbook-xml-4.5))
(home-page "https://docbook2x.sourceforge.net")
(synopsis "Convert DocBook to man page and Texinfo format")
(description
diff --git a/gnu/packages/patches/docbook2x-filename-handling.patch b/gnu/packages/patches/docbook2x-filename-handling.patch
new file mode 100644
index 0000000000..b6895dd0d3
--- /dev/null
+++ b/gnu/packages/patches/docbook2x-filename-handling.patch
@@ -0,0 +1,42 @@
+## 03_fix_420153_filename_whitespace_handling.dpatch by
+## Daniel Leidert (dale) <daniel.leidert@wgdd.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Peter Eisentraut reported a regression in the whitespace handling of
+## DP: refentrytitle content during filename creation:
+## DP: http://bugs.debian.org/420153. The problem is, that upstream first
+## DP: replaces all spaces (but not linebreaks btw) with underlines and then
+## DP: it tries to normalize the result. This means, that a linebreak with
+## DP: additional whitespaces results in manpage names like 'foo_ ____bar.9'.
+## DP: So what we basically do in this patch is, that we first normalize the
+## DP: refentrytitle and then replace any spaces left with underlines.
+
+Edit by Bruno Victal <mirai@makinata.eu>:
+ Removed dpatch lines.
+
+--- docbook2x-0.8.8~/xslt/man/manpage.xsl 2006-04-20 15:45:55.000000000 +0200
++++ docbook2x-0.8.8/xslt/man/manpage.xsl 2007-04-20 16:19:28.000000000 +0200
+@@ -30,7 +30,7 @@
+
+ <xsl:template name="manpage-filename">
+ <xsl:param name="filename" />
+- <xsl:value-of select="normalize-space(translate($filename, &quot; /&quot;, &quot;__&quot;))" />
++ <xsl:value-of select="translate(normalize-space($filename), ' /', '__')" />
+ </xsl:template>
+
+
+--- docbook2x-0.8.8~/xslt/man/refentry.xsl 2006-04-21 04:39:55.000000000 +0200
++++ docbook2x-0.8.8/xslt/man/refentry.xsl 2007-04-20 16:21:53.000000000 +0200
+@@ -38,7 +38,11 @@
+ <xsl:template name="refentry-filename">
+ <xsl:param name="title" />
+
+- <xsl:variable name="title2" select="translate($title, &quot; /&quot;, &quot;__&quot;)" />
++ <xsl:variable name="title2">
++ <xsl:call-template name="manpage-filename">
++ <xsl:with-param name="filename" select="$title" />
++ </xsl:call-template>
++ </xsl:variable>
+
+ <!-- not using gentext here since man page names tend not to have
+ accented chars / non-Latin chars ...
diff --git a/gnu/packages/patches/docbook2x-manpage-typo.patch b/gnu/packages/patches/docbook2x-manpage-typo.patch
new file mode 100644
index 0000000000..5be21bdf9b
--- /dev/null
+++ b/gnu/packages/patches/docbook2x-manpage-typo.patch
@@ -0,0 +1,24 @@
+Author: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+
+--- docbook2x-0.8.8.orig/doc/docbook2man.1
++++ docbook2x-0.8.8/doc/docbook2man.1
+@@ -187,7 +187,7 @@ parameter instead.
+
+ However, inside a custom stylesheet
+ (\fInot on the command-line\fR)
+-this paramter can be set to the XPath expression
++this parameter can be set to the XPath expression
+ \*(T<document('')\*(T>,
+ which will cause the custom translations
+ directly embedded inside the custom stylesheet to be read.
+--- docbook2x-0.8.8.orig/doc/docbook2texi.1
++++ docbook2x-0.8.8/doc/docbook2texi.1
+@@ -230,7 +230,7 @@ parameter instead.
+
+ However, inside a custom stylesheet
+ (\fInot on the command-line\fR)
+-this paramter can be set to the XPath expression
++this parameter can be set to the XPath expression
+ \*(T<document('')\*(T>,
+ which will cause the custom translations
+ directly embedded inside the custom stylesheet to be read.
diff --git a/gnu/packages/patches/docbook2x-preprocessor-declaration.patch b/gnu/packages/patches/docbook2x-preprocessor-declaration.patch
new file mode 100644
index 0000000000..938f20617a
--- /dev/null
+++ b/gnu/packages/patches/docbook2x-preprocessor-declaration.patch
@@ -0,0 +1,89 @@
+## 04_fix_442782_preprocessor_declaration_syntax.dpatch by Colin Watson <cjwatson@debian.org>.
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Conventionally, preprocessor declarations should start with
+## DP: '\"
+## DP: rather than
+## DP: .\"
+## DP: Current man-db only supports the first (and recommended) syntax. So
+## DP: Colin Watson provided this patch to fix docbook2x.
+## DP:
+## DP: <URL:http://bugs.debian.org/442782>
+## DP: <URL:http://lists.gnu.org/archive/html/groff/2007-11/msg00023.html>
+
+Edit by Bruno Victal <mirai@makinata.eu>:
+ Removed dpatch lines.
+
+--- trunk~/perl/db2x_manxml.pl 2006-04-22 17:21:32.000000000 +0200
++++ trunk/perl/db2x_manxml.pl 2007-11-24 01:27:37.000000000 +0100
+@@ -342,6 +342,25 @@
+ $self->{line_start} = 1;
+ }
+
++#
++# Print a comment in the output, without causing a break.
++# Params: comment - the comment text.
++# May use any characters; they need not be escaped.
++#
++sub comment_nobreak
++{
++ my ($self, $comment) = @_;
++ $self->write("\n") unless $self->{line_start};
++
++ foreach my $line (split(/\n/, $comment)) {
++ $self->write('\'\" ');
++ $self->write($line);
++ $self->write("\n");
++ }
++
++ $self->{line_start} = 1;
++}
++
+
+ #
+ # Use a roff "escape" i.e. commands embedded in text starting with \
+@@ -510,16 +529,20 @@
+
+ $self->{'adjust-stack'} = [ 'b' ];
+
+- $self->{rw}->comment($elem->attr('preprocessors'))
+- if($elem->attr('preprocessors') ne '');
+-
++ my $preprocessors = $elem->attr('preprocessors');
+ # I've dug through the Internet to see if there was any
+ # standard way to specify encoding with man pages.
+ # The following seems to be a reasonable proposal:
+ # <URL:http://mail.nl.linux.org/linux-utf8/2001-04/msg00168.html>
+ my $encoding = $self->{options}->{'encoding'};
+ $encoding =~ s#//TRANSLIT$##i;
+- $self->{rw}->comment("-*- coding: $encoding -*-");
++ $encoding = "-*- coding: $encoding -*-";
++ if ($preprocessors eq '') {
++ $preprocessors = $encoding;
++ } else {
++ $preprocessors = "$preprocessors $encoding";
++ }
++ $self->{rw}->comment_nobreak($preprocessors);
+
+ # Define escapes for switching to and from monospace fonts (groff only)
+ $self->{rw}->request(qw{ .if \n(.g .ds T< \\\\FC});
+--- trunk~/xslt/backend/db2x_manxml.xsl 2006-04-23 16:44:52.000000000 +0200
++++ trunk/xslt/backend/db2x_manxml.xsl 2007-11-24 01:27:37.000000000 +0100
+@@ -528,7 +528,7 @@
+ <exslt:document method="text"
+ encoding="{$encoding}"
+ href="{$path}">
+- <xsl:text>.\" -*- coding: </xsl:text>
++ <xsl:text>'\" -*- coding: </xsl:text>
+ <xsl:value-of select="$encoding" />
+ <xsl:text> -*-&#10;</xsl:text>
+ <xsl:copy-of select="$content" />
+@@ -538,7 +538,7 @@
+ <saxon:output method="text"
+ encoding="{$encoding}"
+ href="{$path}">
+- <xsl:text>.\" -*- coding: </xsl:text>
++ <xsl:text>'\" -*- coding: </xsl:text>
+ <xsl:value-of select="$encoding" />
+ <xsl:text> -*-&#10;</xsl:text>
+ <xsl:copy-of select="$content" />
diff --git a/gnu/packages/patches/docbook2x-static-datadir-evaluation.patch b/gnu/packages/patches/docbook2x-static-datadir-evaluation.patch
new file mode 100644
index 0000000000..5241dc30a7
--- /dev/null
+++ b/gnu/packages/patches/docbook2x-static-datadir-evaluation.patch
@@ -0,0 +1,19 @@
+Description:
+ 01_fix_static_datadir_evaluation.dpatch by Daniel Leidert (dale) <daniel.leidert@wgdd.de>
+ All lines beginning with `## DP:' are a description of the patch.
+ The evaluation of datadir results in "${prefix}/share" without
+ evaluation of the ${prefix} variable with autoconf 2.60.
+
+Index: docbook2X-0.8.8/configure.ac
+===================================================================
+--- docbook2X-0.8.8.orig/configure.ac
++++ docbook2X-0.8.8/configure.ac
+@@ -148,7 +148,7 @@
+ dnl they will reside and should use these static_* values.
+ dnl Ensure that all static_* are fully expanded.
+
+-eval static_datadir="$datadir"
++eval eval static_datadir="$datadir"
+
+ eval static_bindir="$bindir"
+ old_val=""
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 05/62] gnu: docbook-xsl: Add rewrite entries for http.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
0fb6a173cbcc7ae9bd0b2cd2362c9c599bb6a000.1695478390.git.mirai@makinata.eu
Refactored 'patch-catalog.xml to reduce code duplication.
The catalog for docbook-xsl hosted on the CDN [1] have entries for the 'http'
scheme yet when building from source only 'https' entries are generated.
Patch the XML catalog to provide them both.


* gnu/packages/docbook.scm (docbook-xsl)[arguments]<#:phases>: Rename
'patch-catalog-xml to 'patch-catalog.xml. Refactor this phase for
deduplication and add 'https' entries.
---
gnu/packages/docbook.scm | 140 +++++++++++++++++----------------------
1 file changed, 59 insertions(+), 81 deletions(-)

Toggle diff (159 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 55f99aae62..83a5496a0e 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -342,93 +342,71 @@ (define-public docbook-xsl
(add-before 'install 'generate-catalog.xml
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "-C" "xsl" "catalog.xml" make-flags)))
- (add-before 'install 'patch-catalog-xml
+ (add-after 'generate-catalog.xml 'patch-catalog.xml
+ ;; Note: URI resolutions are not recursive.
+ ;; A rewrite rule from:
+ ;; 'http://docbook.sourceforge.net/release/xsl-ns/'
+ ;; to
+ ;; 'http://docbook.sourceforge.net/release/xsl/'
+ ;; will not trigger the rewrite rule that ultimately
+ ;; remaps to a /gnu/store URI, as can be seen by
+ ;; invoking:
+ ;; $ xmlcatalog "" \
+ ;; 'http://docbook.sourceforge.net/release/xsl-ns/current/'
+ ;; http://docbook.sourceforge.net/release/xsl/current/
+ ;; $ xmlcatalog "" \
+ ;; 'http://docbook.sourceforge.net/release/xsl/current/'
+ ;; file://gnu/store/…/xml/xsl/…
+ ;;
+ ;; See XML Catalog specification, item 7.2.2. for
+ ;; details.
(lambda* (#:key inputs #:allow-other-keys)
(let ((xmlcatalog (search-input-file inputs
"/bin/xmlcatalog"))
- (catalog-files (find-files "." "catalog\\.xml$"))
+ (catalog-file "xsl/catalog.xml")
(store-uri (string-append "file://" dest-path "/")))
+ ;; Remove /snapshot/ references.
(for-each
- (lambda (catalog)
- ;; Replace /snapshot/ reference with one based on
- ;; BASE-VERSION.
- (let ((versioned-uri
- (format
- #f "https://cdn.docbook.org/release/xsl/~a/"
- #$base-version)))
- (invoke xmlcatalog "--noout"
- "--del"
- "https://cdn.docbook.org/release/xsl/snapshot/"
- catalog)
- (for-each
- (lambda (type)
- (invoke xmlcatalog "--noout"
- "--add" type
- versioned-uri
- store-uri
- catalog))
- (list "rewriteSystem" "rewriteURI")))
-
- ;; Patch /current/ references to point to /gnu/store/….
- (for-each
- (lambda (type)
- (invoke xmlcatalog "--noout"
- "--add" type
- "https://cdn.docbook.org/release/xsl/current/"
- store-uri
- catalog))
- (list "rewriteSystem" "rewriteURI"))
-
- ;; Re-add the no longer present compatibility entries for
- ;; v.1.79.1 or earlier URIs.
- (for-each
- (lambda (type)
- (invoke xmlcatalog "--noout"
- "--add" type
- "http://docbook.sourceforge.net/release/xsl/current/"
- store-uri
- catalog))
- (list "rewriteSystem" "rewriteURI"))
-
- ;; Originally the
- ;; "http://docbook.sourceforge.net/release/xsl/"
- ;; URI referred to the non-namespaced docbook-xsl,
- ;; with its namespaced version using a URI differing in
- ;; the path component as '…/xsl-ns/'.
- ;; At some point the namespaced version was made the
- ;; canonical docbook-xsl package whilst preserving the
- ;; original URI.
- ;;
- ;; For compatibility with XML files that still specify
- ;; the legacy namespaced docbook-xsl URIs we re-add them
- ;; here.
+ (lambda (scheme)
+ (invoke xmlcatalog "--noout"
+ "--del"
+ (string-append
+ scheme
+ "://cdn.docbook.org/release/xsl/snapshot/")
+ catalog-file))
+ (list "http" "https"))
+ ;; Rewrite both http:// and https:// URIs.
+ (for-each
+ (lambda (path)
(for-each
- (lambda (type)
- ;; Remap /xsl-ns/ to /xsl/.
- ;; Note: URI resolutions are not recursive.
- ;; A rewrite rule from:
- ;; 'http://docbook.sourceforge.net/release/xsl-ns/'
- ;; to
- ;; 'http://docbook.sourceforge.net/release/xsl/'
- ;; will not trigger the rewrite rule that ultimately
- ;; remaps to a /gnu/store URI, as can be seen by
- ;; invoking:
- ;; $ xmlcatalog "" \
- ;; 'http://docbook.sourceforge.net/release/xsl-ns/current/'
- ;; http://docbook.sourceforge.net/release/xsl/current/
- ;; $ xmlcatalog "" \
- ;; 'http://docbook.sourceforge.net/release/xsl/current/'
- ;; file://gnu/store/…/xml/xsl/…
- ;;
- ;; See XML Catalog specification, item 7.2.2. for
- ;; details.
- (invoke xmlcatalog "--noout"
- "--add" type
- "http://docbook.sourceforge.net/release/xsl-ns/current/"
- store-uri
- catalog))
- (list "rewriteSystem" "rewriteURI")))
- catalog-files))))
+ (lambda (scheme)
+ (for-each
+ (lambda (entry-type)
+ (let ((uri (string-append scheme "://" path)))
+ (invoke xmlcatalog "--noout"
+ "--add" entry-type uri store-uri
+ catalog-file)))
+ (list "rewriteSystem" "rewriteURI")))
+ (list "http" "https")))
+ (list #$(format #f "cdn.docbook.org/release/xsl/~a/"
+ base-version)
+ "cdn.docbook.org/release/xsl/current/"
+ ;; Re-add the no longer present compatibility entries for
+ ;; v.1.79.1 or earlier URIs.
+ "docbook.sourceforge.net/release/xsl/current/"
+ ;; Originally the
+ ;; "http://docbook.sourceforge.net/release/xsl/"
+ ;; URI referred to the non-namespaced docbook-xsl,
+ ;; with its namespaced version using a URI differing in
+ ;; the path component as '…/xsl-ns/'.
+ ;; At some point the namespaced version was made the
+ ;; canonical docbook-xsl package whilst preserving the
+ ;; original URI.
+ ;;
+ ;; For compatibility with XML files that still specify
+ ;; the legacy namespaced docbook-xsl URIs we re-add them
+ ;; here.
+ "docbook.sourceforge.net/release/xsl-ns/current/")))))
(replace 'install
(lambda _
(let ((select-rx (make-regexp
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 10/62] gnu: docbook2x: Split documentation.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
5bfbc03650d355564bfb8ec93e17773a54ad0120.1695478390.git.mirai@makinata.eu
* gnu/packages/docbook.scm (docbook2x)[arguments]<#:phases>: Add
'split-outputs phase.
[outputs]: Add 'doc output.
---
gnu/packages/docbook.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 2d1c1f00ad..37eaac0a59 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -902,6 +902,12 @@ (define-public docbook2x
(add-after 'unpack 'autoreconf
(lambda _
(invoke "autoreconf" "-vif")))
+ (add-after 'install 'split-outputs
+ (lambda _
+ (let* ((old (string-append #$output "/share/doc"))
+ (new (string-append #$output:doc "/share/doc")))
+ (mkdir-p (dirname new))
+ (rename-file old new))))
(add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((programs
@@ -958,6 +964,7 @@ (define-public docbook2x
docbook-xml-4.1.2 docbook-xml-4.2 docbook-xml-4.4
docbook-xml-4.5
groff-minimal libxml2))
+ (outputs '("out" "doc"))
(home-page "https://docbook2x.sourceforge.net")
(synopsis "Convert DocBook to man page and Texinfo format")
(description
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 22/62] gnu: xmlto: Add libxslt native-search-paths to its own.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
9e1983c326c156bc033d498aac96096565053bfe.1695478390.git.mirai@makinata.eu
Otherwise when xmlto invokes xsltproc it will fail to find the XML catalog
files.

* gnu/packages/xml.scm (xmlto)[native-search-paths]: Add libxslt
native-search-paths to its own.
---
gnu/packages/xml.scm | 3 +++
1 file changed, 3 insertions(+)

Toggle diff (16 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 447bdcf117..6913b016df 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -1136,6 +1136,9 @@ (define-public xmlto
(list util-linux ; for 'getopt'
libxml2 ; for 'xmllint'
libxslt)) ; for 'xsltproc'
+ (native-search-paths
+ ;; For finding XML/SGML catalogs used by 'xsltproc' and 'xmllint'.
+ (package-native-search-paths libxslt))
(home-page "http://cyberelk.net/tim/software/xmlto/")
(synopsis "Front-end to an XSL toolchain")
(description
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 13/62] gnu: libxml2: Add SGML_CATALOG_FILES to native-search-path.
(address . 65479@debbugs.gnu.org)
6fae21fb2011c2598abbdcea7611efd54bc45cfb.1695478390.git.mirai@makinata.eu
According to the xmllint manpage it also makes use of the SGML_CATALOG_FILES
environment variable.

* gnu/packages/xml.scm (libxml2)[native-search-paths]: Add SGML_CATALOG_FILES.

Co-authored-by: gemmaro <gemmaro.dev@gmail.com>
---
gnu/packages/xml.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 75a14d0824..6aa5a22e67 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -226,7 +226,8 @@ (define-public libxml2
(inputs (list xz))
(propagated-inputs (list zlib)) ; libxml2.la says '-lz'.
(native-inputs (list perl))
- (native-search-paths (list $XML_CATALOG_FILES))
+ (native-search-paths
+ (list $SGML_CATALOG_FILES $XML_CATALOG_FILES))
(search-paths native-search-paths)
(description
"Libxml2 is the XML C parser and toolkit developed for the Gnome
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 12/62] search-paths: Add $XML_CATALOG_FILES and $SGML_CATALOG_FILES.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
a76f2d756fb08e9d629b72b839dd20103937c973.1695478390.git.mirai@makinata.eu
These variables are used by some packages for XML/SGML catalog lookups.

* guix/search-paths ($XML_CATALOG_FILES, $SGML_CATALOG_FILES): New variable,
extracted from …
* gnu/packages/xml.scm (libxml2, opensp)[native-search-paths]: … here. Refer
to the variables from (guix search-paths) respectively.
* gnu/packages/perl.scm (perl-app-xml-docbook-builder)[native-search-paths]:
Use $XML_CATALOG_FILES.
* doc/guix.texi (Search Paths): Update documentation to reflect changes.
---
doc/guix.texi | 24 +++++++++++-------------
gnu/packages/perl.scm | 7 +------
gnu/packages/xml.scm | 19 +++----------------
guix/search-paths.scm | 25 +++++++++++++++++++++++++
4 files changed, 40 insertions(+), 35 deletions(-)

Toggle diff (156 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 346af01e9d..5e7df75976 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11132,17 +11132,14 @@ Search Paths
to be found in @file{xml} sub-directories---nothing less. The search
path specification looks like this:
+@c This is defined at (guix search-paths) as $XML_CATALOG_FILES.
@lisp
-(package
- (name "libxml2")
- ;; some fields omitted
- (native-search-paths
- (list (search-path-specification
- (variable "XML_CATALOG_FILES")
- (separator " ")
- (files '("xml"))
- (file-pattern "^catalog\\.xml$")
- (file-type 'regular)))))
+(search-path-specification
+ (variable "XML_CATALOG_FILES")
+ (separator " ")
+ (files '("xml"))
+ (file-pattern "^catalog\\.xml$")
+ (file-type 'regular))
@end lisp
Worry not, search path specifications are usually not this tricky.
@@ -11178,15 +11175,16 @@ Search Paths
though it can be any symbol returned by @code{stat:type} (@pxref{File
System, @code{stat},, guile, GNU Guile Reference Manual}).
-In the libxml2 example above, we would match regular files; in the
-Python example, we would match directories.
+In the @env{XML_CATALOG_FILES} example above, we would match regular
+files; in the Python example, we would match directories.
@item @code{file-pattern} (default: @code{#f})
This must be either @code{#f} or a regular expression specifying
files to be matched @emph{within} the sub-directories specified by the
@code{files} field.
-Again, the libxml2 example shows a situation where this is needed.
+Again, the @env{XML_CATALOG_FILES} example shows a situation where this
+is needed.
@end table
@end deftp
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 8b82c272fc..267a35e560 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -601,12 +601,7 @@ (define-public perl-app-xml-docbook-builder
(list perl-class-xsaccessor perl-test-trap))
(native-search-paths
;; xsltproc's search paths, to avoid propagating libxslt.
- (list (search-path-specification
- (variable "XML_CATALOG_FILES")
- (separator " ")
- (files '("xml"))
- (file-pattern "^catalog\\.xml$")
- (file-type 'regular))))
+ (list $XML_CATALOG_FILES))
(home-page "https://www.shlomifish.org/open-source/projects/docmake/")
(synopsis "Translate DocBook/XML documentation into other file formats")
(description
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index c0222f5518..75a14d0824 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -83,6 +83,7 @@ (define-module (gnu packages xml)
#:use-module (guix build-system python)
#:use-module (guix deprecation)
#:use-module (guix utils)
+ #:use-module (guix search-paths)
#:use-module (gnu packages linux)
#:use-module (gnu packages pkg-config))
@@ -225,14 +226,7 @@ (define-public libxml2
(inputs (list xz))
(propagated-inputs (list zlib)) ; libxml2.la says '-lz'.
(native-inputs (list perl))
- ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
- ;; sub-directory of any given package.
- (native-search-paths (list (search-path-specification
- (variable "XML_CATALOG_FILES")
- (separator " ")
- (files '("xml"))
- (file-pattern "^catalog\\.xml$")
- (file-type 'regular))))
+ (native-search-paths (list $XML_CATALOG_FILES))
(search-paths native-search-paths)
(description
"Libxml2 is the XML C parser and toolkit developed for the Gnome
@@ -1787,14 +1781,7 @@ (define-public opensp
(("^\tOSGMLNORM=`echo osgmlnorm\\|sed '\\$\\(transform\\)'`\\\\")
"\tOSGMLNORM=`echo osgmlnorm|sed '$(transform)'`")
(("^\t\\$\\(SHELL\\)\n") "")))))))
- ;; $SGML_CATALOG_FILES lists 'catalog' or 'CATALOG' or '*.cat' files found
- ;; under the 'sgml' sub-directory of any given package.
- (native-search-paths (list (search-path-specification
- (variable "SGML_CATALOG_FILES")
- (separator ":")
- (files '("sgml"))
- (file-pattern "^catalog$|^CATALOG$|^.*\\.cat$")
- (file-type 'regular))))
+ (native-search-paths (list $SGML_CATALOG_FILES))
(home-page "https://openjade.sourceforge.net/")
(synopsis "Suite of SGML/XML processing tools")
(description "OpenSP is an object-oriented toolkit for SGML parsing and
diff --git a/guix/search-paths.scm b/guix/search-paths.scm
index 8dc81861c9..752dc8099b 100644
--- a/guix/search-paths.scm
+++ b/guix/search-paths.scm
@@ -38,6 +38,8 @@ (define-module (guix search-paths)
$SSL_CERT_DIR
$SSL_CERT_FILE
$TZDIR
+ $SGML_CATALOG_FILES
+ $XML_CATALOG_FILES
search-path-specification->sexp
sexp->search-path-specification
@@ -121,6 +123,29 @@ (define $TZDIR
(files '("share/zoneinfo"))
(separator #f))) ;single entry
+;; Some packages (notably libxml2) make use of 'XML_CATALOG_FILES'
+;; and 'SGML_CATALOG_FILES' for remapping URI references or public/system
+;; identifiers to other URI references.
+(define $SGML_CATALOG_FILES
+ ;; $SGML_CATALOG_FILES lists 'catalog' or 'CATALOG' or '*.cat' files found
+ ;; under the 'sgml' sub-directory of any given package.
+ (search-path-specification
+ (variable "SGML_CATALOG_FILES")
+ (separator ":")
+ (files '("sgml"))
+ (file-pattern "^catalog$|^CATALOG$|^.*\\.cat$")
+ (file-type 'regular)))
+
+(define $XML_CATALOG_FILES
+ ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
+ ;; sub-directory of any given package.
+ (search-path-specification
+ (variable "XML_CATALOG_FILES")
+ (separator " ")
+ (files '("xml"))
+ (file-pattern "^catalog\\.xml$")
+ (file-type 'regular)))
+
(define (search-path-specification->sexp spec)
"Return an sexp representing SPEC, a <search-path-specification>. The sexp
corresponds to the arguments expected by `set-path-environment-variable'."
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 20/62] gnu: docbook2x: Set search-paths for XML and SGML catalogs.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
a7f471fd3de9906f2ddcae3f25ab5f36728204d4.1695478390.git.mirai@makinata.eu
According to the manpage, it has both XML and SGML catalog support through the
XML_CATALOG_FILES (resp. SGML_CATALOG_FILES) environment variables.

* gnu/packages/docbook.scm (docbook2x)[arguments]<#:phases>: Don't hardcode
XML_CATALOG_FILES environmment variable.
[native-search-paths]: Add $XML_CATALOG_FILES and $SGML_CATALOG_FILES.
---
gnu/packages/docbook.scm | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 1b24c3522e..2f221866cc 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -43,6 +43,7 @@ (define-module (gnu packages docbook)
#:use-module (gnu packages xfig)
#:use-module (gnu packages xml)
#:use-module (guix gexp)
+ #:use-module (guix search-paths)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
@@ -1048,14 +1049,10 @@ (define-public docbook2x
'("perl-xml-namespacesupport"
"perl-xml-parser"
"perl-xml-sax"
- "perl-xml-sax-base")))
- (xml-catalog-files
- (list (search-input-file
- inputs "xml/dtd/docbook/catalog.xml"))))
+ "perl-xml-sax-base"))))
(map (lambda (program)
(wrap-program program
- `("PERL5LIB" ":" prefix ,perl5lib)
- `("XML_CATALOG_FILES" " " prefix ,xml-catalog-files)))
+ `("PERL5LIB" ":" prefix ,perl5lib)))
programs))))
(add-after 'install 'sgml-check
;; This is not covered by 'make check'.
@@ -1089,6 +1086,7 @@ (define-public docbook2x
docbook-xml-4.1.2 docbook-xml-4.2 docbook-xml-4.4
docbook-xml-4.5
groff-minimal libxml2))
+ (native-search-paths (list $XML_CATALOG_FILES $SGML_CATALOG_FILES))
(outputs '("out" "doc"))
(home-page "https://docbook2x.sourceforge.net")
(synopsis "Convert DocBook to man page and Texinfo format")
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:20
[PATCH core-updates v2 31/62] gnu: criu: Drop xmlto workaround.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
8d9002aba49b4707c81c8c773f637608a8deef88.1695478390.git.mirai@makinata.eu
* gnu/packages/virtualization.scm (criu)[arguments]<#:phases>: Remove
'fix-documentation phase.
---
gnu/packages/virtualization.scm | 10 ----------
1 file changed, 10 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index f5bdedd45e..0d371eec83 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1757,16 +1757,6 @@ (define-public criu
#:phases
(modify-phases %standard-phases
(delete 'configure) ; no configure script
- (add-after 'unpack 'fix-documentation
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* "Documentation/Makefile"
- (("-m custom.xsl")
- (string-append
- "-m custom.xsl --skip-validation -x "
- (assoc-ref inputs "docbook-xsl") "/xml/xsl/"
- ,(package-name docbook-xsl) "-"
- ,(package-version docbook-xsl)
- "/manpages/docbook.xsl")))))
(add-after 'unpack 'hardcode-variables
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Hardcode arm version detection
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 06/62] gnu: docbook: Remove leftovers.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
842e6cb9d3a1c2acb26375983b6edd84064b263d.1695478390.git.mirai@makinata.eu
docbook-xsl patches are probably remnants from
1f7d94597f1e78776f854eeca46c03a3aded8466.

* gnu/packages/docbook.scm: Remove unused import.
* gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch: Remove.
* gnu/packages/patches/docbook-xsl-support-old-url.patch: Ditto.
* gnu/local.mk: Unregister it.
* gnu/packages/moreutils.scm (moreutils)[native-inputs]: Drop obsolete
comment.
---
gnu/local.mk | 2 -
gnu/packages/docbook.scm | 1 -
gnu/packages/moreutils.scm | 2 +-
...ocbook-xsl-nonrecursive-string-subst.patch | 40 -------------------
.../patches/docbook-xsl-support-old-url.patch | 17 --------
5 files changed, 1 insertion(+), 61 deletions(-)
delete mode 100644 gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
delete mode 100644 gnu/packages/patches/docbook-xsl-support-old-url.patch

Toggle diff (109 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 4f8637418a..c399a94e6b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1070,8 +1070,6 @@ dist_patch_DATA = \
%D%/packages/patches/diffutils-fix-signal-processing.patch \
%D%/packages/patches/directfb-davinci-glibc-228-compat.patch \
%D%/packages/patches/dkimproxy-add-ipv6-support.patch \
- %D%/packages/patches/docbook-xsl-nonrecursive-string-subst.patch \
- %D%/packages/patches/docbook-xsl-support-old-url.patch \
%D%/packages/patches/doc++-include-directives.patch \
%D%/packages/patches/doc++-segfault-fix.patch \
%D%/packages/patches/dovecot-opensslv3.patch \
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 83a5496a0e..47d3a04479 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -47,7 +47,6 @@ (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 trivial)
#:use-module (guix build-system python))
;; The fetch-plan, install-plan and phases for docbook-xml tend to vary
diff --git a/gnu/packages/moreutils.scm b/gnu/packages/moreutils.scm
index d219c78d4f..d7f4a8522a 100644
--- a/gnu/packages/moreutils.scm
+++ b/gnu/packages/moreutils.scm
@@ -71,7 +71,7 @@ (define-public moreutils
;; For building the manual pages.
(native-inputs
(list docbook-xml-4.4
- docbook-xsl ;without -next, man pages are corrupted
+ docbook-xsl
libxml2
libxslt))
(home-page "https://joeyh.name/code/moreutils/")
diff --git a/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch b/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
deleted file mode 100644
index fed4b76429..0000000000
--- a/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Use a non-recursive replace function when the parser supports it.
-
-https://bugs.gnu.org/29782
-https://bugzilla.samba.org/show_bug.cgi?id=9515
-https://bugzilla.gnome.org/show_bug.cgi?id=736077 (for xsltproc)
-
-Patch copied from Debian:
-https://salsa.debian.org/debian/docbook-xsl/-/blob/master/debian/patches/765567_non-recursive_string_subst.patch
-
-Description: use EXSLT "replace" function when available
- A recursive implementation of string.subst is problematic,
- long strings with many matches will cause stack overflows.
-Author: Peter De Wachter <pdewacht@gmail.com>
-Bug-Debian: https://bugs.debian.org/750593
-
---- a/lib/lib.xsl
-+++ b/lib/lib.xsl
-@@ -6,7 +6,11 @@
-
- This module implements DTD-independent functions
-
-- ******************************************************************** --><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-+ ******************************************************************** -->
-+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-+ xmlns:str="http://exslt.org/strings"
-+ exclude-result-prefixes="str"
-+ version="1.0">
-
- <xsl:template name="dot.count">
- <!-- Returns the number of "." characters in a string -->
-@@ -52,6 +56,9 @@
- <xsl:param name="replacement"/>
-
- <xsl:choose>
-+ <xsl:when test="function-available('str:replace')">
-+ <xsl:value-of select="str:replace($string, string($target), string($replacement))"/>
-+ </xsl:when>
- <xsl:when test="contains($string, $target)">
- <xsl:variable name="rest">
- <xsl:call-template name="string.subst">
diff --git a/gnu/packages/patches/docbook-xsl-support-old-url.patch b/gnu/packages/patches/docbook-xsl-support-old-url.patch
deleted file mode 100644
index 5b7dda458f..0000000000
--- a/gnu/packages/patches/docbook-xsl-support-old-url.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Docbook 1.79.2 makes very few changes apart from changing the canonical URL
-to cdn.docbook.org. This patch adds support for the previous URL to avoid
-breaking packages that still use that.
-
-Adapted from Debian:
-https://salsa.debian.org/debian/docbook-xsl/-/blob/master/debian/patches/0005-catalog.xml-Compatibility-with-1.79.1-or-earlier.patch
-
---- a/catalog.xml
-+++ b/catalog.xml
-@@ -5,4 +5,7 @@
- <rewriteSystem systemIdStartString="http://cdn.docbook.org/release/xsl/current/" rewritePrefix="./"/>
- <rewriteURI uriStartString="http://cdn.docbook.org/release/xsl/1.79.2/" rewritePrefix="./"/>
- <rewriteSystem systemIdStartString="http://cdn.docbook.org/release/xsl/1.79.2/" rewritePrefix="./"/>
-+ <!-- Also support old URI of v1.79.1 or earlier -->
-+ <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
-+ <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="./"/>
- </catalog>
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 19/62] gnu: lilypond: Use dblatex/stable.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
b2e865506da9ad43860fd4238415b080c184b3d7.1695478390.git.mirai@makinata.eu
* gnu/packages/music.scm (lilypond)[native-inputs]: Replace dblatex with
dblatex/stable.
---
gnu/packages/music.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index cf74a2cd36..ee2d398714 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1496,7 +1496,7 @@ (define-public lilypond
python))
(native-inputs
(list bison
- dblatex
+ dblatex/stable
flex
fontforge
gettext-minimal
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:20
[PATCH core-updates v2 28/62] gnu: udisks: Rewrite using G-Expressions.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
05a82d7ad54d31b8c5f835daaedabc40e73d9ea3.1695478390.git.mirai@makinata.eu
* gnu/packages/freedesktop.scm (udisks)[arguments]: Rewrite using
G-Expressions. Drop trailing #t.
[native-inputs]: Drop labels.
---
gnu/packages/freedesktop.scm | 120 +++++++++++++++++------------------
1 file changed, 58 insertions(+), 62 deletions(-)

Toggle diff (140 lines)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index d1f767acd6..690a83b26f 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1504,15 +1504,15 @@ (define-public udisks
"06cq52kp1nyy15qzylywy9s7hhhqc45k0s3y68crf0zsmjyng0yj"))))
(build-system gnu-build-system)
(native-inputs
- `(("docbook-xml" ,docbook-xml-4.3) ; to build the manpages
- ("docbook-xsl" ,docbook-xsl)
- ("glib:bin" ,glib "bin") ; for glib-mkenums
- ("gnome-common" ,gnome-common) ; TODO: Why is this needed?
- ("gobject-introspection" ,gobject-introspection)
- ("gtk-doc" ,gtk-doc/stable)
- ("intltool" ,intltool)
- ("pkg-config" ,pkg-config)
- ("xsltproc" ,libxslt)))
+ (list docbook-xml-4.3 ; to build the manpages
+ docbook-xsl
+ `(,glib "bin") ; for glib-mkenums
+ gnome-common ; TODO: Why is this needed?
+ gobject-introspection
+ gtk-doc/stable
+ intltool
+ pkg-config
+ libxslt))
(propagated-inputs
(list glib)) ; required by udisks2.pc
(inputs
@@ -1530,59 +1530,55 @@ (define-public udisks
(outputs '("out"
"doc")) ;5 MiB of gtk-doc HTML
(arguments
- `(#:tests? #f ; requiring system message dbus
- #:disallowed-references ("doc") ;enforce separation of "doc"
- #:configure-flags
- (list "--enable-man"
- "--enable-available-modules" ; Such as lvm2, btrfs, etc.
- "--localstatedir=/var"
- "--enable-fhs-media" ;mount devices in /media, not /run/media
- (string-append "--with-html-dir="
- (assoc-ref %outputs "doc")
- "/share/doc/udisks/html")
- (string-append "--with-udevdir=" %output "/lib/udev"))
- #:make-flags
- (let* ((docbook-xsl-name-version ,(string-append
- (package-name docbook-xsl) "-"
- (package-version docbook-xsl)))
- (docbook-xsl-catalog-file (string-append
- (assoc-ref %build-inputs "docbook-xsl")
- "/xml/xsl/"
- docbook-xsl-name-version
- "/catalog.xml"))
- (docbook-xml-catalog-file (string-append
- (assoc-ref %build-inputs "docbook-xml")
- "/xml/dtd/docbook/catalog.xml")))
- ;; Reference the catalog files required to build the manpages.
- (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file " "
- docbook-xml-catalog-file)))
- #:phases
- (modify-phases %standard-phases
- (add-before
- 'configure 'fix-girdir
- (lambda _
- ;; Install introspection data to its own output.
- (substitute* "udisks/Makefile.in"
- (("girdir = .*")
- "girdir = $(datadir)/gir-1.0\n")
- (("typelibsdir = .*")
- "typelibsdir = $(libdir)/girepository-1.0\n"))))
- (add-after 'install 'wrap-udisksd
- (lambda* (#:key outputs inputs #:allow-other-keys)
- ;; Tell 'udisksd' where to find the 'mount' command.
- (let ((out (assoc-ref outputs "out"))
- (utils (assoc-ref inputs "util-linux"))
- (cryptsetup (assoc-ref inputs "cryptsetup"))
- (parted (assoc-ref inputs "parted")))
- (wrap-program (string-append out "/libexec/udisks2/udisksd")
- `("PATH" ":" prefix
- (,(string-append utils "/bin") ;for 'mount'
- ;; cryptsetup is required for setting encrypted
- ;; partitions, e.g. in gnome-disks
- ,(string-append cryptsetup "/sbin")
- "/run/current-system/profile/bin"
- "/run/current-system/profile/sbin")))
- #t))))))
+ (list
+ #:tests? #f ; requiring system message dbus
+ #:disallowed-references '("doc") ;enforce separation of "doc"
+ #:configure-flags
+ #~(list "--enable-man"
+ "--enable-available-modules" ; Such as lvm2, btrfs, etc.
+ "--localstatedir=/var"
+ "--enable-fhs-media" ;mount devices in /media, not /run/media
+ (string-append "--with-html-dir=" #$output:doc
+ "/share/doc/udisks/html")
+ (string-append "--with-udevdir=" #$output "/lib/udev"))
+ #:make-flags
+ #~(let* ((docbook-xsl-name-version
+ #$(string-append (package-name docbook-xsl) "-"
+ (package-version docbook-xsl)))
+ (docbook-xsl-catalog-file
+ (string-append #$(this-package-native-input "docbook-xsl")
+ "/xml/xsl/" docbook-xsl-name-version
+ "/catalog.xml"))
+ (docbook-xml-catalog-file
+ #$(file-append (this-package-native-input "docbook-xml")
+ "/xml/dtd/docbook/catalog.xml")))
+ ;; Reference the catalog files required to build the manpages.
+ (list (string-append "XML_CATALOG_FILES=" docbook-xsl-catalog-file
+ " " docbook-xml-catalog-file)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'fix-girdir
+ (lambda _
+ ;; Install introspection data to its own output.
+ (substitute* "udisks/Makefile.in"
+ (("girdir = .*")
+ "girdir = $(datadir)/gir-1.0\n")
+ (("typelibsdir = .*")
+ "typelibsdir = $(libdir)/girepository-1.0\n"))))
+ (add-after 'install 'wrap-udisksd
+ (lambda _
+ ;; Tell 'udisksd' where to find the 'mount' command.
+ (let ((utils #$(this-package-input "util-linux"))
+ (cryptsetup #$(this-package-input "cryptsetup"))
+ (parted #$(this-package-input "parted")))
+ (wrap-program (string-append #$output "/libexec/udisks2/udisksd")
+ `("PATH" ":" prefix
+ (,(string-append utils "/bin") ;for 'mount'
+ ;; cryptsetup is required for setting encrypted
+ ;; partitions, e.g. in gnome-disks
+ ,(string-append cryptsetup "/sbin")
+ "/run/current-system/profile/bin"
+ "/run/current-system/profile/sbin")))))))))
(home-page "https://www.freedesktop.org/wiki/Software/udisks/")
(synopsis "Disk manager service")
(description
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 18/62] gnu: dblatex: Fix missing texlive binaries.
(address . 65479@debbugs.gnu.org)
cc0fcd178acf30ea5665d5faf6f6b4d5b5a2cf19.1695478390.git.mirai@makinata.eu
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 <mail@nicolasgoaziou.fr>
---
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

Toggle diff (222 lines)
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 <https://sourceforge.net/p/dblatex/dblatex/merge-requests/4/>
+
+# HG changeset patch
+# User Jan Tojnar <jtojnar@gmail.com>
+# 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 @@
+ <imagedata>
+ <converter src="svg" dst="*" docformat="pdf">
+ <command>
+- 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
+ </command>
+ </converter>
+ </imagedata>
+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"])
+
+
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 23/62] gnu: gtk-doc: Add libxslt native-search-paths to its own.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
c7f2284bfe5a0bb30511dd59156d34d30920d5f8.1695478390.git.mirai@makinata.eu
Grepping through the built package, gtk-doc invokes 'xsltproc' so we propagate
the search paths in order for 'xsltproc' to find the XML/SGML catalog files.
Note that due to a module cycle we must duplicate it instead of using
'(package-native-search-paths libxslt)'.

* gnu/packages/gtk.scm (gtk-doc)[native-search-paths]: Add $SGML_CATALOG_FILES
and $XML_CATALOG_FILES.
---
gnu/packages/gtk.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 0d6df1f583..082039fa6e 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -60,6 +60,7 @@ (define-module (gnu packages gtk)
#:use-module (guix download)
#:use-module (guix bzr-download)
#:use-module (guix git-download)
+ #:use-module (guix search-paths)
#:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix build-system cmake)
#:use-module (guix build-system glib-or-gtk)
@@ -2227,6 +2228,12 @@ (define-public gtk-doc
python-pygments
source-highlight
yelp-tools))
+ (native-search-paths
+ ;; xsltproc's search paths, to avoid propagating libxslt.
+ ;; XXX: There's a module cycle as (gnu packages xml) imports
+ ;; (gnu packages gtk) so we can't use (package-native-search-paths …)
+ ;; and must duplicate it here instead.
+ (list $SGML_CATALOG_FILES $XML_CATALOG_FILES))
(home-page "https://wiki.gnome.org/DocumentationProject/GtkDoc")
(synopsis "GTK+ DocBook Documentation Generator")
(description "GtkDoc is a tool used to extract API documentation from C-code
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 11/62] gnu: libxml2: Rewrite using G-Expressions.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
6d301ace4eb593026feb0ef1e5bd3b8fedda764b.1695478390.git.mirai@makinata.eu
* gnu/packages/xml.scm (libxml2): Use G-Expressions.
---
gnu/packages/xml.scm | 47 ++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 23 deletions(-)

Toggle diff (67 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 01e48fda57..c0222f5518 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -196,29 +197,29 @@ (define-public libxml2
(build-system gnu-build-system)
(outputs '("out" "static" "doc"))
(arguments
- `(#:phases (modify-phases %standard-phases
- (add-after 'install 'use-other-outputs
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((src (assoc-ref outputs "out"))
- (doc (string-append (assoc-ref outputs "doc") "/share"))
- (dst (string-append (assoc-ref outputs "static")
- "/lib")))
- (mkdir-p doc)
- (mkdir-p dst)
- (for-each (lambda (dir)
- (rename-file (string-append src "/share/" dir)
- (string-append doc "/" dir)))
- '("gtk-doc"))
- (for-each (lambda (ar)
- (rename-file ar (string-append dst "/"
- (basename ar))))
- (find-files (string-append src "/lib") "\\.a$"))
-
- ;; Remove reference to the static library from the .la
- ;; file such that Libtool does the right thing when both
- ;; the shared and static variants are available.
- (substitute* (string-append src "/lib/libxml2.la")
- (("^old_library='libxml2.a'") "old_library=''"))))))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'use-other-outputs
+ (lambda _
+ (let ((doc (string-append #$output:doc "/share/"))
+ (static (string-append #$output:static "/lib/")))
+ (for-each mkdir-p (list doc static))
+
+ (rename-file (string-append #$output "/share/gtk-doc")
+ (string-append doc "/gtk-doc"))
+
+ (for-each
+ (lambda (ar)
+ (rename-file ar
+ (string-append static (basename ar))))
+ (find-files (string-append #$output "/lib") "\\.a$"))
+
+ ;; Remove reference to the static library from the .la
+ ;; file such that Libtool does the right thing when both
+ ;; the shared and static variants are available.
+ (substitute* (string-append #$output "/lib/libxml2.la")
+ (("^old_library='libxml2.a'") "old_library=''"))))))))
(home-page "http://www.xmlsoft.org/")
(synopsis "C parser for XML")
(inputs (list xz))
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 24/62] gnu: docbook2x: Drop docbook-xml workarounds.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
35c14ed9039096db9d85aa92bc85d4492c923b4e.1695478390.git.mirai@makinata.eu
* gnu/packages/docbook.scm (docbook2x)[arguments]<#:phases>: Drop
'patch-sources.
[native-inputs]: Remove docbook-xml-4.5.
---
gnu/packages/docbook.scm | 13 -------------
1 file changed, 13 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 2f221866cc..e3de6bc00a 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -1013,18 +1013,6 @@ (define-public docbook2x
(list
#:phases
#~(modify-phases %standard-phases
- (add-after 'configure 'patch-sources
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Patch all the tests use DocBook 4.5
- (substitute* (find-files "test" "\\.xml$")
- (("\"-//OASIS//DTD DocBook XML V4\\..+//EN\"")
- "\"-//OASIS//DTD DocBook XML V4.5//EN\"")
- (("\"http://www\\.oasis-open\\.org/docbook/xml/4\\..+/docbookx.dtd\"")
- "\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\""))
- ;; Set XML catalogs for tests to pass
- (setenv "XML_CATALOG_FILES"
- (string-append (assoc-ref inputs "docbook-xml")
- "/xml/dtd/docbook/catalog.xml"))))
(add-after 'unpack 'autoreconf
(lambda _
(invoke "autoreconf" "-vif")))
@@ -1084,7 +1072,6 @@ (define-public docbook2x
tidy-html
;; For tests
docbook-xml-4.1.2 docbook-xml-4.2 docbook-xml-4.4
- docbook-xml-4.5
groff-minimal libxml2))
(native-search-paths (list $XML_CATALOG_FILES $SGML_CATALOG_FILES))
(outputs '("out" "doc"))
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 21/62] gnu: xmlto: Rewrite with G-Expressions.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
b527e43b6801c4bddae8a3b890738156574bff6c.1695478390.git.mirai@makinata.eu
* gnu/packages/xml.scm (xmlto)[arguments]: Rewrite with G-Expressions.
---
gnu/packages/xml.scm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index ab4001e885..447bdcf117 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -1125,10 +1125,11 @@ (define-public xmlto
(build-system gnu-build-system)
(arguments
;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
- '(#:configure-flags (list (string-append "GETOPT="
- (assoc-ref %build-inputs
- "util-linux")
- "/bin/getopt"))))
+ (list
+ #:configure-flags
+ #~(list (string-append "GETOPT="
+ #$(this-package-input "util-linux")
+ "/bin/getopt"))))
(native-inputs
(list util-linux))
(inputs
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 14/62] gnu: libxslt: Set search-paths for XML and SGML catalogs.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
81881efffa61672124d5f79b9a19ca9145f0d5a0.1695478390.git.mirai@makinata.eu
According to xsltproc manpage it supports both XML_CATALOG_FILES and
SGML_CATALOG_FILES for catalog lookup.

* gnu/packages/xml.scm (libxslt)[native-search-paths]: Add SGML_CATALOG_FILES
and XML_CATALOG_FILES.
[search-paths]: Likewise.
* gnu/packages/perl.scm (perl-app-xml-docbook-builder)[native-search-paths]:
Refer to libxslt native-search-paths.
---
gnu/packages/perl.scm | 2 +-
gnu/packages/xml.scm | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 267a35e560..3ed0668fa3 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -601,7 +601,7 @@ (define-public perl-app-xml-docbook-builder
(list perl-class-xsaccessor perl-test-trap))
(native-search-paths
;; xsltproc's search paths, to avoid propagating libxslt.
- (list $XML_CATALOG_FILES))
+ (package-native-search-paths libxslt))
(home-page "https://www.shlomifish.org/open-source/projects/docmake/")
(synopsis "Translate DocBook/XML documentation into other file formats")
(description
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 6aa5a22e67..ab4001e885 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -365,6 +365,9 @@ (define-public libxslt
xz))
(native-inputs
(list pkg-config))
+ (native-search-paths
+ (list $SGML_CATALOG_FILES $XML_CATALOG_FILES))
+ (search-paths native-search-paths)
(description
"Libxslt is an XSLT C library developed for the GNOME project. It is
based on libxml for XML parsing, tree manipulation and XPath support.")
--
2.41.0
B
B
Bruno Victal wrote on 23 Sep 2023 16:19
[PATCH core-updates v2 07/62] gnu: docbook-utils: Import patches from debian.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
dd229d3a7357a415c0670e9591ad8c74821b60cb.1695478390.git.mirai@makinata.eu
* gnu/packages/docbook.scm (docbook-utils)[source]: Import patches from debian.
Drop snippet for patching OpenSP and OpenJade.
[arguments]<:phases>: Add 'autoreconf phase.
[native-inputs]: Add autoconf, automake and libtool.
* gnu/packages/patches/docbook-utils-documentation-edits.patch: New file.
* gnu/packages/patches/docbook-utils-escape-characters.patch: Ditto.
* gnu/packages/patches/docbook-utils-remove-jade-sp.patch: Ditto.
* gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch: Ditto.
* gnu/packages/patches/docbook-utils-source-date-epoch.patch: Ditto.
* gnu/packages/patches/docbook-utils-use-date-element.patch: Ditto.
* gnu/local.mk: Register them.
---
gnu/local.mk | 6 +
gnu/packages/docbook.scm | 24 +-
.../docbook-utils-documentation-edits.patch | 100 ++++++++
.../docbook-utils-escape-characters.patch | 34 +++
.../docbook-utils-remove-jade-sp.patch | 215 ++++++++++++++++++
...book-utils-respect-refentry-for-name.patch | 34 +++
.../docbook-utils-source-date-epoch.patch | 29 +++
.../docbook-utils-use-date-element.patch | 61 +++++
8 files changed, 496 insertions(+), 7 deletions(-)
create mode 100644 gnu/packages/patches/docbook-utils-documentation-edits.patch
create mode 100644 gnu/packages/patches/docbook-utils-escape-characters.patch
create mode 100644 gnu/packages/patches/docbook-utils-remove-jade-sp.patch
create mode 100644 gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch
create mode 100644 gnu/packages/patches/docbook-utils-source-date-epoch.patch
create mode 100644 gnu/packages/patches/docbook-utils-use-date-element.patch

Toggle diff (449 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index c399a94e6b..ea923be41d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1070,6 +1070,12 @@ dist_patch_DATA = \
%D%/packages/patches/diffutils-fix-signal-processing.patch \
%D%/packages/patches/directfb-davinci-glibc-228-compat.patch \
%D%/packages/patches/dkimproxy-add-ipv6-support.patch \
+ %D%/packages/patches/docbook-utils-documentation-edits.patch \
+ %D%/packages/patches/docbook-utils-escape-characters.patch \
+ %D%/packages/patches/docbook-utils-remove-jade-sp.patch \
+ %D%/packages/patches/docbook-utils-respect-refentry-for-name.patch \
+ %D%/packages/patches/docbook-utils-source-date-epoch.patch \
+ %D%/packages/patches/docbook-utils-use-date-element.patch \
%D%/packages/patches/doc++-include-directives.patch \
%D%/packages/patches/doc++-segfault-fix.patch \
%D%/packages/patches/dovecot-opensslv3.patch \
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm
index 47d3a04479..994aa57f18 100644
--- a/gnu/packages/docbook.scm
+++ b/gnu/packages/docbook.scm
@@ -773,18 +773,20 @@ (define-public docbook-utils
(sha256
(base32
"1scj5vgw1xz872pq54a89blcxqqm11p90yzv8a9mqq57x27apyj8"))
+ (patches
+ (search-patches "docbook-utils-documentation-edits.patch"
+ "docbook-utils-escape-characters.patch"
+ "docbook-utils-remove-jade-sp.patch"
+ "docbook-utils-respect-refentry-for-name.patch"
+ "docbook-utils-use-date-element.patch"
+ "docbook-utils-source-date-epoch.patch"))
(modules '((guix build utils)))
(snippet
#~(begin
;; Patch build system.
- (substitute* (find-files "." "\\.in$")
+ (substitute* (find-files "." "\\.((in)|(am))$")
;; Do not hard-code SGML_CATALOG_FILES.
- ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") "")
- ;; Use OpenSP and OpenJade.
- (("\\bjade\\b")
- "openjade")
- (("\\bnsgmls\\b")
- "onsgmls"))
+ ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") ""))
;; Do not override the SGML_CATALOG_FILES environment
;; variable.
@@ -805,6 +807,14 @@ (define-public docbook-utils
"CONVERT=")
(("\\[ -x /usr/bin/([^ ]+) \\]" _ command)
(format #f "command -v ~a > /dev/null" command)))))))
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'autoreconf
+ (lambda _
+ (invoke "autoreconf" "-vif"))))))
+ (native-inputs (list autoconf automake libtool))
(build-system gnu-build-system)
;; Propagated for convenience. All these tools are used at run time to
;; provide the complete functionality of the docbook-utils commands.
diff --git a/gnu/packages/patches/docbook-utils-documentation-edits.patch b/gnu/packages/patches/docbook-utils-documentation-edits.patch
new file mode 100644
index 0000000000..03c0a4abcf
--- /dev/null
+++ b/gnu/packages/patches/docbook-utils-documentation-edits.patch
@@ -0,0 +1,100 @@
+Description: Fix some typos in man pages
+Author: Mathieu Malaterre <malat@debian.org>
+
+Index: docbook-utils-0.6.14/doc/man/docbook2man-spec.pl.1
+===================================================================
+--- docbook-utils-0.6.14.orig/doc/man/docbook2man-spec.pl.1 2012-05-09 18:39:17.932819095 +0200
++++ docbook-utils-0.6.14/doc/man/docbook2man-spec.pl.1 2012-05-09 18:39:24.780818845 +0200
+@@ -17,7 +17,7 @@
+ .SH "DESCRIPTION"
+ .PP
+ \fBdocbook2man\fR is a sgmlspl spec file that produced man
+-pages (using the -man macros) from DocBook RefEntry markup.
++pages (using the \-man macros) from DocBook RefEntry markup.
+ .PP
+ The program reads ESIS produced by nsgmls (or other SGML parsers) from
+ standard input. Markup not found in RefEntry is discarded.
+Index: docbook-utils-0.6.14/doc/man/frontend-spec.7
+===================================================================
+--- docbook-utils-0.6.14.orig/doc/man/frontend-spec.7 2012-05-09 18:41:45.172813778 +0200
++++ docbook-utils-0.6.14/doc/man/frontend-spec.7 2012-05-09 18:42:03.176813129 +0200
+@@ -10,7 +10,7 @@
+ .SH "DESCRIPTION"
+ .PP
+ \fBjw\fR(1) calls frontends like
+-\fIfrontends/docbook\fR to get the informations
++\fIfrontends/docbook\fR to get the information
+ specific to a given input format. The frontend knows which information
+ to return from the first command line parameter. It gets all necessary
+ data via environment variables ready to use.
+Index: docbook-utils-0.6.14/doc/man/jw.1
+===================================================================
+--- docbook-utils-0.6.14.orig/doc/man/jw.1 2012-05-09 18:39:35.612818456 +0200
++++ docbook-utils-0.6.14/doc/man/jw.1 2012-05-09 18:40:51.736815708 +0200
+@@ -142,7 +142,7 @@
+ The following options apply to the conversion script:
+ .TP
+ \fB -f \fIfrontend\fB | --frontend \fIfrontend\fB \fR
+-Allows to specify another frontend than default \fIdocbook\fR\&.
++Allows one to specify another frontend than default \fIdocbook\fR\&.
+ The list of currently available frontends is:
+ .RS
+ .TP
+@@ -156,13 +156,13 @@
+ .RE
+ .TP
+ \fB -b \fIbackend\fB | --backend \fIbackend\fB \fR
+-Allows to specify another backend than default
++Allows one to specify another backend than default
+ \fIHTML\fR\&. The list of currently available
+ backends is:
+ .RS
+ .TP
+ \fB\fIdvi\fB\fR
+-Converts to DVI (DeVice Independant
++Converts to DVI (DeVice Independent
+ files) by calling \fBJade\fR or
+ \fBOpenJade\fR\&.
+ .TP
+@@ -210,7 +210,7 @@
+ .RE
+ .TP
+ \fB -c \fIfile\fB | --cat \fIfile\fB \fR
+-Allows to use an extra SGML Open Catalog that will list
++Allows one to use an extra SGML Open Catalog that will list
+ other files like customization style sheets, adaptations to the
+ DocBook Document Type Definition, special character entities,
+ etc. This catalog is added to the list of catalogs determined
+@@ -241,7 +241,7 @@
+ are specified on the command line.
+ .TP
+ \fB -d \fIfile\fB|default|none | --dsl \fIfile\fB|default|none \fR
+-Allows to use a customized style sheet instead
++Allows one to use a customized style sheet instead
+ of the default one.
+
+ A "target" starting with a hash mark "#" can be appended
+Index: docbook-utils-0.6.14/doc/man/sgmldiff.1
+===================================================================
+--- docbook-utils-0.6.14.orig/doc/man/sgmldiff.1 2012-05-09 18:41:13.316814927 +0200
++++ docbook-utils-0.6.14/doc/man/sgmldiff.1 2012-05-09 18:41:38.032814038 +0200
+@@ -17,7 +17,7 @@
+
+ .SH "DESCRIPTION"
+ .PP
+-This perl script allows to determine the structural differences
++This perl script allows one to determine the structural differences
+ between two SGML files. It compares the files, regardless of what
+ is in between the tags, to only focus on the markup. Its output
+ is similar to \fBdiff\fR(1)\&.
+@@ -62,8 +62,8 @@
+ Lines 5 to 7 of the first file have been changed
+ into lines 8 to 10 of the second line.
+ In addition to those summaries, the lines of the first file are
+-shown preceeded by '<' and the lines of the second file are
+-shown preceeded by '>".
++shown preceded by '<' and the lines of the second file are
++shown preceded by '>".
+ .SH "OPTIONS"
+ .PP
+ Here is the list of actions that can be requested to
diff --git a/gnu/packages/patches/docbook-utils-escape-characters.patch b/gnu/packages/patches/docbook-utils-escape-characters.patch
new file mode 100644
index 0000000000..58fca8bace
--- /dev/null
+++ b/gnu/packages/patches/docbook-utils-escape-characters.patch
@@ -0,0 +1,34 @@
+Description: incorrectly strips whitespace (patch included)
+ In the previous upload, docbook2man was patched to escape the special
+ characters . and ' at the beginning of a line (see #399947).
+ Unfortunately that patch was incorrect -- as well as escaping the special
+ characters, it also removes all whitespace from the beginning of
+ affected lines. As a result, if you are in a block where whitespace
+ matters (such as <screen>...</screen>) then the output is now incorrect.
+
+ This is very easy to fix -- just match the whitespace and preserve it,
+ instead of tossing it away. The full patch (just two lines) is included
+ below.
+Author: Ben Burton <bab@debian.org>
+Forwarded: not-needed
+Bug-Debian: http://bugs.debian.org/528334
+
+Edit by Bruno Victal <mirai@makinata.eu>:
+ Patch was edited so that it could be applied against the original
+ docbook-utils-0.6.14 sources.
+
+Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
+===================================================================
+--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl 2012-05-09 18:59:42.584774885 +0200
++++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl 2012-05-09 19:00:34.788773002 +0200
+@@ -1212,8 +1212,8 @@
+ $_[0] =~ s/\\/\\\\/g;
+
+ # Escape dots and single quotes in column 1
+- $_[0] =~ s/^\./\\\&\./;
+- $_[0] =~ s/^\'/\\\&\'/;
++ $_[0] =~ s/^([ \t]*)\./$1\\\&\./;
++ $_[0] =~ s/^([ \t]*)\'/$1\\\&\'/;
+
+ # In non-'pre'-type elements:
+ if(!$nocollapse_whitespace) {
diff --git a/gnu/packages/patches/docbook-utils-remove-jade-sp.patch b/gnu/packages/patches/docbook-utils-remove-jade-sp.patch
new file mode 100644
index 0000000000..8aae51373f
--- /dev/null
+++ b/gnu/packages/patches/docbook-utils-remove-jade-sp.patch
@@ -0,0 +1,215 @@
+Description: Change dependencies on jade and sp to openjade and opensp
+Author: Neil Roeth <neil@debian.org>
+Last-Update: 2016-07-24
+
+Edit by Bruno Victal <mirai@makinata.eu>:
+ Patch was edited so that it could be applied against the original
+ docbook-utils-0.6.14 sources.
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/doc/HTML/Makefile.am
++++ b/doc/HTML/Makefile.am
+@@ -1,4 +1,4 @@
+-htmldir = $(docdir)/html/docbook-utils-@VERSION@
++htmldir = $(docdir)/html
+ html_DATA = api.html \
+ backend-spec.html \
+ docbook2man.html \
+@@ -25,6 +25,6 @@
+ $(top_srcdir)/doc/refentry/sgmldiff.sgml
+ SGML_CATALOG_FILES=/etc/sgml/catalog \
+ SGML_SEARCH_PATH=$(top_srcdir):$(top_srcdir)/doc:.. \
+- jade -t sgml -i html -d $(top_srcdir)/docbook-utils.dsl\#html \
++ openjade -t sgml -i html -d $(top_srcdir)/docbook-utils.dsl\#html \
+ -V '%use-id-as-filename%' $<
+
+--- a/doc/man/Makefile.am
++++ b/doc/man/Makefile.am
+@@ -12,5 +12,5 @@
+ $(top_srcdir)/helpers/docbook2man-spec.pl
+ SGML_CATALOG_FILES=/etc/sgml/catalog \
+ SGML_SEARCH_PATH=$(top_srcdir)/doc:.. \
+- nsgmls $< | \
++ onsgmls $< | \
+ sgmlspl $(top_srcdir)/helpers/docbook2man-spec.pl
+--- a/backends/man.in
++++ b/backends/man.in
+@@ -7,8 +7,8 @@
+ TMPDIR=`mktemp -d /tmp/man.XXXXXX` || \
+ { echo >&2 "man backend: could not create secure temporary directory"; exit 1;}
+ trap 'rm -rf "${TMPDIR}"' EXIT
+-nsgmls $SGML_FILE > "${TMPDIR}/nsgmls.tmp"
+-sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp" 2>"${TMPDIR}/errs"
++onsgmls $SGML_FILE > "${TMPDIR}/onsgmls.tmp"
++sgmlspl $HELPER <"${TMPDIR}/onsgmls.tmp" 2>"${TMPDIR}/errs"
+ if [ $? -ne 0 ]
+ then
+ cat "${TMPDIR}/errs"
+@@ -18,7 +18,7 @@
+ if grep unresolved "${TMPDIR}/errs" >/dev/null 2>&1
+ then
+ echo "Resolving references.."
+- sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp"
++ sgmlspl $HELPER <"${TMPDIR}/onsgmls.tmp"
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
+--- a/backends/texi.in
++++ b/backends/texi.in
+@@ -3,7 +3,7 @@
+ # This program is under GPL license. See LICENSE file for details.
+
+ # Convert to texinfo
+-nsgmls $SGML_FILE | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi
++onsgmls $SGML_FILE | sgmlspl docbook2texi-spec.pl >$SGML_FILE_NAME.texi
+ if [ $? -ne 0 ]
+ then exit 1
+ fi
+--- a/bin/sgmldiff.in
++++ b/bin/sgmldiff.in
+@@ -22,13 +22,13 @@
+
+ use strict;
+ use integer;
+-use vars qw($nsgmls $errors $errorlog $VERSION);
++use vars qw($onsgmls $errors $errorlog $VERSION);
+ use Getopt::Long 2.01;
+
+ $VERSION = 1.03;
+
+-my $nsgmls;
+-$nsgmls = "@jade_bindir@/nsgmls";
++my $onsgmls;
++$onsgmls = "@jade_bindir@/onsgmls";
+
+ #----------------------------------------------------------------------
+ # TODO:
+@@ -37,7 +37,7 @@
+ # - Wait for suggestions ;-)
+ #
+ # Note: the input file need not be valid, nor is it necessary to have
+-# the DTDs. nsgmls always returns a structure.
++# the DTDs. onsgmls always returns a structure.
+ #----------------------------------------------------------------------
+
+ # Get file name
+@@ -141,11 +141,11 @@
+ unlink $diff2;
+
+ #---------------------------------------------------------------------
+-# Process nsgmls output: keep all stuff that is important for the
++# Process onsgmls output: keep all stuff that is important for the
+ # structure comparison. Make two structures: one that is diffed
+ # (without text) (DIFF) and one that is used to present the
+ # differences to the user (@full). For more info: see SP
+-# documentation, nsgmls output format.
++# documentation, onsgmls output format.
+
+ sub prepare {
+ my($filename,$todiffname) = @_;
+@@ -161,7 +161,7 @@
+ my @line_numbered = ();
+ my $line = 0;
+
+- open(ESIS, "$nsgmls -l $errors $errorlog -onotation-sysid -oid -oempty $filename | "); #-oentity generates strange output; ? -ononsgml
++ open(ESIS, "$onsgmls -l $errors $errorlog -onotation-sysid -oid -oempty $filename | "); #-oentity generates strange output; ? -ononsgml
+ open(DIFF, "> $todiffname");
+ while (<ESIS>) {
+ chomp $_;
+@@ -375,7 +375,7 @@
+ };
+
+ #----------------------------------------------------------------------
+-# Normalise data text from nsgmls (i.e. don't print the escaped text).
++# Normalise data text from onsgmls (i.e. don't print the escaped text).
+ sub normalise_text {
+ my($string,$prefix) = @_;
+ my $result = "$prefix";
+--- a/configure.in
++++ b/configure.in
+@@ -21,7 +21,7 @@
+
+ dnl Checks for programs.
+ jade_bindirs="/usr/bin /usr/local/bin"
+-AC_FIND_PROGRAM(nsgmls, $jade_bindirs, jade_bindir)
++AC_FIND_PROGRAM(onsgmls, $jade_bindirs, jade_bindir)
+ AC_SUBST(jade_bindir)
+
+ perl_bindirs="/usr/bin /usr/local/bin"
+--- a/doc/refentry/docbook2man-spec.pl.sgml
++++ b/doc/refentry/docbook2man-spec.pl.sgml
+@@ -19,7 +19,7 @@
+ <!-- docbook2man-spec.pl BREAKAGE HERE! -->
+
+ <CmdSynopsis>
+-<Command>nsgmls</command>
++<Command>onsgmls</command>
+ <Arg><Replaceable>sgml document</replaceable></Arg>
+ <Command>| sgmlspl</command>
+ <Arg choice=req>docbook2man-spec.pl</arg>
+@@ -35,7 +35,7 @@
+ </Para>
+
+ <Para>
+-The program reads ESIS produced by nsgmls (or other SGML parsers) from
++The program reads ESIS produced by onsgmls (or other SGML parsers) from
+ standard input. Markup not found in RefEntry is discarded.
+ </Para>
+
+--- a/doc/refentry/docbook2texi-spec.pl.sgml
++++ b/doc/refentry/docbook2texi-spec.pl.sgml
+@@ -20,7 +20,7 @@
+ <!-- docbook2man-spec.pl BREAKAGE HERE! -->
+
+ <CmdSynopsis>
+-<Command>nsgmls</command>
++<Command>onsgmls</command>
+ <Arg><Replaceable>sgml document</replaceable></Arg>
+ <Command>| sgmlspl</command>
+ <Arg choice=req>docbook2texi-spec.pl</arg>
+@@ -37,7 +37,7 @@
+ </Para>
+
+ <Para>
+-The program reads ESIS produced by nsgmls (or other SGML parsers) from
++The program reads ESIS produced by onsgmls (or other SGML parsers) from
+ standard input. Currently the document element must be <SGMLTag>Book</sgmltag>,
+ otherwise the results are undefined.
+ </Para>
+--- a/doc/refentry/jw.sgml
++++ b/doc/refentry/jw.sgml
+@@ -630,7 +630,7 @@
+ <manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>install-catalog</refentrytitle>
+ <manvolnum>8</manvolnum></citerefentry>,
+- <citerefentry><refentrytitle>nsgmls</refentrytitle>
++ <citerefentry><refentrytitle>onsgmls</refentrytitle>
+ <manvolnum>1</manvolnum></citerefentry>, <ulink
+ url="http://sources.redhat.com/docbook-tools/">docbook-utils
+ homepage</ulink>.</para>
+--- a/doc/refentry/sgmldiff.sgml
++++ b/doc/refentry/sgmldiff.sgml
+@@ -238,10 +238,10 @@
+ <glossterm>
+ <!-- Next line is a hack to force a paragraph break in the man-page. -->
+ <cmdsynopsis> <command></command> </cmdsynopsis>
+- <citerefentry> <refentrytitle>nsgmls</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>
++ <citerefentry> <refentrytitle>onsgmls</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>
+ </glossterm>
+ <glossdef>
+- <para>a base component of <application>Jade</application> DSSSL engine</para>
++ <para>a base component of <application>OpenJade</application> DSSSL engine</para>
+ </glossdef>
+ </glossentry>
+
+--- a/helpers/docbook2man-spec.pl
++++ b/helpers/docbook2man-spec.pl
+@@ -7,7 +7,7 @@
+ The SGMLSpm package from CPAN. This contains the sgmlspl script which
+ is used to grok this file. Use it like this:
+
+-nsgmls some-docbook-document.sgml | sgmlspl docbook2man-spec.pl
++onsgmls some-docbook-document.sgml | sgmlspl docbook2man-spec.pl
+
+ =head1 DESCRIPTION
+
diff --git a/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch b/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch
new file mode 100644
index 0000000000..d577fed748
--- /dev/null
+++ b/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch
@@ -0,0 +1,34 @@
+Description: docbook2man should translate the NAME section according to the REFENTRY's lang attribute
+ Currently, docbook2man translates the NAME section according to the lang
+ attribute provided to the REFNAMEDIV tag.
+ When a lang attribute is specified in the REFENTRY tag and no lang
+ attribute is specified with the REFNAMEDIV, the lang attribute of the
+ REFENTRY should be used.
+Author: Nicolas François <nicolas.francois@centraliens.net>
+Forwarded: not-needed
+Bug-Debian: http://bugs.debian.org/394511
+
+Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
+==============
This message was truncated. Download the full message here.
B
B
Bruno Victal wrote on 23 Sep 2023 16:20
[PATCH core-updates v2 25/62] gnu: secilc: Drop xmlto workaround.
(address . 65479@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
46daa48512278409586af7bcb2dbf30afaf7bb98.1695478390.git.mirai@makinata.eu
The xmlto error[1] was due to libsepol using an unversioned PUBLIC identifier
for DocBook 4.2.


* gnu/packages/patches/libsepol-versioned-docbook.patch: New file.
* gnu/local.mk: Register it.
* gnu/packages/selinux.scm (libsepol)[source]: Apply it.
(secilc)[arguments]: Drop xmlto workaround.
[native-inputs]: Add docbook-xml-4.2.
---
gnu/local.mk | 1 +
.../patches/libsepol-versioned-docbook.patch | 56 +++++++++++++++++++
gnu/packages/selinux.scm | 13 +----
3 files changed, 60 insertions(+), 10 deletions(-)
create mode 100644 gnu/packages/patches/libsepol-versioned-docbook.patch

Toggle diff (114 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index e6dbde6f8f..2ac9e80632 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1543,6 +1543,7 @@ dist_patch_DATA = \
%D%/packages/patches/libqalculate-3.8.0-libcurl-ssl-fix.patch \
%D%/packages/patches/libquicktime-ffmpeg.patch \
%D%/packages/patches/librecad-support-for-boost-1.76.patch \
+ %D%/packages/patches/libsepol-versioned-docbook.patch \
%D%/packages/patches/libtar-CVE-2013-4420.patch \
%D%/packages/patches/libtgvoip-disable-sse2.patch \
%D%/packages/patches/libtgvoip-disable-webrtc.patch \
diff --git a/gnu/packages/patches/libsepol-versioned-docbook.patch b/gnu/packages/patches/libsepol-versioned-docbook.patch
new file mode 100644
index 0000000000..6b39de0a5b
--- /dev/null
+++ b/gnu/packages/patches/libsepol-versioned-docbook.patch
@@ -0,0 +1,56 @@
+# Sent upstream: <https://lore.kernel.org/selinux/260cd39c55ff2d13f5ac916b508f023bedecfce9.1692025627.git.mirai@makinata.eu/>
+
+From 260cd39c55ff2d13f5ac916b508f023bedecfce9 Mon Sep 17 00:00:00 2001
+Message-Id: <260cd39c55ff2d13f5ac916b508f023bedecfce9.1692827278.git.mirai@makinata.eu>
+From: Bruno Victal <mirai@makinata.eu>
+Date: Mon, 14 Aug 2023 15:51:05 +0100
+Subject: [PATCH] secilc: Use versioned DocBook public identifier.
+
+Fix xml validation issues that often crop up since the XML catalogs
+for DocBook often only contain versioned public identifiers.
+