From a7f702306f726d09523d64fa04b413cd47c71dbf Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Thu, 10 Nov 2022 14:25:12 -0500 Subject: [PATCH 1/3] boost: add patch to support Python 3.11. --- .../boost/patches/Py_TPFLAGS_HAVE_GC.patch | 35 +++++++++++++++++++ srcpkgs/boost/template | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/boost/patches/Py_TPFLAGS_HAVE_GC.patch diff --git a/srcpkgs/boost/patches/Py_TPFLAGS_HAVE_GC.patch b/srcpkgs/boost/patches/Py_TPFLAGS_HAVE_GC.patch new file mode 100644 index 000000000000..53659904ba03 --- /dev/null +++ b/srcpkgs/boost/patches/Py_TPFLAGS_HAVE_GC.patch @@ -0,0 +1,35 @@ +From ae5da2a7e8f1111757d8a474095486a5b22aa12d Mon Sep 17 00:00:00 2001 +From: Victor Stinner +Date: Mon, 25 Apr 2022 10:51:46 +0200 +Subject: [PATCH] Fix enum_type_object type on Python 3.11 + +The enum_type_object type inherits from PyLong_Type which is not tracked +by the GC. Instances doesn't have to be tracked by the GC: remove the +Py_TPFLAGS_HAVE_GC flag. + +The Python C API documentation says: + + "To create a container type, the tp_flags field of the type object + must include the Py_TPFLAGS_HAVE_GC and provide an implementation of + the tp_traverse handler." + +https://docs.python.org/dev/c-api/gcsupport.html + +The new exception was introduced in Python 3.11 by: +https://github.com/python/cpython/issues/88429 +--- + libs/python/src/object/enum.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/object/enum.cpp b/src/object/enum.cpp +index 293e705899..5753b32e07 100644 +--- a/libs/python/src/object/enum.cpp ++++ b/libs/python/src/object/enum.cpp +@@ -113,7 +113,6 @@ static PyTypeObject enum_type_object = { + #if PY_VERSION_HEX < 0x03000000 + | Py_TPFLAGS_CHECKTYPES + #endif +- | Py_TPFLAGS_HAVE_GC + | Py_TPFLAGS_BASETYPE, /* tp_flags */ + 0, /* tp_doc */ + 0, /* tp_traverse */ diff --git a/srcpkgs/boost/template b/srcpkgs/boost/template index a3da2dc4ca2e..fb01417cea1d 100644 --- a/srcpkgs/boost/template +++ b/srcpkgs/boost/template @@ -1,7 +1,7 @@ # Template file for 'boost' pkgname=boost version=1.80.0 -revision=5 +revision=6 hostmakedepends="which bzip2-devel icu-devel python3-devel pkg-config" makedepends="zlib-devel bzip2-devel icu-devel python3-devel liblzma-devel libzstd-devel" From cfd23260a8cf712115347485036c5042b352fb09 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Thu, 10 Nov 2022 14:27:36 -0500 Subject: [PATCH 2/3] libtorrent-rasterbar: rebuild to support Python 3.11. --- srcpkgs/libtorrent-rasterbar/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/libtorrent-rasterbar/template b/srcpkgs/libtorrent-rasterbar/template index 4d325a46f53c..bbb945a01409 100644 --- a/srcpkgs/libtorrent-rasterbar/template +++ b/srcpkgs/libtorrent-rasterbar/template @@ -2,7 +2,7 @@ # Breaks ABI/API without changing soname, revbump all dependants pkgname=libtorrent-rasterbar version=1.2.17 -revision=4 +revision=5 build_style=cmake configure_args="DCMAKE_CXX_STANDARD=14 -Dbuild_examples=ON -Dbuild_tools=ON -Dpython-bindings=ON" From cfe5af17ffdc542a0950d27fea60fccb4133ee75 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Thu, 10 Nov 2022 14:25:34 -0500 Subject: [PATCH 3/3] deluge: update to 2.1.1. --- srcpkgs/deluge/template | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/srcpkgs/deluge/template b/srcpkgs/deluge/template index 6ac544ff9fa6..0fbbccf2a43c 100644 --- a/srcpkgs/deluge/template +++ b/srcpkgs/deluge/template @@ -1,22 +1,21 @@ # Template file for 'deluge' pkgname=deluge -version=2.0.5 -revision=3 +version=2.1.1 +revision=1 build_style=python3-module # TODO package python3-slimit to minify javascript hostmakedepends="intltool python3-setuptools python3-wheel" depends="python3-setuptools python3-chardet python3-Twisted python3-Mako python3-xdg python3-rencode python3-setproctitle libtorrent-rasterbar-python3 python3-Pillow python3-pyasn1 python3-openssl python3-six python3-zope.interface" -checkdepends="python3-pytest $depends python3-pytest-mock python3-mock gtk+3 - python3-gobject xvfb-run cantarell-fonts" short_desc="Fully-featured cross-platform BitTorrent client" maintainer="Alexey Rochev " license="GPL-3.0-or-later" homepage="https://deluge-torrent.org/" changelog="https://raw.githubusercontent.com/deluge-torrent/deluge/develop/CHANGELOG.md" -distfiles="https://ftp.osuosl.org/pub/deluge/source/2.0/deluge-${version}.tar.xz" -checksum=c4bd04abfd211b65218be03f3c46d26f44024884de10e01859fb856fdd6f25d8 +distfiles="https://ftp.osuosl.org/pub/deluge/source/2.1/deluge-${version}.tar.xz" +checksum=768dd319802e42437ab3794ebe75b497142e08ed5b0fb2503bad62cef442dff7 +make_check=no # requires unpackaged pytest_twisted system_accounts="deluge" deluge_homedir="/var/lib/deluge" @@ -27,11 +26,6 @@ make_dirs=" /var/lib/deluge/.config/deluge 0755 deluge deluge " -do_check() { - rm deluge/tests/test_torrentview.py deluge/tests/test_files_tab.py - xvfb-run python3 -m pytest -} - post_install() { vsv deluged }