gnu: emacs-sly: Update to 20200228.
[jackhill/guix/guix.git] / gnu / packages / djvu.scm
CommitLineData
1a8bf1dc
PW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
794ebb6b 3;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
1a8bf1dc
PW
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages djvu)
21 #:use-module ((guix licenses) #:prefix license:)
794ebb6b 22 #:use-module (guix utils)
1a8bf1dc
PW
23 #:use-module (guix packages)
24 #:use-module (guix download)
794ebb6b
NG
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages glib)
27 #:use-module (gnu packages image)
28 #:use-module (gnu packages pkg-config)
29 #:use-module (gnu packages qt)
30 #:use-module (gnu packages xorg))
1a8bf1dc
PW
31
32(define-public djvulibre
33 (package
34 (name "djvulibre")
35 (version "3.5.27")
36 (source (origin
37 (method url-fetch)
de67e922
LF
38 (uri (string-append "mirror://sourceforge/djvu/DjVuLibre/"
39 version "/djvulibre-" version ".tar.gz"))
1a8bf1dc
PW
40 (sha256
41 (base32
42 "0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6"))))
43 (build-system gnu-build-system)
5fe2a139
R
44 (arguments
45 `(#:phases (modify-phases %standard-phases
46 (add-after 'unpack 'reproducible
47 (lambda _
48 ;; Ensure there are no timestamps in .svgz files.
49 (substitute* "desktopfiles/Makefile.in"
50 (("gzip") "gzip -n"))
51 #t)))))
1a8bf1dc
PW
52 (home-page "http://djvu.sourceforge.net/")
53 (synopsis "Implementation of DjVu, the document format")
54 (description "DjVuLibre is an implementation of DjVu,
55including viewers, browser plugins, decoders, simple encoders, and
56utilities.")
57 (license license:gpl2+)))
794ebb6b
NG
58
59(define-public djview
60 (package
61 (name "djview")
62 (version "4.10.6")
63 (source
64 (origin
65 (method url-fetch)
66 (uri (string-append "mirror://sourceforge/djvu/DjView/"
67 (version-major+minor version) "/"
68 "djview-" version ".tar.gz"))
69 (sha256
70 (base32 "08bwv8ppdzhryfcnifgzgdilb12jcnivl4ig6hd44f12d76z6il4"))))
71 (build-system gnu-build-system)
72 (native-inputs
73 `(("pkg-config" ,pkg-config)
74 ("qttools" ,qttools)))
75 (inputs
f8c2d324
NG
76 `(("djvulibre" ,djvulibre)
77 ("glib" ,glib)
794ebb6b
NG
78 ("libxt" ,libxt)
79 ("libtiff" ,libtiff)
f8c2d324
NG
80 ("qtbase" ,qtbase)))
81 (arguments
82 `(#:phases
83 (modify-phases %standard-phases
84 (add-after 'unpack 'fix-desktop-file
85 ;; Executable is "djview", not "djview4".
86 (lambda _
87 (substitute* "desktopfiles/djvulibre-djview4.desktop"
88 (("Exec=djview4 %f") "Exec=djview %f"))
89 #t)))))
0d79e82a 90 (home-page "http://djvu.sourceforge.net/djview4.html")
794ebb6b
NG
91 (synopsis "Viewer for the DjVu image format")
92 (description "DjView is a standalone viewer for DjVu files.
93
94Its features include navigating documents, zooming and panning page images,
95producing and displaying thumbnails, displaying document outlines, searching
96documents for particular words in the hidden text layer, copying hidden text
97to the clipboard, saving pages and documents as bundled or indirect multi-page
98files, and printing page and documents.
99
100The viewer can simultaneously display several pages using a side-by-side or
101a continuous layout.")
102 (license license:gpl2+)))