From debbugs-submit-bounces@debbugs.gnu.org Tue May 03 14:34:44 2022 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 To: 55248@debbugs.gnu.org Subject: [PATCH 4/7] gnu: chez-scheme: Refactor documentation phases. 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 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 55248 Cc: Philip McGrath X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) 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 -- 2.32.0