unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: Timotej Lazar <timotej.lazar@araneo.si>
Cc: 44853@debbugs.gnu.org
Subject: [bug#44853] [PATCH] gnu: Add qpdfview.
Date: Tue, 24 Nov 2020 22:13:09 -0500	[thread overview]
Message-ID: <20201125031309.GA10305@jasmine.lan> (raw)
In-Reply-To: <20201124185845.31317-1-timotej.lazar@araneo.si>


[-- Attachment #1.1: Type: text/plain, Size: 519 bytes --]

On Tue, Nov 24, 2020 at 07:58:45PM +0100, Timotej Lazar wrote:
> * gnu/packages/pdf.scm (qpdfview): New variable.

Thanks!

I noticed that, on my Debian system, the user interface was not
displaying any icons.

I fixed it for myself by making the package use the 'qt-wrap' phase from
the Qt build system fixed this, which adds a wrapper for the
XDG_DATA_DIRS, XDG_CONFIG_DIRS, QT_PLUGIN_PATH, and QML2_IMPORT_PATH
environment variables.

I've attached a patch that does this. Can you check that it still works
for you?

[-- Attachment #1.2: 0001-gnu-Add-qpdfview.patch --]
[-- Type: text/plain, Size: 3624 bytes --]

From 33e6e67975d63a27319f7df6e34741e97b83f5db Mon Sep 17 00:00:00 2001
From: Timotej Lazar <timotej.lazar@araneo.si>
Date: Tue, 24 Nov 2020 19:58:45 +0100
Subject: [PATCH] gnu: Add qpdfview.

* gnu/packages/pdf.scm (qpdfview): New variable.

Signed-off-by: Leo Famulari <leo@famulari.name>
---
 gnu/packages/pdf.scm | 49 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 1899501122..9e4341afb9 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -19,6 +19,7 @@
 ;;; Copyright © 2019,2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,6 +46,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system qt)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages audio)
@@ -54,6 +56,7 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cups)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages djvu)
   #:use-module (gnu packages fontutils)
@@ -806,6 +809,52 @@ program capable of converting PDF into other formats.")
    (license (list license:asl2.0 license:clarified-artistic))
    (home-page "http://qpdf.sourceforge.net/")))
 
+(define-public qpdfview
+  (package
+    (name "qpdfview")
+    (version "0.4.18")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://launchpad.net/qpdfview/"
+                           "trunk/" version "/+download/"
+                           "qpdfview-" version ".tar.gz"))
+       (sha256
+        (base32 "0v1rl126hvblajnph2hkansgi0s8vjdc5yxrm4y3faa0lxzjwr6c"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("cups" ,cups)
+       ("djvulibre" ,djvulibre)
+       ("libspectre" ,libspectre)
+       ("poppler-qt5" ,poppler-qt5)
+       ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)))
+    (arguments
+     `(#:imported-modules ((guix build qt-build-system)
+                           (guix build cmake-build-system)
+                           ,@%gnu-build-system-modules)
+       #:modules ((guix build utils)
+                  (guix build gnu-build-system)
+                  ((guix build qt-build-system) #:prefix qt:))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda _
+             (substitute* "qpdfview.pri"
+               (("/usr") (assoc-ref %outputs "out")))
+             (invoke "qmake" "qpdfview.pro")))
+         (add-after 'install 'qt-wrap
+           (assoc-ref qt:%standard-phases 'qt-wrap)))))
+    (home-page "https://launchpad.net/qpdfview")
+    (synopsis "Tabbed document viewer")
+    (description "@command{qpdfview} is a document viewer for PDF, PS and DJVU
+files.  It uses the Qt toolkit and features persistent per-file settings,
+configurable toolbars and shortcuts, continuous and multi‐page layouts,
+SyncTeX support, and rudimentary support for annotations and forms.")
+    (license license:gpl2+)))
+
 (define-public xournal
   (package
     (name "xournal")
-- 
2.29.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-11-25  3:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 18:58 [bug#44853] [PATCH] gnu: Add qpdfview Timotej Lazar
2020-11-25  3:13 ` Leo Famulari [this message]
2020-11-25 18:35   ` Timotej Lazar
2020-11-25 20:33     ` Leo Famulari
2020-11-25 20:38     ` bug#44853: " Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201125031309.GA10305@jasmine.lan \
    --to=leo@famulari.name \
    --cc=44853@debbugs.gnu.org \
    --cc=timotej.lazar@araneo.si \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).