From patchwork Sat Jan 22 19:28:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon South X-Patchwork-Id: 36751 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 A029927BBEA; Sat, 22 Jan 2022 19:29:26 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,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 4B61327BBE9 for ; Sat, 22 Jan 2022 19:29:26 +0000 (GMT) Received: from localhost ([::1]:57850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBM4j-0002A4-Eg for patchwork@mira.cbaines.net; Sat, 22 Jan 2022 14:29:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBM4M-00029u-U2 for guix-patches@gnu.org; Sat, 22 Jan 2022 14:29:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45050) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nBM4M-0001HV-Hq for guix-patches@gnu.org; Sat, 22 Jan 2022 14:29:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nBM4M-0004IQ-F6 for guix-patches@gnu.org; Sat, 22 Jan 2022 14:29:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53454] [PATCH core-updates 1/1] gnu: texlive-psnfss: Fix build; add "doc" output. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Jan 2022 19:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53454 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53454@debbugs.gnu.org Received: via spool by 53454-submit@debbugs.gnu.org id=B53454.164287973516501 (code B ref 53454); Sat, 22 Jan 2022 19:29:02 +0000 Received: (at 53454) by debbugs.gnu.org; 22 Jan 2022 19:28:55 +0000 Received: from localhost ([127.0.0.1]:37953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBM4F-0004I3-7q for submit@debbugs.gnu.org; Sat, 22 Jan 2022 14:28:55 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:56738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBM4D-0004Hq-68 for 53454@debbugs.gnu.org; Sat, 22 Jan 2022 14:28:54 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id A76A0C8515 for <53454@debbugs.gnu.org>; Sat, 22 Jan 2022 19:28:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo01-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo01-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UrUQV_6Q3Gia for <53454@debbugs.gnu.org>; Sat, 22 Jan 2022 19:28:45 +0000 (UTC) Received: from laptop.simonsouth.net (23-233-96-244.cpe.pppoe.ca [23.233.96.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id B6041C84D2 for <53454@debbugs.gnu.org>; Sat, 22 Jan 2022 19:28:45 +0000 (UTC) From: Simon South Date: Sat, 22 Jan 2022 14:28:43 -0500 Message-Id: <6de30164aa84e0b7ce303177637f995b177e1778.1642877796.git.simon@simonsouth.net> X-Mailer: git-send-email 2.25.2 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 * gnu/packages/tex.scm (texlive-psnfss)[outputs]: Add "doc". [arguments]: Add "chdir-back", "clean-installed-files" and "move-doc-files" phases to ensure files are correctly arranged in package's outputs, matching installation instructions in README. --- gnu/packages/tex.scm | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index ebb7f86552..a81d326b6d 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2021 Ivan Gankevich ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 Thiago Jung Bauermann +;;; Copyright © 2022 Simon South ;;; ;;; This file is part of GNU Guix. ;;; @@ -4089,6 +4090,7 @@ (define-public texlive-psnfss "11f14dzhwsy4pli21acccip43d36nf3pac33ihjffnps1i2mhqkd")))) (package (inherit template) + (outputs '("out" "doc")) (arguments (substitute-keyword-arguments (package-arguments template) ((#:tex-directory _ #t) @@ -4097,7 +4099,37 @@ (define-public texlive-psnfss `(modify-phases ,phases (add-after 'unpack 'chdir (lambda _ - (chdir "source/latex/psnfss") #t)))))) + (chdir "source/latex/psnfss") #t)) + (add-after 'install 'chdir-back + (lambda _ + (chdir "../../..") #t)) + (add-after 'chdir-back 'clean-installed-files + (lambda _ + ;; Remove the generated .sty files from the build area as + ;; these were already copied to the default output in the + ;; "install" phase. + (delete-file-recursively "source/latex/psnfss/build") + #t)) + (add-after 'clean-installed-files 'move-doc-files + (lambda* (#:key outputs #:allow-other-keys) + (let* ((doc (assoc-ref outputs "doc")) + (doc-root (string-append doc "/share/texmf-dist")) + (doc-path "doc/latex/psnfss") + (source-path "source/latex/psnfss")) + ;; Move the PDF documentation to the "doc" output. + (let* ((file-name "psnfss2e.pdf") + (source (string-append doc-path "/" file-name)) + (target-dir (string-append doc-root "/" doc-path))) + (mkdir-p target-dir) + (copy-file source + (string-append target-dir "/" file-name)) + (delete-file source)) + + ;; Keep the remaining files together with the package's + ;; source, as per the installation instructions. + (copy-recursively doc-path source-path) + (delete-file-recursively "doc")) + #t)))))) (native-inputs (list texlive-cm)) (home-page "https://www.ctan.org/pkg/psnfss")