unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 5/6] gnu: mit-scheme: Generate and install documentation.
@ 2015-12-30 17:33 Federico Beffa
  2016-01-05 22:13 ` Ludovic Courtès
  0 siblings, 1 reply; 14+ messages in thread
From: Federico Beffa @ 2015-12-30 17:33 UTC (permalink / raw)
  To: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 0005-gnu-mit-scheme-Generate-and-install-documentation.patch --]
[-- Type: text/x-diff, Size: 5074 bytes --]

From 5c2be0d7d628ba27ac1360cc8e998de68a505b2a Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Sun, 27 Dec 2015 19:06:37 +0100
Subject: [PATCH 5/6] gnu: mit-scheme: Generate and install documentation.

* gnu/packages/scheme.scm (mit-scheme): Convert to the 'modify-phases'
  syntax. Add phases 'configure-doc, 'build-doc and 'install-doc. Add
  'texlive' input.
---
 gnu/packages/scheme.scm | 78 ++++++++++++++++++++++++++++++-------------------
 1 file changed, 48 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 7eb03f6..f778b99 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)
@@ -59,37 +60,54 @@
     (arguments
      `(#:tests? #f                                ; no "check" target
        #:phases
-       (alist-replace
-        'unpack
-        (lambda* (#:key inputs #:allow-other-keys)
-          (and (zero? (system* "tar" "xzvf"
-                               (assoc-ref inputs "source")))
-               (chdir ,(mit-scheme-source-directory (%current-system)
-                                                    version))
-               (begin
-                 ;; Delete these dangling symlinks since they break
-                 ;; `patch-shebangs'.
-                 (for-each delete-file
-                           (append '("src/lib/shim-config.scm")
-                                   (find-files "src/lib/lib" "\\.so$")
-                                   (find-files "src/lib" "^liarc-")
-                                   (find-files "src/compiler" "^make\\.")))
-                 (chdir "src")
-                 #t)))
-        (alist-replace
-         'build
-         (lambda* (#:key system outputs #:allow-other-keys)
-           (let ((out (assoc-ref outputs "out")))
-             (if (or (string-prefix? "x86_64" system)
-                     (string-prefix? "i686" system))
-                 (zero? (system* "make" "compile-microcode"))
-                 (zero? (system* "./etc/make-liarc.sh"
-                                 (string-append "--prefix=" out))))))
-         %standard-phases))))
+       (modify-phases %standard-phases
+         (replace 'unpack
+           (lambda* (#:key inputs #:allow-other-keys)
+             (and (zero? (system* "tar" "xzvf"
+                                  (assoc-ref inputs "source")))
+                  (chdir ,(mit-scheme-source-directory (%current-system)
+                                                       version))
+                  (begin
+                    ;; Delete these dangling symlinks since they break
+                    ;; `patch-shebangs'.
+                    (for-each delete-file
+                              (append '("src/lib/shim-config.scm")
+                                      (find-files "src/lib/lib" "\\.so$")
+                                      (find-files "src/lib" "^liarc-")
+                                      (find-files "src/compiler" "^make\\.")))
+                    (chdir "src")
+                    #t))))
+         (replace 'build
+           (lambda* (#:key system outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (if (or (string-prefix? "x86_64" system)
+                       (string-prefix? "i686" system))
+                   (zero? (system* "make" "compile-microcode"))
+                   (zero? (system* "./etc/make-liarc.sh"
+                                   (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* _
+             (with-directory-excursion "../doc"
+               (zero? (system* "make" "install"))))))))
     (inputs
-     `(;; TODO: Build doc when TeX Live is available.
-       ;; ("automake" ,automake)
-       ;; ("texlive-core" ,texlive-core)
+     `(("texlive" ,texlive)
        ("texinfo" ,texinfo)
        ("m4" ,m4)
        ("libx11" ,libx11)
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-01-12  7:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-30 17:33 [PATCH 5/6] gnu: mit-scheme: Generate and install documentation Federico Beffa
2016-01-05 22:13 ` Ludovic Courtès
2016-01-09 10:28   ` Federico Beffa
2016-01-09 18:42     ` Ludovic Courtès
2016-01-09 22:32       ` Federico Beffa
2016-01-10 18:50         ` Ludovic Courtès
2016-01-10 21:19           ` Federico Beffa
2016-01-10 23:14             ` Mathieu Lirzin
2016-01-11  8:20               ` Federico Beffa
2016-01-11  9:09             ` Ludovic Courtès
2016-01-11 11:58               ` Federico Beffa
2016-01-11 19:06                 ` Leo Famulari
2016-01-12  7:46                   ` Federico Beffa
2016-01-11 20:47                 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).