From patchwork Mon May 9 06:02:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 39177 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 BED4F27BBEA; Mon, 9 May 2022 07:06:35 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED 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 463A227BBE9 for ; Mon, 9 May 2022 07:06:35 +0100 (BST) Received: from localhost ([::1]:42872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnwXS-0001kH-BG for patchwork@mira.cbaines.net; Mon, 09 May 2022 02:06:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnwV2-00011k-4Y for guix-patches@gnu.org; Mon, 09 May 2022 02:04:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33580) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnwV1-0004gj-PD for guix-patches@gnu.org; Mon, 09 May 2022 02:04:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnwV1-0000ui-K4 for guix-patches@gnu.org; Mon, 09 May 2022 02:04:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55248] [PATCH v3 4/9] gnu: chez-scheme: Refactor documentation phases. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 May 2022 06:04: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: Liliana Marie Prikler , Maxime Devos , Philip McGrath , Liliana Marie Prikler Received: via spool by 55248-submit@debbugs.gnu.org id=B55248.16520762333446 (code B ref 55248); Mon, 09 May 2022 06:04:03 +0000 Received: (at 55248) by debbugs.gnu.org; 9 May 2022 06:03:53 +0000 Received: from localhost ([127.0.0.1]:55700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnwUq-0000tR-Sy for submit@debbugs.gnu.org; Mon, 09 May 2022 02:03:53 -0400 Received: from mail-vs1-f41.google.com ([209.85.217.41]:36759) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnwUn-0000sp-Dr for 55248@debbugs.gnu.org; Mon, 09 May 2022 02:03:49 -0400 Received: by mail-vs1-f41.google.com with SMTP id a127so12860713vsa.3 for <55248@debbugs.gnu.org>; Sun, 08 May 2022 23:03:49 -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=BrMiAIOmBaE3D0Wry6gjtvJgqHTL9qxXm1nYIH+noISXZnxBx4COocgSxyck8OQhMQ QzYtmUARZO0p1ZjZIhFABaelLByjar1gGbGk3x8zmK3G1A6Op1z3sXkNOdQqokdBgeyI /uGcflyeFiobU+sMilXuraWvaJCCM8UZ/JUIswB1zaaUoBPgLZZ+mN0EIZAkBmhKEEGB 7O/1damZnQwgy4f7snIDm8uG1I0KWv5lbn+eTbzn3Qt3c71UYIocFWFhUFkCN7izNgBz xjqJoLenKW4o1Bi60lThxlWqPCa0o/hvDPB1Q60g6lD89h4pxvw3jfIbiFMadMEF3Qs1 d8SQ== 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=BJ1wD+gP28TUxzVm14kLAiNbPlIBihqLkJPDwLTlXczT99eGcEHx2A+MmpaRQKQ7lI dMZpPNO2nnidOZBC89eF959oPtoWxV45/ncYtLZCyvIr3+3UCFkZPfeNZBIP/RRxAqRE 687rz9AfU0+G6RXewJ8SM4X7seSld0YhZyPm+CZTprW9feTe10S9LS1nSlvtWt623aiW mcRmk3hfJ9Ke7ePYEdPyfap3ok1Y9iJo0Y6rUYpBzYRBE7FOAGAoRAduY4MTQ5xwTPkF OD8Oc/QhwDvM1kKjHqVyIgLqw0qp6OJl7utMaEsHyo6i7KZsJbuyCU7arhHTepjtQ2Kc mveQ== X-Gm-Message-State: AOAM533RPyWiSn47sV37XBsOj3jImi3dTLm3QxE40HuI0Z4FGWqSTnMq TrvuS/tSiwZKny7yrNrRZvrV+zOuoeZgZq5i X-Google-Smtp-Source: ABdhPJzSrLEuCO5hPgUcIf04ugYyxgeNcLanZivmm4AWLD2VxPG+kH2KHRN+ZEJBy4a/tE2WU2WFOQ== X-Received: by 2002:a67:fe0b:0:b0:32c:ba4e:2b89 with SMTP id l11-20020a67fe0b000000b0032cba4e2b89mr6702306vsr.50.1652076223855; Sun, 08 May 2022 23:03:43 -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 h17-20020ab06191000000b003626f894de9sm1558200uan.23.2022.05.08.23.03.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 May 2022 23:03:43 -0700 (PDT) From: Philip McGrath Date: Mon, 9 May 2022 02:02:45 -0400 Message-Id: <5fff69c601fd95ba51b3d6635dfa5865fdc714a4.1652075689.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