From patchwork Mon Dec 19 22:42:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45436 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 0881927BBE9; Mon, 19 Dec 2022 22:43:34 +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.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 CC77427BBED for ; Mon, 19 Dec 2022 22:43:31 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7Oqf-000504-VI; Mon, 19 Dec 2022 17:43:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7Oqd-0004zQ-3M for guix-patches@gnu.org; Mon, 19 Dec 2022 17:43:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7Oqc-00010a-RV for guix-patches@gnu.org; Mon, 19 Dec 2022 17:43:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7Oqc-0008R2-Dq for guix-patches@gnu.org; Mon, 19 Dec 2022 17:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60145] [PATCH v5 1/2] gnu: Add u-boot-documentation. References: <20221217041541.20193-1-maxim.cournoyer@gmail.com> In-Reply-To: <20221217041541.20193-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 19 Dec 2022 22:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60145 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60145@debbugs.gnu.org Cc: vagrant@debian.org, Maxim Cournoyer Received: via spool by 60145-submit@debbugs.gnu.org id=B60145.167148976232406 (code B ref 60145); Mon, 19 Dec 2022 22:43:02 +0000 Received: (at 60145) by debbugs.gnu.org; 19 Dec 2022 22:42:42 +0000 Received: from localhost ([127.0.0.1]:40795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7OqI-0008Qc-3o for submit@debbugs.gnu.org; Mon, 19 Dec 2022 17:42:42 -0500 Received: from mail-qv1-f51.google.com ([209.85.219.51]:46651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7OqF-0008QV-DK for 60145@debbugs.gnu.org; Mon, 19 Dec 2022 17:42:41 -0500 Received: by mail-qv1-f51.google.com with SMTP id mn15so7186212qvb.13 for <60145@debbugs.gnu.org>; Mon, 19 Dec 2022 14:42:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uscX7WMLExdGQ5gp3nKv9DL7fL7jd3wQNvvJDm15Z1E=; b=QfORZjwEInlnqs5j++Xwg5cLiv7zkF2y22YqJ8fGpRzwAySLfNYcIBp4Q9b5pE/EUc NaY/kVBQkwAnLL7u9KXZsWq7LipgLMsFj2A1C5smzBcmkPczq5Y5GCzLH7GmESPT0/dM a46naa5KMRh316ugtf9Z/SrpTKFctZ39S0lm1K4+Q3Cjr8CkaJ7bictb5T8cTpFVy9mq CjjMdoDe2K0i/vZTX3SZdTVZqFHSD97f1jleWjigPFU0KRScqfnstSpTdHH5yNfncJ/u TAQPJ/JLC0SVOnJK+pAh6t2gUS2gjdm3OqezwpsCT5tjUtRlpX+DVLsohSc0QbOU74Hz 5o1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uscX7WMLExdGQ5gp3nKv9DL7fL7jd3wQNvvJDm15Z1E=; b=0zGKw1D6NnHpkevrN5ef1HNd3nXGtzjXNRTP/N0O0Wh4Aeq1D8OBBmRIixZ8jKFYGs DKWRTMC0dKOmzISnwBa+gJ8dO7ES4uJ5zSW2OvbNRNK+TXhnYygVGN1V64fnuMnrgqo/ 3h8J/IfyOOjSX4ykn91S0wFslCWKuhpekUZ0cUvIwNWgNc4gNBr4IzbrHZB6UMrT+r1x 9Hw04dEJiWhVpgTE0I4iHaMNrD9XYiGLUE0cwqPHutvaXcQt1SQeR5kZ2sX1cXzUiXDx W0Wef+3w0XEJtN2Z2njklNkxg999FmawhFVNXQmxjdVBDV1gzTDQC2tcPrM4Z703RRaZ YPTw== X-Gm-Message-State: ANoB5pkGtyFApIzbRL+8VmH7VBa5RiRdjWmEMomHMvYW8WMFkf2bUJMM eNpd3CgLXQBZVZaK+XOk97KYTCasNbbO/tC9 X-Google-Smtp-Source: AA0mqf4CRUew5eUkdILK3+fwIFaQnxQmygLfpgsy/w8p243+F7VZzsDzmxD/FuqgL1dFvzfCzBQWLw== X-Received: by 2002:a0c:fc0f:0:b0:4c7:1d69:5533 with SMTP id z15-20020a0cfc0f000000b004c71d695533mr49630975qvo.34.1671489753490; Mon, 19 Dec 2022 14:42:33 -0800 (PST) Received: from localhost.localdomain (dsl-10-133-202.b2b2c.ca. [72.10.133.202]) by smtp.gmail.com with ESMTPSA id f19-20020a05620a15b300b006ce9e880c6fsm7616995qkk.111.2022.12.19.14.42.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 14:42:33 -0800 (PST) From: Maxim Cournoyer Date: Mon, 19 Dec 2022 17:42:26 -0500 Message-Id: <20221219224227.17684-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/u-boot-infodocs-target.patch: New patch. * gnu/local.mk: (dist_patch_DATA): Register it. * gnu/packages/bootloaders.scm (u-boot): Apply it. (u-boot-documentation): New variable. --- Changes in v5: - Update URL in patch Changes in v3: - Update U-Boot documentation patch - Remove now extraneous convenience symlink Changes in v2: - Update U-Boot documentation patch gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 41 ++++++++- .../patches/u-boot-infodocs-target.patch | 84 +++++++++++++++++++ 3 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/u-boot-infodocs-target.patch base-commit: f28ca2447c5e2eef1ba6a3a11587380a665b0e26 diff --git a/gnu/local.mk b/gnu/local.mk index 56634e090c..01fcc9d7d3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1924,6 +1924,7 @@ dist_patch_DATA = \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-bcg729.patch \ %D%/packages/patches/u-boot-allow-disabling-openssl.patch \ + %D%/packages/patches/u-boot-infodocs-target.patch \ %D%/packages/patches/u-boot-nintendo-nes-serial.patch \ %D%/packages/patches/u-boot-rockchip-inno-usb.patch \ %D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 3c96453e5c..32970f86f1 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2021 Brice Waegeneire ;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; Copyright © 2021 Stefan +;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -62,6 +63,7 @@ (define-module (gnu packages bootloaders) #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) #:use-module (gnu packages sdl) + #:use-module (gnu packages sphinx) #:use-module (gnu packages serialization) #:use-module (gnu packages swig) #:use-module (gnu packages valgrind) @@ -637,7 +639,8 @@ (define u-boot (list %u-boot-rockchip-inno-usb-patch %u-boot-allow-disabling-openssl-patch %u-boot-sifive-prevent-relocating-initrd-fdt - %u-boot-rk3399-enable-emmc-phy-patch)) + %u-boot-rk3399-enable-emmc-phy-patch + (search-patch "u-boot-infodocs-target.patch"))) (method url-fetch) (uri (string-append "https://ftp.denx.de/pub/u-boot/" @@ -667,6 +670,42 @@ (define u-boot also initializes the boards (RAM etc).") (license license:gpl2+))) +;;; This is very similar to the linux-libre-documentation package, since it +;;; reuses the same Makefile-based build system. +(define-public u-boot-documentation + (package + (inherit u-boot) + (name "u-boot-documentation") + (arguments + (list + #:make-flags #~(list "HOSTCC=gcc" + ;; Avoid treating Sphinx warnings as errors. + "SPHINXOPTS=") + #:tests? #f + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "infodocs" make-flags))) + (replace 'install + (lambda* (#:key make-flags #:allow-other-keys) + (let* ((info-dir (string-append #$output "/share/info")) + (info (string-append info-dir + "/DasUBoot.info.gz"))) + (with-directory-excursion "doc/output" + (apply invoke "make" "-C" "texinfo" "install-info" + (string-append "infodir=" info-dir) + make-flags)))))))) + (native-inputs + (modify-inputs (package-native-inputs u-boot) + (append fontconfig + python-sphinx + texinfo + which))) + (synopsis "U-Boot documentation") + (description "This package provides the documentation for U-Boot, as an +Info manual."))) + (define-public u-boot-tools (package (inherit u-boot) diff --git a/gnu/packages/patches/u-boot-infodocs-target.patch b/gnu/packages/patches/u-boot-infodocs-target.patch new file mode 100644 index 0000000000..5b21a99de3 --- /dev/null +++ b/gnu/packages/patches/u-boot-infodocs-target.patch @@ -0,0 +1,84 @@ +Upstream status: https://patchwork.ozlabs.org/project/uboot/list/?series=333259 + +diff --git a/Makefile b/Makefile +index de5746399a..597a8886c3 100644 +--- a/Makefile ++++ b/Makefile +@@ -2372,7 +2372,7 @@ tcheck: + # Documentation targets + # --------------------------------------------------------------------------- + DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \ +- linkcheckdocs dochelp refcheckdocs ++ linkcheckdocs dochelp refcheckdocs texinfodocs infodocs + PHONY += $(DOC_TARGETS) + $(DOC_TARGETS): scripts_basic FORCE + $(Q)$(MAKE) $(build)=doc $@ +diff --git a/doc/Makefile b/doc/Makefile +index f5de65e927..d0904a9f99 100644 +--- a/doc/Makefile ++++ b/doc/Makefile +@@ -69,6 +69,14 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) + htmldocs: + @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) + ++texinfodocs: ++ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texinfo,$(var))) ++ ++# Note: the 'info' Make target is generated by sphinx itself when ++# running the texinfodocs target defined above. ++infodocs: texinfodocs ++ $(MAKE) -C $(BUILDDIR)/texinfo info ++ + linkcheckdocs: + @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var))) + +@@ -109,6 +117,8 @@ cleandocs: + dochelp: + @echo ' U-Boot documentation in different formats from ReST:' + @echo ' htmldocs - HTML' ++ @echo ' texinfodocs - Texinfo' ++ @echo ' infodocs - Info' + @echo ' latexdocs - LaTeX' + @echo ' pdfdocs - PDF' + @echo ' epubdocs - EPUB' +diff --git a/doc/conf.py b/doc/conf.py +index 62c8d31270..3db70f80c1 100644 +--- a/doc/conf.py ++++ b/doc/conf.py +@@ -449,7 +449,7 @@ for fn in os.listdir('.'): + # One entry per manual page. List of tuples + # (source start file, name, description, authors, manual section). + man_pages = [ +- (master_doc, 'dasuboot', 'The U-Boot Documentation', ++ (master_doc, 'u-boot', 'The U-Boot Documentation', + [author], 1) + ] + +@@ -463,8 +463,8 @@ man_pages = [ + # (source start file, target name, title, author, + # dir menu entry, description, category) + texinfo_documents = [ +- (master_doc, 'DasUBoot', 'The U-Boot Documentation', +- author, 'DasUBoot', 'One line description of project.', ++ (master_doc, 'u-boot', 'The U-Boot Documentation', ++ author, 'U-Boot', 'Boot loader for embedded systems', + 'Miscellaneous'), + ] + +diff --git a/doc/media/Makefile b/doc/media/Makefile +index b9b43a34c3..9b32258696 100644 +--- a/doc/media/Makefile ++++ b/doc/media/Makefile +@@ -22,10 +22,11 @@ $(BUILDDIR)/linker_lists.h.rst: ${API}/linker_lists.h ${PARSER} $(SRC_DIR)/linke + + # Media build rules + +-.PHONY: all html epub xml latex ++.PHONY: all html texinfo epub xml latex + + all: $(IMGDOT) $(BUILDDIR) ${TARGETS} + html: all ++texinfo: all + epub: all + xml: all + latex: $(IMGPDF) all