]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
python3-sphinxcontrib-svg2pdfconverter: add new recipe
authorQuentin Schulz <quentin.schulz@cherry.de>
Wed, 3 Dec 2025 11:32:31 +0000 (12:32 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Dec 2025 17:54:25 +0000 (17:54 +0000)
This will be a dependency for building the Yocto docs soon, so let's add
a recipe for it.

This does SVG to PDF (or PNG) conversion for images used in Sphinx
projects.

It exposes three different Sphinx extensions, each using a different
tool for the conversion:
- cairosvg, a Python module with no available recipe,
- inkscape, only available in seemingly unmaintained 3rd party layer,
- rsvg-convert,

So we'll only support the last extension for now.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/maintainers.inc
meta/recipes-devtools/python/python3-sphinxcontrib-svg2pdfconverter_2.0.0.bb [new file with mode: 0644]

index 2f1e95e499dc21461cbb4f5bcb0654369f31baad..fe317ef552f9f952b38de67eb85d593ec4a5a317 100644 (file)
@@ -734,6 +734,7 @@ RECIPE_MAINTAINER:pn-python3-sphinxcontrib-jquery = "Tim Orling <tim.orling@kons
 RECIPE_MAINTAINER:pn-python3-sphinxcontrib-jsmath = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-python3-sphinxcontrib-qthelp = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-python3-sphinxcontrib-serializinghtml = "Tim Orling <tim.orling@konsulko.com>"
+RECIPE_MAINTAINER:pn-python3-sphinxcontrib-svg2pdfconverter = "Antonin Godard <antonin.godard@bootlin.com>"
 RECIPE_MAINTAINER:pn-python3-subunit = "Trevor Gamblin <tgamblin@baylibre.com>"
 RECIPE_MAINTAINER:pn-python3-testtools = "Trevor Gamblin <tgamblin@baylibre.com>"
 RECIPE_MAINTAINER:pn-python3-trove-classifiers = "Trevor Gamblin <tgamblin@baylibre.com>"
diff --git a/meta/recipes-devtools/python/python3-sphinxcontrib-svg2pdfconverter_2.0.0.bb b/meta/recipes-devtools/python/python3-sphinxcontrib-svg2pdfconverter_2.0.0.bb
new file mode 100644 (file)
index 0000000..1bf3e55
--- /dev/null
@@ -0,0 +1,20 @@
+SUMMARY = "Sphinx SVG to PDF or PNG converter extension"
+HOMEPAGE = "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b11cf936853a71258d4b57bb1849a3f9"
+
+SRC_URI[sha256sum] = "ab9c8f1080391e231812d20abf2657a69ee35574563b1014414f953964a95fa3"
+
+inherit pypi python_setuptools_build_meta
+
+PYPI_PACKAGE = "sphinxcontrib_svg2pdfconverter"
+UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"
+
+RDEPENDS:${PN} = "python3-sphinx"
+# Only support sphinxcontrib.rsvgconverter for now.
+# sphinxcontrib.cairosvgconverter depends on cairosvg module, no recipe yet
+# sphinxcontrib.inkscapeconverter depends on inkscape, recipe in meta-office,
+# 3rd-party layer not updated in years
+RDEPENDS:${PN} += "librsvg"
+
+BBCLASSEXTEND = "native nativesdk"