gnu: gtk-doc: Wrap XML_CATALOG_FILES.

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.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
Bruno Victal 2023-10-09 21:06:43 +01:00 committed by Ludovic Courtès
parent f9660a2cfa
commit 443965fee1
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -2263,23 +2263,6 @@ (define-public gtk-doc
#:parallel-tests? #f #:parallel-tests? #f
#:phases #:phases
#~(modify-phases %standard-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 (add-after 'unpack 'disable-failing-tests
(lambda _ (lambda _
(substitute* "tests/Makefile.am" (substitute* "tests/Makefile.am"
@ -2287,10 +2270,17 @@ (define-public gtk-doc
"")))) ""))))
(add-after 'install 'wrap-executables (add-after 'install 'wrap-executables
(lambda _ (lambda _
(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) (for-each (lambda (prog)
(wrap-program prog (wrap-program prog
`("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))) `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
(find-files (string-append #$output "/bin")))))))) `("XML_CATALOG_FILES" " " suffix (,docbook-xsl-catalog))))
(find-files (string-append #$output "/bin")))))))))
(native-inputs (native-inputs
(list gettext-minimal (list gettext-minimal
`(,glib "bin") `(,glib "bin")