gv.scm 3.2 KB

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