summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRaghav Gururajan <rg@raghavgururajan.name>2021-05-15 21:17:47 -0400
committerRaghav Gururajan <rg@raghavgururajan.name>2021-09-05 10:26:29 -0400
commit9baa020f312770b7ffaab4c484c9202fbbaacdc2 (patch)
tree70706feb67b8417f38a5ab9b0e6de0839607ef5e /gnu/packages
parent360b5583b986183b9bc6e72e8b36e4555f886efa (diff)
downloadguix-9baa020f312770b7ffaab4c484c9202fbbaacdc2.tar.gz
gnu: tracker: Enable documentation.
* gnu/packages/gnome.scm (tracker)[outputs](doc): New output.
[configure-flags](docs): New flag.
[phases](patch-docbook-xml,move-doc): New phases.
[native-inputs]: Add docbook-xml, docbook-xsl and gtk-doc.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/gnome.scm41
1 files changed, 35 insertions, 6 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 93057ed29b..76a0684313 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8735,23 +8735,52 @@ easy, safe, and automatic.")
                (base32
                 "1ixxyqjlv7pnl4j8g6b72fkbjvzfspza8y71ppkncry8i6xkr223"))))
     (build-system meson-build-system)
+    (outputs '("out" "doc"))
     (arguments
      `(#:glib-or-gtk? #t
        #:configure-flags
-       ;; Otherwise, the RUNPATH will lack the final path component.
-       (list (string-append "-Dc_link_args=-Wl,-rpath="
-                            (assoc-ref %outputs "out") "/lib:"
-                            (assoc-ref %outputs "out") "/lib/tracker-2.0"))
+       (list
+        "-Ddocs=true"
+        ;; Otherwise, the RUNPATH will lack the final path component.
+        (string-append "-Dc_link_args=-Wl,-rpath="
+                       (assoc-ref %outputs "out") "/lib:"
+                       (assoc-ref %outputs "out") "/lib/tracker-2.0"))
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/reference"
+               (substitute* (find-files "." "\\..*ml$")
+                 (("http://www.oasis-open.org/docbook/xml/4.5/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.5")
+                                 "/xml/dtd/docbook/"))
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))
+                 (("http://www.oasis-open.org/docbook/xml/4.1.2/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.1.2")
+                                 "/xml/dtd/docbook/"))))))
          (add-before 'check 'pre-check
            (lambda _
              ;; Some tests expect to write to $HOME.
              (setenv "HOME" "/tmp")
-             #t)))))
+             #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/gtk-doc")
+                (string-append doc "/share/gtk-doc"))))))))
     (native-inputs
-     `(("glib:bin" ,glib "bin")
+     `(("docbook-xml-4.1.2" ,docbook-xml-4.1.2)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml-4.5" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("glib:bin" ,glib "bin")
        ("gobject-introspection" ,gobject-introspection)
+       ("gtk-doc" ,gtk-doc)
        ("python-pygobject" ,python-pygobject)
        ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)