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>
4 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages djvu)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix utils)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix git-download)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages glib)
30 #:use-module (gnu packages image)
31 #:use-module (gnu packages pkg-config)
32 #:use-module (gnu packages qt)
33 #:use-module (gnu packages xorg))
35 (define-public djvulibre
41 (uri (string-append "mirror://sourceforge/djvu/DjVuLibre/"
42 version "/djvulibre-" version ".tar.gz"))
45 "0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6"))))
46 (build-system gnu-build-system)
48 `(#:phases (modify-phases %standard-phases
49 (add-after 'unpack 'reproducible
51 ;; Ensure there are no timestamps in .svgz files.
52 (substitute* "desktopfiles/Makefile.in"
55 (home-page "http://djvu.sourceforge.net/")
56 (synopsis "Implementation of DjVu, the document format")
57 (description "DjVuLibre is an implementation of DjVu,
58 including viewers, browser plugins, decoders, simple encoders, and
60 (license license:gpl2+)))
70 (url "https://git.code.sf.net/p/djvu/djview-git")
71 (commit (string-append "release." version))))
73 (base32 "0qlhd0xlxn8i869m0hwdjvwivi2vigqm88wliyr1h7s84zl3qhsy"))
74 (file-name (git-file-name name version))))
75 (build-system gnu-build-system)
77 `(("autoconf" ,autoconf)
78 ("automake" ,automake)
80 ("pkg-config" ,pkg-config)
81 ("qttools" ,qttools)))
83 `(("djvulibre" ,djvulibre)
90 (modify-phases %standard-phases
91 (add-after 'unpack 'fix-desktop-file
92 ;; Executable is "djview", not "djview4".
94 (substitute* "desktopfiles/djvulibre-djview4.desktop"
95 (("Exec=djview4 %f") "Exec=djview %f"))
97 (add-after 'unpack 'make-files-writable
99 (for-each make-file-writable
102 (home-page "http://djvu.sourceforge.net/djview4.html")
103 (synopsis "Viewer for the DjVu image format")
104 (description "DjView is a standalone viewer for DjVu files.
106 Its features include navigating documents, zooming and panning page images,
107 producing and displaying thumbnails, displaying document outlines, searching
108 documents for particular words in the hidden text layer, copying hidden text
109 to the clipboard, saving pages and documents as bundled or indirect multi-page
110 files, and printing page and documents.
112 The viewer can simultaneously display several pages using a side-by-side or
113 a continuous layout.")
114 (license license:gpl2+)))