summary refs log tree commit diff
path: root/gnu/packages/gv.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2017-01-06 17:14:41 -0500
committerLeo Famulari <leo@famulari.name>2017-01-06 17:14:41 -0500
commit74288230ea8b2310495dc2739f39ceadcc143fd0 (patch)
tree73ba6c7c13d59c5f92b409c94dccfff159e08f4d /gnu/packages/gv.scm
parent92e779592d269ca1924f184496eb4ca832997b12 (diff)
parentaa21c764d65068783ae31febee2a92eb3d138a24 (diff)
downloadguix-74288230ea8b2310495dc2739f39ceadcc143fd0.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/gv.scm')
-rw-r--r--gnu/packages/gv.scm23
1 files changed, 20 insertions, 3 deletions
diff --git a/gnu/packages/gv.scm b/gnu/packages/gv.scm
index e1e86a83a6..446b2946b5 100644
--- a/gnu/packages/gv.scm
+++ b/gnu/packages/gv.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2013, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -40,8 +40,25 @@
             (sha256 (base32
                      "0q8s43z14vxm41pfa8s5h9kyyzk1fkwjhkiwbf2x70alm6rv6qi1"))))
    (build-system gnu-build-system)
-   (propagated-inputs `(("ghostscript" ,ghostscript/x)))
-   (inputs `(("libx11" ,libx11)
+   (arguments
+    '(#:phases (modify-phases %standard-phases
+                 (add-before 'configure 'set-gs-file-name
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     ;; Set the value of 'GV.gsInterpreter' in the generated
+                     ;; 'gv_system.ad' file.
+                     (let ((gs (assoc-ref inputs "ghostscript")))
+                       (with-fluids ((%default-port-encoding "ISO-8859-1"))
+                        (substitute* "src/Makefile.in"
+                          (("GV\\.gsInterpreter:([[:blank:]]+)gs" _ blank)
+                           (string-append "GV.gsInterpreter:" blank
+                                          gs "/bin/gs"))
+                          (("GV\\.gsCmd([[:alpha:]]+):([[:blank:]]+)gs" _
+                            command blank)
+                           (string-append "GV.gsCmd" command ":"
+                                          blank gs "/bin/gs"))))
+                       #t))))))
+   (inputs `(("ghostscript" ,ghostscript/x)
+             ("libx11" ,libx11)
              ("libxaw3d" ,libxaw3d)
              ("libxinerama" ,libxinerama)
              ("libxpm" ,libxpm)