[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/10: gnu: chez-scheme: Refactor documentation phases.
From: |
guix-commits |
Subject: |
04/10: gnu: chez-scheme: Refactor documentation phases. |
Date: |
Thu, 12 May 2022 06:30:29 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit d35920daf0c2efe3b3da055a1468cb2f8d3616d4
Author: Philip McGrath <philip@philipmcgrath.com>
AuthorDate: Mon May 9 02:02:45 2022 -0400
gnu: chez-scheme: Refactor documentation phases.
Patches merged in both upstream Chez Scheme and Racket's variant will
soon let us replace the 'install-docs' phase with just
'make install-docs'. Separating the 'link-doc-pdfs' phase (which won't
change) leaves us well-prepared for the transition, regardless of
whether Chez Scheme 9.5.10 or Racket 8.6 is released first.
* gnu/packages/chez.scm (chez-scheme)[arguments]: Split 'install-doc'
phase into 'install-docs' (matching the future 'make' target) and
'link-doc-pdfs'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/chez.scm | 64 +++++++++++++++++++++++++++++----------------------
1 file changed, 36 insertions(+), 28 deletions(-)
diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index 34545b1f58..49051abd17 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -309,35 +309,43 @@ If native threads are supported, the returned list will
include
(string-append (dirname scheme.boot)
"/chez-scheme.boot")))))))
;; Building the documentation requires stex and a running scheme.
- ;; FIXME: this is probably wrong for cross-compilation
- (add-after 'install-symlink 'install-doc
+ (add-after 'install-symlink 'install-docs
(lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
- (match (assoc-ref outputs "doc")
- (#f
- (format #t "not installing docs~%"))
- (doc-prefix
- (let* ((chez+version (strip-store-file-name #$output))
- (scheme (search-input-file outputs "/bin/scheme"))
- (stexlib (search-input-directory (or native-inputs
- inputs)
- "/lib/stex"))
- (doc-dir (string-append doc-prefix
- "/share/doc/"
- chez+version)))
- (define* (stex-make #:optional (suffix ""))
- (invoke "make" "install"
- (string-append "Scheme=" scheme)
- (string-append "STEXLIB=" stexlib)
- (string-append "installdir=" doc-dir suffix)))
- (with-directory-excursion "csug"
- (stex-make "/csug"))
- (with-directory-excursion "release_notes"
- (stex-make "/release_notes"))
- (with-directory-excursion doc-dir
- (symlink "release_notes/release_notes.pdf"
- "release_notes.pdf")
- (symlink "csug/csug9_5.pdf"
- "csug.pdf"))))))))))
+ (let* ((doc-prefix (or (assoc-ref outputs "doc")
+ (assoc-ref outputs "out")))
+ (chez+version (strip-store-file-name #$output))
+ (scheme (search-input-file outputs "/bin/scheme"))
+ (stexlib (search-input-directory (or native-inputs
+ inputs)
+ "/lib/stex"))
+ (doc-dir (string-append doc-prefix
+ "/share/doc/"
+ chez+version)))
+ (define* (stex-make #:optional (suffix ""))
+ (invoke "make" "install"
+ (string-append "Scheme=" scheme)
+ (string-append "STEXLIB=" stexlib)
+ (string-append "installdir=" doc-dir suffix)))
+ (with-directory-excursion "csug"
+ (stex-make "/csug"))
+ (with-directory-excursion "release_notes"
+ (stex-make "/release_notes")))))
+ (add-after 'install-docs 'link-doc-pdfs
+ ;; otherwise, it's hard to notice them in a forest of HTML files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-directory-excursion
+ (string-append (or (assoc-ref outputs "doc")
+ (assoc-ref outputs "out"))
+ "/share/doc/"
+ (strip-store-file-name #$output))
+ (symlink "release_notes/release_notes.pdf"
+ "release_notes.pdf")
+ (match (find-files "csug"
+ "csug.*\\.pdf$" ;; embeded version number
+ #:fail-on-error? #t)
+ ((pth)
+ (symlink pth
+ "csug.pdf")))))))))
;; Chez Scheme does not have a MIPS backend.
;; FIXME: Debian backports patches to get armhf working.
;; We should too. It is the Chez machine type arm32le
- branch master updated (8980f6c532 -> 0b4300d4fd), guix-commits, 2022/05/12
- 07/10: gnu: chez-upstream-features-for-system: Improve implementation., guix-commits, 2022/05/12
- 02/10: gnu: racket: Fix out-of-source build., guix-commits, 2022/05/12
- 09/10: gnu: chez-scheme-for-system: Adjust for bytecode backend., guix-commits, 2022/05/12
- 01/10: gnu: racket: Update to 8.5., guix-commits, 2022/05/12
- 03/10: gnu: chez-scheme: Update to 9.5.8., guix-commits, 2022/05/12
- 05/10: gnu: chez-scheme: Refactor configure phase and fix '--threads'., guix-commits, 2022/05/12
- 04/10: gnu: chez-scheme: Refactor documentation phases.,
guix-commits <=
- 08/10: gnu: chez-scheme-for-racket: Fix supported systems., guix-commits, 2022/05/12
- 06/10: gnu: stex: Get machine type dynamically., guix-commits, 2022/05/12
- 10/10: gnu: commencement: Remove redundant import., guix-commits, 2022/05/12