pygame-ce: migrate to sdl2-compat

Signed-off-by: Marcin Serwin <marcin@serwin.dev>
This commit is contained in:
Marcin Serwin
2025-05-17 11:32:52 +02:00
parent 03a1fef71d
commit 225330b95d
2 changed files with 31 additions and 9 deletions
@@ -18,10 +18,10 @@
libpng,
libX11,
portmidi,
SDL2_classic,
SDL2_classic_image,
SDL2_classic_mixer,
SDL2_classic_ttf,
SDL2,
SDL2_image,
SDL2_mixer,
SDL2_ttf,
numpy,
pygame-gui,
@@ -59,6 +59,8 @@ buildPythonPackage rec {
]) buildInputs
);
})
# https://github.com/libsdl-org/sdl2-compat/issues/476
./skip-rle-tests.patch
];
postPatch =
@@ -98,10 +100,10 @@ buildPythonPackage rec {
libjpeg
libpng
portmidi
SDL2_classic
(SDL2_classic_image.override { enableSTB = false; })
SDL2_classic_mixer
SDL2_classic_ttf
SDL2
(SDL2_image.override { enableSTB = false; })
SDL2_mixer
SDL2_ttf
];
nativeCheckInputs = [
@@ -114,7 +116,7 @@ buildPythonPackage rec {
env =
{
SDL_CONFIG = lib.getExe' (lib.getDev SDL2_classic) "sdl2-config";
SDL_CONFIG = lib.getExe' (lib.getDev SDL2) "sdl2-config";
}
// lib.optionalAttrs stdenv.cc.isClang {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-function-pointer-types";
@@ -0,0 +1,20 @@
diff --git a/test/surface_test.py b/test/surface_test.py
index 4e4b5d4..ffc7ffb 100644
--- a/test/surface_test.py
+++ b/test/surface_test.py
@@ -375,6 +375,7 @@ class SurfaceTypeTest(unittest.TestCase):
self.assertTrue(s1.get_flags() & pygame.RLEACCELOK)
self.assertTrue(not s2.get_flags() & pygame.RLEACCELOK)
+ @unittest.skipIf(True, "https://github.com/libsdl-org/sdl2-compat/issues/476")
def test_solarwolf_rle_usage(self):
"""Test for error/crash when calling set_colorkey() followed
by convert twice in succession. Code originally taken
@@ -403,6 +404,7 @@ class SurfaceTypeTest(unittest.TestCase):
finally:
pygame.display.quit()
+ @unittest.skipIf(True, "https://github.com/libsdl-org/sdl2-compat/issues/476")
def test_solarwolf_rle_usage_2(self):
"""Test for RLE status after setting alpha"""