git: d41a31aa689e - 2022Q4 - games/gzdoom: fix runtime against SDL newer than 2.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 25 Oct 2022 05:22:44 UTC
The branch 2022Q4 has been updated by kevans:
URL: https://cgit.FreeBSD.org/ports/commit/?id=d41a31aa689ecd2cbba8ba2416594cb81dc156f5
commit d41a31aa689ecd2cbba8ba2416594cb81dc156f5
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2022-10-24 22:21:49 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2022-10-25 05:22:26 +0000
games/gzdoom: fix runtime against SDL newer than 2.0
The game was supposed to be restricted to newer versions of SDL than
2.0.6, but they inadvertently only checked the patch number of the
current SDL version. The provided patch is pulled from a later version
of GZDoom and uses the correct SDL version check macro.
(cherry picked from commit 32b4b09f7dbf1b1e32ffb844a15f7e842e5cda2a)
---
games/gzdoom/Makefile | 2 +-
.../patch-src_common_platform_posix_sdl_sdlglvideo.cpp | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/games/gzdoom/Makefile b/games/gzdoom/Makefile
index bd7b23c72993..125329bf8d9e 100644
--- a/games/gzdoom/Makefile
+++ b/games/gzdoom/Makefile
@@ -1,6 +1,6 @@
PORTNAME= gzdoom
PORTVERSION= 4.7.1
-PORTREVISION= 1
+PORTREVISION= 2
DISTVERSIONPREFIX= g
CATEGORIES= games
diff --git a/games/gzdoom/files/patch-src_common_platform_posix_sdl_sdlglvideo.cpp b/games/gzdoom/files/patch-src_common_platform_posix_sdl_sdlglvideo.cpp
new file mode 100644
index 000000000000..6e001316a22b
--- /dev/null
+++ b/games/gzdoom/files/patch-src_common_platform_posix_sdl_sdlglvideo.cpp
@@ -0,0 +1,13 @@
+--- src/common/platform/posix/sdl/sdlglvideo.cpp.orig 2021-10-20 06:18:37 UTC
++++ src/common/platform/posix/sdl/sdlglvideo.cpp
+@@ -396,9 +396,7 @@ SDLVideo::SDLVideo ()
+ }
+
+ // Fail gracefully if we somehow reach here after linking against a SDL2 library older than 2.0.6.
+- SDL_version sdlver;
+- SDL_GetVersion(&sdlver);
+- if (!(sdlver.patch >= 6))
++ if (!SDL_VERSION_ATLEAST(2, 0, 6))
+ {
+ I_FatalError("Only SDL 2.0.6 or later is supported.");
+ }