forked from pool/python-pygame
Accepting request 1042426 from devel:languages:python
- Add adjust-surface-mask.patch gh#pygame/pygame#3577, to fix tests with SDL 2.26.0. OBS-URL: https://build.opensuse.org/request/show/1042426 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pygame?expand=0&rev=34
This commit is contained in:
23
adjust-surface-mask.patch
Normal file
23
adjust-surface-mask.patch
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
From 420c1a73416a607cf9157520e86c8b21e778576d Mon Sep 17 00:00:00 2001
|
||||||
|
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.
|
||||||
|
---
|
||||||
|
test/surface_test.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test/surface_test.py b/test/surface_test.py
|
||||||
|
index 1c2369b366..51e2bc822f 100644
|
||||||
|
--- 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
|
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 12 16:41:18 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Add adjust-surface-mask.patch gh#pygame/pygame#3577, to fix tests with SDL
|
||||||
|
2.26.0.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 12 19:46:06 UTC 2022 - Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@fastmail.net>
|
Fri Aug 12 19:46:06 UTC 2022 - Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@fastmail.net>
|
||||||
|
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%define skip_python36 1
|
%define skip_python36 1
|
||||||
Name: python-pygame
|
Name: python-pygame
|
||||||
Version: 2.1.2
|
Version: 2.1.2
|
||||||
@@ -25,6 +24,8 @@ Summary: A Python Module for Interfacing with the SDL Multimedia Library
|
|||||||
License: LGPL-2.1-or-later
|
License: LGPL-2.1-or-later
|
||||||
URL: https://github.com/pygame/pygame
|
URL: https://github.com/pygame/pygame
|
||||||
Source0: https://files.pythonhosted.org/packages/source/p/pygame/pygame-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/p/pygame/pygame-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM adjust-surface-mask.patch gh#pygame/pygame#3577
|
||||||
|
Patch0: adjust-surface-mask.patch
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module numpy}
|
BuildRequires: %{python_module numpy}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
@@ -89,8 +90,7 @@ Provides: %{python_module pygame-doc = %{version}}
|
|||||||
This package contains documentation and example programs for Pygame.
|
This package contains documentation and example programs for Pygame.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pygame-%{version}
|
%autosetup -p1 -n pygame-%{version}
|
||||||
%autopatch -p1
|
|
||||||
|
|
||||||
sed -i 's/\r$//' docs/reST/ref/code_examples/draw_module_example.py
|
sed -i 's/\r$//' docs/reST/ref/code_examples/draw_module_example.py
|
||||||
sed -i 's/\r$//' docs/reST/ref/code_examples/joystick_calls.py
|
sed -i 's/\r$//' docs/reST/ref/code_examples/joystick_calls.py
|
||||||
|
Reference in New Issue
Block a user