From patchwork Tue May 3 18:33:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 39107 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 33D5B27BBEA; Tue, 3 May 2022 19:35:45 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 95A3927BBE9 for ; Tue, 3 May 2022 19:35:44 +0100 (BST) Received: from localhost ([::1]:36016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlxN9-0000Jv-Om for patchwork@mira.cbaines.net; Tue, 03 May 2022 14:35:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlxMV-0000BE-JH for guix-patches@gnu.org; Tue, 03 May 2022 14:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47162) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlxMV-000796-A4 for guix-patches@gnu.org; Tue, 03 May 2022 14:35:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlxMV-0002nW-6k for guix-patches@gnu.org; Tue, 03 May 2022 14:35:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55248] [PATCH 4/7] gnu: chez-scheme: Refactor documentation phases. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 May 2022 18:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55248 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55248@debbugs.gnu.org Cc: Philip McGrath Received: via spool by 55248-submit@debbugs.gnu.org id=B55248.165160288410660 (code B ref 55248); Tue, 03 May 2022 18:35:03 +0000 Received: (at 55248) by debbugs.gnu.org; 3 May 2022 18:34:44 +0000 Received: from localhost ([127.0.0.1]:41047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlxMB-0002lr-Nd for submit@debbugs.gnu.org; Tue, 03 May 2022 14:34:44 -0400 Received: from mail-vk1-f176.google.com ([209.85.221.176]:46062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlxM9-0002lA-I3 for 55248@debbugs.gnu.org; Tue, 03 May 2022 14:34:41 -0400 Received: by mail-vk1-f176.google.com with SMTP id bc42so8356140vkb.12 for <55248@debbugs.gnu.org>; Tue, 03 May 2022 11:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AocubqIwjg+N51Lf+GXtSQCjnp1BqIMKG2MA699sy1g=; b=E8Er5O44vyNg4kdZOTBKoxnWF3CHiuD6OZlarV5GTanDBid7Zu19rUK7eenIKbsSGT /kV44PnPTeaVgdhSzl393Trc20E4+6l/ibP5C8Kiaix5BSxWJc9M+JdshtR4/tXSB5C2 7/pICw75DkyH6TDJY1Wo33dhzgUubdkuxqQFCGlpiP6c9yBbaKIZIHRriQbhSCBXhx7J okY1X93SkbGqSCuqjZLgsf8tM4L7axvy3LvBexc1/q4XI1IoMqr9TY9oJoEqfzGtbwoc IFtACoJMQB9mp0QQg+rKMuzck6QM8jofTt4yOr3q910MyFK2fwpGjlwwE2QHO3nSE1ri 1OcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AocubqIwjg+N51Lf+GXtSQCjnp1BqIMKG2MA699sy1g=; b=sd/O2PVA5jZeUkNh3FrKAVaAVNpnXa9AtCZ1Z6RStKF7aZer5j/CjXfRgUwdLv533j 407Jx6R4YMkPppghgjS1xMpEY2flDHtjEvgj/6yh8sjXwxwfSX0T7DQqk2uQuSHL69jO xLOVsY5IhCoP77xafH5oEHqzIcvaoibRjBP8HwzJK6q5kEptyfl8p6YJM68cZW2NYEEo YVGdGwEqc06TT1PyclE0i2BjXjVpjp1IMV9cGg+0E3PSCMKeNj7dRDlqnh/AqEtlq3cw 2m2q52wNacWw05FXzH1FE1OrHg5eUEFtv7BYHahhPai5nZGYe5VwTovaYQHr4+/poPpG 8dYA== X-Gm-Message-State: AOAM5338TDwZq8pSbE/mVGUjtwgMsjbJPMam1++wckYVJ7Ee85rW1mzu lSCdOmO3nRVi0782+oT8ONtvEayrdNYtYO1k X-Google-Smtp-Source: ABdhPJz9VEDqyYSeaezcTUWgNYLb6DXCwt5zol9EQX7CrZks+pPN55ypCQ685vwUDZMYY3NaRvp9aw== X-Received: by 2002:a1f:28d8:0:b0:349:6247:e614 with SMTP id o207-20020a1f28d8000000b003496247e614mr5428587vko.38.1651602875928; Tue, 03 May 2022 11:34:35 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id 11-20020a05612202ab00b0034e6f1fd067sm1333750vkq.49.2022.05.03.11.34.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 May 2022 11:34:35 -0700 (PDT) From: Philip McGrath Date: Tue, 3 May 2022 14:33:43 -0400 Message-Id: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Patches merged in Racket's variant of Chez Scheme and submitted to the upstream 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'. --- 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 @@ (define-public chez-scheme (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