aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-06-26 10:20:22 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-03 15:28:06 +0200
commit9161ba818d14461c8a13afd3dc367b7a4c06ad62 (patch)
tree00cb6ce8302e12e58194363acb841a16230d3f0d
parent4a6aeb670f74ef895878631bc3d832d08e1cb321 (diff)
downloadpatches-9161ba818d14461c8a13afd3dc367b7a4c06ad62.tar
patches-9161ba818d14461c8a13afd3dc367b7a4c06ad62.tar.gz
gnu: ghostscript: Add "doc" output.
* gnu/packages/ghostscript.scm (ghostscript)[source](snippet): New field. [outputs]: New field. [arguments]: Add 'remove-doc-reference' phase.
-rw-r--r--gnu/packages/ghostscript.scm17
1 files changed, 16 insertions, 1 deletions
diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index f9026704da..09306e942d 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -129,8 +129,15 @@ printing, and psresize, for adjusting page sizes.")
(sha256
(base32
"0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1"))
- (patches (list (search-patch "ghostscript-runpath.patch")))))
+ (patches (list (search-patch "ghostscript-runpath.patch")))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Honor --docdir.
+ '(substitute* "Makefile.in"
+ (("^docdir=.*$") "docdir = @docdir@\n")
+ (("^exdir=.*$") "exdir = $(docdir)/examples\n")))))
(build-system gnu-build-system)
+ (outputs '("out" "doc")) ;16 MiB of HTML/PS doc + examples
(inputs `(("freetype" ,freetype)
("lcms" ,lcms)
("libjpeg-8" ,libjpeg-8)
@@ -152,6 +159,14 @@ printing, and psresize, for adjusting page sizes.")
(("/bin/sh") (which "bash")))
(substitute* "base/unixhead.mak"
(("/bin/sh") (which "bash")))))
+ (add-after 'configure 'remove-doc-reference
+ (lambda _
+ ;; Don't retain a reference to the 'doc' output in 'gs'.
+ ;; The only use of this definition is in the output of
+ ;; 'gs --help', so this change is fine.
+ (substitute* "base/gscdef.c"
+ (("GS_DOCDIR")
+ "\"~/.guix-profile/share/doc/ghostscript\""))))
(add-after 'build 'build-so
(lambda _
(zero? (system* "make" "so"))))