From c2e8a22d52410806502ca533825da90aef2ed83c Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Thu, 7 May 2020 22:21:25 -0400
Subject: [PATCH 12/22] gnu: zathura: Update package definition.

* gnu/packages/pwmt.scm (zathura): Make changes to reflect particulars
of recent source code.
[arguments]: Add glib-or-gtk option.
[native-inputs]: Add desktop-fileutils, doxygen, python-breathe and
python-sphinx-rtd-theme.
[inputs]: Add appstream-glib, file, glib, json-c, gtk+, libnotify and
libseccomp.
[propagated-inputs]: Move cairo and girara to inputs.
[synopsis]: Updated.
[description]: Updated.
---
 gnu/packages/pwmt.scm | 111 ++++++++++++++++++++++++------------------
 1 file changed, 63 insertions(+), 48 deletions(-)

diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index 1e01d00965..f68baac083 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -28,6 +28,8 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages djvu)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages file)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages glib)
@@ -35,6 +37,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
   #:use-module (gnu packages javascript)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages sphinx)
@@ -111,57 +114,69 @@ provides the user with current information.")
   (package
     (name "zathura")
     (version "0.4.5")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura/download/zathura-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "0b3nrcvykkpv2vm99kijnic2gpfzva520bsjlihaxandzfm9ff8c"))))
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://pwmt.org/projects/zathura/download/zathura-"
+                       version ".tar.xz"))
+       (sha256
+        (base32
+         "0b3nrcvykkpv2vm99kijnic2gpfzva520bsjlihaxandzfm9ff8c"))))
     (build-system meson-build-system)
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-before 'check 'start-xserver
-                    ;; Tests require a running X server.
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (let ((xorg-server (assoc-ref inputs "xorg-server"))
-                            (display ":1"))
-                        (setenv "DISPLAY" display)
-
-                        ;; On busy machines, tests may take longer than
-                        ;; the default of four seconds.
-                        (setenv "CK_DEFAULT_TIMEOUT" "20")
-
-                        ;; Don't fail due to missing '/etc/machine-id'.
-                        (setenv "DBUS_FATAL_WARNINGS" "0")
-                        (zero? (system (string-append xorg-server "/bin/Xvfb "
-                                                      display " &")))))))))
-    (native-inputs `(("pkg-config" ,pkg-config)
-                     ("gettext" ,gettext-minimal)
-                     ("glib:bin" ,glib "bin")
-
-                     ;; For building documentation.
-                     ("python-sphinx" ,python-sphinx)
-
-                     ;; For building icons.
-                     ("librsvg" ,librsvg)
-
-                     ;; For tests.
-                     ("check" ,check)
-                     ("xorg-server" ,xorg-server-for-tests)))
-    (inputs `(("sqlite" ,sqlite)))
-    ;; Listed in 'Requires.private' of 'zathura.pc'.
-    (propagated-inputs `(("cairo" ,cairo)
-                         ("girara" ,girara)))
+     `(#:glib-or-gtk? #t                ; To compile schemas
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'start-xserver
+           ;; Tests require a running X server.
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let
+                 ((xorg-server (assoc-ref inputs "xorg-server"))
+                  (display ":1"))
+               (setenv "DISPLAY" display)
+               ;; On busy machines, tests may take longer than
+               ;; the default of four seconds.
+               (setenv "CK_DEFAULT_TIMEOUT" "20")
+               ;; Don't fail due to missing '/etc/machine-id'.
+               (setenv "DBUS_FATAL_WARNINGS" "0")
+               (zero?
+                (system
+                 (string-append xorg-server "/bin/Xvfb "
+                                display " &")))))))))
+    (native-inputs
+     `(("check" ,check)                 ; For tests
+       ("desktop-file-utils" ,desktop-file-utils)
+       ("doxygen" ,doxygen)             ; For docs
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("librsvg" ,librsvg)             ; For icons
+       ("pkg-config" ,pkg-config)
+       ("python-breathe" ,python-breathe)                   ; For docs
+       ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) ; For docs
+       ("python-sphinx" ,python-sphinx)                     ; For docs
+       ("xorg-server" ,xorg-server-for-tests))) ; For tests
+    (inputs
+     `(("appstream-glib" ,appstream-glib)
+       ("cairo" ,cairo)
+       ("file" ,file)                   ; For mime-type detection
+       ("girara" ,girara)
+       ("glib" ,glib)
+       ("json-c" ,json-c)          ; For configuration dumping support
+       ("gtk+" ,gtk+)
+       ("libnotify" ,libnotify)         ; For notification support
+       ("libseccomp" ,libseccomp)       ; For sandbox support
+       ("sqlite" ,sqlite)))             ; For database backend
     (native-search-paths
-     (list (search-path-specification
-            (variable "ZATHURA_PLUGINS_PATH")
-            (files '("lib/zathura")))))
-    (synopsis "Lightweight keyboard-driven PDF viewer")
-    (description "Zathura is a customizable document viewer.  It provides a
-minimalistic interface and an interface that mainly focuses on keyboard
-interaction.")
+     (list
+      (search-path-specification
+       (variable "ZATHURA_PLUGINS_PATH")
+       (files '("lib/zathura")))))
+    (synopsis "Document Viewer")
+    (description "Zathura is a highly customizable and functional document
+viewer based on the girara user interface library and several document
+libraries.  It currently supports multiple back-ends (PostScript, PDF, EPUB,
+DjVu and ComicBook) via plugins.")
     (home-page "https://pwmt.org/projects/zathura/")
     (license license:zlib)))
 
-- 
2.26.2

