summaryrefslogtreecommitdiff
path: root/gnu/packages/pdf.scm
diff options
context:
space:
mode:
authordan <i@dan.games>2024-02-26 02:27:48 +0800
committerHilton Chain <hako@ultrarare.space>2024-03-09 09:38:27 +0800
commit52f9db6503b398bd2c9d73446c51ca99ee76fafe (patch)
tree401e1dd6d179898e8dad9b70daae95a38735cb02 /gnu/packages/pdf.scm
parent8d6d5b2a947b1ca2ff42709ee5faefec53d6cb10 (diff)
gnu: Add sioyek.
* gnu/packages/patches/sioyek-fix-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/pdf.scm (sioyek): New variable. Change-Id: Id2708745bd7ef672b620b8e9c907126bdc5a1f55 Signed-off-by: Hilton Chain <hako@ultrarare.space>
Diffstat (limited to 'gnu/packages/pdf.scm')
-rw-r--r--gnu/packages/pdf.scm60
1 files changed, 60 insertions, 0 deletions
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 0d796f65bb..f32403b954 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -25,6 +25,7 @@
;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2023 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2024 dan <i@dan.games>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1710,3 +1711,62 @@ python library.
Keywords: html2pdf, htmltopdf")
(license license:bsd-3)))
+
+(define-public sioyek
+ (package
+ (name "sioyek")
+ (version "2.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ahrm/sioyek")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1vmmp2s032ygh1byz77pg9aljmp8hx745fr7mmz11831f96mlmhq"))
+ (modules '((guix build utils)))
+ ;; libmupdf-third.so no longer available since mupdf 1.18.0.
+ (snippet '(substitute* "pdf_viewer_build_config.pro"
+ (("-lmupdf-third") "")))
+ ;; XXX: Fix build with mupdf-0.23.0+.
+ ;; See also: https://github.com/ahrm/sioyek/issues/804
+ (patches (search-patches "sioyek-fix-build.patch"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda _
+ (substitute* "pdf_viewer/main.cpp"
+ (("/usr/share")
+ (string-append #$output "/share"))
+ (("/etc")
+ (string-append #$output "/etc")))))
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (apply invoke "qmake" configure-flags)))
+ (add-after 'install 'instal-man-page
+ (lambda _
+ (install-file "resources/sioyek.1"
+ (string-append #$output "/share/man/man1")))))))
+ (inputs
+ (list freetype
+ gumbo-parser
+ harfbuzz
+ jbig2dec
+ libjpeg-turbo
+ mujs
+ mupdf
+ openjpeg
+ qt3d-5
+ qtbase-5
+ zlib))
+ (home-page "https://sioyek.info/")
+ (synopsis "PDF viewer with a focus on technical books and research papers")
+ (description
+ "Sioyek is a PDF viewer with a focus on textbooks and research papers.")
+ (license license:gpl3+)))