I am sponsoring a NMU to fix this.
The changes are attached.
diff -Nru libtcod-1.18.1+dfsg/debian/changelog
libtcod-1.18.1+dfsg/debian/changelog
--- libtcod-1.18.1+dfsg/debian/changelog 2024-02-28 20:17:26.000000000
+0100
+++ libtcod-1.18.1+dfsg/debian/changelog 2025-01-26 20:22:22.000000000
+0100
@@ -1,3 +1,11 @@
+libtcod (1.18.1+dfsg-1.2) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix incompatible pointer type build error. (Closes: #1075212)
+ * Fix debian/watch to find new versions on GitHub.
+
+ -- Nikolay Shaplov <dh...@nataraj.su> Sun, 26 Jan 2025 22:22:22 +0300
+
libtcod (1.18.1+dfsg-1.1) unstable; urgency=medium
* Non-maintainer upload.
diff -Nru libtcod-1.18.1+dfsg/debian/patches/01-fix-#1075212.patch
libtcod-1.18.1+dfsg/debian/patches/01-fix-#1075212.patch
--- libtcod-1.18.1+dfsg/debian/patches/01-fix-#1075212.patch 1970-01-01
01:00:00.000000000 +0100
+++ libtcod-1.18.1+dfsg/debian/patches/01-fix-#1075212.patch 2025-01-26
20:22:22.000000000 +0100
@@ -0,0 +1,21 @@
+Description: Fix incompatible pointer type build error
+Author: Nikolay Shaplov
+Forwarded: not-needed
+Last-Update: 2025-01-27
+---
+Since g++ 14 converting incompatible pointer type is considered an error
+This fix is backported from later releases and solves the problem
+diff --git a/samples/samples_c.c b/samples/samples_c.c
+index 25007fc..5fb5972 100644
+--- a/samples/samples_c.c
++++ b/samples/samples_c.c
+@@ -1440,8 +1440,7 @@ void blur(SDL_Surface* screen, int sample_x, int
sample_y, int sample_w, int sam
+ }
+ }
+
+-void SDL_render(void* sdlSurface) {
+- SDL_Surface* screen = (SDL_Surface*)sdlSurface;
++void SDL_render(SDL_Surface* screen) {
+ // now we have almighty access to the screen's precious pixels !!
+ // get the font character size
+ int char_w, char_h, sample_x, sample_y;
diff -Nru libtcod-1.18.1+dfsg/debian/patches/series
libtcod-1.18.1+dfsg/debian/patches/series
--- libtcod-1.18.1+dfsg/debian/patches/series 2021-09-11 18:03:34.000000000
+0200
+++ libtcod-1.18.1+dfsg/debian/patches/series 2025-01-26 20:22:22.000000000
+0100
@@ -1 +1,2 @@
00-fix-makefile.patch
+01-fix-#1075212.patch
diff -Nru libtcod-1.18.1+dfsg/debian/watch libtcod-1.18.1+dfsg/debian/watch
--- libtcod-1.18.1+dfsg/debian/watch 2021-09-11 18:03:34.000000000 +0200
+++ libtcod-1.18.1+dfsg/debian/watch 2025-01-26 20:22:22.000000000 +0100
@@ -1,4 +1,2 @@
version=4
-opts="dversionmangle=s/\+dfsg\d*$//,filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%libtcod-$1.tar.gz%"
\
- https://github.com/libtcod/libtcod/releases \
- (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
+https://github.com/libtcod/libtcod/tags .*/v?(\d.*)@ARCHIVE_EXT@