[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/10: gnu: mit-scheme: Generate and install documentation.
From: |
Federico Beffa |
Subject: |
06/10: gnu: mit-scheme: Generate and install documentation. |
Date: |
Wed, 03 Feb 2016 09:50:36 +0000 |
beffa pushed a commit to branch master
in repository guix.
commit f163c290f1aa2925d0c7fdbc94f82625092bb330
Author: Federico Beffa <address@hidden>
Date: Sat Jan 9 11:04:40 2016 +0100
gnu: mit-scheme: Generate and install documentation.
* gnu/packages/scheme.scm (mit-scheme): Add 'doc' output.
[arguments]: Add phases 'configure-doc, 'build-doc and 'install-doc.
[native-inputs]: Add 'texlive'. Move 'texinfo' and 'm4' from inputs.
---
gnu/packages/scheme.scm | 50 +++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 46 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 752dae2..352b66c 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -30,6 +30,7 @@
#:use-module (gnu packages databases)
#:use-module (gnu packages emacs)
#:use-module (gnu packages texinfo)
+ #:use-module (gnu packages texlive)
#:use-module (gnu packages base)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages avahi)
@@ -55,9 +56,13 @@
(name "mit-scheme")
(version "9.2")
(source #f) ; see below
+ (outputs '("out" "doc"))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
+ #:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1))
#:phases
(modify-phases %standard-phases
(replace 'unpack
@@ -83,11 +88,48 @@
(string-prefix? "i686" system))
(zero? (system* "make" "compile-microcode"))
(zero? (system* "./etc/make-liarc.sh"
- (string-append "--prefix=" out))))))))))
+ (string-append "--prefix=" out)))))))
+ (add-after 'configure 'configure-doc
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (with-directory-excursion "../doc"
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref inputs "bash"))
+ (bin/sh (string-append bash "/bin/sh")))
+ (system* bin/sh "./configure"
+ (string-append "--prefix=" out)
+ (string-append "SHELL=" bin/sh))
+ (substitute* '("Makefile" "make-common")
+ (("/lib/mit-scheme/doc")
+ (string-append "/share/doc/" ,name "-" ,version)))
+ #t))))
+ (add-after 'build 'build-doc
+ (lambda* _
+ (with-directory-excursion "../doc"
+ (zero? (system* "make")))))
+ (add-after 'install 'install-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc"))
+ (old-doc-dir (string-append out "/share/doc"))
+ (new-doc/mit-scheme-dir
+ (string-append doc "/share/doc/" ,name "-" ,version)))
+ (with-directory-excursion "../doc"
+ (for-each (lambda (target)
+ (system* "make" target))
+ '("install-config" "install-info-gz" "install-man"
+ "install-html" "install-pdf")))
+ (mkdir-p new-doc/mit-scheme-dir)
+ (copy-recursively
+ (string-append old-doc-dir "/" ,name "-" ,version)
+ new-doc/mit-scheme-dir)
+ (delete-file-recursively old-doc-dir)
+ #t))))))
+ (native-inputs
+ `(("texlive" ,texlive)
+ ("texinfo" ,texinfo)
+ ("m4" ,m4)))
(inputs
- `(("texinfo" ,texinfo)
- ("m4" ,m4)
- ("libx11" ,libx11)
+ `(("libx11" ,libx11)
("source"
- branch master updated (fd9a5b0 -> 3a6a0f6), Federico Beffa, 2016/02/03
- 02/10: gnu: scmutils: Generate 'scmutils-autoloads.el' file., Federico Beffa, 2016/02/03
- 01/10: gnu: Add emacs-scheme-complete., Federico Beffa, 2016/02/03
- 03/10: gnu: Add emacs-mit-scheme-doc., Federico Beffa, 2016/02/03
- 05/10: gnu: mit-scheme: Convert to the 'modify-phases' syntax., Federico Beffa, 2016/02/03
- 06/10: gnu: mit-scheme: Generate and install documentation.,
Federico Beffa <=
- 04/10: gnu: Add emacs-constants., Federico Beffa, 2016/02/03
- 07/10: gnu: Add emacs-slime., Federico Beffa, 2016/02/03
- 10/10: gnu: Add Italian Aspell dictionary., Federico Beffa, 2016/02/03
- 08/10: gnu: sbcl: Convert to the 'modify-phases' syntax., Federico Beffa, 2016/02/03
- 09/10: gnu: sbcl: Generate and install documentation., Federico Beffa, 2016/02/03