From patchwork Sun May 8 20:07:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 39170 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 9131927BBEA; Sun, 8 May 2022 21:41:16 +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 1471027BBE9 for ; Sun, 8 May 2022 21:41:16 +0100 (BST) Received: from localhost ([::1]:60518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnniN-0005Ar-8r for patchwork@mira.cbaines.net; Sun, 08 May 2022 16:41:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnnED-0003nd-00 for guix-patches@gnu.org; Sun, 08 May 2022 16:10:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33155) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnnEC-0000FA-Ip for guix-patches@gnu.org; Sun, 08 May 2022 16:10:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnnEC-0002NW-EL for guix-patches@gnu.org; Sun, 08 May 2022 16:10:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55248] [PATCH v2 4/9] gnu: chez-scheme: Refactor documentation phases. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 May 2022 20:10:04 +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: Liliana Marie Prikler , Maxime Devos , Philip McGrath , Liliana Marie Prikler Received: via spool by 55248-submit@debbugs.gnu.org id=B55248.16520405799018 (code B ref 55248); Sun, 08 May 2022 20:10:04 +0000 Received: (at 55248) by debbugs.gnu.org; 8 May 2022 20:09:39 +0000 Received: from localhost ([127.0.0.1]:55268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnnDm-0002LJ-TI for submit@debbugs.gnu.org; Sun, 08 May 2022 16:09:39 -0400 Received: from mail-vk1-f171.google.com ([209.85.221.171]:35333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnnDj-0002Ko-Ea for 55248@debbugs.gnu.org; Sun, 08 May 2022 16:09:35 -0400 Received: by mail-vk1-f171.google.com with SMTP id e7so6010431vkh.2 for <55248@debbugs.gnu.org>; Sun, 08 May 2022 13:09:35 -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=KjaP2rvANmmMXNQFFrlb7FuHL+nHim3mKpSwJJ/N+ls=; b=Zwsw8za4McewwxsBsRbpz90sWRjJptQcmkmtzRV2v9fBaDDlqURYHfXtxjfcEPMFvs 22zhH2NJN+bOXBtdbZKYC9hZrtFjP+TG4N/LSShrTvHAajvLZkJ3gyv+C9YYitH/ajIQ P4SHNb9T75Sw64R8TPZytiK7EDVIOFt55eGqnE6h4854Z/WKmA9fgrhtGcsFgAz4c71X znTepeNy175mvk52Jf6OzDme+19aEVmkDKc96iJtDQ4s1QqrvjtIWz1rlvNUFNy6AMrw YpY78J25f+oeHxO2V8xIDCoge2I41poZ+ShCV/n6V3ILaCVz1XTSqoufRxF/CSXT2JfB G0mQ== 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=KjaP2rvANmmMXNQFFrlb7FuHL+nHim3mKpSwJJ/N+ls=; b=q1EE4oaf+PNm6G5QklAu3TME11XaJ98vxuKg+29Vwa+LuVIHtZk79kPv9kc1d1nUtf IyDXlt6lw9kgh4IoxXvgdKg0/caherCwMiiavFM6JH4XdquqT7k1o0B42pQ04sYYZi+6 3dxfmWCfcylh4FDQ/rHMNWA8w5WgFPtdOfBIXoHslNVBfyyhCNoP1Jf+YtxUmy4u9njk 97xAAFHzpef5gyUKYWPziqDnr1nFHwLDZP3LjoiW/Tb9YlHjAmPryTy+241SjiMdG0MH 5MHDidG/IJQWXGsTccnF9cyDXPX+xnuHPOnWwDweg23ce/94HIT0CWPZc6Cej/ZOAAly cN5Q== X-Gm-Message-State: AOAM533nGtZpQ2ABn/MjyzKy9nn/6r6T2PfXrmWIxX0xhRJUuPO2L55h 3zBzm9KbiOb1oxi9hWyjLuGl3tQAaqXSSkeC X-Google-Smtp-Source: ABdhPJwCGC9D5s3Tow0fQHm7VX9l42zN9d2aBwUaU/AR0SIp4e+60nJTXWgLDu8gfWp6njUiDCqqQw== X-Received: by 2002:ac5:cb65:0:b0:34d:58d9:216d with SMTP id l5-20020ac5cb65000000b0034d58d9216dmr6921441vkn.21.1652040569973; Sun, 08 May 2022 13:09:29 -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 u68-20020a1f2e47000000b0034e6f1fd048sm1563973vku.18.2022.05.08.13.09.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 May 2022 13:09:29 -0700 (PDT) From: Philip McGrath Date: Sun, 8 May 2022 16:07:47 -0400 Message-Id: <55dfaa9f70c0842d05424ed394c232e5454262d1.1652039837.git.philip@philipmcgrath.com> 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 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'. --- 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