Bug 283866 - games/vcmi: Fails to build with sdl2_ttf 2.24.0
Summary: games/vcmi: Fails to build with sdl2_ttf 2.24.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Alexey Dokuchaev
URL: https://github.com/vcmi/vcmi/commit/3...
Keywords:
Depends on:
Blocks: 283865
  Show dependency treegraph
 
Reported: 2025-01-05 15:41 UTC by Daniel Engberg
Modified: 2025-02-06 10:55 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (danfe)


Attachments
patch (976 bytes, patch)
2025-01-16 19:44 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2025-01-05 15:41:49 UTC
In file included from /wrkdirs/usr/ports/games/vcmi/work/vcmi-1.5.7/client/renderSDL/CTrueTypeFont.cpp:22:
/usr/local/include/SDL2/SDL_ttf.h:165:16: error: type alias 'TTF_Font' cannot be referenced with a struct specifier
  165 | typedef struct TTF_Font TTF_Font;
      |                ^
/wrkdirs/usr/ports/games/vcmi/work/vcmi-1.5.7/client/renderSDL/CTrueTypeFont.h:20:7: note: declared here
   20 | using TTF_Font = struct _TTF_Font;
      |       ^
1 error generated.

Using Poudriere, 14.2-RELEASE (amd64)
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2025-01-06 10:31:16 UTC
https://github.com/vcmi/vcmi/issues/5207 might be of interest
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2025-01-07 19:03:46 UTC
May likely be fixed the same way as https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283867
Comment 3 Dmitry Marakasov freebsd_committer freebsd_triage 2025-01-16 19:44:47 UTC
Created attachment 256738 [details]
patch
Comment 4 Alexey Dokuchaev freebsd_committer freebsd_triage 2025-01-18 04:07:41 UTC
(In reply to Dmitry Marakasov from comment #3)
> patch
Looks like we can simply backport upstream commit 3db1a01 via PATCHFILES, I'll test and update the port, thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2025-01-28 10:23:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b9b66f0962f6b4f1d7efdb4c5c57aeacc77804c3

commit b9b66f0962f6b4f1d7efdb4c5c57aeacc77804c3
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2025-01-28 10:22:04 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2025-01-28 10:22:04 +0000

    games/vcmi: update the port to version 1.6.3

    - VCMI mod now uses same filesystem as all mods, with all
      files located under `Content' directory
    - Moved all PNG images from `Data' directory to `Sprites'
    - Use `TTF_Font' type provided by <SDL_ttf.h> to unbreak
      the build against `graphics/sdl2_ttf' version 2.24.0
    - Add `post-patch' target to prevent accidentally picking
      up Qt 6 bits if they're installed (always prefer Qt 5)

    PR:     283866

 games/vcmi/Makefile                                |   6 +-
 games/vcmi/distinfo                                |   6 +-
 .../files/patch-client_ServerRunner.cpp (gone)     |  33 --
 .../vcmi/files/patch-client_ServerRunner.h (gone)  |  20 -
 games/vcmi/files/patch-lib_CMakeLists.txt (new)    |  14 +
 games/vcmi/pkg-plist                               | 558 +++++++++++----------
 6 files changed, 324 insertions(+), 313 deletions(-)