From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 20 08:21:22 2022 Received: (at 60145) by debbugs.gnu.org; 20 Dec 2022 13:21:22 +0000 Received: from localhost ([127.0.0.1]:44848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7cYb-0002C9-3L for submit@debbugs.gnu.org; Tue, 20 Dec 2022 08:21:21 -0500 Received: from mail-qt1-f179.google.com ([209.85.160.179]:38796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7cYY-0002C1-Gi for 60145@debbugs.gnu.org; Tue, 20 Dec 2022 08:21:19 -0500 Received: by mail-qt1-f179.google.com with SMTP id z12so10864371qtv.5 for <60145@debbugs.gnu.org>; Tue, 20 Dec 2022 05:21:18 -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=XmGIC7nPHNp+TzX1//jy/0TopQ6sVtrS8TVEsbNfaJA=; b=V5/FsQNnLAefuBNqvcCGlGBIAEiOqlCfSNw4nM+dV3uyD2vSTH5mKI6WvhBO/7oqeB 2xliP7+mMdrUtPD9sVrrGDR+zhAPl5yX8Vpm9SfP4ahu+85mNxkArnA1QiSG8HUlv9oT hSI3ihDPbvMOToD24SnVlUdayAk7KRPBmCV3tXkdWnAZhgiVMXG1yvHlWNvVKEdaVmzC l8tI87aoS7CeXvSGLNgqauDSkfGcTYOUeNGtsYlhstM2xWuZWh3bQP1t0j0H6CaDm/x7 FYBxkih02XxPAIYsI+RQzIfTaAEGhGeaNSXJXLVef0G+stbi1sj6VS5cyMC9i1IlhiX2 xfSQ== 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=XmGIC7nPHNp+TzX1//jy/0TopQ6sVtrS8TVEsbNfaJA=; b=uhEyDVHhfp/sj548x7l11v0fjnP7HolEIHcAtF6inps4sNmsycER3jYM96NF/dnEEL YOnNzH0GRQ/grFtgd8v0UHrqrJKvQqw5ueUd7wYvZHBDLkW4SCVe7YX6RlD+Eh2+TJCI CMhYS9m5XQGBr18z3DT4G9WxOCAAG/EZKXuviTHEt52siR1FIjDxYHqMidc/4p6GmwP6 fvaIjIWESsP8AM6F+En+vH8JUn6/NwVF4BVVtOAbm96OzEx6lmLNEIxYLPCj98GcvJbg dbitC78DBnPo5tvl0W0tWrWJH+9iAiNKt48Fu7QyAvtQ2DJ45jdbLel8vn37+0R3ToOf n9oA== X-Gm-Message-State: ANoB5pm7n0rDHNPQkxDze5KBiL1arJiWmDnwrHYyH24k4I63JPr5LR4i wyEgOH2Flkh6qUIOyLGvnPGPkfvIjHIzfg== X-Google-Smtp-Source: AA0mqf7zayui3JdE5qYbZUIi8r9AsdMiMmvpS7jJw+VyzYdXNY3+ZslVJM+4kh04yLy+byyEaq8VRA== X-Received: by 2002:ac8:4e19:0:b0:3a7:efe3:47c8 with SMTP id c25-20020ac84e19000000b003a7efe347c8mr53688473qtw.6.1671542472464; Tue, 20 Dec 2022 05:21:12 -0800 (PST) Received: from localhost.localdomain ([2607:fad8:4:3::1002]) by smtp.gmail.com with ESMTPSA id o11-20020ac872cb000000b003a4f435e381sm7550703qtp.18.2022.12.20.05.21.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 05:21:11 -0800 (PST) From: Maxim Cournoyer To: 60145@debbugs.gnu.org Subject: [PATCH v6 1/2] gnu: Add u-boot-documentation. Date: Tue, 20 Dec 2022 08:21:06 -0500 Message-Id: <20221220132107.25988-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60145 Cc: vagrant@debian.org, Maxim Cournoyer 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: -1.0 (-) * 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. --- (no changes since v5) 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 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 base-commit: f28ca2447c5e2eef1ba6a3a11587380a665b0e26 -- 2.38.1