summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRaghav Gururajan <rg@raghavgururajan.name>2021-03-26 10:42:00 -0400
committerRaghav Gururajan <rg@raghavgururajan.name>2021-09-05 10:26:21 -0400
commit1cee4cb52e196dc38759413695d9fe97f1550dd0 (patch)
tree1feb704ee465ebc5fffc2e463d3d54a065a612aa /gnu/packages
parentc119d02d9729e5f31121df931fc8e6a001916144 (diff)
downloadguix-1cee4cb52e196dc38759413695d9fe97f1550dd0.tar.gz
gnu: wayland: Fix and move documentation.
* gnu/packages/freedesktop.scm (wayland) [outputs]: New output "doc".
[arguments]<#:phases>['patch-docbook-xml]: New phase.
['move-doc]: New phase.

Signed-off-by: Léo Le Bouter <lle-bout@zaclys.net>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/freedesktop.scm25
1 files changed, 24 insertions, 1 deletions
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 68bc14759f..b296e60580 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -963,8 +963,31 @@ Python.")
                (base32
                 "05bd2vphyx8qwa1mhsj1zdaiv4m4v94wrlssrn0lad8d601dkk5s"))))
     (build-system meson-build-system)
+    (outputs '("out" "doc"))
     (arguments
-     `(#:parallel-tests? #f))
+     `(#:parallel-tests? #f
+        #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "doc"
+               (substitute* (find-files "." "\\.xml$")
+                 (("http://www.oasis-open.org/docbook/xml/4\\.5/")
+                  (string-append (assoc-ref inputs "docbook-xml")
+                                 "/xml/dtd/docbook/"))
+                 (("http://www.oasis-open.org/docbook/xml/4\\.2/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.2")
+                                 "/xml/dtd/docbook/"))))
+             #t))
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share"))
+               (rename-file
+                (string-append out "/share/doc")
+                (string-append doc "/share/doc"))
+               #t))))))
     (native-inputs
      `(("docbook-xml-4.2" ,docbook-xml-4.2)
        ("docbook-xml" ,docbook-xml)