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

commit:     ede46deb06342ee19d0d4b4a3be19a7a750d83b3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  8 09:29:02 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jun  8 10:02:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ede46deb

dev-python/pygame: Bump to 2.0.0.dev10

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

 dev-python/pygame/Manifest                         |  1 +
 .../pygame/files/pygame-2.0.0_pre10-py39.patch     | 34 ++++++++++
 dev-python/pygame/pygame-2.0.0_pre10.ebuild        | 77 ++++++++++++++++++++++
 3 files changed, 112 insertions(+)

diff --git a/dev-python/pygame/Manifest b/dev-python/pygame/Manifest
index b3ae74d328f..c108ab0a10d 100644
--- a/dev-python/pygame/Manifest
+++ b/dev-python/pygame/Manifest
@@ -1 +1,2 @@
 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

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
new file mode 100644
index 00000000000..9cfaa476db3
--- /dev/null
+++ b/dev-python/pygame/files/pygame-2.0.0_pre10-py39.patch
@@ -0,0 +1,34 @@
+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-2.0.0_pre10.ebuild b/dev-python/pygame/pygame-2.0.0_pre10.ebuild
new file mode 100644
index 00000000000..5552e2045b0
--- /dev/null
+++ b/dev-python/pygame/pygame-2.0.0_pre10.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6..9} )
+
+inherit flag-o-matic distutils-r1 virtualx
+
+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="~amd64 ~x86"
+IUSE="doc examples midi opengl test X"
+RESTRICT="!test? ( test )"
+
+DEPEND="dev-python/numpy[${PYTHON_USEDEP}]
+	>=media-libs/sdl2-image-1.2.2[png,jpeg]
+	>=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 )"
+RDEPEND="${DEPEND}"
+# util-linux provides script
+BDEPEND="
+	test? ( 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
+}
+
+src_test() {
+	virtx distutils-r1_src_test
+}
+
+python_test() {
+	local -x PYTHONPATH=
+	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
+}


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

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

commit:     61528be38033e37ac115cedaf6944ede3ca3dff3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 24 19:45:29 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Mar 24 19:48:48 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61528be3

dev-python/pygame: Remove old

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

 dev-python/pygame/Manifest                         |  1 -
 .../pygame/files/pygame-2.1.2-cython_only.patch    | 36 --------
 dev-python/pygame/metadata.xml                     |  3 -
 dev-python/pygame/pygame-2.1.2-r1.ebuild           | 86 --------------------
 dev-python/pygame/pygame-2.1.2-r2.ebuild           | 95 ----------------------
 5 files changed, 221 deletions(-)

diff --git a/dev-python/pygame/Manifest b/dev-python/pygame/Manifest
index d515591df4bd..0e08cc3cb687 100644
--- a/dev-python/pygame/Manifest
+++ b/dev-python/pygame/Manifest
@@ -1,4 +1,3 @@
-DIST pygame-2.1.2.gh.tar.gz 6100415 BLAKE2B 4b81c2f0abc2c2c4732ddb8f8e6d4bffa5169e3d3ee2d9ea2798d294623a9c70e2ff004825030606285124ef1347177b46adc676db450785e8420de45f37db34 SHA512 531cb0371853def7a3ddb8eb0110fbd58acaf1b2351d7518402c9a960baca705bb34da879015e7a6cd5f2f8af98c57e7bc732021a8f62ed9f90cacf068c9c2d6
 DIST pygame-2.1.3.gh.tar.gz 6517003 BLAKE2B 9f2062b24ef2e97995207fbf7572a8aa4d3475356e8646356758ad72b0b744fcf911adaa78bb730ed43c95fa23b8ed733a5573882bd83e112ae5e7e6ef099de9 SHA512 28f46826f58f73607b28c1411c6f2b71796cd4f98103df2dd47db842f578fe7f26dac01cb60d1cb00ac9dacfa62c6c3b913a244379ce70bd03265424e29052e6
 DIST pygame-2.2.0.gh.tar.gz 6530469 BLAKE2B 301b8decd7afe7ad44d97b086ad27209a084884993122f0c8d6973e718cb811587aa2e2c34b5e9fc5859410ced4c298b24127b4bf166dbeaa225b5c731c66cb6 SHA512 212e0f6390fa84f4fbcb3051ecb83c324a59d7591fd216a0f17946a581cf01540116162357b41004a387fbd3395e030a5a6d5f804496d84558125f512c9c2617
 DIST pygame-2.3.0.gh.tar.gz 6547956 BLAKE2B 3189dc5dda7e5fc12fe2091af304816d905a24a33f6f43070040b90bd1bac1191fe6fe1a738ccfda49b5d9b472a704962c3b6aa7d8b99bc67e15317a9df06a2b SHA512 ed93cf5f0fac67b8a03f25f514ac71bf9b9a97f4df30efca9e3225396769e7616d3ce1063e6cc6ee3f4e6f1327154a9e0ec4e81b179578118af3a140bb1543bd

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
deleted file mode 100644
index 4fb935dcf668..000000000000
--- a/dev-python/pygame/files/pygame-2.1.2-cython_only.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-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/metadata.xml b/dev-python/pygame/metadata.xml
index 4ce54800af77..0ac44a30fbe9 100644
--- a/dev-python/pygame/metadata.xml
+++ b/dev-python/pygame/metadata.xml
@@ -5,9 +5,6 @@
 		<email>python@gentoo.org</email>
 		<name>Python</name>
 	</maintainer>
