public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/, dev-python/pygame/files/
@ 2022-02-13  9:42 Michał Górny
  0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2022-02-13  9:42 UTC (permalink / raw
  To: gentoo-commits

commit:     908b0505c9c1e316ec2b6b74f730890253982d0b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 13 09:42:14 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Feb 13 09:42:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=908b0505

dev-python/pygame: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pygame/Manifest                         |   8 --
 .../pygame/files/pygame-2.0.0_pre10-py39.patch     |  34 -------
 dev-python/pygame/pygame-1.9.6-r1.ebuild           | 102 ---------------------
 dev-python/pygame/pygame-2.0.0.ebuild              |  91 ------------------
 dev-python/pygame/pygame-2.0.0_pre10.ebuild        |  85 -----------------
 dev-python/pygame/pygame-2.0.1-r1.ebuild           |  96 -------------------
 dev-python/pygame/pygame-2.0.2.ebuild              |  91 ------------------
 dev-python/pygame/pygame-2.0.3.ebuild              |  91 ------------------
 dev-python/pygame/pygame-2.1.0.ebuild              |  91 ------------------
 dev-python/pygame/pygame-2.1.1.ebuild              |  91 ------------------
 10 files changed, 780 deletions(-)

diff --git a/dev-python/pygame/Manifest b/dev-python/pygame/Manifest
index 6abf32207f2e..fa5cbe30c92f 100644
--- a/dev-python/pygame/Manifest
+++ b/dev-python/pygame/Manifest
@@ -1,9 +1 @@
-DIST pygame-1.9.6.tar.gz 3223131 BLAKE2B a4d04c933fcad244d32bd512ef8717e60ec923f361e9e0296b5c7d57c5949d3434a040d028249c5b8f3c865ac3dcdbb32e6f0b223186678595a8625213ba2a17 SHA512 d923c554203a7c35e37921658cb4c5bf50215ab0ff4d2b869a1ee6b2e2ca31d66ec4bbde4287f5a777838ffe932cd15b993cb0224b86e43d684de61c35acbcd0
-DIST pygame-2.0.0.dev10.tar.gz 5567274 BLAKE2B 7d78f260318cfabeb33f1073ae210f890d2f772e3ef302f243cca67724c6012355644ba60d4cae6de72db6dd61d320177deff6ee83dd355ec4cc33e841b565f7 SHA512 4cee7599fd8a6d31ddd66bfaad3bbb67cb167c1ae339f37e83322d810fea8746e81a191c224a0eeb6cc43a64bf1730ff0886c82f1a4f642e2e656ca9a837bf9e
-DIST pygame-2.0.0.tar.gz 5522621 BLAKE2B 49773979af53595d3ff2db1a18e4bcd217e26db3ec28d6129d2a588f23a1bd5326fa79fab32c25aa796738cde0e68f5741bee58f62432e86f89cd49ee17a8f14 SHA512 3f65924d0e1d2863b84118a4e468b521a289e2cf174405c6f3ee2b2a2ed399cde7f9f310d57c4166351f84caaea02dd7408ee852dbcee7c205bb2955b6078fda
-DIST pygame-2.0.1.tar.gz 5536907 BLAKE2B b27cb9001499a00da62dac0486a72079ff4e60ca609be444b04f547cb2372090da91d2670307ce7068b964458e6ac1284402439bb7809c9735135d5e93a71d78 SHA512 1535a872c43e5f75acdfa7d325fcfa0f0f826e18602b28b228cfdbe068a382678c21568d80873f7af4f0b318e693adb38afa4d632f8294f716a47188abe5245a
-DIST pygame-2.0.2.tar.gz 6309459 BLAKE2B 0cb23b4226d8d86f938cba08b67ab3bd847c9e4122f5f6cce4d8810b239df672ab282e1b77dd7d71423f805c7c0418e54050347dfb9e506b799eb8e0b4f16856 SHA512 2cef4669e5bd81759c9886293ebc1b82e1ed3b4576a3632437f66cb353af330e15dd39e7378f2be8fd25838f202529dc550208a031aec77e1d05443a070638c8
-DIST pygame-2.0.3.tar.gz 5804279 BLAKE2B fb58dd57a9288bdff3c0d01389e363968ebddd4b2b0fa92335c825297026c5858da4f73a870f84e0c3c7cf302bd9f4163807c97a348d581658df7e7695fcb4fb SHA512 1d2b4cb1e577f0244c2b92511b8fa0ab7bcd689d04a4451ced41e6d97758ba380d7e681e60abed26c81b96bd49d505cf481c67a466437b3cfdb547e744f22949
-DIST pygame-2.1.0.tar.gz 5790847 BLAKE2B 1d2fc9f8d86ab823008cbb4c7431f44dd17ba5b356ed755a308737eb5a0db3c4033efe3fd4245bd740a33c6f4e5d2816daefc3785c747ef046b8f98aa8f58589 SHA512 b9394bea5dad54760297c75133ca56c99f89781340029f8866b169fcef3a7e12c16d00a18dd95f4fe3c13e393915d5b29b8d547465efb94f84b4875579166f1a
-DIST pygame-2.1.1.tar.gz 10132023 BLAKE2B 41f6beb02ada13208d71375f15e247c785261801f82dfc47dba22a28692b5aea01072e46f2fd281451ce778d5818812c74776bd791d47d465645fdef63ffefec SHA512 eea4be27bbf29cfeb98fb095121341e1366fed1cc1f3c16bb076adbd2f1c8583e51d34b93811259a80ea3e2a3bde83c8144e91cd83a7dde3cf730805c0b99ac3
 DIST pygame-2.1.2.gh.tar.gz 6100415 BLAKE2B 4b81c2f0abc2c2c4732ddb8f8e6d4bffa5169e3d3ee2d9ea2798d294623a9c70e2ff004825030606285124ef1347177b46adc676db450785e8420de45f37db34 SHA512 531cb0371853def7a3ddb8eb0110fbd58acaf1b2351d7518402c9a960baca705bb34da879015e7a6cd5f2f8af98c57e7bc732021a8f62ed9f90cacf068c9c2d6

diff --git a/dev-python/pygame/files/pygame-2.0.0_pre10-py39.patch b/dev-python/pygame/files/pygame-2.0.0_pre10-py39.patch
deleted file mode 100644
index 9cfaa476db39..000000000000
--- a/dev-python/pygame/files/pygame-2.0.0_pre10-py39.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 159908e5726c3df5df58429d1ff3113137c57f98 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Mon, 8 Jun 2020 09:35:41 +0200
-Subject: [PATCH] Replace long-deprecated Thread.isAlive() with .is_alive()
-
-Replace Thread.isAlive() calls with Thread.is_alive() to fix
-compatibility with Python 3.9.  The new method was present since py2.6,
-the old one got deprecated in py3.1 and was finally removed in py3.9.
----
- test/threads_test.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/test/threads_test.py b/test/threads_test.py
-index 300f6a9c6..59ab5d488 100644
---- a/test/threads_test.py
-+++ b/test/threads_test.py
-@@ -41,7 +41,7 @@ def test_stop(self):
-         self.assertGreater(len(wq.pool), 0)
- 
-         for t in wq.pool:
--            self.assertTrue(t.isAlive())
-+            self.assertTrue(t.is_alive())
- 
-         for i in xrange_(200):
-             wq.do(lambda x: x + 1, i)
-@@ -49,7 +49,7 @@ def test_stop(self):
-         wq.stop()
- 
-         for t in wq.pool:
--            self.assertFalse(t.isAlive())
-+            self.assertFalse(t.is_alive())
- 
-         self.assertIs(wq.queue.get(), STOP)
- 

diff --git a/dev-python/pygame/pygame-1.9.6-r1.ebuild b/dev-python/pygame/pygame-1.9.6-r1.ebuild
deleted file mode 100644
index b18281a37212..000000000000
--- a/dev-python/pygame/pygame-1.9.6-r1.ebuild
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit flag-o-matic distutils-r1
-
-DESCRIPTION="Python bindings for SDL multimedia library"
-HOMEPAGE="https://www.pygame.org/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
-IUSE="doc examples midi opengl test X"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
-	>=media-libs/sdl-image-1.2.2[png,jpeg]
-	>=media-libs/sdl-mixer-1.2.4
-	>=media-libs/sdl-ttf-2.0.6
-	>=media-libs/smpeg-0.4.4-r1
-	midi? ( media-libs/portmidi )
-	X? ( >=media-libs/libsdl-1.2.5[opengl?,video,X] )
-	!X? ( >=media-libs/libsdl-1.2.5 )"
-DEPEND="${RDEPEND}
-	test? (
-		media-libs/sdl-image[gif,png,jpeg]
-		media-libs/sdl-mixer[mp3,vorbis,wav]
-	)"
-# fontconfig used for fc-list
-RDEPEND+="
-	media-libs/fontconfig"
-# util-linux provides script
-BDEPEND="
-	test? (
-		media-libs/fontconfig
-		sys-apps/util-linux
-	)"
-
-src_prepare() {
-	# segfaults on Xvfb
-	rm test/scrap_test.py || die
-	# backport from git master (clock() isn't used)
-	sed -i -e '/from time import clock/d' test/math_test.py || die
-
-	distutils-r1_src_prepare
-}
-
-python_configure() {
-	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
-		"${EPYTHON}" "${S}"/buildconfig/config.py -auto
-
-	if ! use X; then
-		sed -e "s:^scrap :#&:" -i Setup || die "sed failed"
-	fi
-
-	# Disable automagic dependency on PortMidi.
-	if ! use midi; then
-		sed -e "s:^pypm :#&:" -i Setup || die "sed failed"
-	fi
-}
-
-python_compile() {
-	if [[ ${EPYTHON} == python2* ]]; then
-		local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
-
-		append-flags -fno-strict-aliasing
-	fi
-
-	distutils-r1_python_compile
-}
-
-python_test() {
-	local -x PYTHONPATH=
-	local -x SDL_VIDEODRIVER=dummy
-	local -x SDL_AUDIODRIVER=disk
-	distutils_install_for_testing
-	script -eqc "${EPYTHON} -m pygame.tests" || die
-}
-
-python_install() {
-	distutils-r1_python_install
-
-	# Bug #497720
-	rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	if use doc; then
-		docinto html
-		dodoc -r docs/*
-	fi
-
-	if use examples; then
-		insinto /usr/share/doc/${PF}/examples
-		doins -r examples/*
-	fi
-}

diff --git a/dev-python/pygame/pygame-2.0.0.ebuild b/dev-python/pygame/pygame-2.0.0.ebuild
deleted file mode 100644
index 1e1458e2d897..000000000000
--- a/dev-python/pygame/pygame-2.0.0.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit distutils-r1
-
-MY_PV=${PV/_pre/.dev}
-MY_P=${PN}-${MY_PV}
-
-DESCRIPTION="Python bindings for SDL multimedia library"
-HOMEPAGE="https://www.pygame.org/"
-SRC_URI="
-	https://github.com/pygame/pygame/releases/download/${MY_PV}/${MY_P}.tar.gz"
-S=${WORKDIR}/${MY_P}
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ~ppc64 sparc x86"
-IUSE="doc examples midi opengl test X"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
-	media-libs/freetype
-	>=media-libs/sdl2-image-1.2.2
-	>=media-libs/sdl2-mixer-1.2.4
-	>=media-libs/sdl2-ttf-2.0.6
-	>=media-libs/smpeg2-0.4.4-r1
-	midi? ( media-libs/portmidi )
-	X? ( >=media-libs/libsdl2-1.2.5[opengl?,threads,video,X] )
-	!X? ( >=media-libs/libsdl2-1.2.5[threads] )"
-DEPEND="${RDEPEND}
-	test? (
-		media-libs/sdl2-image[gif,jpeg,png]
-		media-libs/sdl2-mixer[mp3,vorbis,wav]
-	)"
-# fontconfig used for fc-list
-RDEPEND+="
-	media-libs/fontconfig"
-# util-linux provides script
-BDEPEND="
-	test? (
-		media-libs/fontconfig
-		sys-apps/util-linux
-	)"
-
-src_prepare() {
-	if ! use midi; then
-		rm test/midi_test.py || die
-	fi
-	distutils-r1_src_prepare
-}
-
-python_configure() {
-	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
-		"${EPYTHON}" "${S}"/buildconfig/config.py -auto || die
-
-	# Disable automagic dependency on PortMidi.
-	if ! use midi; then
-		sed -e "s:^pypm :#&:" -i Setup || die "sed failed"
-	fi
-}
-
-python_test() {
-	local -x PYTHONPATH=${BUILD_DIR}/install/lib
-	local -x SDL_VIDEODRIVER=dummy
-	local -x SDL_AUDIODRIVER=disk
-	esetup.py install \
-		--root="${BUILD_DIR}"/install \
-		--install-lib=lib
-	script -eqc "${EPYTHON} -m pygame.tests" || die
-}
-
-python_install() {
-	distutils-r1_python_install
-
-	# Bug #497720
-	rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	if use doc; then
-		docinto html
-		dodoc -r docs/*
-	fi
-
-	use examples && dodoc -r examples
-}

diff --git a/dev-python/pygame/pygame-2.0.0_pre10.ebuild b/dev-python/pygame/pygame-2.0.0_pre10.ebuild
deleted file mode 100644
index e85dbd4d2996..000000000000
--- a/dev-python/pygame/pygame-2.0.0_pre10.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit distutils-r1
-
-MY_PV=${PV/_pre/.dev}
-MY_P=${PN}-${MY_PV}
-
-DESCRIPTION="Python bindings for SDL multimedia library"
-HOMEPAGE="https://www.pygame.org/"
-SRC_URI="
-	https://github.com/pygame/pygame/releases/download/${MY_PV}/${MY_P}.tar.gz"
-S=${WORKDIR}/${MY_P}
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ~ppc64 sparc x86"
-IUSE="doc examples midi opengl test X"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
-	>=media-libs/sdl2-image-1.2.2
-	>=media-libs/sdl2-mixer-1.2.4
-	>=media-libs/sdl2-ttf-2.0.6
-	>=media-libs/smpeg2-0.4.4-r1
-	midi? ( media-libs/portmidi )
-	X? ( >=media-libs/libsdl2-1.2.5[opengl?,video,X] )
-	!X? ( >=media-libs/libsdl2-1.2.5 )"
-DEPEND="${RDEPEND}
-	test? (
-		media-libs/sdl2-image[gif,jpeg,png]
-		media-libs/sdl2-mixer[mp3,vorbis,wav]
-	)"
-# fontconfig used for fc-list
-RDEPEND+="
-	media-libs/fontconfig"
-# util-linux provides script
-BDEPEND="
-	test? (
-		media-libs/fontconfig
-		sys-apps/util-linux
-	)"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-py39.patch
-)
-
-python_configure() {
-	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
-		"${EPYTHON}" "${S}"/buildconfig/config.py -auto || die
-
-	# Disable automagic dependency on PortMidi.
-	if ! use midi; then
-		sed -e "s:^pypm :#&:" -i Setup || die "sed failed"
-	fi
-}
-
-python_test() {
-	local -x PYTHONPATH=
-	local -x SDL_VIDEODRIVER=dummy
-	local -x SDL_AUDIODRIVER=disk
-	distutils_install_for_testing
-	script -eqc "${EPYTHON} -m pygame.tests" || die
-}
-
-python_install() {
-	distutils-r1_python_install
-
-	# Bug #497720
-	rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	if use doc; then
-		docinto html
-		dodoc -r docs/*
-	fi
-
-	use examples && dodoc -r examples
-}

diff --git a/dev-python/pygame/pygame-2.0.1-r1.ebuild b/dev-python/pygame/pygame-2.0.1-r1.ebuild
deleted file mode 100644
index b8c0c5f73b53..000000000000
--- a/dev-python/pygame/pygame-2.0.1-r1.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit distutils-r1
-
-MY_PV=${PV/_pre/.dev}
-MY_P=${PN}-${MY_PV}
-
-DESCRIPTION="Python bindings for SDL multimedia library"
-HOMEPAGE="https://www.pygame.org/"
-SRC_URI="
-	https://github.com/pygame/pygame/releases/download/${MY_PV}/${MY_P}.tar.gz"
-S=${WORKDIR}/${MY_P}
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ~ppc64 ~sparc x86"
-IUSE="doc examples midi opengl test X"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
-	media-libs/freetype
-	media-libs/libpng:0=
-	>=media-libs/sdl2-image-1.2.2
-	>=media-libs/sdl2-mixer-1.2.4
-	>=media-libs/sdl2-ttf-2.0.6
-	>=media-libs/smpeg2-0.4.4-r1
-	virtual/jpeg
-	midi? ( media-libs/portmidi )
-	X? ( >=media-libs/libsdl2-1.2.5[opengl?,threads,video,X] )
-	!X? ( >=media-libs/libsdl2-1.2.5[threads] )"
-DEPEND="${RDEPEND}
-	test? (
-		media-libs/sdl2-image[gif,jpeg,png]
-		media-libs/sdl2-mixer[mp3,vorbis,wav]
-	)"
-# fontconfig used for fc-list
-RDEPEND+="
-	media-libs/fontconfig"
-# util-linux provides script
-BDEPEND="
-	test? (
-		media-libs/fontconfig
-		sys-apps/util-linux
-	)"
-
-src_prepare() {
-	if ! use midi; then
-		rm test/midi_test.py || die
-	fi
-	# Fixed in next release
-	sed -e 's/++Py_REFCNT/Py_INCREF/' \
-		-e 's/--Py_REFCNT/Py_DECREF/' \
-		-i src_c/_sdl2/*.c || die
-	distutils-r1_src_prepare
-}
-
-python_configure() {
-	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
-		"${EPYTHON}" "${S}"/buildconfig/config.py -auto || die
-
-	# Disable automagic dependency on PortMidi.
-	if ! use midi; then
-		sed -e "s:^pypm :#&:" -i Setup || die "sed failed"
-	fi
-}
-
-python_test() {
-	local -x PYTHONPATH=${BUILD_DIR}/install/lib
-	local -x SDL_VIDEODRIVER=dummy
-	local -x SDL_AUDIODRIVER=disk
-	distutils_install_for_testing --via-root
-	script -eqc "${EPYTHON} -m pygame.tests" || die
-}
-
-python_install() {
-	distutils-r1_python_install
-
-	# Bug #497720
-	rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	if use doc; then
-		docinto html
-		dodoc -r docs/*
-	fi
-
-	use examples && dodoc -r examples
-}

diff --git a/dev-python/pygame/pygame-2.0.2.ebuild b/dev-python/pygame/pygame-2.0.2.ebuild
deleted file mode 100644
index 1ee94dd33f0e..000000000000
--- a/dev-python/pygame/pygame-2.0.2.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1
-
-MY_PV=${PV/_pre/.dev}
-MY_P=${PN}-${MY_PV}
-
-DESCRIPTION="Python bindings for SDL multimedia library"
-HOMEPAGE="https://www.pygame.org/"
-SRC_URI="
-	https://github.com/pygame/pygame/releases/download/${MY_PV}/${MY_P}.tar.gz"
-S=${WORKDIR}/${MY_P}
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE="doc examples midi opengl test X"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
-	media-libs/freetype
-	media-libs/libpng:0=
-	>=media-libs/sdl2-image-1.2.2
-	>=media-libs/sdl2-mixer-1.2.4
-	>=media-libs/sdl2-ttf-2.0.6
-	>=media-libs/smpeg2-0.4.4-r1
-	virtual/jpeg
-	midi? ( media-libs/portmidi )
-	X? ( >=media-libs/libsdl2-1.2.5[opengl?,threads,video,X] )
-	!X? ( >=media-libs/libsdl2-1.2.5[threads] )"
-DEPEND="${RDEPEND}
-	test? (
-		media-libs/sdl2-image[gif,jpeg,png]
-		media-libs/sdl2-mixer[mp3,vorbis,wav]
-	)"
-# fontconfig used for fc-list
-RDEPEND+="
-	media-libs/fontconfig"
-# util-linux provides script
-BDEPEND="
-	test? (
-		media-libs/fontconfig
-		sys-apps/util-linux
-	)"
-
-src_prepare() {
-	if ! use midi; then
-		rm test/midi_test.py || die
-	fi
-	distutils-r1_src_prepare
-}
-
-python_configure() {
-	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
-		"${EPYTHON}" "${S}"/buildconfig/config.py -auto || die
-
-	# Disable automagic dependency on PortMidi.
-	if ! use midi; then
-		sed -e "s:^pypm :#&:" -i Setup || die "sed failed"
-	fi
-}
-
-python_test() {
-	local -x PYTHONPATH=${BUILD_DIR}/install/lib
-	local -x SDL_VIDEODRIVER=dummy
-	local -x SDL_AUDIODRIVER=disk
-	distutils_install_for_testing --via-root
-	script -eqc "${EPYTHON} -m pygame.tests" || die
-}
-
-python_install() {
-	distutils-r1_python_install
-
-	# Bug #497720
-	rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	if use doc; then
-		docinto html
-		dodoc -r docs/*
-	fi
-
-	use examples && dodoc -r examples
-}

diff --git a/dev-python/pygame/pygame-2.0.3.ebuild b/dev-python/pygame/pygame-2.0.3.ebuild
deleted file mode 100644
index 1ee94dd33f0e..000000000000
--- a/dev-python/pygame/pygame-2.0.3.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1
-
-MY_PV=${PV/_pre/.dev}
-MY_P=${PN}-${MY_PV}
-
-DESCRIPTION="Python bindings for SDL multimedia library"
-HOMEPAGE="https://www.pygame.org/"
-SRC_URI="
-	https://github.com/pygame/pygame/releases/download/${MY_PV}/${MY_P}.tar.gz"
-S=${WORKDIR}/${MY_P}
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE="doc examples midi opengl test X"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
-	media-libs/freetype
-	media-libs/libpng:0=
-	>=media-libs/sdl2-image-1.2.2
-	>=media-libs/sdl2-mixer-1.2.4
-	>=media-libs/sdl2-ttf-2.0.6
-	>=media-libs/smpeg2-0.4.4-r1
-	virtual/jpeg
-	midi? ( media-libs/portmidi )
-	X? ( >=media-libs/libsdl2-1.2.5[opengl?,threads,video,X] )
-	!X? ( >=media-libs/libsdl2-1.2.5[threads] )"
-DEPEND="${RDEPEND}
-	test? (
-		media-libs/sdl2-image[gif,jpeg,png]
-		media-libs/sdl2-mixer[mp3,vorbis,wav]
-	)"
-# fontconfig used for fc-list
-RDEPEND+="
-	media-libs/fontconfig"
-# util-linux provides script
-BDEPEND="
-	test? (
-		media-libs/fontconfig
-		sys-apps/util-linux
-	)"
-
-src_prepare() {
-	if ! use midi; then
-		rm test/midi_test.py || die
-	fi
-	distutils-r1_src_prepare
-}
-
-python_configure() {
-	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
-		"${EPYTHON}" "${S}"/buildconfig/config.py -auto || die
-
-	# Disable automagic dependency on PortMidi.
-	if ! use midi; then
-		sed -e "s:^pypm :#&:" -i Setup || die "sed failed"
-	fi
-}
-
-python_test() {
-	local -x PYTHONPATH=${BUILD_DIR}/install/lib
-	local -x SDL_VIDEODRIVER=dummy
-	local -x SDL_AUDIODRIVER=disk
-	distutils_install_for_testing --via-root
-	script -eqc "${EPYTHON} -m pygame.tests" || die
-}
-
-python_install() {
-	distutils-r1_python_install
-
-	# Bug #497720
-	rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	if use doc; then
-		docinto html
-		dodoc -r docs/*
-	fi
-
-	use examples && dodoc -r examples
-}

diff --git a/dev-python/pygame/pygame-2.1.0.ebuild b/dev-python/pygame/pygame-2.1.0.ebuild
deleted file mode 100644
index 105b520dc82d..000000000000
--- a/dev-python/pygame/pygame-2.1.0.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1
-
-MY_PV=${PV/_pre/.dev}
-MY_P=${PN}-${MY_PV}
-
-DESCRIPTION="Python bindings for SDL multimedia library"
-HOMEPAGE="https://www.pygame.org/"
-SRC_URI="
-	https://github.com/pygame/pygame/releases/download/${MY_PV}/${MY_P}.tar.gz"
-S=${WORKDIR}/${MY_P}
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ppc64 ~sparc ~x86"
-IUSE="doc examples midi opengl test X"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
-	media-libs/freetype
-	media-libs/libpng:0=
-	>=media-libs/sdl2-image-1.2.2
-	>=media-libs/sdl2-mixer-1.2.4
-	>=media-libs/sdl2-ttf-2.0.6
-	>=media-libs/smpeg2-0.4.4-r1
-	virtual/jpeg
-	midi? ( media-libs/portmidi )
-	X? ( >=media-libs/libsdl2-1.2.5[opengl?,threads,video,X] )
-	!X? ( >=media-libs/libsdl2-1.2.5[threads] )"
-DEPEND="${RDEPEND}
-	test? (
-		media-libs/sdl2-image[gif,jpeg,png]
-		media-libs/sdl2-mixer[mp3,vorbis,wav]
-	)"
-# fontconfig used for fc-list
-RDEPEND+="
-	media-libs/fontconfig"
-# util-linux provides script
-BDEPEND="
-	test? (
-		media-libs/fontconfig
-		sys-apps/util-linux
-	)"
-
-src_prepare() {
-	if ! use midi; then
-		rm test/midi_test.py || die
-	fi
-	distutils-r1_src_prepare
-}
-
-python_configure() {
-	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
-		"${EPYTHON}" "${S}"/buildconfig/config.py -auto || die
-
-	# Disable automagic dependency on PortMidi.
-	if ! use midi; then
-		sed -e "s:^pypm :#&:" -i Setup || die "sed failed"
-	fi
-}
-
-python_test() {
-	local -x PYTHONPATH=${BUILD_DIR}/install/lib
-	local -x SDL_VIDEODRIVER=dummy
-	local -x SDL_AUDIODRIVER=disk
-	distutils_install_for_testing --via-root
-	script -eqc "${EPYTHON} -m pygame.tests" || die
-}
-
-python_install() {
-	distutils-r1_python_install
-
-	# Bug #497720
-	rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	if use doc; then
-		docinto html
-		dodoc -r docs/*
-	fi
-
-	use examples && dodoc -r examples
-}

diff --git a/dev-python/pygame/pygame-2.1.1.ebuild b/dev-python/pygame/pygame-2.1.1.ebuild
deleted file mode 100644
index 1ee94dd33f0e..000000000000
--- a/dev-python/pygame/pygame-2.1.1.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1
-
-MY_PV=${PV/_pre/.dev}
-MY_P=${PN}-${MY_PV}
-
-DESCRIPTION="Python bindings for SDL multimedia library"
-HOMEPAGE="https://www.pygame.org/"
-SRC_URI="
-	https://github.com/pygame/pygame/releases/download/${MY_PV}/${MY_P}.tar.gz"
-S=${WORKDIR}/${MY_P}
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE="doc examples midi opengl test X"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
-	media-libs/freetype
-	media-libs/libpng:0=
-	>=media-libs/sdl2-image-1.2.2
-	>=media-libs/sdl2-mixer-1.2.4
-	>=media-libs/sdl2-ttf-2.0.6
-	>=media-libs/smpeg2-0.4.4-r1
-	virtual/jpeg
-	midi? ( media-libs/portmidi )
-	X? ( >=media-libs/libsdl2-1.2.5[opengl?,threads,video,X] )
-	!X? ( >=media-libs/libsdl2-1.2.5[threads] )"
-DEPEND="${RDEPEND}
-	test? (
-		media-libs/sdl2-image[gif,jpeg,png]
-		media-libs/sdl2-mixer[mp3,vorbis,wav]
-	)"
-# fontconfig used for fc-list
-RDEPEND+="
-	media-libs/fontconfig"
-# util-linux provides script
-BDEPEND="
-	test? (
-		media-libs/fontconfig
-		sys-apps/util-linux
-	)"
-
-src_prepare() {
-	if ! use midi; then
-		rm test/midi_test.py || die
-	fi
-	distutils-r1_src_prepare
-}
-
-python_configure() {
-	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
-		"${EPYTHON}" "${S}"/buildconfig/config.py -auto || die
-
-	# Disable automagic dependency on PortMidi.
-	if ! use midi; then
-		sed -e "s:^pypm :#&:" -i Setup || die "sed failed"
-	fi
-}
-
-python_test() {
-	local -x PYTHONPATH=${BUILD_DIR}/install/lib
-	local -x SDL_VIDEODRIVER=dummy
-	local -x SDL_AUDIODRIVER=disk
-	distutils_install_for_testing --via-root
-	script -eqc "${EPYTHON} -m pygame.tests" || die
-}
-
-python_install() {
-	distutils-r1_python_install
-
-	# Bug #497720
-	rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	if use doc; then
-		docinto html
-		dodoc -r docs/*
-	fi
-
-	use examples && dodoc -r examples
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/, dev-python/pygame/files/
@ 2023-01-17  6:03 Ionen Wolkens
  0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2023-01-17  6:03 UTC (permalink / raw
  To: gentoo-commits

commit:     ddcb6ceca54163321fc50de50e2d333d628f3a27
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 17 01:06:30 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Jan 17 05:54:32 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddcb6cec

dev-python/pygame: enable py3.11, cythonize, adjust deps

For 3.11, meant to wait for next release that was supposed to
happen "soon" and have 3.11 fixes but that was about 3 months
ago and it's blocking adding 3.11 to other packages.

Tests pass on amd64 and tried a few games, afaik only real
issue was that it lacked cythonize which should be done
regardless of a new release.

wrt deps:
* add missing [webp] to test deps (used for 1 test)
* replace deprecated virtual/jpeg
* drop unused smpeg2 (no reference to smpeg in the source I can see)
* drop ancient version checks

Revbump to ~arch as a precaution, albeit unlikely cythonize
is going to cause any trouble.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../pygame/files/pygame-2.1.2-cython_only.patch    | 36 ++++++++
 dev-python/pygame/pygame-2.1.2-r2.ebuild           | 95 ++++++++++++++++++++++
 2 files changed, 131 insertions(+)

diff --git a/dev-python/pygame/files/pygame-2.1.2-cython_only.patch b/dev-python/pygame/files/pygame-2.1.2-cython_only.patch
new file mode 100644
index 000000000000..4fb935dcf668
--- /dev/null
+++ b/dev-python/pygame/files/pygame-2.1.2-cython_only.patch
@@ -0,0 +1,36 @@
+Backport to ease running cythonize, DISTUTILS_ARGS=(cython) resulted in
+reconfigure attempts that failed without PORTMIDI* being exported.
+
+https://github.com/pygame/pygame/commit/4eeffc049cf
+From: Ankith <46915066+ankith26@users.noreply.github.com>
+Date: Fri, 3 Jun 2022 21:27:57 +0530
+Subject: [PATCH] Add cython_only option to setup.py
+--- a/setup.py
++++ b/setup.py
+@@ -209,7 +209,16 @@ def consume_arg(name):
+     cflags += '-mfpu=neon'
+     os.environ['CFLAGS'] = cflags
+ 
++compile_cython = False
++cython_only = False
+ if consume_arg('cython'):
++    compile_cython = True
++
++if consume_arg('cython_only'):
++    compile_cython = True
++    cython_only = True
++
++if compile_cython:
+     # compile .pyx files
+     # So you can `setup.py cython` or `setup.py cython install`
+     try:
+@@ -280,6 +289,9 @@ def consume_arg(name):
+     for i, kwargs in enumerate(queue):
+         kwargs['progress'] = f'[{i + 1}/{count}] '
+         cythonize_one(**kwargs)
++    
++    if cython_only:
++        sys.exit(0)
+ 
+ no_compilation = any(x in ['lint', 'format', 'docs'] for x in sys.argv)
+ AUTO_CONFIG = not os.path.isfile('Setup') and not no_compilation

diff --git a/dev-python/pygame/pygame-2.1.2-r2.ebuild b/dev-python/pygame/pygame-2.1.2-r2.ebuild
new file mode 100644
index 000000000000..c6f10a469b75
--- /dev/null
+++ b/dev-python/pygame/pygame-2.1.2-r2.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python bindings for SDL multimedia library"
+HOMEPAGE="https://www.pygame.org/"
+SRC_URI="
+	https://github.com/pygame/pygame/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="examples midi opengl test X"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	dev-python/numpy[${PYTHON_USEDEP}]
+	media-libs/freetype
+	media-libs/libjpeg-turbo:=
+	media-libs/libpng:=
+	media-libs/sdl2-image
+	media-libs/sdl2-mixer
+	media-libs/sdl2-ttf
+	midi? ( media-libs/portmidi )
+	X? ( media-libs/libsdl2[opengl?,threads,video,X] )
+	!X? ( media-libs/libsdl2[threads] )"
+DEPEND="
+	${RDEPEND}
+	test? (
+		media-libs/sdl2-image[gif,jpeg,png,tiff,webp]
+		media-libs/sdl2-mixer[mp3,vorbis,wav]
+	)"
+# fontconfig used for fc-list
+RDEPEND+="
+	media-libs/fontconfig"
+# util-linux provides script
+BDEPEND="
+	dev-python/cython[${PYTHON_USEDEP}]
+	test? (
+		media-libs/fontconfig
+		sys-apps/util-linux
+	)"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-libsdl2-2.26-tests.patch
+	"${FILESDIR}"/${P}-cython_only.patch
+)
+
+src_prepare() {
+	distutils-r1_src_prepare
+
+	if ! use midi; then
+		rm test/midi_test.py || die
+	fi
+}
+
+python_configure() {
+	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
+		"${EPYTHON}" "${S}"/buildconfig/config.py -auto || die
+
+	# Disable automagic dependency on PortMidi.
+	if ! use midi; then
+		sed -e "s:^pypm :#&:" -i Setup || die
+	fi
+}
+
+python_configure_all() {
+	find src_c/cython -name '*.pyx' -exec touch {} + || die
+	"${EPYTHON}" setup.py cython_only || die
+}
+
+python_test() {
+	local -x PYTHONPATH=${BUILD_DIR}/install/lib
+	local -x SDL_VIDEODRIVER=dummy
+	local -x SDL_AUDIODRIVER=disk
+	script -eqc "${EPYTHON} -m pygame.tests -v" || die
+}
+
+python_install() {
+	distutils-r1_python_install
+
+	# Bug #497720
+	rm -fr "${D}$(python_get_sitedir)"/pygame/{docs,examples,tests}/ || die
+}
+
+python_install_all() {
+	distutils-r1_python_install_all
+	use examples && dodoc -r examples
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/, dev-python/pygame/files/
@ 2023-01-17  6:03 Ionen Wolkens
  0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2023-01-17  6:03 UTC (permalink / raw
  To: gentoo-commits

commit:     fc91679f86f1d32bfcc6a298d4e4169c52617cad
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 17 04:46:50 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Jan 17 05:54:32 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc91679f

dev-python/pygame: backport test fix for >=libsdl2-2.26.0

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../pygame/files/pygame-2.1.2-libsdl2-2.26-tests.patch  | 17 +++++++++++++++++
 dev-python/pygame/pygame-2.1.2-r1.ebuild                |  4 ++++
 2 files changed, 21 insertions(+)

diff --git a/dev-python/pygame/files/pygame-2.1.2-libsdl2-2.26-tests.patch b/dev-python/pygame/files/pygame-2.1.2-libsdl2-2.26-tests.patch
new file mode 100644
index 000000000000..e231d1bf6d85
--- /dev/null
+++ b/dev-python/pygame/files/pygame-2.1.2-libsdl2-2.26-tests.patch
@@ -0,0 +1,17 @@
+https://github.com/pygame/pygame/commit/420c1a7341
+From: Starbuck5 <46412508+Starbuck5@users.noreply.github.com>
+Date: Sat, 19 Nov 2022 21:17:32 -0800
+Subject: [PATCH] Adjust surface masks to create a proper 24 bit Surface
+
+The SDL 2.26.0 pre-release rejects a 24 bit Surface created with this mask, which is the right call, as it needs 32 bits of space. Older SDL went ahead and created a 32 bit surface anyway, which it probably shouldn't have.
+--- a/test/surface_test.py
++++ b/test/surface_test.py
+@@ -2023,7 +2023,7 @@ def test_get_losses(self):
+             mask8 = (224, 28, 3, 0)
+             mask15 = (31744, 992, 31, 0)
+             mask16 = (63488, 2016, 31, 0)
+-            mask24 = (4278190080, 16711680, 65280, 0)
++            mask24 = (16711680, 65280, 255, 0)
+             mask32 = (4278190080, 16711680, 65280, 255)
+ 
+             # Surfaces with standard depths and masks

diff --git a/dev-python/pygame/pygame-2.1.2-r1.ebuild b/dev-python/pygame/pygame-2.1.2-r1.ebuild
index bf858b684edb..c7b3c066375a 100644
--- a/dev-python/pygame/pygame-2.1.2-r1.ebuild
+++ b/dev-python/pygame/pygame-2.1.2-r1.ebuild
@@ -45,6 +45,10 @@ BDEPEND="
 		sys-apps/util-linux
 	)"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-libsdl2-2.26-tests.patch
+)
+
 src_prepare() {
 	if ! use midi; then
 		rm test/midi_test.py || die


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/, dev-python/pygame/files/
@ 2023-07-17 19:32 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2023-07-17 19:32 UTC (permalink / raw
  To: gentoo-commits

commit:     ed15f0c65780be87b0d69979625a88f00fda7a0d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 17 19:30:15 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul 17 19:31:11 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed15f0c6

dev-python/pygame: backport cython-3 fix for 2.5.0-r1

Closes: https://bugs.gentoo.org/898704
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../pygame/files/pygame-2.5.0-cython-3.patch       | 214 +++++++++++++++++++++
 dev-python/pygame/pygame-2.5.0-r1.ebuild           |  92 +++++++++
 2 files changed, 306 insertions(+)

diff --git a/dev-python/pygame/files/pygame-2.5.0-cython-3.patch b/dev-python/pygame/files/pygame-2.5.0-cython-3.patch
new file mode 100644
index 000000000000..48e48e738ab3
--- /dev/null
+++ b/dev-python/pygame/files/pygame-2.5.0-cython-3.patch
@@ -0,0 +1,214 @@
+https://bugs.gentoo.org/898704
+https://github.com/pygame/pygame/issues/3938
+https://github.com/pygame/pygame/pull/3956
+https://github.com/pygame/pygame/commit/bff1ba00fa58de40d357d70ba645be2957593b69
+
+From bff1ba00fa58de40d357d70ba645be2957593b69 Mon Sep 17 00:00:00 2001
+From: Matus Valo <matusvalo@gmail.com>
+Date: Wed, 12 Jul 2023 01:26:21 +0200
+Subject: [PATCH] Mark functions as noexcept
+
+--- a/src_c/cython/pygame/_sdl2/audio.pyx
++++ b/src_c/cython/pygame/_sdl2/audio.pyx
+@@ -67,7 +67,7 @@ def get_audio_device_names(iscapture = False):
+     return names
+ 
+ import traceback
+-cdef void recording_cb(void* userdata, Uint8* stream, int len) nogil:
++cdef void recording_cb(void* userdata, Uint8* stream, int len) noexcept nogil:
+     """ This is called in a thread made by SDL.
+         So we need the python GIL to do python stuff.
+     """
+--- a/src_c/cython/pygame/_sdl2/controller.pxd
++++ b/src_c/cython/pygame/_sdl2/controller.pxd
+@@ -101,8 +101,8 @@ cdef extern from "../controllercompat.c" nogil:
+                                 Uint16 high_frequency_rumble,
+                                 Uint32 duration_ms)
+ 
+-cdef bint _controller_autoinit()
+-cdef void _controller_autoquit()
++cdef bint _controller_autoinit() noexcept
++cdef void _controller_autoquit() noexcept
+ 
+ cdef class Controller:
+     cdef SDL_GameController* _controller
+--- a/src_c/cython/pygame/_sdl2/controller.pyx
++++ b/src_c/cython/pygame/_sdl2/controller.pyx
+@@ -17,14 +17,14 @@ def _gamecontroller_init_check():
+     if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER):
+         raise error("gamecontroller system not initialized")
+ 
+-cdef bint _controller_autoinit():
++cdef bint _controller_autoinit() noexcept:
+     if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER):
+         if SDL_InitSubSystem(_SDL_INIT_GAMECONTROLLER):
+             return False
+         #pg_RegisterQuit(_controller_autoquit)
+     return True
+ 
+-cdef void _controller_autoquit():
++cdef void _controller_autoquit() noexcept:
+     cdef Controller controller
+     for c in Controller._controllers:
+         controller = c
+--- a/src_c/cython/pygame/_sdl2/mixer.pxd
++++ b/src_c/cython/pygame/_sdl2/mixer.pxd
+@@ -5,7 +5,7 @@ from .sdl2 cimport *
+ 
+ #https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC79
+ 
+-ctypedef void (*mixcallback)(void *udata, Uint8 *stream, int len) nogil
++ctypedef void (*mixcallback)(void *udata, Uint8 *stream, int len) noexcept nogil
+ 
+ cdef extern from "SDL_mixer.h" nogil:
+     ctypedef void (*mix_func)(void *udata, Uint8 *stream, int len)
+--- a/src_c/cython/pygame/_sdl2/mixer.pyx
++++ b/src_c/cython/pygame/_sdl2/mixer.pyx
+@@ -14,7 +14,7 @@ import traceback
+ # Mix_SetPostMix(noEffect, NULL);
+ 
+ 
+-cdef void recording_cb(void* userdata, Uint8* stream, int len) nogil:
++cdef void recording_cb(void* userdata, Uint8* stream, int len) noexcept nogil:
+     """ This is called in a thread made by SDL.
+         So we need the python GIL to do python stuff.
+     """
+--- a/src_c/cython/pygame/_sdl2/video.pxd
++++ b/src_c/cython/pygame/_sdl2/video.pxd
+@@ -430,7 +430,7 @@ cdef class Texture:
+     cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=*, SDL_Point *originptr=*,
+                        bint flip_x=*, bint flip_y=*)
+     cpdef void draw(self, srcrect=*, dstrect=*, float angle=*, origin=*,
+-                    bint flip_x=*, bint flip_y=*)
++                    bint flip_x=*, bint flip_y=*) noexcept
+ 
+ cdef class Image:
+     cdef Color _color
+@@ -445,4 +445,4 @@ cdef class Image:
+     cdef public Texture texture
+     cdef public Rect srcrect
+ 
+-    cpdef void draw(self, srcrect=*, dstrect=*)
++    cpdef void draw(self, srcrect=*, dstrect=*) noexcept
+--- a/src_c/cython/pygame/_sdl2/video.pyx
++++ b/src_c/cython/pygame/_sdl2/video.pyx
+@@ -731,7 +731,7 @@ cdef class Texture:
+             raise error()
+ 
+     cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None,
+-                    bint flip_x=False, bint flip_y=False):
++                    bint flip_x=False, bint flip_y=False) noexcept:
+         """ Copy a portion of the texture to the rendering target.
+ 
+         :param srcrect: source rectangle on the texture, or None for the entire texture.
+@@ -904,7 +904,7 @@ cdef class Image:
+     def get_rect(self):
+         return pgRect_New(&self.srcrect.r)
+ 
+-    cpdef void draw(self, srcrect=None, dstrect=None):
++    cpdef void draw(self, srcrect=None, dstrect=None) noexcept:
+         """ Copy a portion of the image to the rendering target.
+ 
+         :param srcrect: source rectangle specifying a sub-image, or None for the entire image.
+--- a/src_c/cython/pygame/_sprite.pyx
++++ b/src_c/cython/pygame/_sprite.pyx
+@@ -188,10 +188,10 @@ cdef class Sprite:
+             else:
+                 self.remove(*group)
+ 
+-    cpdef void add_internal(self, group):
++    cpdef void add_internal(self, group) noexcept:
+         self.__g.add(group)
+ 
+-    cpdef void remove_internal(self, group):
++    cpdef void remove_internal(self, group) noexcept:
+         self.__g.remove(group)
+ 
+     def update(self, *args, **kwargs):
+@@ -346,16 +346,16 @@ cdef class AbstractGroup:
+         """
+         return list(self.spritedict)
+ 
+-    cpdef void add_internal(self, sprite):
++    cpdef void add_internal(self, sprite) noexcept:
+         self.spritedict[sprite] = 0
+ 
+-    cpdef void remove_internal(self, sprite):
++    cpdef void remove_internal(self, sprite) noexcept:
+         r = self.spritedict[sprite]
+         if r:
+             self.lostsprites.append(r)
+         del self.spritedict[sprite]
+ 
+-    cpdef bint has_internal(self, sprite):
++    cpdef bint has_internal(self, sprite) noexcept:
+         return sprite in self.spritedict
+ 
+     def copy(self):
+@@ -650,11 +650,11 @@ cdef class OrderedUpdates(RenderUpdates):
+     cpdef list sprites(self):
+         return list(self._spritelist)
+ 
+-    cpdef void add_internal(self, sprite):
++    cpdef void add_internal(self, sprite) noexcept:
+         RenderUpdates.add_internal(self, sprite)
+         self._spritelist.append(sprite)
+ 
+-    cpdef void remove_internal(self, sprite):
++    cpdef void remove_internal(self, sprite) noexcept:
+         RenderUpdates.remove_internal(self, sprite)
+         self._spritelist.remove(sprite)
+ 
+@@ -697,7 +697,7 @@ cdef class LayeredUpdates(AbstractGroup):
+ 
+         self.add(*sprites, **kwargs)
+ 
+-    cpdef void add_internal(self, sprite, layer=None):
++    cpdef void add_internal(self, sprite, layer=None) noexcept:
+         """Do not use this method directly.
+ 
+         It is used by the group to add a sprite internally.
+@@ -779,7 +779,7 @@ cdef class LayeredUpdates(AbstractGroup):
+                         self.add_internal(sprite, layer)
+                         sprite.add_internal(self)
+ 
+-    cpdef void remove_internal(self, sprite):
++    cpdef void remove_internal(self, sprite) noexcept:
+         """Do not use this method directly.
+ 
+         The group uses it to add a sprite.
+@@ -1059,7 +1059,7 @@ cdef class LayeredDirty(LayeredUpdates):
+                 if hasattr(self, key):
+                     setattr(self, key, val)
+ 
+-    cpdef void add_internal(self, sprite, layer=None):
++    cpdef void add_internal(self, sprite, layer=None) noexcept:
+         """Do not use this method directly.
+ 
+         It is used by the group to add a sprite internally.
+@@ -1333,7 +1333,7 @@ cdef class GroupSingle(AbstractGroup):
+         else:
+             return []
+ 
+-    cpdef void add_internal(self, sprite):
++    cpdef void add_internal(self, sprite) noexcept:
+         if self.__sprite is not None:
+             self.__sprite.remove_internal(self)
+             self.remove_internal(<Sprite>self.__sprite)
+@@ -1355,13 +1355,13 @@ cdef class GroupSingle(AbstractGroup):
+                       None,
+                       "The sprite contained in this group")
+ 
+-    cpdef void remove_internal(self, sprite):
++    cpdef void remove_internal(self, sprite) noexcept:
+         if sprite is self.__sprite:
+             self.__sprite = None
+         if sprite in self.spritedict:
+             AbstractGroup.remove_internal(self, sprite)
+ 
+-    cpdef bint has_internal(self, sprite):
++    cpdef bint has_internal(self, sprite) noexcept:
+         return self.__sprite is sprite
+ 
+     # Optimizations...
+

diff --git a/dev-python/pygame/pygame-2.5.0-r1.ebuild b/dev-python/pygame/pygame-2.5.0-r1.ebuild
new file mode 100644
index 000000000000..1c0320737094
--- /dev/null
+++ b/dev-python/pygame/pygame-2.5.0-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2023 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_{10..11} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Python bindings for SDL multimedia library"
+HOMEPAGE="
+	https://www.pygame.org/
+	https://github.com/pygame/pygame/
+	https://pypi.org/project/pygame/
+"
+SRC_URI="
+	https://github.com/pygame/pygame/archive/${PV}.tar.gz
+		-> ${P}.gh.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="examples opengl test X"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	dev-python/numpy[${PYTHON_USEDEP}]
+	media-libs/freetype
+	media-libs/libjpeg-turbo:=
+	media-libs/libpng:=
+	media-libs/portmidi
+	media-libs/sdl2-image
+	media-libs/sdl2-mixer
+	media-libs/sdl2-ttf
+	X? ( media-libs/libsdl2[opengl?,threads,video,X] )
+	!X? ( media-libs/libsdl2[threads] )
+"
+DEPEND="
+	${RDEPEND}
+	test? (
+		media-libs/sdl2-image[gif,jpeg,png,tiff,webp]
+		media-libs/sdl2-mixer[mp3,vorbis,wav]
+	)
+"
+# fontconfig used for fc-list
+RDEPEND+="
+	media-libs/fontconfig
+"
+# util-linux provides script
+BDEPEND="
+	dev-python/cython[${PYTHON_USEDEP}]
+	test? (
+		media-libs/fontconfig
+		sys-apps/util-linux
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-cython-3.patch
+)
+
+python_configure() {
+	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
+		"${EPYTHON}" "${S}"/buildconfig/config.py || die
+}
+
+python_configure_all() {
+	find src_c/cython -name '*.pyx' -exec touch {} + || die
+	"${EPYTHON}" setup.py cython_only || die
+}
+
+python_test() {
+	local -x PYTHONPATH=${BUILD_DIR}/install/lib
+	local -x SDL_VIDEODRIVER=dummy
+	local -x SDL_AUDIODRIVER=disk
+	script -eqc "${EPYTHON} -m pygame.tests -v" || die
+}
+
+python_install() {
+	distutils-r1_python_install
+
+	# Bug #497720
+	rm -fr "${D}$(python_get_sitedir)"/pygame/{docs,examples,tests}/ || die
+}
+
+python_install_all() {
+	distutils-r1_python_install_all
+	use examples && dodoc -r examples
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/, dev-python/pygame/files/
@ 2023-10-02  4:22 Michał Górny
  0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2023-10-02  4:22 UTC (permalink / raw
  To: gentoo-commits

commit:     aaad49b347cdcb9f601e0cb6107810bbbf2de74b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  2 04:18:24 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Oct  2 04:18:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aaad49b3

dev-python/pygame: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pygame/Manifest                         |   1 -
 .../pygame/files/pygame-2.5.0-cython-3.patch       | 214 ---------------------
 dev-python/pygame/pygame-2.5.0-r2.ebuild           |  92 ---------
 3 files changed, 307 deletions(-)

diff --git a/dev-python/pygame/Manifest b/dev-python/pygame/Manifest
index e425372d158a..860b2f9c101c 100644
--- a/dev-python/pygame/Manifest
+++ b/dev-python/pygame/Manifest
@@ -1,2 +1 @@
-DIST pygame-2.5.0.gh.tar.gz 6640084 BLAKE2B affa92cacee34ab1db246e80bea0ee425985c1c2a75b5702b2368536fe4b07ffb24f5e6ef345afb3ee63e7b1eccfc275082649251791a2f34a0eba019cc327a8 SHA512 741c5d11b2b52c5bc08672fb9e7420540f20879ef67b84dd18904d317f3cce7593bf08a9e7bf9d0c6470c6bb88512c9af9eb86056e654ab32d4b33532b2bf702
 DIST pygame-2.5.1.gh.tar.gz 6854761 BLAKE2B e137f73a3bb718213ef92e938ed1b065f5568d7dd2ade6edd973bc55d06425874da0e89e3c102fad39adac25f977ac97025a0c59099702cfabeffd0d3b8f109f SHA512 d7aceb2bc6e40c5dc2d7a19fdc7af18abf021b79dd98b859975f99ec10895e1b09e11fbf17fd6ab925d3aa6c64e5b3dd56c0d857ecacc67303d92fc0efb2630c

diff --git a/dev-python/pygame/files/pygame-2.5.0-cython-3.patch b/dev-python/pygame/files/pygame-2.5.0-cython-3.patch
deleted file mode 100644
index 48e48e738ab3..000000000000
--- a/dev-python/pygame/files/pygame-2.5.0-cython-3.patch
+++ /dev/null
@@ -1,214 +0,0 @@
-https://bugs.gentoo.org/898704
-https://github.com/pygame/pygame/issues/3938
-https://github.com/pygame/pygame/pull/3956
-https://github.com/pygame/pygame/commit/bff1ba00fa58de40d357d70ba645be2957593b69
-
-From bff1ba00fa58de40d357d70ba645be2957593b69 Mon Sep 17 00:00:00 2001
-From: Matus Valo <matusvalo@gmail.com>
-Date: Wed, 12 Jul 2023 01:26:21 +0200
-Subject: [PATCH] Mark functions as noexcept
-
---- a/src_c/cython/pygame/_sdl2/audio.pyx
-+++ b/src_c/cython/pygame/_sdl2/audio.pyx
-@@ -67,7 +67,7 @@ def get_audio_device_names(iscapture = False):
-     return names
- 
- import traceback
--cdef void recording_cb(void* userdata, Uint8* stream, int len) nogil:
-+cdef void recording_cb(void* userdata, Uint8* stream, int len) noexcept nogil:
-     """ This is called in a thread made by SDL.
-         So we need the python GIL to do python stuff.
-     """
---- a/src_c/cython/pygame/_sdl2/controller.pxd
-+++ b/src_c/cython/pygame/_sdl2/controller.pxd
-@@ -101,8 +101,8 @@ cdef extern from "../controllercompat.c" nogil:
-                                 Uint16 high_frequency_rumble,
-                                 Uint32 duration_ms)
- 
--cdef bint _controller_autoinit()
--cdef void _controller_autoquit()
-+cdef bint _controller_autoinit() noexcept
-+cdef void _controller_autoquit() noexcept
- 
- cdef class Controller:
-     cdef SDL_GameController* _controller
---- a/src_c/cython/pygame/_sdl2/controller.pyx
-+++ b/src_c/cython/pygame/_sdl2/controller.pyx
-@@ -17,14 +17,14 @@ def _gamecontroller_init_check():
-     if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER):
-         raise error("gamecontroller system not initialized")
- 
--cdef bint _controller_autoinit():
-+cdef bint _controller_autoinit() noexcept:
-     if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER):
-         if SDL_InitSubSystem(_SDL_INIT_GAMECONTROLLER):
-             return False
-         #pg_RegisterQuit(_controller_autoquit)
-     return True
- 
--cdef void _controller_autoquit():
-+cdef void _controller_autoquit() noexcept:
-     cdef Controller controller
-     for c in Controller._controllers:
-         controller = c
---- a/src_c/cython/pygame/_sdl2/mixer.pxd
-+++ b/src_c/cython/pygame/_sdl2/mixer.pxd
-@@ -5,7 +5,7 @@ from .sdl2 cimport *
- 
- #https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC79
- 
--ctypedef void (*mixcallback)(void *udata, Uint8 *stream, int len) nogil
-+ctypedef void (*mixcallback)(void *udata, Uint8 *stream, int len) noexcept nogil
- 
- cdef extern from "SDL_mixer.h" nogil:
-     ctypedef void (*mix_func)(void *udata, Uint8 *stream, int len)
---- a/src_c/cython/pygame/_sdl2/mixer.pyx
-+++ b/src_c/cython/pygame/_sdl2/mixer.pyx
-@@ -14,7 +14,7 @@ import traceback
- # Mix_SetPostMix(noEffect, NULL);
- 
- 
--cdef void recording_cb(void* userdata, Uint8* stream, int len) nogil:
-+cdef void recording_cb(void* userdata, Uint8* stream, int len) noexcept nogil:
-     """ This is called in a thread made by SDL.
-         So we need the python GIL to do python stuff.
-     """
---- a/src_c/cython/pygame/_sdl2/video.pxd
-+++ b/src_c/cython/pygame/_sdl2/video.pxd
-@@ -430,7 +430,7 @@ cdef class Texture:
-     cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=*, SDL_Point *originptr=*,
-                        bint flip_x=*, bint flip_y=*)
-     cpdef void draw(self, srcrect=*, dstrect=*, float angle=*, origin=*,
--                    bint flip_x=*, bint flip_y=*)
-+                    bint flip_x=*, bint flip_y=*) noexcept
- 
- cdef class Image:
-     cdef Color _color
-@@ -445,4 +445,4 @@ cdef class Image:
-     cdef public Texture texture
-     cdef public Rect srcrect
- 
--    cpdef void draw(self, srcrect=*, dstrect=*)
-+    cpdef void draw(self, srcrect=*, dstrect=*) noexcept
---- a/src_c/cython/pygame/_sdl2/video.pyx
-+++ b/src_c/cython/pygame/_sdl2/video.pyx
-@@ -731,7 +731,7 @@ cdef class Texture:
-             raise error()
- 
-     cpdef void draw(self, srcrect=None, dstrect=None, float angle=0, origin=None,
--                    bint flip_x=False, bint flip_y=False):
-+                    bint flip_x=False, bint flip_y=False) noexcept:
-         """ Copy a portion of the texture to the rendering target.
- 
-         :param srcrect: source rectangle on the texture, or None for the entire texture.
-@@ -904,7 +904,7 @@ cdef class Image:
-     def get_rect(self):
-         return pgRect_New(&self.srcrect.r)
- 
--    cpdef void draw(self, srcrect=None, dstrect=None):
-+    cpdef void draw(self, srcrect=None, dstrect=None) noexcept:
-         """ Copy a portion of the image to the rendering target.
- 
-         :param srcrect: source rectangle specifying a sub-image, or None for the entire image.
---- a/src_c/cython/pygame/_sprite.pyx
-+++ b/src_c/cython/pygame/_sprite.pyx
-@@ -188,10 +188,10 @@ cdef class Sprite:
-             else:
-                 self.remove(*group)
- 
--    cpdef void add_internal(self, group):
-+    cpdef void add_internal(self, group) noexcept:
-         self.__g.add(group)
- 
--    cpdef void remove_internal(self, group):
-+    cpdef void remove_internal(self, group) noexcept:
-         self.__g.remove(group)
- 
-     def update(self, *args, **kwargs):
-@@ -346,16 +346,16 @@ cdef class AbstractGroup:
-         """
-         return list(self.spritedict)
- 
--    cpdef void add_internal(self, sprite):
-+    cpdef void add_internal(self, sprite) noexcept:
-         self.spritedict[sprite] = 0
- 
--    cpdef void remove_internal(self, sprite):
-+    cpdef void remove_internal(self, sprite) noexcept:
-         r = self.spritedict[sprite]
-         if r:
-             self.lostsprites.append(r)
-         del self.spritedict[sprite]
- 
--    cpdef bint has_internal(self, sprite):
-+    cpdef bint has_internal(self, sprite) noexcept:
-         return sprite in self.spritedict
- 
-     def copy(self):
-@@ -650,11 +650,11 @@ cdef class OrderedUpdates(RenderUpdates):
-     cpdef list sprites(self):
-         return list(self._spritelist)
- 
--    cpdef void add_internal(self, sprite):
-+    cpdef void add_internal(self, sprite) noexcept:
-         RenderUpdates.add_internal(self, sprite)
-         self._spritelist.append(sprite)
- 
--    cpdef void remove_internal(self, sprite):
-+    cpdef void remove_internal(self, sprite) noexcept:
-         RenderUpdates.remove_internal(self, sprite)
-         self._spritelist.remove(sprite)
- 
-@@ -697,7 +697,7 @@ cdef class LayeredUpdates(AbstractGroup):
- 
-         self.add(*sprites, **kwargs)
- 
--    cpdef void add_internal(self, sprite, layer=None):
-+    cpdef void add_internal(self, sprite, layer=None) noexcept:
-         """Do not use this method directly.
- 
-         It is used by the group to add a sprite internally.
-@@ -779,7 +779,7 @@ cdef class LayeredUpdates(AbstractGroup):
-                         self.add_internal(sprite, layer)
-                         sprite.add_internal(self)
- 
--    cpdef void remove_internal(self, sprite):
-+    cpdef void remove_internal(self, sprite) noexcept:
-         """Do not use this method directly.
- 
-         The group uses it to add a sprite.
-@@ -1059,7 +1059,7 @@ cdef class LayeredDirty(LayeredUpdates):
-                 if hasattr(self, key):
-                     setattr(self, key, val)
- 
--    cpdef void add_internal(self, sprite, layer=None):
-+    cpdef void add_internal(self, sprite, layer=None) noexcept:
-         """Do not use this method directly.
- 
-         It is used by the group to add a sprite internally.
-@@ -1333,7 +1333,7 @@ cdef class GroupSingle(AbstractGroup):
-         else:
-             return []
- 
--    cpdef void add_internal(self, sprite):
-+    cpdef void add_internal(self, sprite) noexcept:
-         if self.__sprite is not None:
-             self.__sprite.remove_internal(self)
-             self.remove_internal(<Sprite>self.__sprite)
-@@ -1355,13 +1355,13 @@ cdef class GroupSingle(AbstractGroup):
-                       None,
-                       "The sprite contained in this group")
- 
--    cpdef void remove_internal(self, sprite):
-+    cpdef void remove_internal(self, sprite) noexcept:
-         if sprite is self.__sprite:
-             self.__sprite = None
-         if sprite in self.spritedict:
-             AbstractGroup.remove_internal(self, sprite)
- 
--    cpdef bint has_internal(self, sprite):
-+    cpdef bint has_internal(self, sprite) noexcept:
-         return self.__sprite is sprite
- 
-     # Optimizations...
-

diff --git a/dev-python/pygame/pygame-2.5.0-r2.ebuild b/dev-python/pygame/pygame-2.5.0-r2.ebuild
deleted file mode 100644
index e7cd405ad570..000000000000
--- a/dev-python/pygame/pygame-2.5.0-r2.ebuild
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 1999-2023 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_{10..12} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Python bindings for SDL multimedia library"
-HOMEPAGE="
-	https://www.pygame.org/
-	https://github.com/pygame/pygame/
-	https://pypi.org/project/pygame/
-"
-SRC_URI="
-	https://github.com/pygame/pygame/archive/${PV}.tar.gz
-		-> ${P}.gh.tar.gz
-"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv sparc x86"
-IUSE="examples opengl test X"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	dev-python/numpy[${PYTHON_USEDEP}]
-	media-libs/freetype
-	media-libs/libjpeg-turbo:=
-	media-libs/libpng:=
-	media-libs/portmidi
-	media-libs/sdl2-image
-	media-libs/sdl2-mixer
-	media-libs/sdl2-ttf
-	X? ( media-libs/libsdl2[opengl?,threads,video,X] )
-	!X? ( media-libs/libsdl2[threads] )
-"
-DEPEND="
-	${RDEPEND}
-	test? (
-		media-libs/sdl2-image[gif,jpeg,png,tiff,webp]
-		media-libs/sdl2-mixer[mp3,vorbis,wav]
-	)
-"
-# fontconfig used for fc-list
-RDEPEND+="
-	media-libs/fontconfig
-"
-# util-linux provides script
-BDEPEND="
-	dev-python/cython[${PYTHON_USEDEP}]
-	test? (
-		media-libs/fontconfig
-		sys-apps/util-linux
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-cython-3.patch
-)
-
-python_configure() {
-	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
-		"${EPYTHON}" "${S}"/buildconfig/config.py || die
-}
-
-python_configure_all() {
-	find src_c/cython -name '*.pyx' -exec touch {} + || die
-	"${EPYTHON}" setup.py cython_only || die
-}
-
-python_test() {
-	local -x PYTHONPATH=${BUILD_DIR}/install/lib
-	local -x SDL_VIDEODRIVER=dummy
-	local -x SDL_AUDIODRIVER=disk
-	script -eqc "${EPYTHON} -m pygame.tests -v" || die
-}
-
-python_install() {
-	distutils-r1_python_install
-
-	# Bug #497720
-	rm -fr "${D}$(python_get_sitedir)"/pygame/{docs,examples,tests}/ || die
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-	use examples && dodoc -r examples
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/, dev-python/pygame/files/
@ 2024-05-20 18:35 Michał Górny
  0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2024-05-20 18:35 UTC (permalink / raw
  To: gentoo-commits

commit:     faa23060a8db98c794ba723fd567f2ec688c6eb5
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon May 20 18:30:11 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon May 20 18:35:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faa23060

dev-python/pygame: Backport a GCC 14 build fix

Closes: https://bugs.gentoo.org/926650
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pygame/files/pygame-2.5.2-gcc-14.patch | 38 +++++++++++++++++++++++
 dev-python/pygame/pygame-2.5.2-r1.ebuild          |  2 ++
 2 files changed, 40 insertions(+)

diff --git a/dev-python/pygame/files/pygame-2.5.2-gcc-14.patch b/dev-python/pygame/files/pygame-2.5.2-gcc-14.patch
new file mode 100644
index 000000000000..0d74303bbba4
--- /dev/null
+++ b/dev-python/pygame/files/pygame-2.5.2-gcc-14.patch
@@ -0,0 +1,38 @@
+From 504a11fd4855e33ecb945af1270311aa463aae59 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= <renesd@gmail.com>
+Date: Sun, 19 May 2024 11:12:33 +0200
+Subject: [PATCH] pypm: Fix incorrect param in Pm_OpenInput
+
+---
+ src_c/cython/pygame/pypm.pyx | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src_c/cython/pygame/pypm.pyx b/src_c/cython/pygame/pypm.pyx
+index f2c16c9e2b..54a88fd83a 100644
+--- a/src_c/cython/pygame/pypm.pyx
++++ b/src_c/cython/pygame/pypm.pyx
+@@ -106,7 +106,7 @@ cdef extern from "portmidi.h":
+                          PmDeviceID inputDevice,
+                          void *inputDriverInfo,
+                          long bufferSize,
+-                         long (*PmPtr) (), # long = PtTimestamp
++                         PmTimeProcPtr time_proc, # long = PtTimestamp
+                          void *time_info)
+ 
+     PmError Pm_OpenOutput(PortMidiStream** stream,
+@@ -538,11 +538,14 @@ cdef class Input:
+         """Instantiate MIDI input stream object."""
+ 
+         cdef PmError err
++        cdef PmTimeProcPtr PmPtr
+         self.device = input_device
+         self.debug = 0
+ 
++        PmPtr = <PmTimeProcPtr>&Pt_Time
++
+         err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize,
+-                           &Pt_Time, NULL)
++                           PmPtr, NULL)
+         if err < 0:
+             raise Exception(Pm_GetErrorText(err))
+ 

diff --git a/dev-python/pygame/pygame-2.5.2-r1.ebuild b/dev-python/pygame/pygame-2.5.2-r1.ebuild
index a7e594998df9..077556ead05f 100644
--- a/dev-python/pygame/pygame-2.5.2-r1.ebuild
+++ b/dev-python/pygame/pygame-2.5.2-r1.ebuild
@@ -62,6 +62,8 @@ src_prepare() {
 	local PATCHES=(
 		# https://github.com/pygame/pygame/pull/4035
 		"${FILESDIR}/${P}-error.patch"
+		# https://github.com/pygame/pygame/pull/4236
+		"${FILESDIR}/${P}-gcc-14.patch"
 	)
 
 	# some numpy-related crash (not a regression)


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/, dev-python/pygame/files/
@ 2024-06-02 15:43 Michał Górny
  0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2024-06-02 15:43 UTC (permalink / raw
  To: gentoo-commits

commit:     64ef68f4772f7e53f5d55ec348d35d0f521b3e5b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  2 14:31:18 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jun  2 15:43:09 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64ef68f4

dev-python/pygame: Backport numpy-2 fixes

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pygame/files/pygame-2.5.2-numpy-2.patch | 135 +++++++++++++++++++++
 dev-python/pygame/pygame-2.5.2-r3.ebuild           | 107 ++++++++++++++++
 2 files changed, 242 insertions(+)

diff --git a/dev-python/pygame/files/pygame-2.5.2-numpy-2.patch b/dev-python/pygame/files/pygame-2.5.2-numpy-2.patch
new file mode 100644
index 000000000000..37b702e57280
--- /dev/null
+++ b/dev-python/pygame/files/pygame-2.5.2-numpy-2.patch
@@ -0,0 +1,135 @@
+From 21859cd1b108c2073dfd5fd197714c2b391e3824 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= <renesd@gmail.com>
+Date: Tue, 21 May 2024 10:24:52 +0200
+Subject: [PATCH 1/3] test: Fix numpy.alltrue imports to import all instead
+ thanks @mgorny
+
+---
+ test/pixelcopy_test.py | 2 +-
+ test/sndarray_test.py  | 2 +-
+ test/surfarray_test.py | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/test/pixelcopy_test.py b/test/pixelcopy_test.py
+index 6510fd99..46051cd4 100644
+--- a/test/pixelcopy_test.py
++++ b/test/pixelcopy_test.py
+@@ -534,7 +534,7 @@ class PixelCopyTestWithArrayNumpy(unittest.TestCase):
+ 
+     def test_map_array(self):
+         try:
+-            from numpy import array, zeros, uint8, int32, alltrue
++            from numpy import array, zeros, uint8, int32, all as alltrue
+         except ImportError:
+             return
+ 
+diff --git a/test/sndarray_test.py b/test/sndarray_test.py
+index 5b624caf..7a7a51f3 100644
+--- a/test/sndarray_test.py
++++ b/test/sndarray_test.py
+@@ -1,6 +1,6 @@
+ import unittest
+ 
+-from numpy import int8, int16, uint8, uint16, float32, array, alltrue
++from numpy import int8, int16, uint8, uint16, float32, array, all as alltrue
+ 
+ import pygame
+ import pygame.sndarray
+diff --git a/test/surfarray_test.py b/test/surfarray_test.py
+index 0863da77..a9d53fc4 100644
+--- a/test/surfarray_test.py
++++ b/test/surfarray_test.py
+@@ -9,7 +9,7 @@ from numpy import (
+     zeros,
+     float32,
+     float64,
+-    alltrue,
++    all as alltrue,
+     rint,
+     arange,
+ )
+-- 
+2.45.2
+
+From 4a2ede7b8a1e90c77ab90aadd9c26a2757124923 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= <renesd@gmail.com>
+Date: Sun, 2 Jun 2024 13:15:26 +0200
+Subject: [PATCH 2/3] sndarray_test: Fix some overflowed data sizes
+
+---
+ test/sndarray_test.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/test/sndarray_test.py b/test/sndarray_test.py
+index 7a7a51f3..57eb71c3 100644
+--- a/test/sndarray_test.py
++++ b/test/sndarray_test.py
+@@ -41,7 +41,7 @@ class SndarrayTest(unittest.TestCase):
+             16, 2, [[0, 0xFFFF], [0xFFFF, 0], [0x00FF, 0xFF00], [0x0F0F, 0xF0F0]]
+         )
+         check_array(-8, 1, [0, -0x80, 0x7F, 0x64])
+-        check_array(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [0xFF, 0]])
++        check_array(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [-1, 0]])
+         check_array(-16, 1, [0, 0x7FFF, -0x7FFF, -1])
+         check_array(-16, 2, [[0, -0x7FFF], [-0x7FFF, 0], [0x7FFF, 0], [0, 0x7FFF]])
+ 
+@@ -78,13 +78,13 @@ class SndarrayTest(unittest.TestCase):
+                 pygame.mixer.quit()
+ 
+         check_sound(8, 1, [0, 0x0F, 0xF0, 0xFF])
+-        check_sound(8, 2, [[0, 0x80], [0x2D, 0x41], [0x64, 0xA1], [0xFF, 0x40]])
++        check_sound(8, 2, [[0, 0x80], [0x2D, 0x41], [0x64, 0xA1], [125, 0x40]])
+         check_sound(16, 1, [0, 0x00FF, 0xFF00, 0xFFFF])
+         check_sound(
+             16, 2, [[0, 0xFFFF], [0xFFFF, 0], [0x00FF, 0xFF00], [0x0F0F, 0xF0F0]]
+         )
+         check_sound(-8, 1, [0, -0x80, 0x7F, 0x64])
+-        check_sound(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [0xFF, 0]])
++        check_sound(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [-1, 0]])
+         check_sound(-16, 1, [0, 0x7FFF, -0x7FFF, -1])
+         check_sound(-16, 2, [[0, -0x7FFF], [-0x7FFF, 0], [0x7FFF, 0], [0, 0x7FFF]])
+         check_sound(32, 2, [[0.0, -1.0], [-1.0, 0], [1.0, 0], [0, 1.0]])
+@@ -123,7 +123,7 @@ class SndarrayTest(unittest.TestCase):
+             16, 2, [[0, 0xFFFF], [0xFFFF, 0], [0x00FF, 0xFF00], [0x0F0F, 0xF0F0]]
+         )
+         check_sample(-8, 1, [0, -0x80, 0x7F, 0x64])
+-        check_sample(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [0xFF, 0]])
++        check_sample(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [-1, 0]])
+         check_sample(-16, 1, [0, 0x7FFF, -0x7FFF, -1])
+         check_sample(-16, 2, [[0, -0x7FFF], [-0x7FFF, 0], [0x7FFF, 0], [0, 0x7FFF]])
+         check_sample(32, 2, [[0.0, -1.0], [-1.0, 0], [1.0, 0], [0, 1.0]])
+-- 
+2.45.2
+
+From 184f8b78e6952aa619e961553835c442b3db8d5c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= <renesd@gmail.com>
+Date: Sun, 2 Jun 2024 13:27:34 +0200
+Subject: [PATCH 3/3] surfarray_test: Fix for value out of uint32 range
+
+Was in signed 32bit range.
+---
+ test/surfarray_test.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/test/surfarray_test.py b/test/surfarray_test.py
+index a9d53fc4..ee74290e 100644
+--- a/test/surfarray_test.py
++++ b/test/surfarray_test.py
+@@ -113,10 +113,10 @@ class SurfarrayModuleTest(unittest.TestCase):
+ 
+     def _fill_array2d(self, arr, surf):
+         palette = self.test_palette
+-        arr[:5, :6] = surf.map_rgb(palette[1])
+-        arr[5:, :6] = surf.map_rgb(palette[2])
+-        arr[:5, 6:] = surf.map_rgb(palette[3])
+-        arr[5:, 6:] = surf.map_rgb(palette[4])
++        arr[:5, :6] = surf.map_rgb(palette[1]) & 0xFFFFFFFF
++        arr[5:, :6] = surf.map_rgb(palette[2]) & 0xFFFFFFFF
++        arr[:5, 6:] = surf.map_rgb(palette[3]) & 0xFFFFFFFF
++        arr[5:, 6:] = surf.map_rgb(palette[4]) & 0xFFFFFFFF
+ 
+     def _fill_array3d(self, arr):
+         palette = self.test_palette
+-- 
+2.45.2
+

diff --git a/dev-python/pygame/pygame-2.5.2-r3.ebuild b/dev-python/pygame/pygame-2.5.2-r3.ebuild
new file mode 100644
index 000000000000..5c10b9bc4adc
--- /dev/null
+++ b/dev-python/pygame/pygame-2.5.2-r3.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2024 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_{10..12} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Python bindings for SDL multimedia library"
+HOMEPAGE="
+	https://www.pygame.org/
+	https://github.com/pygame/pygame/
+	https://pypi.org/project/pygame/
+"
+SRC_URI="
+	https://github.com/pygame/pygame/archive/${PV}.tar.gz
+		-> ${P}.gh.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~x86"
+IUSE="examples opengl test X"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	dev-python/numpy[${PYTHON_USEDEP}]
+	media-libs/freetype
+	media-libs/libjpeg-turbo:=
+	media-libs/libpng:=
+	media-libs/portmidi
+	media-libs/sdl2-image
+	media-libs/sdl2-mixer
+	media-libs/sdl2-ttf
+	X? ( media-libs/libsdl2[opengl?,threads(+),video,X] )
+	!X? ( media-libs/libsdl2[threads(+)] )
+"
+DEPEND="
+	${RDEPEND}
+	test? (
+		media-libs/sdl2-image[gif,jpeg,png,tiff,webp]
+		media-libs/sdl2-mixer[mp3,vorbis,wav]
+	)
+"
+# fontconfig used for fc-list
+RDEPEND+="
+	media-libs/fontconfig
+"
+# util-linux provides script
+BDEPEND="
+	dev-python/cython[${PYTHON_USEDEP}]
+	test? (
+		media-libs/fontconfig
+		sys-apps/util-linux
+	)
+"
+
+src_prepare() {
+	local PATCHES=(
+		# https://github.com/pygame/pygame/pull/4035
+		"${FILESDIR}/${P}-error.patch"
+		# https://github.com/pygame/pygame/pull/4236
+		"${FILESDIR}/${P}-gcc-14.patch"
+		# https://github.com/pygame/pygame/pull/4240
+		# https://github.com/pygame/pygame/pull/4254
+		# https://github.com/pygame/pygame/pull/4255
+		"${FILESDIR}/${P}-numpy-2.patch"
+	)
+
+	# some numpy-related crash (not a regression)
+	# https://github.com/pygame/pygame/issues/4049
+	sed -e 's:import numpy:raise ImportError(""):' \
+		-i test/pixelcopy_test.py || die
+
+	distutils-r1_src_prepare
+}
+
+python_configure() {
+	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
+		"${EPYTHON}" "${S}"/buildconfig/config.py || die
+}
+
+python_configure_all() {
+	find src_c/cython -name '*.pyx' -exec touch {} + || die
+	"${EPYTHON}" setup.py cython_only || die
+}
+
+python_test() {
+	local -x SDL_VIDEODRIVER=dummy
+	local -x SDL_AUDIODRIVER=disk
+	script -eqc "${EPYTHON} -m pygame.tests -v" || die
+}
+
+python_install() {
+	distutils-r1_python_install
+
+	# https://bugs.gentoo.org/497720
+	rm -fr "${D}$(python_get_sitedir)"/pygame/{docs,examples} || die
+}
+
+python_install_all() {
+	distutils-r1_python_install_all
+	use examples && dodoc -r examples
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/, dev-python/pygame/files/
@ 2024-07-21  2:47 Michał Górny
  0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2024-07-21  2:47 UTC (permalink / raw
  To: gentoo-commits

commit:     9a31c1f1884e398171b8de1db1fc363645e70d47
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 21 02:45:40 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jul 21 02:45:40 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a31c1f1

dev-python/pygame: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pygame/Manifest                         |   1 -
 dev-python/pygame/files/pygame-2.5.2-error.patch   | 121 ------------------
 dev-python/pygame/files/pygame-2.5.2-gcc-14.patch  |  38 ------
 dev-python/pygame/files/pygame-2.5.2-numpy-2.patch | 135 ---------------------
 dev-python/pygame/pygame-2.5.2-r2.ebuild           | 103 ----------------
 dev-python/pygame/pygame-2.5.2-r3.ebuild           | 107 ----------------
 6 files changed, 505 deletions(-)

diff --git a/dev-python/pygame/Manifest b/dev-python/pygame/Manifest
index 4a5df64234de..9d7b5373a2c8 100644
--- a/dev-python/pygame/Manifest
+++ b/dev-python/pygame/Manifest
@@ -1,2 +1 @@
-DIST pygame-2.5.2.gh.tar.gz 5970857 BLAKE2B 523874926a8fd868f5674ed2997a44decb928fcfe246d551249ed7320a0e908ce46d00f459d187726edf74a4c1038cd56821f6466559fb7d24aa75d16769cbfe SHA512 b54e9b80951c8a9e75666621aafc26874c6dbdab27330146f7217346c76be5627a5464a0102a5968eca0dbd7cced4b2143cd2ff1b6227e3e17e5634854b27f19
 DIST pygame-2.6.0.gh.tar.gz 5970025 BLAKE2B 2a7616982675d8d9a5f306bae709e97e87d4f602f12ea553ca4779f858fb88bf92ac2a4e0f8f63ac52096e1829d2f7805edee919d7e96b7764db72e9cb7f4034 SHA512 bdf36314bd2179ab30942efab4e4cb65eff023b6951d1705a46d7cb4b89095e76bf4dcd04e714224355705d3e44283213fbb807973b3b241bf128b78c80044ae

diff --git a/dev-python/pygame/files/pygame-2.5.2-error.patch b/dev-python/pygame/files/pygame-2.5.2-error.patch
deleted file mode 100644
index 9f2800e29e70..000000000000
--- a/dev-python/pygame/files/pygame-2.5.2-error.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From bbed8d293483fa7bd7322f5976641dfe86bf6367 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= <renesd@gmail.com>
-Date: Sat, 7 Oct 2023 12:05:45 +0200
-Subject: [PATCH 1/2] base: Clean up some error messaging
-
----
- src_c/base.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src_c/base.c b/src_c/base.c
-index 1f12a63451..d32c17bdc5 100644
---- a/src_c/base.c
-+++ b/src_c/base.c
-@@ -309,11 +309,13 @@ pg_mod_autoquit(const char *modname)
- 
-     funcobj = PyObject_GetAttrString(module, "_internal_mod_quit");
- 
-+    if (PyErr_Occurred())
-+        PyErr_Clear();
-+
-     /* If we could not load _internal_mod_quit, load quit function */
-     if (!funcobj)
-         funcobj = PyObject_GetAttrString(module, "quit");
- 
--    /* Silence errors */
-     if (PyErr_Occurred())
-         PyErr_Clear();
- 
-@@ -322,7 +324,6 @@ pg_mod_autoquit(const char *modname)
-         Py_XDECREF(temp);
-     }
- 
--    /* Silence errors */
-     if (PyErr_Occurred())
-         PyErr_Clear();
- 
-
-From d8fae59ff0f3a02fe159cc302c891177af97a41f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= <renesd@gmail.com>
-Date: Sat, 7 Oct 2023 12:05:58 +0200
-Subject: [PATCH 2/2] pixelcopy: Clean up some error messaging
-
----
- src_c/pixelcopy.c | 27 +++++++++++++++++++++++++++
- 1 file changed, 27 insertions(+)
-
-diff --git a/src_c/pixelcopy.c b/src_c/pixelcopy.c
-index 923072dde8..1d1eaf3267 100644
---- a/src_c/pixelcopy.c
-+++ b/src_c/pixelcopy.c
-@@ -767,6 +767,9 @@ surface_to_array(PyObject *self, PyObject *args, PyObject *kwds)
-     Uint8 opaque = 255;
-     Uint8 clear = 0;
-     SDL_Surface *surf;
-+    PyObject *type = NULL;
-+    PyObject *value = NULL;
-+    PyObject *traceback = NULL;
-     char *keywords[] = {"array", "surface", "kind", "opaque", "clear", 0};
- 
-     if (!PyArg_ParseTupleAndKeywords(
-@@ -794,8 +797,16 @@ surface_to_array(PyObject *self, PyObject *args, PyObject *kwds)
-     if (view_p->ndim == 2) {
-         if (view_kind == VIEWKIND_RGB) {
-             if (_copy_mapped(view_p, surf)) {
-+                if (PyErr_Occurred()) {
-+                    PyErr_Fetch(&type, &value, &traceback);
-+                    PyErr_Clear();
-+                }
-+
-                 pgBuffer_Release(&pg_view);
-                 pgSurface_Unlock(surfobj);
-+                if (type) {
-+                    PyErr_Restore(type, value, traceback);
-+                }
-                 return 0;
-             }
-         }
-@@ -876,6 +887,8 @@ map_array(PyObject *self, PyObject *args)
-     _pc_pixel_t pixel = {0};
-     int pix_bytesize;
-     Py_ssize_t i;
-+    PyObject *type = NULL;
-+    PyObject *value, *traceback;
- 
-     if (!PyArg_ParseTuple(args, "OOO!", &tar_array, &src_array,
-                           &pgSurface_Type, &format_surf)) {
-@@ -889,6 +902,11 @@ map_array(PyObject *self, PyObject *args)
-     /* Determine array shapes and check validity
-      */
-     if (pgObject_GetBuffer(tar_array, &tar_pg_view, PyBUF_RECORDS)) {
-+        if (PyErr_Occurred()) {
-+            PyErr_Fetch(&type, &value, &traceback);
-+            PyErr_Clear();
-+        }
-+
-         goto fail;
-     }
-     is_tar_alloc = 1;
-@@ -912,6 +930,10 @@ map_array(PyObject *self, PyObject *args)
-         goto fail;
-     }
-     if (pgObject_GetBuffer(src_array, &src_pg_view, PyBUF_RECORDS_RO)) {
-+        if (PyErr_Occurred()) {
-+            PyErr_Fetch(&type, &value, &traceback);
-+            PyErr_Clear();
-+        }
-         goto fail;
-     }
-     is_src_alloc = 1;
-@@ -1134,6 +1156,11 @@ map_array(PyObject *self, PyObject *args)
-         pgBuffer_Release(&tar_pg_view);
-     }
-     pgSurface_Unlock(format_surf);
-+
-+    if (type != NULL) {
-+        PyErr_Restore(type, value, traceback);
-+    }
-+
-     return 0;
- }
- 

diff --git a/dev-python/pygame/files/pygame-2.5.2-gcc-14.patch b/dev-python/pygame/files/pygame-2.5.2-gcc-14.patch
deleted file mode 100644
index 0d74303bbba4..000000000000
--- a/dev-python/pygame/files/pygame-2.5.2-gcc-14.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 504a11fd4855e33ecb945af1270311aa463aae59 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= <renesd@gmail.com>
-Date: Sun, 19 May 2024 11:12:33 +0200
-Subject: [PATCH] pypm: Fix incorrect param in Pm_OpenInput
-
----
- src_c/cython/pygame/pypm.pyx | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/src_c/cython/pygame/pypm.pyx b/src_c/cython/pygame/pypm.pyx
-index f2c16c9e2b..54a88fd83a 100644
---- a/src_c/cython/pygame/pypm.pyx
-+++ b/src_c/cython/pygame/pypm.pyx
-@@ -106,7 +106,7 @@ cdef extern from "portmidi.h":
-                          PmDeviceID inputDevice,
-                          void *inputDriverInfo,
-                          long bufferSize,
--                         long (*PmPtr) (), # long = PtTimestamp
-+                         PmTimeProcPtr time_proc, # long = PtTimestamp
-                          void *time_info)
- 
-     PmError Pm_OpenOutput(PortMidiStream** stream,
-@@ -538,11 +538,14 @@ cdef class Input:
-         """Instantiate MIDI input stream object."""
- 
-         cdef PmError err
-+        cdef PmTimeProcPtr PmPtr
-         self.device = input_device
-         self.debug = 0
- 
-+        PmPtr = <PmTimeProcPtr>&Pt_Time
-+
-         err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize,
--                           &Pt_Time, NULL)
-+                           PmPtr, NULL)
-         if err < 0:
-             raise Exception(Pm_GetErrorText(err))
- 

