diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2022-10-24 22:21:49 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2022-10-25 05:02:40 +0000 |
commit | 32b4b09f7dbf1b1e32ffb844a15f7e842e5cda2a (patch) | |
tree | ea2fb7f2887e0aa3bf188103913d6cd206063256 | |
parent | f2e7a18e178900863996ca43f1f7e9431fcb03e5 (diff) | |
download | ports-32b4b09f7dbf1b1e32ffb844a15f7e842e5cda2a.tar.gz ports-32b4b09f7dbf1b1e32ffb844a15f7e842e5cda2a.zip |
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 so that newer
versions of SDL don't need to get up to patchlevel=6 to work again.
MFH: 2022Q4
-rw-r--r-- | games/gzdoom/Makefile | 2 | ||||
-rw-r--r-- | games/gzdoom/files/patch-src_common_platform_posix_sdl_sdlglvideo.cpp | 13 |
2 files changed, 14 insertions, 1 deletions
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."); + } |