git: 9fc88e4d69ec - 2026Q2 - games/tecnoballz: fix build on FreeBSD 15.1

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Fri, 26 Jun 2026 12:16:06 UTC
The branch 2026Q2 has been updated by fuz:

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

commit 9fc88e4d69ecde19d6ce4dec86b80d15e0a0f050
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-06-25 07:46:56 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-06-26 12:13:55 +0000

    games/tecnoballz: fix build on FreeBSD 15.1
    
    CHAR_WIDTH is now a macro defined by <limits.h> (from C23).
    
    While we are at it, roll static REINPLACE_CMD usage into existing patch
    file.
    
    MFH:            2026Q2
    Approved by:    portmgr (build fix blanket)
    
    (cherry picked from commit c758ccc79c2bb3db009274cb68b102c830640f5d)
---
 games/tecnoballz/Makefile                            |  1 -
 games/tecnoballz/files/patch-configure.ac            | 20 ++++++++++++++++----
 .../files/patch-include_display__text__bitmap.h      | 10 ++++++++++
 .../files/patch-src_display__text__bitmap.cc         | 11 +++++++++++
 4 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/games/tecnoballz/Makefile b/games/tecnoballz/Makefile
index 1bbbac96ee29..5b50b7375231 100644
--- a/games/tecnoballz/Makefile
+++ b/games/tecnoballz/Makefile
@@ -33,7 +33,6 @@ DESKTOP_ENTRIES="TecnoballZ" \
 		false
 
 post-patch:
-	@${REINPLACE_CMD} -e '/CXXFLAGS=[^$$]*$$/ s|^|#|' ${WRKSRC}/configure.ac
 	@${REINPLACE_CMD} -e 's|$$(prefix)/games|$$(prefix)/bin|; \
 		/chmod/ d; /chown/ d' ${WRKSRC}/src/Makefile.am
 .for f in tecnoballz.cc tiles_background.cc sprite_ship.cc controller_magnetic_eyes.cc
diff --git a/games/tecnoballz/files/patch-configure.ac b/games/tecnoballz/files/patch-configure.ac
index 0fd065f42e3d..7877247f7fcc 100644
--- a/games/tecnoballz/files/patch-configure.ac
+++ b/games/tecnoballz/files/patch-configure.ac
@@ -1,6 +1,6 @@
---- configure.ac.orig	2014-09-30 14:20:26.000000000 +0400
-+++ configure.ac	2014-12-04 03:31:46.000000000 +0300
-@@ -40,6 +40,8 @@
+--- configure.ac.orig	2014-09-30 10:20:26 UTC
++++ configure.ac
+@@ -40,6 +40,8 @@ AC_SUBST(MIKMOD_LIBS)
  AC_SUBST(MIKMOD_FLAGS)
  AC_SUBST(MIKMOD_LIBS)
  
@@ -9,7 +9,7 @@
  AC_CHECK_LIB([tinyxml], [main], [
    TINYXML_LIBS="-ltinyxml"
  ],[
-@@ -47,6 +49,8 @@
+@@ -47,6 +49,8 @@ AC_SUBST(TINYXML_LIBS)
  ])
  AC_SUBST(TINYXML_LIBS)
  
@@ -18,3 +18,15 @@
  # Checks for header files.
  AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h sys/time.h unistd.h])
  
+@@ -63,9 +67,9 @@ if test "x${enable_devel}" = "xyes"; then
+ 
+ if test "x${enable_devel}" = "xyes"; then
+   AC_DEFINE(UNDER_DEVELOPMENT,  1, Define to enable development version)
+-  CXXFLAGS="-Werror -O2 -Wall -pedantic -Wextra -std=gnu++98 -g"
++#  CXXFLAGS="-Werror -O2 -Wall -pedantic -Wextra -std=gnu++98 -g"
+ else
+-  CXXFLAGS="-O2 -Werror -Wall -pedantic -Wextra -std=gnu++98"
++#  CXXFLAGS="-O2 -Werror -Wall -pedantic -Wextra -std=gnu++98"
+ fi
+ 
+ AC_OUTPUT(
diff --git a/games/tecnoballz/files/patch-include_display__text__bitmap.h b/games/tecnoballz/files/patch-include_display__text__bitmap.h
new file mode 100644
index 000000000000..31952bc4d621
--- /dev/null
+++ b/games/tecnoballz/files/patch-include_display__text__bitmap.h
@@ -0,0 +1,10 @@
+--- include/display_text_bitmap.h.orig	2026-06-25 07:43:41 UTC
++++ include/display_text_bitmap.h
+@@ -38,7 +38,6 @@ class display_text_bitmap:public virtual tecnoballz (p
+ class display_text_bitmap:public virtual tecnoballz
+ {
+ protected:
+-  static const Uint32 CHAR_WIDTH = 8;
+   static char ascii2code[128];
+   Sint32 off_desti1;            // modulo destination affichage ecran
+   Sint32 off_source;            // modulo source page graphique
diff --git a/games/tecnoballz/files/patch-src_display__text__bitmap.cc b/games/tecnoballz/files/patch-src_display__text__bitmap.cc
new file mode 100644
index 000000000000..90af0915de2e
--- /dev/null
+++ b/games/tecnoballz/files/patch-src_display__text__bitmap.cc
@@ -0,0 +1,11 @@
+--- src/display_text_bitmap.cc.orig	2026-06-25 07:44:17 UTC
++++ src/display_text_bitmap.cc
+@@ -108,7 +108,7 @@ display_text_bitmap::load_bitmap_fonts (Uint32 resourc
+   off_desti1 = game_screen->get_row_size ();    //modulo destination
+   off_source = bitmap_fonts->get_row_size ();     //modulo source
+   
+-  char_width = CHAR_WIDTH * resolution;
++  char_width = 8 * resolution;
+   char_height = bitmap_fonts->get_height ();
+ 
+   rect_fonts.y = 0;