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 <[email protected]> +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