-	<use>
-		<flag name="midi">Enable midi support using <pkg>media-libs/portmidi</pkg></flag>
-	</use>
 	<upstream>
 		<remote-id type="pypi">pygame</remote-id>
 		<remote-id type="github">pygame/pygame</remote-id>

diff --git a/dev-python/pygame/pygame-2.1.2-r1.ebuild b/dev-python/pygame/pygame-2.1.2-r1.ebuild
deleted file mode 100644
index c7b3c066375a..000000000000
--- a/dev-python/pygame/pygame-2.1.2-r1.ebuild
+++ /dev/null
@@ -1,86 +0,0 @@
-# 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..10} )
-
-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/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,tiff]
-		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}-libsdl2-2.26-tests.patch
-)
-
-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
-	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
-}

diff --git a/dev-python/pygame/pygame-2.1.2-r2.ebuild b/dev-python/pygame/pygame-2.1.2-r2.ebuild
deleted file mode 100644
index 2ceb169344ba..000000000000
--- a/dev-python/pygame/pygame-2.1.2-r2.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# 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] 4+ messages in thread

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

commit:     bf3b055fdffbfe29a78f0e7f22fd4fb9a3042e7e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 14 18:33:35 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Aug 14 18:33:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf3b055f

dev-python/pygame: Remove old

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

 dev-python/pygame/Manifest                         |  4 -
 .../files/pygame-2.1.2-libsdl2-2.26-tests.patch    | 17 ----
 dev-python/pygame/pygame-2.1.3.ebuild              | 91 ---------------------
 dev-python/pygame/pygame-2.2.0.ebuild              | 87 --------------------
 dev-python/pygame/pygame-2.3.0.ebuild              | 87 --------------------
 dev-python/pygame/pygame-2.4.0.ebuild              | 88 ---------------------
 dev-python/pygame/pygame-2.5.0-r1.ebuild           | 92 ----------------------
 dev-python/pygame/pygame-2.5.0.ebuild              | 88 ---------------------
 8 files changed, 554 deletions(-)

diff --git a/dev-python/pygame/Manifest b/dev-python/pygame/Manifest
index 6dfd9b2c9ce1..e425372d158a 100644
--- a/dev-python/pygame/Manifest
+++ b/dev-python/pygame/Manifest
@@ -1,6 +1,2 @@
-DIST pygame-2.1.3.gh.tar.gz 6517003 BLAKE2B 9f2062b24ef2e97995207fbf7572a8aa4d3475356e8646356758ad72b0b744fcf911adaa78bb730ed43c95fa23b8ed733a5573882bd83e112ae5e7e6ef099de9 SHA512 28f46826f58f73607b28c1411c6f2b71796cd4f98103df2dd47db842f578fe7f26dac01cb60d1cb00ac9dacfa62c6c3b913a244379ce70bd03265424e29052e6
-DIST pygame-2.2.0.gh.tar.gz 6530469 BLAKE2B 301b8decd7afe7ad44d97b086ad27209a084884993122f0c8d6973e718cb811587aa2e2c34b5e9fc5859410ced4c298b24127b4bf166dbeaa225b5c731c66cb6 SHA512 212e0f6390fa84f4fbcb3051ecb83c324a59d7591fd216a0f17946a581cf01540116162357b41004a387fbd3395e030a5a6d5f804496d84558125f512c9c2617
-DIST pygame-2.3.0.gh.tar.gz 6547956 BLAKE2B 3189dc5dda7e5fc12fe2091af304816d905a24a33f6f43070040b90bd1bac1191fe6fe1a738ccfda49b5d9b472a704962c3b6aa7d8b99bc67e15317a9df06a2b SHA512 ed93cf5f0fac67b8a03f25f514ac71bf9b9a97f4df30efca9e3225396769e7616d3ce1063e6cc6ee3f4e6f1327154a9e0ec4e81b179578118af3a140bb1543bd
-DIST pygame-2.4.0.r1.gh.tar.gz 6602313 BLAKE2B 9720b44f55cb0454880cd96b4f8bee77064f0b3997dc3a0aec3a6ff973356a003d37cbe89ff33b62990bc1d6ac1f815c925751031b7a8ee35ce850dee0e56d41 SHA512 78e7f9d705d611c99612fe0f1274aabfeb885798faecdf6b6bf6a3e2b8a22145db757ae5a6e5595075c47382bf2228cd2edada8f708e11042cfc7dfc4d17ef94
 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.1.2-libsdl2-2.26-tests.patch b/dev-python/pygame/files/pygame-2.1.2-libsdl2-2.26-tests.patch
