aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Torokhov <torokhov-s-a@yandex.ru>2023-02-02 00:13:31 +0300
committerSergey Torokhov <torokhov-s-a@yandex.ru>2023-02-02 00:13:31 +0300
commit0fe0c37ab956c18cdf5c62b815d957e462aae40c (patch)
treede66ab97dc5209505bd1f2fd1b7b1500724ff9b3 /app-doc
parentgui-apps/wl-scripts: add 1.0.3, drop 1.0.0 (diff)
downloadguru-0fe0c37ab956c18cdf5c62b815d957e462aae40c.tar.gz
guru-0fe0c37ab956c18cdf5c62b815d957e462aae40c.tar.bz2
guru-0fe0c37ab956c18cdf5c62b815d957e462aae40c.zip
app-doc/ford: add Python3.11 compat.
Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
Diffstat (limited to 'app-doc')
-rw-r--r--app-doc/ford/files/ford-6.1.17_fix_python3.11_tests.patch22
-rw-r--r--app-doc/ford/ford-6.1.17-r1.ebuild45
2 files changed, 67 insertions, 0 deletions
diff --git a/app-doc/ford/files/ford-6.1.17_fix_python3.11_tests.patch b/app-doc/ford/files/ford-6.1.17_fix_python3.11_tests.patch
new file mode 100644
index 000000000..6fb3c832c
--- /dev/null
+++ b/app-doc/ford/files/ford-6.1.17_fix_python3.11_tests.patch
@@ -0,0 +1,22 @@
+From 67b1355fea6904dc8ea540a6cfaa6164dc3a1a23 Mon Sep 17 00:00:00 2001
+From: Peter Hill <peter.hill@york.ac.uk>
+Date: Tue, 24 Jan 2023 10:54:10 +0000
+Subject: [PATCH] Fix test for Python 3.11 (mutable default not allowed)
+
+---
+ test/test_sourceform.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/test_sourceform.py b/test/test_sourceform.py
+index 4e6c9d3..f3a67c9 100644
+--- a/test/test_sourceform.py
++++ b/test/test_sourceform.py
+@@ -790,7 +790,7 @@ class FakeParent:
+ class FakeVariable:
+ name: str
+ vartype: str
+- parent: Optional[FakeParent] = FakeParent()
++ parent: Optional[FakeParent] = field(default_factory=FakeParent)
+ attribs: Optional[List[str]] = field(default_factory=list)
+ intent: str = ""
+ optional: bool = False
diff --git a/app-doc/ford/ford-6.1.17-r1.ebuild b/app-doc/ford/ford-6.1.17-r1.ebuild
new file mode 100644
index 000000000..004286456
--- /dev/null
+++ b/app-doc/ford/ford-6.1.17-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1 toolchain-funcs
+
+MY_PN="FORD"
+DESCRIPTION="FORD, automatic documentation generator for modern Fortran programs"
+HOMEPAGE="https://github.com/Fortran-FOSS-Programmers/ford"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+RDEPEND="
+ dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+ >=dev-python/graphviz-0.20[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ >=dev-python/markdown-3.4[${PYTHON_USEDEP}]
+ >=dev-python/markdown-include-0.7.0[${PYTHON_USEDEP}]
+ >=dev-python/pygments-2.12.0[${PYTHON_USEDEP}]
+ dev-python/python-markdown-math[${PYTHON_USEDEP}]
+ >=dev-python/tqdm-4.64.0[${PYTHON_USEDEP}]
+ >=dev-python/toposort-1.7[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}_fix_python3.11_tests.patch" )
+
+DOCS=( CHANGELOG.md README.md )
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ default
+ sed -i -e 's/"cpp /"'"$(tc-getCPP)"' /' ford/__init__.py || die # bug: 839300
+}