diff mbox series

[bug#40994] 3-zathura-ps-v1

Message ID 20200501134842.5819e428.raghavgururajan@disroot.org
State Superseded
Headers show
Series [bug#40994] 3-zathura-ps-v1 | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Raghav Gururajan May 1, 2020, 5:48 p.m. UTC

diff mbox series

Patch

From f399f61f261bbd3ab828ca27fc1d31f0e49d0d45 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Fri, 1 May 2020 13:42:52 -0400
Subject: [PATCH 3/3] gnu: zathura-ps: Move to pwmt module.

Moved variable from pdf.scm to pwmt.scm, for being part of pwmt project.
Added extra dependencies and arguments for additional features.
Updated synopsis and description.
Made some cosmetic changes in the definition.

* gnu/packages/pdf.scm (zathura-ps): Remove variable.
* gnu/packages/pwmt.scm (zathura-ps): Add variable.
---
 gnu/packages/pdf.scm  | 35 --------------------------------
 gnu/packages/pwmt.scm | 47 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 35 deletions(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index ff75e1ed55..c5539c7df5 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -426,41 +426,6 @@  reading and editing of existing PDF files.")
 using libarchive.")
     (license license:zlib)))
 
-(define-public zathura-ps
-  (package
-    (name "zathura-ps")
-    (version "0.2.6")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura-ps/download/zathura-ps-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "0wygq89nyjrjnsq7vbpidqdsirjm6iq4w2rijzwpk2f83ys8bc3y"))))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs `(("libspectre" ,libspectre)
-              ("zathura" ,zathura)))
-    (build-system meson-build-system)
-    (arguments
-     `(#:tests? #f                      ; package does not contain tests
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-plugin-directory
-           ;; Something of a regression in 0.2.6: the new Meson build system
-           ;; now hard-codes an incorrect plugin directory.  Fix it.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "meson.build"
-               (("(install_dir:).*" _ key)
-                (string-append key
-                               "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
-             #t)))))
-    (home-page "https://pwmt.org/projects/zathura-ps/")
-    (synopsis "PS support for zathura (libspectre backend)")
-    (description "The zathura-ps plugin adds PS support to zathura
-using libspectre.")
-    (license license:zlib)))
-
 (define-public zathura-djvu
   (package
     (name "zathura-djvu")
diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index be9613bbf8..8b177e3e7a 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -29,6 +29,7 @@ 
   #: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)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
@@ -177,3 +178,49 @@  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)))
+
+(define-public zathura-ps
+  (package
+    (name "zathura-ps")
+    (version "0.2.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://pwmt.org/projects/" name "/download/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "0wygq89nyjrjnsq7vbpidqdsirjm6iq4w2rijzwpk2f83ys8bc3y"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:tests? #f                      ; No target
+       #:glib-or-gtk? #t                ; To compile schemas
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-plugin-directory
+           ;; This package tries to install into directory of Zathura.
+           ;; That cannot be allowed. Fix it.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("(install_dir:).*" _ key)
+                (string-append key
+                               "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
+             #t)))))
+    (native-inputs
+     `(("glib:bin" ,glib "bin")
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("cairo" ,cairo)
+       ("girara" ,girara)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("json-c" ,json-c)          ; For configuration dumping support
+       ("libnotify" ,libnotify)    ; For notification support
+       ("libspectre" ,libspectre)
+       ("zathura" ,zathura)))
+    (synopsis "PostScript support for zathura")
+    (description "The zathura-ps plugin adds PostScript support to zathura by
+using the libspectre library.")
+    (home-page "https://pwmt.org/projects/zathura-ps/")
+    (license license:zlib)))
-- 
2.26.2