summary refs log tree commit diff
diff options
context:
space:
mode:
authorRaghav Gururajan <rg@raghavgururajan.name>2021-03-25 07:47:41 -0400
committerRaghav Gururajan <rg@raghavgururajan.name>2021-09-05 10:26:15 -0400
commit6e6201b7d2d453728de9f0eb4f79e2a626c24560 (patch)
tree944ed99553ffa4a628fe6bb5f0c97d83d01550f4
parentd4a93831012517838c496847899214f0d305fc84 (diff)
downloadguix-6e6201b7d2d453728de9f0eb4f79e2a626c24560.tar.gz
gnu: pangomm: Enable documentation.
* gnu/packages/gtk.scm (pangomm)[outputs]: New output "doc".
[arguments]<#:configure-flags>[-Dbuild-documentation]: New flag.
<#:phases>['move-doc]: New phase.
[native-inputs]: Add doxygen, graphviz, perl and libxslt.

Signed-off-by: Léo Le Bouter <lle-bout@zaclys.net>
-rw-r--r--gnu/packages/gtk.scm25
1 files changed, 22 insertions, 3 deletions
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 837f799c84..26e1ff945c 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1361,12 +1361,31 @@ library.")
                (base32
                 "0y2vyp6azvhrii6rzs89kr08wg8z1p562awyr812131zqdsd83ly"))))
     (build-system meson-build-system)
+    (outputs '("out" "doc"))
     (arguments
-     `(#:glib-or-gtk? #t))   ; To wrap binaries and/or compile schemas
+     `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
+       #:configure-flags
+       (list
+        "-Dbuild-documentation=true")
+       #:phases
+       (modify-phases %standard-phases
+         (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
-     `(("m4" ,m4)
+     `(("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("m4" ,m4)
        ("mm-common" ,mm-common)
-       ("pkg-config" ,pkg-config)))
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("xsltproc" ,libxslt)))
     (propagated-inputs
      `(("cairo" ,cairo)
        ("cairomm" ,cairomm)