summaryrefslogtreecommitdiff
path: root/gnu/packages/fontutils.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-11-08 23:01:17 +0100
committerLudovic Courtès <ludo@gnu.org>2020-11-08 23:06:27 +0100
commitd6517ddb8e4977a1e4d3ed068bb2ba6e912fbb5f (patch)
tree7f83aa9bc32a4f9ba666e26d3d30db95c497f33b /gnu/packages/fontutils.scm
parent4b797193d7508ddc53bb1ff7a267a0d50c1fe298 (diff)
downloadguix-patches-d6517ddb8e4977a1e4d3ed068bb2ba6e912fbb5f.tar
guix-patches-d6517ddb8e4977a1e4d3ed068bb2ba6e912fbb5f.tar.gz
gnu: fontconfig: Add "doc" output.
* gnu/packages/fontutils.scm (fontconfig)[outputs]: New field. [arguments]: Add 'move-man-sections'.
Diffstat (limited to 'gnu/packages/fontutils.scm')
-rw-r--r--gnu/packages/fontutils.scm26
1 files changed, 21 insertions, 5 deletions
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index f55d43db3a..1760d65f01 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -326,6 +326,7 @@ Font Format (WOFF).")
(patches (search-patches "fontconfig-hurd-path-max.patch"))
(sha256 (base32
"0hb700a68kk0ip51wdlnjjc682kvlrmb6q920mzajykdk0mdsmgn"))))
+ (outputs '("out" "doc"))
(build-system gnu-build-system)
;; In Requires or Requires.private of fontconfig.pc.
(propagated-inputs `(("expat" ,expat)
@@ -353,11 +354,26 @@ Font Format (WOFF).")
#:phases
(modify-phases %standard-phases
(replace 'install
- (lambda _
- ;; Don't try to create /var/cache/fontconfig.
- (invoke "make" "install"
- "fc_cachedir=$(TMPDIR)"
- "RUN_FC_CACHE_TEST=false"))))))
+ (lambda _
+ ;; Don't try to create /var/cache/fontconfig.
+ (invoke "make" "install"
+ "fc_cachedir=$(TMPDIR)"
+ "RUN_FC_CACHE_TEST=false")))
+ (add-after 'install 'move-man-sections
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Move share/man/man{3,5} to the "doc" output. Leave "man1" in
+ ;; "out" for convenience.
+ (let ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc")))
+ (for-each (lambda (section)
+ (let ((source (string-append out "/share/man/"
+ section))
+ (target (string-append doc "/share/man/"
+ section)))
+ (copy-recursively source target)
+ (delete-file-recursively source)))
+ '("man3" "man5"))
+ #t))))))
(synopsis "Library for configuring and customizing font access")
(description
"Fontconfig can discover new fonts when installed automatically;