diff --git a/dev-python/pygame/files/pygame-2.5.2-numpy-2.patch b/dev-python/pygame/files/pygame-2.5.2-numpy-2.patch
deleted file mode 100644
index 37b702e57280..000000000000
--- a/dev-python/pygame/files/pygame-2.5.2-numpy-2.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 21859cd1b108c2073dfd5fd197714c2b391e3824 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= <renesd@gmail.com>
-Date: Tue, 21 May 2024 10:24:52 +0200
-Subject: [PATCH 1/3] test: Fix numpy.alltrue imports to import all instead
- thanks @mgorny
-
----
- test/pixelcopy_test.py | 2 +-
- test/sndarray_test.py  | 2 +-
- test/surfarray_test.py | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/test/pixelcopy_test.py b/test/pixelcopy_test.py
-index 6510fd99..46051cd4 100644
---- a/test/pixelcopy_test.py
-+++ b/test/pixelcopy_test.py
-@@ -534,7 +534,7 @@ class PixelCopyTestWithArrayNumpy(unittest.TestCase):
- 
-     def test_map_array(self):
-         try:
--            from numpy import array, zeros, uint8, int32, alltrue
-+            from numpy import array, zeros, uint8, int32, all as alltrue
-         except ImportError:
-             return
- 
-diff --git a/test/sndarray_test.py b/test/sndarray_test.py
-index 5b624caf..7a7a51f3 100644
---- a/test/sndarray_test.py
-+++ b/test/sndarray_test.py
-@@ -1,6 +1,6 @@
- import unittest
- 
--from numpy import int8, int16, uint8, uint16, float32, array, alltrue
-+from numpy import int8, int16, uint8, uint16, float32, array, all as alltrue
- 
- import pygame
- import pygame.sndarray
-diff --git a/test/surfarray_test.py b/test/surfarray_test.py
-index 0863da77..a9d53fc4 100644
---- a/test/surfarray_test.py
-+++ b/test/surfarray_test.py
-@@ -9,7 +9,7 @@ from numpy import (
-     zeros,
-     float32,
-     float64,
--    alltrue,
-+    all as alltrue,
-     rint,
-     arange,
- )
--- 
-2.45.2
-
-From 4a2ede7b8a1e90c77ab90aadd9c26a2757124923 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= <renesd@gmail.com>
-Date: Sun, 2 Jun 2024 13:15:26 +0200
-Subject: [PATCH 2/3] sndarray_test: Fix some overflowed data sizes
-
----
- test/sndarray_test.py | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/test/sndarray_test.py b/test/sndarray_test.py
-index 7a7a51f3..57eb71c3 100644
---- a/test/sndarray_test.py
-+++ b/test/sndarray_test.py
-@@ -41,7 +41,7 @@ class SndarrayTest(unittest.TestCase):
-             16, 2, [[0, 0xFFFF], [0xFFFF, 0], [0x00FF, 0xFF00], [0x0F0F, 0xF0F0]]
-         )
-         check_array(-8, 1, [0, -0x80, 0x7F, 0x64])
--        check_array(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [0xFF, 0]])
-+        check_array(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [-1, 0]])
-         check_array(-16, 1, [0, 0x7FFF, -0x7FFF, -1])
-         check_array(-16, 2, [[0, -0x7FFF], [-0x7FFF, 0], [0x7FFF, 0], [0, 0x7FFF]])
- 
-@@ -78,13 +78,13 @@ class SndarrayTest(unittest.TestCase):
-                 pygame.mixer.quit()
- 
-         check_sound(8, 1, [0, 0x0F, 0xF0, 0xFF])
--        check_sound(8, 2, [[0, 0x80], [0x2D, 0x41], [0x64, 0xA1], [0xFF, 0x40]])
-+        check_sound(8, 2, [[0, 0x80], [0x2D, 0x41], [0x64, 0xA1], [125, 0x40]])
-         check_sound(16, 1, [0, 0x00FF, 0xFF00, 0xFFFF])
-         check_sound(
-             16, 2, [[0, 0xFFFF], [0xFFFF, 0], [0x00FF, 0xFF00], [0x0F0F, 0xF0F0]]
-         )
-         check_sound(-8, 1, [0, -0x80, 0x7F, 0x64])
--        check_sound(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [0xFF, 0]])
-+        check_sound(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [-1, 0]])
-         check_sound(-16, 1, [0, 0x7FFF, -0x7FFF, -1])
-         check_sound(-16, 2, [[0, -0x7FFF], [-0x7FFF, 0], [0x7FFF, 0], [0, 0x7FFF]])
-         check_sound(32, 2, [[0.0, -1.0], [-1.0, 0], [1.0, 0], [0, 1.0]])
-@@ -123,7 +123,7 @@ class SndarrayTest(unittest.TestCase):
-             16, 2, [[0, 0xFFFF], [0xFFFF, 0], [0x00FF, 0xFF00], [0x0F0F, 0xF0F0]]
-         )
-         check_sample(-8, 1, [0, -0x80, 0x7F, 0x64])
--        check_sample(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [0xFF, 0]])
-+        check_sample(-8, 2, [[0, -0x80], [-0x64, 0x64], [0x25, -0x50], [-1, 0]])
-         check_sample(-16, 1, [0, 0x7FFF, -0x7FFF, -1])
-         check_sample(-16, 2, [[0, -0x7FFF], [-0x7FFF, 0], [0x7FFF, 0], [0, 0x7FFF]])
-         check_sample(32, 2, [[0.0, -1.0], [-1.0, 0], [1.0, 0], [0, 1.0]])
--- 
-2.45.2
-
-From 184f8b78e6952aa619e961553835c442b3db8d5c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ren=C3=A9=20Dudfield?= <renesd@gmail.com>
-Date: Sun, 2 Jun 2024 13:27:34 +0200
-Subject: [PATCH 3/3] surfarray_test: Fix for value out of uint32 range
-
-Was in signed 32bit range.
----
- test/surfarray_test.py | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/test/surfarray_test.py b/test/surfarray_test.py
-index a9d53fc4..ee74290e 100644
---- a/test/surfarray_test.py
-+++ b/test/surfarray_test.py
-@@ -113,10 +113,10 @@ class SurfarrayModuleTest(unittest.TestCase):
- 
-     def _fill_array2d(self, arr, surf):
-         palette = self.test_palette
--        arr[:5, :6] = surf.map_rgb(palette[1])
--        arr[5:, :6] = surf.map_rgb(palette[2])
--        arr[:5, 6:] = surf.map_rgb(palette[3])
--        arr[5:, 6:] = surf.map_rgb(palette[4])
-+        arr[:5, :6] = surf.map_rgb(palette[1]) & 0xFFFFFFFF
-+        arr[5:, :6] = surf.map_rgb(palette[2]) & 0xFFFFFFFF
-+        arr[:5, 6:] = surf.map_rgb(palette[3]) & 0xFFFFFFFF
-+        arr[5:, 6:] = surf.map_rgb(palette[4]) & 0xFFFFFFFF
- 
-     def _fill_array3d(self, arr):
-         palette = self.test_palette
--- 
-2.45.2
-

