Unverified Commit 871b355e authored by K900's avatar K900 Committed by GitHub
Browse files

SDL2_image_2_0: drop (#400338)

parents 404427f7 8a6d7844
Loading
Loading
Loading
Loading
+13 −10
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
  stdenv,
  zlib,
  # Boolean flags
  enableSTB ? true,
  ## Darwin headless will hang when trying to run the SDL test program
  enableSdltest ? (!stdenv.hostPlatform.isDarwin),
}:
@@ -36,16 +37,17 @@ stdenv.mkDerivation (finalAttrs: {
    pkg-config
  ];

  buildInputs = [
  buildInputs =
    [
      SDL2
    giflib
    libXpm
    libjpeg
    libpng
      libtiff
      libwebp
      zlib
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ];
    ]
    ++ lib.optionals (!enableSTB) [
      libjpeg
      libpng
    ];

  configureFlags =
    [
@@ -54,6 +56,7 @@ stdenv.mkDerivation (finalAttrs: {
      (lib.enableFeature false "png-shared")
      (lib.enableFeature false "tif-shared")
      (lib.enableFeature false "webp-shared")
      (lib.enableFeature enableSTB "stb-image")
      (lib.enableFeature enableSdltest "sdltest")
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
+0 −17
Original line number Diff line number Diff line
# Dependency of pygame, toppler
{ SDL2_image, fetchurl }:

SDL2_image.overrideAttrs (oldAttrs: {
  version = "2.0.5";
  src = fetchurl {
    inherit (oldAttrs.src) url;
    hash = "sha256-vdX24CZoL31+G+C2BRsgnaL0AqLdi9HEvZwlrSYxCNA";
  };

  postPatch =
    (oldAttrs.postPatch or "")
    + ''
      # allow newer autoreconf to run successfully
      touch NEWS README AUTHORS ChangeLog
    '';
})
+4 −6
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
  libpng,
  libX11,
  portmidi,
  SDL2,
  SDL2_classic,
  SDL2_image,
  SDL2_mixer,
  SDL2_ttf,
@@ -60,8 +60,6 @@ buildPythonPackage rec {
        ]) buildInputs
      );
    })
    # Skip tests that should be disabled without video driver
    ./skip-surface-tests.patch
  ];

  postPatch =
@@ -101,8 +99,8 @@ buildPythonPackage rec {
    libjpeg
    libpng
    portmidi
    SDL2
    SDL2_image
    SDL2_classic
    (SDL2_image.override { enableSTB = false; })
    SDL2_mixer
    SDL2_ttf
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ];
@@ -117,7 +115,7 @@ buildPythonPackage rec {

  env =
    {
      SDL_CONFIG = lib.getExe' (lib.getDev SDL2) "sdl2-config";
      SDL_CONFIG = lib.getExe' (lib.getDev SDL2_classic) "sdl2-config";
    }
    // lib.optionalAttrs stdenv.cc.isClang {
      NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-function-pointer-types";
+0 −26
Original line number Diff line number Diff line
diff --git a/test/surface_test.py b/test/surface_test.py
index 5ce78b6e..8b8f7ed5 100644
--- a/test/surface_test.py
+++ b/test/surface_test.py
@@ -1091,6 +1091,10 @@ class GeneralSurfaceTests(unittest.TestCase):
         finally:
             pygame.display.quit()
 
+    @unittest.skipIf(
+        os.environ.get("SDL_VIDEODRIVER") == "dummy",
+        'requires a non-"dummy" SDL_VIDEODRIVER',
+    )
     def test_convert_init(self):
         """Ensure initialization exceptions are raised
         for surf.convert()."""
@@ -1118,6 +1122,10 @@ class GeneralSurfaceTests(unittest.TestCase):
         finally:
             pygame.display.quit()
 
+    @unittest.skipIf(
+        os.environ.get("SDL_VIDEODRIVER") == "dummy",
+        'requires a non-"dummy" SDL_VIDEODRIVER',
+    )
     def test_convert_alpha_init(self):
         """Ensure initialization exceptions are raised
         for surf.convert_alpha()."""
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ buildPythonPackage rec {
    libX11
    portmidi
    SDL2_classic
    SDL2_image
    (SDL2_image.override { enableSTB = false; })
    SDL2_mixer
    SDL2_ttf
  ];
Loading