Commit | Line | Data |
---|---|---|
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> |
e6c2a88f | 4 | ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
1a8bf1dc PW |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
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. | |
12 | ;;; | |
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. | |
17 | ;;; | |
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/>. | |
20 | ||
21 | (define-module (gnu packages djvu) | |
22 | #:use-module ((guix licenses) #:prefix license:) | |
794ebb6b | 23 | #:use-module (guix utils) |
1a8bf1dc PW |
24 | #:use-module (guix packages) |
25 | #:use-module (guix download) | |
e6c2a88f | 26 | #:use-module (guix git-download) |
794ebb6b | 27 | #:use-module (guix build-system gnu) |
e6c2a88f | 28 | #:use-module (gnu packages autotools) |
794ebb6b NG |
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)) | |
1a8bf1dc PW |
34 | |
35 | (define-public djvulibre | |
36 | (package | |
37 | (name "djvulibre") | |
38 | (version "3.5.27") | |
39 | (source (origin | |
40 | (method url-fetch) | |
de67e922 LF |
41 | (uri (string-append "mirror://sourceforge/djvu/DjVuLibre/" |
42 | version "/djvulibre-" version ".tar.gz")) | |
1a8bf1dc PW |
43 | (sha256 |
44 | (base32 | |
45 | "0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6")))) | |
46 | (build-system gnu-build-system) | |
5fe2a139 R |
47 | (arguments |
48 | `(#:phases (modify-phases %standard-phases | |
49 | (add-after 'unpack 'reproducible | |
50 | (lambda _ | |
51 | ;; Ensure there are no timestamps in .svgz files. | |
52 | (substitute* "desktopfiles/Makefile.in" | |
53 | (("gzip") "gzip -n")) | |
54 | #t))))) | |
1a8bf1dc PW |
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 | |
59 | utilities.") | |
60 | (license license:gpl2+))) | |
794ebb6b NG |
61 | |
62 | (define-public djview | |
63 | (package | |
64 | (name "djview") | |
e6c2a88f | 65 | (version "4.11") |
794ebb6b NG |
66 | (source |
67 | (origin | |
e6c2a88f TGR |
68 | (method git-fetch) |
69 | (uri (git-reference | |
70 | (url "https://git.code.sf.net/p/djvu/djview-git") | |
71 | (commit (string-append "release." version)))) | |
794ebb6b | 72 | (sha256 |
e6c2a88f TGR |
73 | (base32 "0qlhd0xlxn8i869m0hwdjvwivi2vigqm88wliyr1h7s84zl3qhsy")) |
74 | (file-name (git-file-name name version)))) | |
794ebb6b NG |
75 | (build-system gnu-build-system) |
76 | (native-inputs | |
e6c2a88f TGR |
77 | `(("autoconf" ,autoconf) |
78 | ("automake" ,automake) | |
79 | ("libtool" ,libtool) | |
80 | ("pkg-config" ,pkg-config) | |
794ebb6b NG |
81 | ("qttools" ,qttools))) |
82 | (inputs | |
f8c2d324 NG |
83 | `(("djvulibre" ,djvulibre) |
84 | ("glib" ,glib) | |
794ebb6b NG |
85 | ("libxt" ,libxt) |
86 | ("libtiff" ,libtiff) | |
f8c2d324 NG |
87 | ("qtbase" ,qtbase))) |
88 | (arguments | |
89 | `(#:phases | |
90 | (modify-phases %standard-phases | |
91 | (add-after 'unpack 'fix-desktop-file | |
92 | ;; Executable is "djview", not "djview4". | |
93 | (lambda _ | |
94 | (substitute* "desktopfiles/djvulibre-djview4.desktop" | |
95 | (("Exec=djview4 %f") "Exec=djview %f")) | |
e6c2a88f TGR |
96 | #t)) |
97 | (add-after 'unpack 'make-files-writable | |
98 | (lambda _ | |
99 | (for-each make-file-writable | |
100 | (find-files ".")) | |
f8c2d324 | 101 | #t))))) |
0d79e82a | 102 | (home-page "http://djvu.sourceforge.net/djview4.html") |
794ebb6b NG |
103 | (synopsis "Viewer for the DjVu image format") |
104 | (description "DjView is a standalone viewer for DjVu files. | |
105 | ||
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. | |
111 | ||
112 | The viewer can simultaneously display several pages using a side-by-side or | |
113 | a continuous layout.") | |
114 | (license license:gpl2+))) |