diff options
author | Mike Pagano <mpagano@gentoo.org> | 2023-04-04 15:04:12 -0400 |
---|---|---|
committer | Mike Pagano <mpagano@gentoo.org> | 2023-04-04 15:04:12 -0400 |
commit | 2d1d858bf3a2128044351453fa2a35928ff5f845 (patch) | |
tree | 802f13aba59c924c98b4266d5b51233fb18358f8 /sys-kernel/linux-docs | |
parent | dev-lang/vala: Version bump to 0.56.6 (diff) | |
download | gentoo-2d1d858bf3a2128044351453fa2a35928ff5f845.tar.gz gentoo-2d1d858bf3a2128044351453fa2a35928ff5f845.tar.bz2 gentoo-2d1d858bf3a2128044351453fa2a35928ff5f845.zip |
sys-kernel/linux-docs: add 5.15.105 and patch for sphinx 6.0
Closes: https://bugs.gentoo.org/902759
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Diffstat (limited to 'sys-kernel/linux-docs')
-rw-r--r-- | sys-kernel/linux-docs/files/linux-docs-sphinx-6.0.patch | 46 | ||||
-rw-r--r-- | sys-kernel/linux-docs/linux-docs-5.15.105.ebuild | 49 |
2 files changed, 95 insertions, 0 deletions
diff --git a/sys-kernel/linux-docs/files/linux-docs-sphinx-6.0.patch b/sys-kernel/linux-docs/files/linux-docs-sphinx-6.0.patch new file mode 100644 index 000000000000..0a81dd1858d5 --- /dev/null +++ b/sys-kernel/linux-docs/files/linux-docs-sphinx-6.0.patch @@ -0,0 +1,46 @@ +From 0283189e8f3d0917e2ac399688df85211f48447b Mon Sep 17 00:00:00 2001 +From: Jonathan Corbet <corbet@lwn.net> +Date: Wed, 4 Jan 2023 10:47:39 -0700 +Subject: [PATCH] docs: Fix the docs build with Sphinx 6.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Sphinx 6.0 removed the execfile_() function, which we use as part of the +configuration process. They *did* warn us... Just open-code the +functionality as is done in Sphinx itself. + +Tested (using SPHINX_CONF, since this code is only executed with an +alternative config file) on various Sphinx versions from 2.5 through 6.0. + +Reported-by: Martin Liška <mliska@suse.cz> +Cc: stable@vger.kernel.org +Signed-off-by: Jonathan Corbet <corbet@lwn.net> +--- + Documentation/sphinx/load_config.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/Documentation/sphinx/load_config.py b/Documentation/sphinx/load_config.py +index eeb394b39e2cc8..8b416bfd75ac17 100644 +--- a/Documentation/sphinx/load_config.py ++++ b/Documentation/sphinx/load_config.py +@@ -3,7 +3,7 @@ + + import os + import sys +-from sphinx.util.pycompat import execfile_ ++from sphinx.util.osutil import fs_encoding + + # ------------------------------------------------------------------------------ + def loadConfig(namespace): +@@ -48,7 +48,9 @@ def loadConfig(namespace): + sys.stdout.write("load additional sphinx-config: %s\n" % config_file) + config = namespace.copy() + config['__file__'] = config_file +- execfile_(config_file, config) ++ with open(config_file, 'rb') as f: ++ code = compile(f.read(), fs_encoding, 'exec') ++ exec(code, config) + del config['__file__'] + namespace.update(config) + else: diff --git a/sys-kernel/linux-docs/linux-docs-5.15.105.ebuild b/sys-kernel/linux-docs/linux-docs-5.15.105.ebuild new file mode 100644 index 000000000000..724c5fd6cd1a --- /dev/null +++ b/sys-kernel/linux-docs/linux-docs-5.15.105.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{9,10,11} ) +inherit linux-info python-any-r1 toolchain-funcs + +MY_PV="$(ver_cut 1-2)" +MY_P=linux-${MY_PV} + +S=${WORKDIR}/${MY_P} + +DESCRIPTION="Developer documentation generated from the Linux kernel" +HOMEPAGE="https://www.kernel.org/" +SRC_URI="https://www.kernel.org/pub/linux/kernel/v5.x/${MY_P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sparc ~x86" + +IUSE="graphviz" + +DEPEND="" +RDEPEND="graphviz? ( >=media-gfx/graphviz-5.0.0 )" +BDEPEND="${PYTHON_DEPS} + >=dev-python/sphinx-6 + dev-python/sphinx-rtd-theme + media-libs/fontconfig" + +PATCHES=( + "${FILESDIR}/${PN}-sphinx-6.0.patch" +) + +src_prepare() { + default + # Fix the Python shebangs. + python_fix_shebang "${S}/Documentation/sphinx/" +} + +src_compile() { + local ARCH="$(tc-arch-kernel)" + unset KBUILD_OUTPUT + HTML_DOCS=( Documentation/output/. ) + emake htmldocs +} + +src_install() { + einstalldocs +} |