commit:     83e926029ae787486fc19a30d517b7f6682b21f7
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 13 13:58:53 2024 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Sat Apr 13 22:55:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83e92602

app-emacs/pymacs: port to py3.12

Closes: https://bugs.gentoo.org/929304
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 app-emacs/pymacs/files/pymacs-0.26-setup.patch     | 11 ++++++++++
 ...pymacs-0.26-r4.ebuild => pymacs-0.26-r5.ebuild} | 25 +++++++++++-----------
 2 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/app-emacs/pymacs/files/pymacs-0.26-setup.patch 
b/app-emacs/pymacs/files/pymacs-0.26-setup.patch
new file mode 100644
index 000000000000..5d774b7d4dfb
--- /dev/null
+++ b/app-emacs/pymacs/files/pymacs-0.26-setup.patch
@@ -0,0 +1,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -70,7 +70,7 @@ def cfg_to_args(path='setup.cfg'):
+     config = RawConfigParser()
+     f = codecs.open(path, encoding='utf-8')
+     try:
+-        config.readfp(f)
++        config.read_file(f)
+     finally:
+         f.close()
+ 

diff --git a/app-emacs/pymacs/pymacs-0.26-r4.ebuild 
b/app-emacs/pymacs/pymacs-0.26-r5.ebuild
similarity index 71%
rename from app-emacs/pymacs/pymacs-0.26-r4.ebuild
rename to app-emacs/pymacs/pymacs-0.26-r5.ebuild
index bebfd8782b42..0cc4eacd125b 100644
--- a/app-emacs/pymacs/pymacs-0.26-r4.ebuild
+++ b/app-emacs/pymacs/pymacs-0.26-r5.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 
 inherit elisp distutils-r1
 
@@ -12,13 +12,15 @@ DESCRIPTION="A tool that allows both-side communication 
between Python and Emacs
 HOMEPAGE="https://www.emacswiki.org/emacs/PyMacs
        https://github.com/dgentry/Pymacs/";
 
-if [[ ${PV} == *9999* ]] ; then
+if [[ "${PV}" == *9999* ]] ; then
        inherit git-r3
+
        EGIT_REPO_URI="https://github.com/dgentry/${PN^}.git";
 else
        SRC_URI="https://github.com/dgentry/${PN^}/archive/v${PV}.tar.gz
                -> ${P}.tar.gz"
-       S="${WORKDIR}"/${P^}
+       S="${WORKDIR}/${P^}"
+
        KEYWORDS="amd64 arm ~hppa ~ia64 ppc ppc64 x86 ~amd64-linux ~x86-linux 
~ppc-macos"
 fi
 
@@ -33,16 +35,13 @@ BDEPEND="
        )
 "
 
-DOCS=( ${PN}.rst )
+PATCHES=( "${FILESDIR}/${PN}-0.26-setup.patch"  )
+
+DOCS=( "${PN}.rst" )
 SITEFILE="50${PN}-gentoo.el"
 
 python_configure() {
-       emake PYSETUP=: PYTHON=${EPYTHON} prepare
-}
-
-src_prepare() {
-       distutils-r1_src_prepare
-       elisp_src_prepare
+       emake PYSETUP=":" PYTHON="${EPYTHON}" prepare
 }
 
 src_compile() {
@@ -50,7 +49,7 @@ src_compile() {
        elisp_src_compile
 
        if use doc; then
-               VARTEXFONTS="${T}"/fonts emake RST2LATEX=rst2latex.py ${PN}.pdf
+               VARTEXFONTS="${T}/fonts" emake RST2LATEX="rst2latex.py" 
"${PN}.pdf"
        fi
 }
 
@@ -58,5 +57,5 @@ src_install() {
        distutils-r1_src_install
        elisp_src_install
 
-       use doc && dodoc ${PN}.pdf
+       use doc && dodoc "${PN}.pdf"
 }

Reply via email to