commit:     ba59c6b3f69a5053649a2f8e47146a48bdd2a437
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri May  5 05:05:13 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May  5 05:05:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba59c6b3

dev-python/pycairo: fix build w/ USE=doc

Thanks to Chris Mayo.

Closes: https://bugs.gentoo.org/890411
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../pycairo/files/pycairo-1.23.0-fix-sphinx.patch  | 28 ++++++++++++++++++++++
 dev-python/pycairo/pycairo-1.23.0.ebuild           |  4 ++++
 2 files changed, 32 insertions(+)

diff --git a/dev-python/pycairo/files/pycairo-1.23.0-fix-sphinx.patch 
b/dev-python/pycairo/files/pycairo-1.23.0-fix-sphinx.patch
new file mode 100644
index 000000000000..a86dd935e482
--- /dev/null
+++ b/dev-python/pycairo/files/pycairo-1.23.0-fix-sphinx.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/890411
+https://github.com/pygobject/pycairo/pull/318
+
+From 9e78bd1acbaef6659dbe3076934ed779eac27a96 Mon Sep 17 00:00:00 2001
+From: Chris Mayo <[email protected]>
+Date: Sun, 23 Apr 2023 19:44:26 +0100
+Subject: [PATCH] docs: Fix build failure due to extlinks with Sphinx 6
+
+extlinks caption must be None or contain one %s.
+
+Compatible with Sphinx >= 4.0.
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -48,10 +48,10 @@ def exec_module(path):
+ ]
+ 
+ extlinks = {
+-    'fdobug': ('https://bugs.freedesktop.org/show_bug.cgi?id=%s', '#fdo-'),
+-    'bug': ('https://github.com/pygobject/pycairo/issues/%s', '#'),
+-    'pr': ('https://github.com/pygobject/pycairo/pull/%s', '#pr-'),
+-    'user': ('https://github.com/%s', ''),
++    'fdobug': ('https://bugs.freedesktop.org/show_bug.cgi?id=%s', '#fdo-%s'),
++    'bug': ('https://github.com/pygobject/pycairo/issues/%s', '#%s'),
++    'pr': ('https://github.com/pygobject/pycairo/pull/%s', '#pr-%s'),
++    'user': ('https://github.com/%s', '%s'),
+ }
+ suppress_warnings = ["image.nonlocal_uri"]
+ 

diff --git a/dev-python/pycairo/pycairo-1.23.0.ebuild 
b/dev-python/pycairo/pycairo-1.23.0.ebuild
index 9794a33c7be1..79497ecd3bc0 100644
--- a/dev-python/pycairo/pycairo-1.23.0.ebuild
+++ b/dev-python/pycairo/pycairo-1.23.0.ebuild
@@ -38,6 +38,10 @@ DEPEND="
        x11-base/xorg-proto
 "
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.23.0-fix-sphinx.patch
+)
+
 distutils_enable_sphinx docs \
        dev-python/sphinx-rtd-theme
 distutils_enable_tests pytest

Reply via email to