1 |
commit: 82e55d83028f8d2c25d1ad14dd72c12ea6b979c8 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 14 19:01:18 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 14 19:07:13 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82e55d83 |
7 |
|
8 |
kde-frameworks/extra-cmake-modules: Fix IUSE=doc w/ dev-python/sphinx-4 |
9 |
|
10 |
See also: https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/121 |
11 |
|
12 |
Closes: https://bugs.gentoo.org/789096 |
13 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
.../extra-cmake-modules-5.82.0.ebuild | 15 ++-- |
17 |
.../extra-cmake-modules-5.82.0-sphinx-4.patch | 81 ++++++++++++++++++++++ |
18 |
2 files changed, 91 insertions(+), 5 deletions(-) |
19 |
|
20 |
diff --git a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.82.0.ebuild b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.82.0.ebuild |
21 |
index 6bd09789c61..41f98627db4 100644 |
22 |
--- a/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.82.0.ebuild |
23 |
+++ b/kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.82.0.ebuild |
24 |
@@ -16,10 +16,16 @@ IUSE="doc test" |
25 |
|
26 |
RESTRICT+=" !test? ( test )" |
27 |
|
28 |
+RDEPEND=" |
29 |
+ app-arch/libarchive[bzip2] |
30 |
+" |
31 |
BDEPEND=" |
32 |
doc? ( |
33 |
${PYTHON_DEPS} |
34 |
- $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') |
35 |
+ $(python_gen_any_dep ' |
36 |
+ dev-python/sphinx[${PYTHON_USEDEP}] |
37 |
+ dev-python/sphinxcontrib-qthelp[${PYTHON_USEDEP}] |
38 |
+ ') |
39 |
>=dev-qt/qthelp-${QTMIN}:5 |
40 |
) |
41 |
test? ( |
42 |
@@ -27,18 +33,17 @@ BDEPEND=" |
43 |
>=dev-qt/qtcore-${QTMIN}:5 |
44 |
) |
45 |
" |
46 |
-RDEPEND=" |
47 |
- app-arch/libarchive[bzip2] |
48 |
-" |
49 |
|
50 |
PATCHES=( |
51 |
"${FILESDIR}/${PN}-5.49.0-no-fatal-warnings.patch" |
52 |
"${FILESDIR}/${PN}-5.72.0-skip-ecm_add_test-early.patch" |
53 |
"${FILESDIR}/${PN}-5.74.0-disable-qmlplugindump.patch" |
54 |
+ "${FILESDIR}/${P}-sphinx-4.patch" # bug 789096, pending upstream MR 121 |
55 |
) |
56 |
|
57 |
python_check_deps() { |
58 |
- has_version "dev-python/sphinx[${PYTHON_USEDEP}]" |
59 |
+ has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && |
60 |
+ has_version "dev-python/sphinxcontrib-qthelp[${PYTHON_USEDEP}]" |
61 |
} |
62 |
|
63 |
pkg_setup() { |
64 |
|
65 |
diff --git a/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.82.0-sphinx-4.patch b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.82.0-sphinx-4.patch |
66 |
new file mode 100644 |
67 |
index 00000000000..7ccd024affc |
68 |
--- /dev/null |
69 |
+++ b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.82.0-sphinx-4.patch |
70 |
@@ -0,0 +1,81 @@ |
71 |
+From 02abfc3695b71e05e3d5df83514f50ec0ab60bdf Mon Sep 17 00:00:00 2001 |
72 |
+From: Antonio Rojas <arojas@×××××××××.org> |
73 |
+Date: Fri, 14 May 2021 20:42:02 +0200 |
74 |
+Subject: [PATCH] Fix doc build with Sphinx 4 |
75 |
+ |
76 |
+Port away from removed functions. In particular, port to the new index structure which was introduced in 1.4 (released november 2016). |
77 |
+Also account for the new default location of built man pages. |
78 |
+ |
79 |
+BUG: 436818 |
80 |
+--- |
81 |
+ docs/CMakeLists.txt | 3 ++- |
82 |
+ docs/sphinx/ext/ecm.py | 13 ++++++++----- |
83 |
+ 2 files changed, 10 insertions(+), 6 deletions(-) |
84 |
+ |
85 |
+diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt |
86 |
+index 84cca9ea..32687b64 100644 |
87 |
+--- a/docs/CMakeLists.txt |
88 |
++++ b/docs/CMakeLists.txt |
89 |
+@@ -110,7 +110,8 @@ if(BUILD_MAN_DOCS) |
90 |
+ set(name "${CMAKE_MATCH_1}") |
91 |
+ set(sec "${CMAKE_MATCH_2}") |
92 |
+ install( |
93 |
+- FILES ${CMAKE_CURRENT_BINARY_DIR}/man/${name}.${sec} |
94 |
++ FILES ${CMAKE_CURRENT_BINARY_DIR}/man/${name}.${sec} ${CMAKE_CURRENT_BINARY_DIR}/man/${sec}/${name}.${sec} |
95 |
++ OPTIONAL |
96 |
+ DESTINATION ${MAN_INSTALL_DIR}/man${sec} |
97 |
+ ) |
98 |
+ endif() |
99 |
+diff --git a/docs/sphinx/ext/ecm.py b/docs/sphinx/ext/ecm.py |
100 |
+index 8667b367..a09e4890 100644 |
101 |
+--- a/docs/sphinx/ext/ecm.py |
102 |
++++ b/docs/sphinx/ext/ecm.py |
103 |
+@@ -5,6 +5,7 @@ |
104 |
+ # |
105 |
+ # SPDX-License-Identifier: BSD-3-Clause |
106 |
+ |
107 |
++import html |
108 |
+ import os |
109 |
+ import re |
110 |
+ |
111 |
+@@ -19,8 +20,11 @@ CMakeLexer.tokens["args"].append(('(\\$<)(.+?)(>)', |
112 |
+ |
113 |
+ # Monkey patch for sphinx generating invalid content for qcollectiongenerator |
114 |
+ # https://bitbucket.org/birkenfeld/sphinx/issue/1435/qthelp-builder-should-htmlescape-keywords |
115 |
+-from sphinx.util.pycompat import htmlescape |
116 |
+-from sphinx.builders.qthelp import QtHelpBuilder |
117 |
++try: |
118 |
++ from sphinxcontrib.qthelp import QtHelpBuilder |
119 |
++except ImportError: |
120 |
++ # sphinx < 4.0 |
121 |
++ from sphinx.builders.qthelp import QtHelpBuilder |
122 |
+ old_build_keywords = QtHelpBuilder.build_keywords |
123 |
+ def new_build_keywords(self, title, refs, subitems): |
124 |
+ old_items = old_build_keywords(self, title, refs, subitems) |
125 |
+@@ -29,13 +33,12 @@ def new_build_keywords(self, title, refs, subitems): |
126 |
+ before, rest = item.split("ref=\"", 1) |
127 |
+ ref, after = rest.split("\"") |
128 |
+ if ("<" in ref and ">" in ref): |
129 |
+- new_items.append(before + "ref=\"" + htmlescape(ref) + "\"" + after) |
130 |
++ new_items.append(before + "ref=\"" + html.escape(ref) + "\"" + after) |
131 |
+ else: |
132 |
+ new_items.append(item) |
133 |
+ return new_items |
134 |
+ QtHelpBuilder.build_keywords = new_build_keywords |
135 |
+ |
136 |
+- |
137 |
+ from docutils.parsers.rst import Directive, directives |
138 |
+ from docutils.transforms import Transform |
139 |
+ try: |
140 |
+@@ -127,7 +130,7 @@ class _ecm_index_entry: |
141 |
+ self.desc = desc |
142 |
+ |
143 |
+ def __call__(self, title, targetid): |
144 |
+- return ('pair', u'%s ; %s' % (self.desc, title), targetid, 'main') |
145 |
++ return ('pair', u'%s ; %s' % (self.desc, title), targetid, 'main', None) |
146 |
+ |
147 |
+ _ecm_index_objs = { |
148 |
+ 'manual': _ecm_index_entry('manual'), |
149 |
+-- |
150 |
+GitLab |
151 |
+ |