From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0OYTCA5M4mClugAAgWs5BA (envelope-from ) for ; Mon, 05 Jul 2021 02:02:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uJXRAw5M4mCABgAAbx9fmQ (envelope-from ) for ; Mon, 05 Jul 2021 00:02:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 04A1C2526F for ; Mon, 5 Jul 2021 02:02:21 +0200 (CEST) Received: from localhost ([::1]:38612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0C43-0005EU-Vv for larch@yhetil.org; Sun, 04 Jul 2021 20:02:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0C3m-0005E6-TY for guix-patches@gnu.org; Sun, 04 Jul 2021 20:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60096) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0C3m-0002TY-LL for guix-patches@gnu.org; Sun, 04 Jul 2021 20:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0C3m-0001Xl-Gn for guix-patches@gnu.org; Sun, 04 Jul 2021 20:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49408] [PATCH core-updates 1/5] gnu: TeX Live: Use IniTeX to build a couple of packages References: <20210704234449.424436-1-bauermann@kolabnow.com> In-Reply-To: <20210704234449.424436-1-bauermann@kolabnow.com> Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Jul 2021 00:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49408 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49408@debbugs.gnu.org Cc: Thiago Jung Bauermann Received: via spool by 49408-submit@debbugs.gnu.org id=B49408.16254433015869 (code B ref 49408); Mon, 05 Jul 2021 00:02:02 +0000 Received: (at 49408) by debbugs.gnu.org; 5 Jul 2021 00:01:41 +0000 Received: from localhost ([127.0.0.1]:43393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0C3N-0001WI-0h for submit@debbugs.gnu.org; Sun, 04 Jul 2021 20:01:41 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:57262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0C3I-0001W0-Fd for 49408@debbugs.gnu.org; Sun, 04 Jul 2021 20:01:36 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 2ACC4B4F for <49408@debbugs.gnu.org>; Mon, 5 Jul 2021 02:01:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1625443284; x=1627257685; bh=qgT7Rh+oWI4rYLSQ0Xb9n6MwfT7pHK7eG+F32WWH5PY=; b=viL+R4SIM7r/ WSf+YC0lBqtOfG5JpUuQhA9Kjerxuh5mQ1D7IpV9ZRC5zhhpraoskMgW0/60+Ii6 9Zz1p0QABDfFFtEgbOmn1Tadqytl37sgsKAVUjfrYRa6OwTdY3QQ/KzarDTlsRJc KZYBIpnU37xAaUvGzgdkzop4sO7UZWalZK6Ieo4SZtOYYWzfpJdk/SkWaoyPZjtq spwNGDZLoysKRAyqsvPUGf0v7vaFknJOxs7fEPQulD+cVAkWcD29zQ01jL1xp3Q7 L5rQYZqEU6bx+O9js1Hx/qLJN6sn8NBzkY7N+dDKI7aZxN55zMZw0K8LOx4BX5Zo WFm4JuGwGBNM5yl8YQvb+NRsPfYue6YwrEztd/puXtXrVX3ixeg8zherjdSjZFbs epCY14BVy3g9+i8PbaRkl7g03pEz4q4wFe8LH/N/mJI/gMRS95n+l4P9W8UHAPMT WngCfHRkNcgfYoVX8jr3tQjHD40EzkbkvrqxKtZ+w2Y6JVrmfxaWkGLCnfzYIAQl oSEYrcCVBpFQ2BFS58JcqrKktucdXFg+oh53pKlfDy2RNvj2vcyLni+mw+j/rJ1X BFo5x6dqRIExhLGhyymXeROeMte6Ua4JSc9LiVTRq7wHRC9T8nToAj7FOYhx07rd as+gqdgwfe+v4bQxFrZEYieM65kp0qo= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DLcfvGTiUi9r for <49408@debbugs.gnu.org>; Mon, 5 Jul 2021 02:01:24 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 35815AF9 for <49408@debbugs.gnu.org>; Mon, 5 Jul 2021 02:01:23 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx001.mykolab.com (Postfix) with ESMTPS id 06614349; Mon, 5 Jul 2021 02:01:22 +0200 (CEST) Date: Sun, 4 Jul 2021 21:00:59 -0300 Message-Id: <20210705000103.470948-1-bauermann@kolabnow.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches From: Thiago Jung Bauermann via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625443341; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qgT7Rh+oWI4rYLSQ0Xb9n6MwfT7pHK7eG+F32WWH5PY=; b=Pwf0tK3hwry1/tK+7QOBQNIBoT2UY4XrX1MRsy0fbZ6g3v828yL0CTFk2RoSvnfIB6tzW3 FI2Lq3yxWj61lfXNYzObtASIoG3CRZVGcuxQ+7IWBWIG8Jm5xdRyx1IdT41dnrkzVZUgPs E88OQRRW9ocEK7AFnNtEdoG3YLuLkKFgc27Kc3kFdLNXBSL8mdwjDpERMUE/4CPtjEQDWe Oz4WL3b2I6gmgcKZp4J2Wj0kNztRIA119UUzUkzGGu9vmbHHMXxYU/c4l2YhPXcYH9lCS8 17Z/hkoMxCN489n1zIvHAvn08XitSbAxnq7XzkmSfqnpDIR0DzyLTlFnpyKFSw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625443341; a=rsa-sha256; cv=none; b=Pwi6SDHHcB4ZQadrJkpz/a2rLQBulAvilhggps3UZebsRrb844A7Muge4IHzAr+0DqRtd+ Enpgzt9qIGlZXxCu/okQOoO8q7r1aGI97tiJi9IAoyQt1Gennji7fvStiEtIU3wQUA+HSU TYuqgXlpSEl8RaUy54RLT6/O9+xdY7VUM9zjh/AyL6eFeO4TtTRv4mXle5+WkLeAn8zgAP 3H310yFxUj4SgOl6vVxKrbHSblGj2y8ss2ZD4HWSS8FmVQuleXDT3Smu39VMC+uj94GGuK 6bAtE628H071ZiWQViQq+AToGH75eH29oiatVbpc4OEz/j3gM+8ElX2V8pp07A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=viL+R4SI; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.41 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=viL+R4SI; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 04A1C2526F X-Spam-Score: -1.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0ODHC+q3ZXIo The package texlive-latex-base in TeX Live 2021 will depend on texlive-latex-l3kernel and texlive-latex-l3packages. Therefore we need to remove their build dependency on texlive-latex-base to avoid a circular dependency. l3kernel and l3packages don’t need LaTeX during build, just IniTeX. So to make them use it, modify texlive-build-system to allow disabling the #:texlive-latex-base and #:tex-format parameters, and also add a #:tex-engine parameter. We also need to add texlive-docstrip as a native input, which was previously provided by texlive-latex-base. * gnu/packages/tex.scm (texlive-latex-l3kernel, texlive-latex-l3packages)[arguments]: Add ‘#:tex-engine’, ‘#:tex-format’ and ‘#:texlive-latex-base’ parameters. [native-inputs]: Add ‘texlive-docstrip’. * guix/build-system/texlive.scm (lower)[build-inputs]: Don’t add ‘texlive-latex-base’ if its keyword parameter is false. (texlive-build): Add ‘tex-engine’ keyword parameter. [builder]: If a ‘tex-engine’ parameter was passed, use it. Otherwise, use ‘tex-format’ as the engine. * guix/build/texlive-build-system.scm (compile-with-latex): Add ‘engine’ parameter. If the ‘format’ parameter is false, add “-ini” option to the command line. (build): Add ‘tex-engine’ parameter. Pass it down to ‘compile-with-latex’. --- gnu/packages/tex.scm | 13 ++++++++++++- guix/build-system/texlive.scm | 9 ++++++++- guix/build/texlive-build-system.scm | 12 +++++++----- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 7a78563a75e5..bf557a4cf8ea 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2020, 2021 Paul Garlick ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Thiago Jung Bauermann ;;; ;;; This file is part of GNU Guix. ;;; @@ -3348,7 +3349,12 @@ Live distribution.") "0w82d5a4d3rc950ms6ymj4mpw5ndz6qs5x53szcfgzgjxsns9l4w")))) (build-system texlive-build-system) (arguments - '(#:tex-directory "latex/l3kernel")) + '(#:tex-directory "latex/l3kernel" + #:tex-engine "tex" + #:tex-format #f + #:texlive-latex-base #f)) + (native-inputs + `(("texlive-docstrip" ,texlive-docstrip))) (home-page "https://www.ctan.org/pkg/l3kernel") (synopsis "LaTeX3 programmers’ interface") (description @@ -3373,6 +3379,9 @@ that the LaTeX3 conventions can be used with regular LaTeX 2e packages.") (build-system texlive-build-system) (arguments '(#:tex-directory "latex/l3packages" + #:tex-engine "tex" + #:tex-format #f + #:texlive-latex-base #f ;; build-targets must be specified manually since they are in ;; sub-directories. #:build-targets '("l3keys2e.ins" "xparse.ins" "xfrac.ins" "xfp.ins" "xtemplate.ins") @@ -3394,6 +3403,8 @@ that the LaTeX3 conventions can be used with regular LaTeX 2e packages.") ":"))) #t))) )) + (native-inputs + `(("texlive-docstrip" ,texlive-docstrip))) (propagated-inputs `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel))) (home-page "https://www.ctan.org/pkg/l3packages") diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm index 00a36d5862d4..bb671e5e2b32 100644 --- a/guix/build-system/texlive.scm +++ b/guix/build-system/texlive.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2021 Thiago Jung Bauermann ;;; ;;; This file is part of GNU Guix. ;;; @@ -116,7 +117,9 @@ level package ID." ;; Keep the standard inputs of 'gnu-build-system'. ,@(standard-packages))) (build-inputs `(("texlive-bin" ,texlive-bin) - ("texlive-latex-base" ,texlive-latex-base) + ,@(if texlive-latex-base + `(("texlive-latex-base" ,texlive-latex-base)) + '()) ,@native-inputs)) (outputs outputs) (build texlive-build) @@ -128,6 +131,7 @@ level package ID." (tests? #f) tex-directory (build-targets #f) + (tex-engine #f) (tex-format "pdftex") (phases '(@ (guix build texlive-build-system) %standard-phases)) @@ -151,6 +155,9 @@ level package ID." #:source #+source #:tex-directory #$tex-directory #:build-targets #$build-targets + #:tex-engine #$(if tex-engine + tex-engine + tex-format) #:tex-format #$tex-format #:system #$system #:tests? #$tests? diff --git a/guix/build/texlive-build-system.scm b/guix/build/texlive-build-system.scm index 4c255700bbd2..353fb934a652 100644 --- a/guix/build/texlive-build-system.scm +++ b/guix/build/texlive-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Thiago Jung Bauermann ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,16 +35,17 @@ ;; ;; Code: -(define (compile-with-latex format file) - (invoke format +(define (compile-with-latex engine format file) + (invoke engine "-interaction=nonstopmode" "-output-directory=build" - (string-append "&" format) + (if format (string-append "&" format) "-ini") file)) -(define* (build #:key inputs build-targets tex-format #:allow-other-keys) +(define* (build #:key inputs build-targets tex-engine tex-format + #:allow-other-keys) (mkdir "build") - (for-each (cut compile-with-latex tex-format <>) + (for-each (cut compile-with-latex tex-engine tex-format <>) (if build-targets build-targets (scandir "." (cut string-suffix? ".ins" <>)))))