gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / gv.scm
CommitLineData
6d267f0a
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
fbec5abe 3;;; Copyright © 2013, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
fb0b9ff1 4;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6d267f0a
LC
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 gv)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages ghostscript)
24 #:use-module (gnu packages compression)
25 #:use-module (gnu packages pkg-config)
26 #:use-module (gnu packages xorg)
b5b73a82 27 #:use-module ((guix licenses) #:prefix license:)
6d267f0a
LC
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system gnu))
31
6d267f0a
LC
32(define-public gv
33 (package
34 (name "gv")
35 (version "3.7.4")
36 (source (origin
37 (method url-fetch)
38 (uri (string-append "mirror://gnu/gv/gv-"
39 version ".tar.gz"))
40 (sha256 (base32
41 "0q8s43z14vxm41pfa8s5h9kyyzk1fkwjhkiwbf2x70alm6rv6qi1"))))
42 (build-system gnu-build-system)
fbec5abe
LC
43 (arguments
44 '(#:phases (modify-phases %standard-phases
45 (add-before 'configure 'set-gs-file-name
46 (lambda* (#:key inputs #:allow-other-keys)
47 ;; Set the value of 'GV.gsInterpreter' in the generated
48 ;; 'gv_system.ad' file.
49 (let ((gs (assoc-ref inputs "ghostscript")))
50 (with-fluids ((%default-port-encoding "ISO-8859-1"))
51 (substitute* "src/Makefile.in"
52 (("GV\\.gsInterpreter:([[:blank:]]+)gs" _ blank)
53 (string-append "GV.gsInterpreter:" blank
54 gs "/bin/gs"))
55 (("GV\\.gsCmd([[:alpha:]]+):([[:blank:]]+)gs" _
56 command blank)
57 (string-append "GV.gsCmd" command ":"
58 blank gs "/bin/gs"))))
59 #t))))))
60 (inputs `(("ghostscript" ,ghostscript/x)
61 ("libx11" ,libx11)
6d267f0a
LC
62 ("libxaw3d" ,libxaw3d)
63 ("libxinerama" ,libxinerama)
64 ("libxpm" ,libxpm)
6d267f0a 65 ("zlib" ,zlib)))
c4c4cc05
JD
66 (native-inputs
67 `(("pkg-config" ,pkg-config)))
2c71cf66 68 (synopsis "PostScript and PDF viewer using Ghostscript as a back-end")
6d267f0a 69 (description
79c311b8
LC
70 "GNU GV is a graphical user interface to the Ghostscript interpreter.
71With it, one can view and navigate through PostScript and PDF documents in X
a22dc0c4 72Windows.")
6d267f0a 73 (license license:gpl3+)
6fd52309 74 (home-page "https://www.gnu.org/software/gv/")))