diff --git a/dev-python/pygame/pygame-2.5.2-r2.ebuild b/dev-python/pygame/pygame-2.5.2-r2.ebuild
deleted file mode 100644
index 8229c9fa5e6d..000000000000
--- a/dev-python/pygame/pygame-2.5.2-r2.ebuild
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 1999-2024 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_{10..12} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Python bindings for SDL multimedia library"
-HOMEPAGE="
-	https://www.pygame.org/
-	https://github.com/pygame/pygame/
-	https://pypi.org/project/pygame/
-"
-SRC_URI="
-	https://github.com/pygame/pygame/archive/${PV}.tar.gz
-		-> ${P}.gh.tar.gz
-"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv x86"
-IUSE="examples opengl test X"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	<dev-python/numpy-2[${PYTHON_USEDEP}]
-	media-libs/freetype
-	media-libs/libjpeg-turbo:=
-	media-libs/libpng:=
-	media-libs/portmidi
-	media-libs/sdl2-image
-	media-libs/sdl2-mixer
-	media-libs/sdl2-ttf
-	X? ( media-libs/libsdl2[opengl?,threads(+),video,X] )
-	!X? ( media-libs/libsdl2[threads(+)] )
-"
-DEPEND="
-	${RDEPEND}
-	test? (
-		media-libs/sdl2-image[gif,jpeg,png,tiff,webp]
-		media-libs/sdl2-mixer[mp3,vorbis,wav]
-	)
-"
-# fontconfig used for fc-list
-RDEPEND+="
-	media-libs/fontconfig
-"
-# util-linux provides script
-BDEPEND="
-	dev-python/cython[${PYTHON_USEDEP}]
-	test? (
-		media-libs/fontconfig
-		sys-apps/util-linux
-	)
-"
-
-src_prepare() {
-	local PATCHES=(
-		# https://github.com/pygame/pygame/pull/4035
-		"${FILESDIR}/${P}-error.patch"
-		# https://github.com/pygame/pygame/pull/4236
-		"${FILESDIR}/${P}-gcc-14.patch"
-	)
-
-	# some numpy-related crash (not a regression)
-	# https://github.com/pygame/pygame/issues/4049
-	sed -e 's:import numpy:raise ImportError(""):' \
-		-i test/pixelcopy_test.py || die
-
-	distutils-r1_src_prepare
-}
-
-python_configure() {
-	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
-		"${EPYTHON}" "${S}"/buildconfig/config.py || die
-}
-
-python_configure_all() {
-	find src_c/cython -name '*.pyx' -exec touch {} + || die
-	"${EPYTHON}" setup.py cython_only || die
-}
-
-python_test() {
-	local -x SDL_VIDEODRIVER=dummy
-	local -x SDL_AUDIODRIVER=disk
-	script -eqc "${EPYTHON} -m pygame.tests -v" || die
-}
-
-python_install() {
-	distutils-r1_python_install
-
-	# https://bugs.gentoo.org/497720
-	rm -fr "${D}$(python_get_sitedir)"/pygame/{docs,examples} || die
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-	use examples && dodoc -r examples
-}

