all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Federico Beffa <beffa@ieee.org>
To: Guix-devel <guix-devel@gnu.org>
Subject: [PATCH 5/6] gnu: mit-scheme: Generate and install documentation.
Date: Wed, 30 Dec 2015 18:33:33 +0100	[thread overview]
Message-ID: <CAKrPhPMtvKf8ShfbtZdbDcwE+ADw+qQGGsXhfwUNGu5r7BU4Nw@mail.gmail.com> (raw)

[-- 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


             reply	other threads:[~2015-12-30 17:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30 17:33 Federico Beffa [this message]
2016-01-05 22:13 ` [PATCH 5/6] gnu: mit-scheme: Generate and install documentation 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKrPhPMtvKf8ShfbtZdbDcwE+ADw+qQGGsXhfwUNGu5r7BU4Nw@mail.gmail.com \
    --to=beffa@ieee.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.