From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D02CA1581C1 for ; Thu, 4 Jul 2024 14:00:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0040CE2A06; Thu, 4 Jul 2024 14:00:07 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CF752E2A06 for ; Thu, 4 Jul 2024 14:00:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CA2BD34134D for ; Thu, 4 Jul 2024 14:00:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3C25B3A1 for ; Thu, 4 Jul 2024 14:00:04 +0000 (UTC) From: "Miroslav Šulc" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Miroslav Šulc" Message-ID: <1720101358.2ff43c35f7c0b91e2d1a2bb2c6ef3abfd349866d.fordfrog@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/quodlibet/files/, media-sound/quodlibet/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-sound/quodlibet/files/quodlibet-4.6.0-python312.patch media-sound/quodlibet/quodlibet-4.6.0-r2.ebuild X-VCS-Directories: media-sound/quodlibet/files/ media-sound/quodlibet/ X-VCS-Committer: fordfrog X-VCS-Committer-Name: Miroslav Šulc X-VCS-Revision: 2ff43c35f7c0b91e2d1a2bb2c6ef3abfd349866d X-VCS-Branch: master Date: Thu, 4 Jul 2024 14:00:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2e501a45-af77-4dad-a9b5-b8977ad3c47e X-Archives-Hash: c0604135ecad578d1a4507c110f76f95 commit: 2ff43c35f7c0b91e2d1a2bb2c6ef3abfd349866d Author: Alan Swanson improbability net> AuthorDate: Thu Jul 4 12:51:39 2024 +0000 Commit: Miroslav Šulc gentoo org> CommitDate: Thu Jul 4 13:55:58 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ff43c35 media-sound/quodlibet: add python3_12 support Closes: https://bugs.gentoo.org/909994 Closes: https://bugs.gentoo.org/925283 Signed-off-by: Alan Swanson improbability.net> Closes: https://github.com/gentoo/gentoo/pull/37428 Signed-off-by: Miroslav Šulc gentoo.org> .../files/quodlibet-4.6.0-python312.patch | 60 +++++++++++++++++++++ media-sound/quodlibet/quodlibet-4.6.0-r2.ebuild | 62 ++++++++++++++++++++++ 2 files changed, 122 insertions(+) diff --git a/media-sound/quodlibet/files/quodlibet-4.6.0-python312.patch b/media-sound/quodlibet/files/quodlibet-4.6.0-python312.patch new file mode 100644 index 000000000000..da781fd35523 --- /dev/null +++ b/media-sound/quodlibet/files/quodlibet-4.6.0-python312.patch @@ -0,0 +1,60 @@ +From a8b6f6bb34864a6821174edbf7802b689e440db3 Mon Sep 17 00:00:00 2001 +From: LuK1337 +Date: Wed, 23 Aug 2023 17:13:23 +0200 +Subject: [PATCH] Fix startup on Python 3.12 + +--- a/quodlibet/_import.py ++++ b/quodlibet/_import.py +@@ -8,6 +8,7 @@ + + import sys + import importlib ++import importlib.util + + + class RedirectImportHook: +@@ -31,6 +32,11 @@ def __init__(self, name, packages): + self._name = name + self._packages = packages + ++ def find_spec(self, fullname, path, target=None): ++ loader = self.find_module(fullname, path) ++ if loader is not None: ++ return importlib.util.spec_from_loader(fullname, loader) ++ + def find_module(self, fullname, path=None): + package = fullname.split(".")[0] + if package in self._packages: +--- a/quodlibet/util/config.py ++++ b/quodlibet/util/config.py +@@ -377,7 +377,7 @@ def read(self, filename): + with open(filename, "rb") as fileobj: + fileobj = StringIO( + fileobj.read().decode("utf-8", "surrogateescape")) +- self._config.readfp(fileobj, filename) ++ self._config.read_file(fileobj, filename) + except (IOError, OSError): + return + +--- a/quodlibet/util/importhelper.py ++++ b/quodlibet/util/importhelper.py +@@ -92,8 +92,8 @@ def load_module(name, package, path): + except KeyError: + pass + +- loader = importlib.find_loader(fullname, [path]) +- if loader is None: ++ spec = importlib.machinery.PathFinder.find_spec(fullname, [path]) ++ if spec is None: + return + + # modules need a parent package +@@ -101,7 +101,7 @@ def load_module(name, package, path): + spec = importlib.machinery.ModuleSpec(package, None, is_package=True) + sys.modules[package] = importlib.util.module_from_spec(spec) + +- mod = loader.load_module(fullname) ++ mod = spec.loader.load_module(fullname) + + # make it accessible from the parent, like __import__ does + vars(sys.modules[package])[name] = mod diff --git a/media-sound/quodlibet/quodlibet-4.6.0-r2.ebuild b/media-sound/quodlibet/quodlibet-4.6.0-r2.ebuild new file mode 100644 index 000000000000..fdcc5f87bc22 --- /dev/null +++ b/media-sound/quodlibet/quodlibet-4.6.0-r2.ebuild @@ -0,0 +1,62 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..12} ) +DISTUTILS_USE_PEP517=setuptools +inherit distutils-r1 xdg + +DESCRIPTION="audio library tagger, manager, and player for GTK+" +HOMEPAGE="https://quodlibet.readthedocs.io/" +SRC_URI="https://github.com/${PN}/${PN}/archive/release-${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="+dbus gstreamer +udev" + +RDEPEND="dev-libs/keybinder:3[introspection] + dev-python/feedparser[${PYTHON_USEDEP}] + dev-python/pygobject:3[${PYTHON_USEDEP}] + media-libs/mutagen[${PYTHON_USEDEP}] + net-libs/libsoup:3.0[introspection] + x11-libs/gtk+[introspection] + gstreamer? ( + media-libs/gstreamer:1.0 + media-libs/gst-plugins-base:1.0 + media-libs/gst-plugins-good:1.0 + media-plugins/gst-plugins-meta:1.0 + ) + !gstreamer? ( media-libs/xine-lib ) + dbus? ( + app-misc/media-player-info + dev-python/dbus-python[${PYTHON_USEDEP}] + ) + udev? ( virtual/udev )" +DEPEND="dev-util/intltool" + +S="${WORKDIR}/${PN}-release-${PV}" + +PATCHES=( + "${FILESDIR}/${PN}-4.6.0-python312.patch" +) + +src_prepare() { + local qlconfig=quodlibet/config.py + + if ! use gstreamer; then + sed -i -e '/backend/s:gstbe:xinebe:' ${qlconfig} || die + fi + + sed -i -e '/gst_pipeline/s:"":"alsasink":' ${qlconfig} || die + + distutils-r1_src_prepare +} + +src_install() { + distutils-r1_src_install + dodoc README.rst + + # fix location of desktop file + mv "${ED}/usr/share/appdata" "${ED}/usr/share/metainfo" || die "Failed to fix desktop file location" +}