deleted file mode 100644
index e231d1bf6d85..000000000000
--- a/dev-python/pygame/files/pygame-2.1.2-libsdl2-2.26-tests.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-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.3.ebuild b/dev-python/pygame/pygame-2.1.3.ebuild
deleted file mode 100644
index cb006ada8fc6..000000000000
--- a/dev-python/pygame/pygame-2.1.3.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# 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} 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}"/pygame-2.1.2-libsdl2-2.26-tests.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
-}

diff --git a/dev-python/pygame/pygame-2.2.0.ebuild b/dev-python/pygame/pygame-2.2.0.ebuild
deleted file mode 100644
index 0adfe4bcf71e..000000000000
--- a/dev-python/pygame/pygame-2.2.0.ebuild
+++ /dev/null
@@ -1,87 +0,0 @@
-# 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} 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
-	)
-"
-
-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
-}

diff --git a/dev-python/pygame/pygame-2.3.0.ebuild b/dev-python/pygame/pygame-2.3.0.ebuild
deleted file mode 100644
index 0adfe4bcf71e..000000000000
--- a/dev-python/pygame/pygame-2.3.0.ebuild
+++ /dev/null
@@ -1,87 +0,0 @@
-# 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} 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
-	)
-"
-
-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
-}

diff --git a/dev-python/pygame/pygame-2.4.0.ebuild b/dev-python/pygame/pygame-2.4.0.ebuild
deleted file mode 100644
index 4c8e5322fc5d..000000000000
--- a/dev-python/pygame/pygame-2.4.0.ebuild
+++ /dev/null
@@ -1,88 +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..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}.r1.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
-	)
-"
-
-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
-}

diff --git a/dev-python/pygame/pygame-2.5.0-r1.ebuild b/dev-python/pygame/pygame-2.5.0-r1.ebuild
deleted file mode 100644
index 1c0320737094..000000000000
--- a/dev-python/pygame/pygame-2.5.0-r1.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..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
-}

diff --git a/dev-python/pygame/pygame-2.5.0.ebuild b/dev-python/pygame/pygame-2.5.0.ebuild
deleted file mode 100644
index 520b2a145398..000000000000
--- a/dev-python/pygame/pygame-2.5.0.ebuild
+++ /dev/null
@@ -1,88 +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..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-3[${PYTHON_USEDEP}]
-	test? (
-		media-libs/fontconfig
-		sys-apps/util-linux
-	)
-"
-
-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] 4+ messages in thread

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

commit:     de33ae0d9ef984e676549f3227933d7a40c4b4c2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 17 14:33:35 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Oct 17 15:11:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de33ae0d

dev-python/pygame: Bump to 2.5.2

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/pygame-2.5.2.ebuild            | 101 +++++++++++++++++++
 3 files changed, 223 insertions(+)

diff --git a/dev-python/pygame/Manifest b/dev-python/pygame/Manifest
index 860b2f9c101c..b4bddf487169 100644
--- a/dev-python/pygame/Manifest
+++ b/dev-python/pygame/Manifest
@@ -1 +1,2 @@
 DIST pygame-2.5.1.gh.tar.gz 6854761 BLAKE2B e137f73a3bb718213ef92e938ed1b065f5568d7dd2ade6edd973bc55d06425874da0e89e3c102fad39adac25f977ac97025a0c59099702cfabeffd0d3b8f109f SHA512 d7aceb2bc6e40c5dc2d7a19fdc7af18abf021b79dd98b859975f99ec10895e1b09e11fbf17fd6ab925d3aa6c64e5b3dd56c0d857ecacc67303d92fc0efb2630c
+DIST pygame-2.5.2.gh.tar.gz 5970857 BLAKE2B 523874926a8fd868f5674ed2997a44decb928fcfe246d551249ed7320a0e908ce46d00f459d187726edf74a4c1038cd56821f6466559fb7d24aa75d16769cbfe SHA512 b54e9b80951c8a9e75666621aafc26874c6dbdab27330146f7217346c76be5627a5464a0102a5968eca0dbd7cced4b2143cd2ff1b6227e3e17e5634854b27f19

diff --git a/dev-python/pygame/files/pygame-2.5.2-error.patch b/dev-python/pygame/files/pygame-2.5.2-error.patch
new file mode 100644
index 000000000000..9f2800e29e70
--- /dev/null
+++ b/dev-python/pygame/files/pygame-2.5.2-error.patch
@@ -0,0 +1,121 @@
+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/pygame-2.5.2.ebuild b/dev-python/pygame/pygame-2.5.2.ebuild
new file mode 100644
index 000000000000..6d89ed769186
--- /dev/null
+++ b/dev-python/pygame/pygame-2.5.2.ebuild
@@ -0,0 +1,101 @@
+# 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
+	)
+"
+
+src_prepare() {
+	local PATCHES=(
+		# https://github.com/pygame/pygame/pull/4035
+		"${FILESDIR}/${P}-error.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] 4+ messages in thread

end of thread, other threads:[~2023-10-17 15:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-14 18:39 [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/files/, dev-python/pygame/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2023-10-17 15:11 Michał Górny
2023-03-24 19:48 Michał Górny
2020-06-08 10:02 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