From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1281934-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id DEF471382C5
	for <garchives@archives.gentoo.org>; Fri, 14 May 2021 19:07:33 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 2481FE0896;
	Fri, 14 May 2021 19:07:33 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id F19A4E0896
	for <gentoo-commits@lists.gentoo.org>; Fri, 14 May 2021 19:07:32 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 6064A335CF4
	for <gentoo-commits@lists.gentoo.org>; Fri, 14 May 2021 19:07:31 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id B6E82644
	for <gentoo-commits@lists.gentoo.org>; Fri, 14 May 2021 19:07:29 +0000 (UTC)
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org>
Message-ID: <1621019233.82e55d83028f8d2c25d1ad14dd72c12ea6b979c8.asturm@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/extra-cmake-modules/files/, kde-frameworks/extra-cmake-modules/
X-VCS-Repository: repo/gentoo
X-VCS-Files: kde-frameworks/extra-cmake-modules/extra-cmake-modules-5.82.0.ebuild kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.82.0-sphinx-4.patch
X-VCS-Directories: kde-frameworks/extra-cmake-modules/files/ kde-frameworks/extra-cmake-modules/
X-VCS-Committer: asturm
X-VCS-Committer-Name: Andreas Sturmlechner
X-VCS-Revision: 82e55d83028f8d2c25d1ad14dd72c12ea6b979c8
X-VCS-Branch: master
Date: Fri, 14 May 2021 19:07:29 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: b99b3516-3e16-48f0-b4e2-e554c90c18bc
X-Archives-Hash: 907846fc3c93170d7ea9efcd8dc48276

commit:     82e55d83028f8d2c25d1ad14dd72c12ea6b979c8
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri May 14 19:01:18 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri May 14 19:07:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82e55d83

kde-frameworks/extra-cmake-modules: Fix IUSE=doc w/ dev-python/sphinx-4

See also: https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/121

Closes: https://bugs.gentoo.org/789096
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../extra-cmake-modules-5.82.0.ebuild              | 15 ++--
 .../extra-cmake-modules-5.82.0-sphinx-4.patch      | 81 ++++++++++++++++++++++
 2 files changed, 91 insertions(+), 5 deletions(-)

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
index 6bd09789c61..41f98627db4 100644
--- 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
@@ -16,10 +16,16 @@ IUSE="doc test"
 
 RESTRICT+=" !test? ( test )"
 
+RDEPEND="
+	app-arch/libarchive[bzip2]
+"
 BDEPEND="
 	doc? (
 		${PYTHON_DEPS}
-		$(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]')
+		$(python_gen_any_dep '
+			dev-python/sphinx[${PYTHON_USEDEP}]
+			dev-python/sphinxcontrib-qthelp[${PYTHON_USEDEP}]
+		')
 		>=dev-qt/qthelp-${QTMIN}:5
 	)
 	test? (
@@ -27,18 +33,17 @@ BDEPEND="
 		>=dev-qt/qtcore-${QTMIN}:5
 	)
 "
-RDEPEND="
-	app-arch/libarchive[bzip2]
-"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-5.49.0-no-fatal-warnings.patch"
 	"${FILESDIR}/${PN}-5.72.0-skip-ecm_add_test-early.patch"
 	"${FILESDIR}/${PN}-5.74.0-disable-qmlplugindump.patch"
+	"${FILESDIR}/${P}-sphinx-4.patch" # bug 789096, pending upstream MR 121
 )
 
 python_check_deps() {
-	has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
+	has_version "dev-python/sphinx[${PYTHON_USEDEP}]" &&
+	has_version "dev-python/sphinxcontrib-qthelp[${PYTHON_USEDEP}]"
 }
 
 pkg_setup() {

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
new file mode 100644
index 00000000000..7ccd024affc
--- /dev/null
+++ b/kde-frameworks/extra-cmake-modules/files/extra-cmake-modules-5.82.0-sphinx-4.patch
@@ -0,0 +1,81 @@
+From 02abfc3695b71e05e3d5df83514f50ec0ab60bdf Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Fri, 14 May 2021 20:42:02 +0200
+Subject: [PATCH] Fix doc build with Sphinx 4
+
+Port away from removed functions. In particular, port to the new index structure which was introduced in 1.4 (released november 2016).
+Also account for the new default location of built man pages.
+
+BUG: 436818
+---
+ docs/CMakeLists.txt    |  3 ++-
+ docs/sphinx/ext/ecm.py | 13 ++++++++-----
+ 2 files changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
+index 84cca9ea..32687b64 100644
+--- a/docs/CMakeLists.txt
++++ b/docs/CMakeLists.txt
+@@ -110,7 +110,8 @@ if(BUILD_MAN_DOCS)
+             set(name "${CMAKE_MATCH_1}")
+             set(sec "${CMAKE_MATCH_2}")
+             install(
+-                FILES ${CMAKE_CURRENT_BINARY_DIR}/man/${name}.${sec}
++                FILES ${CMAKE_CURRENT_BINARY_DIR}/man/${name}.${sec} ${CMAKE_CURRENT_BINARY_DIR}/man/${sec}/${name}.${sec}
++                OPTIONAL
+                 DESTINATION ${MAN_INSTALL_DIR}/man${sec}
+             )
+         endif()
+diff --git a/docs/sphinx/ext/ecm.py b/docs/sphinx/ext/ecm.py
+index 8667b367..a09e4890 100644
+--- a/docs/sphinx/ext/ecm.py
++++ b/docs/sphinx/ext/ecm.py
+@@ -5,6 +5,7 @@
+ #
+ # SPDX-License-Identifier: BSD-3-Clause
+ 
++import html
+ import os
+ import re
+ 
+@@ -19,8 +20,11 @@ CMakeLexer.tokens["args"].append(('(\\$<)(.+?)(>)',
+ 
+ # Monkey patch for sphinx generating invalid content for qcollectiongenerator
+ # https://bitbucket.org/birkenfeld/sphinx/issue/1435/qthelp-builder-should-htmlescape-keywords
+-from sphinx.util.pycompat import htmlescape
+-from sphinx.builders.qthelp import QtHelpBuilder
++try:
++  from sphinxcontrib.qthelp import QtHelpBuilder
++except ImportError:
++  # sphinx < 4.0
++  from sphinx.builders.qthelp import QtHelpBuilder
+ old_build_keywords = QtHelpBuilder.build_keywords
+ def new_build_keywords(self, title, refs, subitems):
+   old_items = old_build_keywords(self, title, refs, subitems)
+@@ -29,13 +33,12 @@ def new_build_keywords(self, title, refs, subitems):
+     before, rest = item.split("ref=\"", 1)
+     ref, after = rest.split("\"")
+     if ("<" in ref and ">" in ref):
+-      new_items.append(before + "ref=\"" + htmlescape(ref) + "\"" + after)
++      new_items.append(before + "ref=\"" + html.escape(ref) + "\"" + after)
+     else:
+       new_items.append(item)
+   return new_items
+ QtHelpBuilder.build_keywords = new_build_keywords
+ 
+-
+ from docutils.parsers.rst import Directive, directives
+ from docutils.transforms import Transform
+ try:
+@@ -127,7 +130,7 @@ class _ecm_index_entry:
+         self.desc = desc
+ 
+     def __call__(self, title, targetid):
+-        return ('pair', u'%s ; %s' % (self.desc, title), targetid, 'main')
++        return ('pair', u'%s ; %s' % (self.desc, title), targetid, 'main', None)
+ 
+ _ecm_index_objs = {
+     'manual':      _ecm_index_entry('manual'),
+-- 
+GitLab
+