diff mbox series

[bug#40994] 5-zathura-pdf-mupdf-v1

Message ID 20200502045017.2b8d2530.raghavgururajan@disroot.org
State Superseded
Headers show
Series [bug#40994] 5-zathura-pdf-mupdf-v1 | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Raghav Gururajan May 2, 2020, 8:50 a.m. UTC

diff mbox series

Patch

From aa93196383df77cac84d4246cbd88f64685d110b Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Sat, 2 May 2020 04:44:03 -0400
Subject: [PATCH 5/5] gnu: zathura-pdf-mupdf: 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.
Removed openssl as input.
Updated synopsis and description.
Made some cosmetic changes in the definition.

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

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 0aca1e707a..30a8ec20e6 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -462,50 +462,6 @@  using libarchive.")
 using the DjVuLibre library.")
     (license license:zlib)))
 
-(define-public zathura-pdf-mupdf
-  (package
-    (name "zathura-pdf-mupdf")
-    (version "0.3.5")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/zathura-pdf-mupdf"
-                              "/download/zathura-pdf-mupdf-" version ".tar.xz"))
-              (sha256
-               (base32
-                "1pjwsb7zwclxsvz229fl7y2saf1pv3ifwv3ay8viqxgrp9x3z9hq"))))
-    (native-inputs `(("pkg-config" ,pkg-config)))
-    (inputs
-     `(("jbig2dec" ,jbig2dec)
-       ("libjpeg" ,libjpeg)
-       ("mujs" ,mujs)
-       ("mupdf" ,mupdf)
-       ("openjpeg" ,openjpeg)
-       ("openssl" ,openssl)
-       ("zathura" ,zathura)))
-    (build-system meson-build-system)
-    (arguments
-     `(#:tests? #f                      ; package does not contain tests
-       #:configure-flags (list (string-append "-Dplugindir="
-                                              (assoc-ref %outputs "out")
-                                              "/lib/zathura")
-                               "-Dlink-external=true")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'add-mujs-to-dependencies
-           (lambda _
-             ;; Add mujs to the 'build_dependencies'.
-             (substitute* "meson.build"
-               (("^  libopenjp2 = dependency.*" x)
-                (string-append x "  mujs = cc.find_library('mujs')\n"))
-               (("^    libopenjp2")
-                "    libopenjp2, mujs")))))))
-    (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/")
-    (synopsis "PDF support for zathura (mupdf backend)")
-    (description "The zathura-pdf-mupdf plugin adds PDF support to zathura
-by using the @code{mupdf} rendering library.")
-    (license license:zlib)))
-
 (define-public podofo
   (package
     (name "podofo")
diff --git a/gnu/packages/pwmt.scm b/gnu/packages/pwmt.scm
index fa973cea17..c2c53ca8ec 100644
--- a/gnu/packages/pwmt.scm
+++ b/gnu/packages/pwmt.scm
@@ -33,6 +33,8 @@ 
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #: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)
@@ -261,3 +263,57 @@  using the libspectre library.")
 using the poppler rendering library.")
     (home-page "https://pwmt.org/projects/zathura-pdf-poppler/")
     (license license:zlib)))
+
+(define-public zathura-pdf-mupdf
+  (package
+    (name "zathura-pdf-mupdf")
+    (version "0.3.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://pwmt.org/projects/" name "/download/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1pjwsb7zwclxsvz229fl7y2saf1pv3ifwv3ay8viqxgrp9x3z9hq"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:tests? #f                      ; No target
+       #:glib-or-gtk? #t                ; To compile schemas
+       #:configure-flags
+       (list
+        (string-append "-Dplugindir="
+                       (assoc-ref %outputs "out") "/lib/zathura")
+        "-Dlink-external=true")         ; For MuPDF external libraries
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'add-mujs-to-dependencies
+           (lambda _
+             ;; Add mujs to the 'build_dependencies'.
+             (substitute* "meson.build"
+               (("^  libopenjp2 = dependency.*" x)
+                (string-append x "  mujs = cc.find_library('mujs')\n"))
+               (("^    libopenjp2")
+                "    libopenjp2, mujs")))))))
+    (native-inputs
+     `(("glib:bin" ,glib "bin")
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("cairo" ,cairo)
+       ("girara" ,girara)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("jbig2dec" ,jbig2dec)
+       ("json-c" ,json-c)          ; For configuration dumping support
+       ("libjpeg" ,libjpeg)
+       ("libnotify" ,libnotify)         ; For notification support
+       ("mujs" ,mujs)
+       ("mupdf" ,mupdf)
+       ("openjpeg" ,openjpeg)
+       ("zathura" ,zathura)))
+    (synopsis "PDF support (mupdf backend) for zathura")
+    (description "The zathura-pdf-mupdf plugin adds PDF support to zathura by
+using the mupdf rendering library.")
+    (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/")
+    (license license:zlib)))
-- 
2.26.2