On Mon, 01 Sep 2025 10:33:01 +0200 Antoine Jacoutot <[email protected]> wrote:
> On Sat, 2025-08-30 at 03:52 -0600, Thomas Frohwein wrote: > > CVSROOT: /cvs > > Module name: ports > > Changes by: [email protected] 2025/08/30 03:52:34 > > > > Modified files: > > devel/sdl2-ttf : Makefile distinfo > > > > Log message: > > update to sdl2-ttf 2.24.0. Release notes: > > https://github.com/libsdl-org/SDL_ttf/releases/tag/release-2.24.0 > > Hi. > > This seems to have broken at least: > > games/trackballs > games/vcmi > > > /usr/local/include/SDL2/SDL_ttf.h:165:16: error: typedef 'TTF_Font' > cannot be referenced with the 'struct' specifier > > Diffs attached to fix these 2 ports. This is a pretty straightforward fix. Did you spot other ports that broke?
Index: Makefile =================================================================== RCS file: /cvs/ports/games/vcmi/Makefile,v diff -u -p -r1.18 Makefile --- Makefile 28 Apr 2025 06:49:30 -0000 1.18 +++ Makefile 1 Sep 2025 13:47:51 -0000 @@ -2,7 +2,7 @@ COMMENT = HoMM3 engine rewrite CATEGORIES = games -REVISION = 1 +REVISION = 2 HOMEPAGE = https://vcmi.eu/ Index: patches/patch-client_renderSDL_CTrueTypeFont_cpp =================================================================== RCS file: patches/patch-client_renderSDL_CTrueTypeFont_cpp diff -N patches/patch-client_renderSDL_CTrueTypeFont_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-client_renderSDL_CTrueTypeFont_cpp 1 Sep 2025 13:47:51 -0000 @@ -0,0 +1,15 @@ +backport https://github.com/vcmi/vcmi/pull/5222 to fix build with +sdl2-ttf 2.24.0 + +Index: client/renderSDL/CTrueTypeFont.cpp +--- client/renderSDL/CTrueTypeFont.cpp.orig ++++ client/renderSDL/CTrueTypeFont.cpp +@@ -19,8 +19,6 @@ + #include "../../lib/json/JsonNode.h" + #include "../../lib/filesystem/Filesystem.h" + +-#include <SDL_ttf.h> +- + std::pair<std::unique_ptr<ui8[]>, ui64> CTrueTypeFont::loadData(const JsonNode & config) + { + std::string filename = "Data/" + config["file"].String(); Index: patches/patch-client_renderSDL_CTrueTypeFont_h =================================================================== RCS file: patches/patch-client_renderSDL_CTrueTypeFont_h diff -N patches/patch-client_renderSDL_CTrueTypeFont_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-client_renderSDL_CTrueTypeFont_h 1 Sep 2025 13:47:51 -0000 @@ -0,0 +1,22 @@ +backport https://github.com/vcmi/vcmi/pull/5222 to fix build with +sdl2-ttf 2.24.0 + +Index: client/renderSDL/CTrueTypeFont.h +--- client/renderSDL/CTrueTypeFont.h.orig ++++ client/renderSDL/CTrueTypeFont.h +@@ -11,13 +11,13 @@ + + #include "../render/IFont.h" + ++#include <SDL_ttf.h> ++ + VCMI_LIB_NAMESPACE_BEGIN + class JsonNode; + VCMI_LIB_NAMESPACE_END + + class CBitmapFont; +- +-using TTF_Font = struct _TTF_Font; + + class CTrueTypeFont : public IFont + {
Index: Makefile =================================================================== RCS file: /cvs/ports/games/trackballs/Makefile,v diff -u -p -r1.1.1.1 Makefile --- Makefile 7 Oct 2024 16:37:19 -0000 1.1.1.1 +++ Makefile 1 Sep 2025 13:47:30 -0000 @@ -3,6 +3,7 @@ COMMENT = marble game inspired by Marbl GH_PROJECT = trackballs GH_ACCOUNT = trackballs GH_TAGNAME = v1.3.4 +REVISION = 0 CATEGORIES = games Index: patches/patch-src_glHelp_h =================================================================== RCS file: patches/patch-src_glHelp_h diff -N patches/patch-src_glHelp_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_glHelp_h 1 Sep 2025 13:47:30 -0000 @@ -0,0 +1,18 @@ +use TTF_Font from SDL_ttf directly to fix build with sdl2-ttf 2.24.0, +similar to https://github.com/vcmi/vcmi/pull/5222 + +Index: src/glHelp.h +--- src/glHelp.h.orig ++++ src/glHelp.h +@@ -25,9 +25,10 @@ + #include <GL/gl.h> + #include <GL/glext.h> + ++#include <SDL_ttf.h> ++ + #include "general.h" + +-typedef struct _TTF_Font TTF_Font; + typedef struct SDL_Surface SDL_Surface; + class Map; + class Game;
