1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
3 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
20 (define-module (gnu packages djvu)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix utils)
23 #:use-module (guix packages)
24 #:use-module (guix download)
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))
32 (define-public djvulibre
38 (uri (string-append "mirror://sourceforge/djvu/DjVuLibre/"
39 version "/djvulibre-" version ".tar.gz"))
42 "0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6"))))
43 (build-system gnu-build-system)
45 `(#:phases (modify-phases %standard-phases
46 (add-after 'unpack 'reproducible
48 ;; Ensure there are no timestamps in .svgz files.
49 (substitute* "desktopfiles/Makefile.in"
52 (home-page "http://djvu.sourceforge.net/")
53 (synopsis "Implementation of DjVu, the document format")
54 (description "DjVuLibre is an implementation of DjVu,
55 including viewers, browser plugins, decoders, simple encoders, and
57 (license license:gpl2+)))
66 (uri (string-append "mirror://sourceforge/djvu/DjView/"
67 (version-major+minor version) "/"
68 "djview-" version ".tar.gz"))
70 (base32 "08bwv8ppdzhryfcnifgzgdilb12jcnivl4ig6hd44f12d76z6il4"))))
71 (build-system gnu-build-system)
73 `(("pkg-config" ,pkg-config)
74 ("qttools" ,qttools)))
76 `(("djvulibre" ,djvulibre)
83 (modify-phases %standard-phases
84 (add-after 'unpack 'fix-desktop-file
85 ;; Executable is "djview", not "djview4".
87 (substitute* "desktopfiles/djvulibre-djview4.desktop"
88 (("Exec=djview4 %f") "Exec=djview %f"))
90 (home-page "http://djvu.sourceforge.net/djview4.html")
91 (synopsis "Viewer for the DjVu image format")
92 (description "DjView is a standalone viewer for DjVu files.
94 Its features include navigating documents, zooming and panning page images,
95 producing and displaying thumbnails, displaying document outlines, searching
96 documents for particular words in the hidden text layer, copying hidden text
97 to the clipboard, saving pages and documents as bundled or indirect multi-page
98 files, and printing page and documents.
100 The viewer can simultaneously display several pages using a side-by-side or
101 a continuous layout.")
102 (license license:gpl2+)))