projects/guix·blob java-team · refs

76 lines · 2.9 KiB

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