diff --git a/dev-python/pygame/pygame-2.5.2-r3.ebuild b/dev-python/pygame/pygame-2.5.2-r3.ebuild
deleted file mode 100644
index 4c0e66baff50..000000000000
--- a/dev-python/pygame/pygame-2.5.2-r3.ebuild
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright 1999-2024 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_{10..12} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Python bindings for SDL multimedia library"
-HOMEPAGE="
-	https://www.pygame.org/
-	https://github.com/pygame/pygame/
-	https://pypi.org/project/pygame/
-"
-SRC_URI="
-	https://github.com/pygame/pygame/archive/${PV}.tar.gz
-		-> ${P}.gh.tar.gz
-"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv x86"
-IUSE="examples opengl test X"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	dev-python/numpy[${PYTHON_USEDEP}]
-	media-libs/freetype
-	media-libs/libjpeg-turbo:=
-	media-libs/libpng:=
-	media-libs/portmidi
-	media-libs/sdl2-image
-	media-libs/sdl2-mixer
-	media-libs/sdl2-ttf
-	X? ( media-libs/libsdl2[opengl?,threads(+),video,X] )
-	!X? ( media-libs/libsdl2[threads(+)] )
-"
-DEPEND="
-	${RDEPEND}
-	test? (
-		media-libs/sdl2-image[gif,jpeg,png,tiff,webp]
-		media-libs/sdl2-mixer[mp3,vorbis,wav]
-	)
-"
-# fontconfig used for fc-list
-RDEPEND+="
-	media-libs/fontconfig
-"
-# util-linux provides script
-BDEPEND="
-	dev-python/cython[${PYTHON_USEDEP}]
-	test? (
-		media-libs/fontconfig
-		sys-apps/util-linux
-	)
-"
-
-src_prepare() {
-	local PATCHES=(
-		# https://github.com/pygame/pygame/pull/4035
-		"${FILESDIR}/${P}-error.patch"
-		# https://github.com/pygame/pygame/pull/4236
-		"${FILESDIR}/${P}-gcc-14.patch"
-		# https://github.com/pygame/pygame/pull/4240
-		# https://github.com/pygame/pygame/pull/4254
-		# https://github.com/pygame/pygame/pull/4255
-		"${FILESDIR}/${P}-numpy-2.patch"
-	)
-
-	# some numpy-related crash (not a regression)
-	# https://github.com/pygame/pygame/issues/4049
-	sed -e 's:import numpy:raise ImportError(""):' \
-		-i test/pixelcopy_test.py || die
-
-	distutils-r1_src_prepare
-}
-
-python_configure() {
-	PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
-		"${EPYTHON}" "${S}"/buildconfig/config.py || die
-}
-
-python_configure_all() {
-	find src_c/cython -name '*.pyx' -exec touch {} + || die
-	"${EPYTHON}" setup.py cython_only || die
-}
-
-python_test() {
-	local -x SDL_VIDEODRIVER=dummy
-	local -x SDL_AUDIODRIVER=disk
-	script -eqc "${EPYTHON} -m pygame.tests -v" || die
-}
-
-python_install() {
-	distutils-r1_python_install
-
-	# https://bugs.gentoo.org/497720
-	rm -fr "${D}$(python_get_sitedir)"/pygame/{docs,examples} || die
-}
-
-python_install_all() {
-	distutils-r1_python_install_all
-	use examples && dodoc -r examples
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-07-21  2:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20 18:35 [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/, dev-python/pygame/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-07-21  2:47 Michał Górny
2024-06-02 15:43 Michał Górny
2023-10-02  4:22 Michał Górny
2023-07-17 19:32 Sam James
2023-01-17  6:03 Ionen Wolkens
2023-01-17  6:03 Ionen Wolkens
2022-02-13  9:42 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox