commit: 96b3f267bf39929ea85abbe82e774890bbdb1a88 Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Wed May 28 21:38:18 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu May 29 19:10:49 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96b3f267
net-news/canto-curses: enable py3.12 and py3.13, fix build Closes: https://bugs.gentoo.org/875032 Closes: https://bugs.gentoo.org/944986 Closes: https://bugs.gentoo.org/952159 Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42312 Closes: https://github.com/gentoo/gentoo/pull/42312 Signed-off-by: Sam James <sam <AT> gentoo.org> net-news/canto-curses/canto-curses-0.9.9-r1.ebuild | 61 ++++++++++++++++++++++ .../canto-curses-0.9.9-drop-pipes-import.patch | 23 ++++++++ .../canto-curses-0.9.9-fix-ncurses-build.patch | 19 +++++++ 3 files changed, 103 insertions(+) diff --git a/net-news/canto-curses/canto-curses-0.9.9-r1.ebuild b/net-news/canto-curses/canto-curses-0.9.9-r1.ebuild new file mode 100644 index 000000000000..796dcd8e6fd8 --- /dev/null +++ b/net-news/canto-curses/canto-curses-0.9.9-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..13} ) +PYTHON_REQ_USE="ncurses(+),threads(+)" +inherit distutils-r1 flag-o-matic + +DESCRIPTION="The ncurses client for canto-daemon" +HOMEPAGE="https://codezen.org/canto-ng/" +SRC_URI="https://github.com/themoken/canto-curses/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RESTRICT="test" +PROPERTIES="test_network" + +DEPEND=" + sys-libs/ncurses:= + sys-libs/readline:= +" +RDEPEND=" + >=net-news/canto-daemon-0.9.1[${PYTHON_USEDEP}] + ${DEPEND} +" +BDEPEND=" + virtual/pkgconfig + test? ( ${RDEPEND} ) +" + +PATCHES=( + "${FILESDIR}"/canto-curses-0.9.9-drop-pipes-import.patch + "${FILESDIR}"/canto-curses-0.9.9-fix-ncurses-build.patch +) + +python_prepare_all() { + # https://bugs.gentoo.org/875032 + # https://github.com/themoken/canto-curses/issues/51 + append-cppflags "$($(tc-getPKG_CONFIG) --cflags-only-I ncursesw)" + + # Respect libdir during plugins installation + sed -i -e "s:lib/canto:$(get_libdir)/canto:" setup.py || die + + # Test fails because of lost site + rm tests/test-config-function.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + local test_file + for test_file in tests/*; do + "${EPYTHON}" "${test_file}" || die "Test ${test_file} failed with ${EPYTHON}" + done +} diff --git a/net-news/canto-curses/files/canto-curses-0.9.9-drop-pipes-import.patch b/net-news/canto-curses/files/canto-curses-0.9.9-drop-pipes-import.patch new file mode 100644 index 000000000000..aee21983968c --- /dev/null +++ b/net-news/canto-curses/files/canto-curses-0.9.9-drop-pipes-import.patch @@ -0,0 +1,23 @@ +https://bugs.gentoo.org/952159 +https://github.com/themoken/canto-curses/issues/57 +https://github.com/themoken/canto-curses/pull/58 +https://github.com/themoken/canto-curses/commit/74432bc3abc30bb6c606ad422d8763719d5fe817 + +From ca1cb8f4a96a6b9029e60109df252537c0ac75b6 Mon Sep 17 00:00:00 2001 +From: Narrat <[email protected]> +Date: Wed, 8 Jan 2025 22:55:35 +0100 +Subject: [PATCH] command.py: remove pipes import + +the usage of pipes got removed with https://github.com/themoken/canto-curses/commit/c6ae73061776ac7ae0d12bcd2e02ca068a8815b4 + +Closes #57 +--- a/canto_curses/command.py ++++ b/canto_curses/command.py +@@ -14,7 +14,6 @@ + import logging + import curses + import shlex +-import pipes + + import readline + diff --git a/net-news/canto-curses/files/canto-curses-0.9.9-fix-ncurses-build.patch b/net-news/canto-curses/files/canto-curses-0.9.9-fix-ncurses-build.patch new file mode 100644 index 000000000000..186587829e9e --- /dev/null +++ b/net-news/canto-curses/files/canto-curses-0.9.9-fix-ncurses-build.patch @@ -0,0 +1,19 @@ +https://bugs.gentoo.org/944986 +https://github.com/themoken/canto-curses/issues/59 +https://gitlab.archlinux.org/archlinux/packaging/packages/canto-curses/-/blob/bc6f6a6e2668798643431a2d3daa41feabb4600a/fix-build.patch + +--- canto-curses-0.9.9.orig/canto_curses/widecurse.c ++++ canto-curses-0.9.9/canto_curses/widecurse.c +@@ -6,9 +6,12 @@ + published by the Free Software Foundation. + */ + ++#define NCURSES_INTERNALS 1 + #include <Python.h> ++#include <curses.h> + #include <py_curses.h> + #include <readline/readline.h> ++#include <wchar.h> + + static PyObject *py_wcwidth(PyObject * self, PyObject * args) + {
