git: 5f0259f7402e - main - games/cataclysm-dda-tiles: fix build

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Wed, 03 Aug 2022 12:57:14 UTC
The branch main has been updated by amdmi3:

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

commit 5f0259f7402e8e50d188d1d9929a840d9d2aa6c4
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-08-03 12:55:29 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-08-03 12:57:07 +0000

    games/cataclysm-dda-tiles: fix build
    
    Approved by:    portmgr blanket
---
 games/cataclysm-dda/files/patch-src_sdl__font.cpp | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/games/cataclysm-dda/files/patch-src_sdl__font.cpp b/games/cataclysm-dda/files/patch-src_sdl__font.cpp
new file mode 100644
index 000000000000..d647f1646e80
--- /dev/null
+++ b/games/cataclysm-dda/files/patch-src_sdl__font.cpp
@@ -0,0 +1,17 @@
+--- src/sdl_font.cpp.orig	2021-07-03 05:00:06 UTC
++++ src/sdl_font.cpp
+@@ -22,12 +22,12 @@ static int test_face_size( const std::string &f, int s
+ {
+     const TTF_Font_Ptr fnt( TTF_OpenFontIndex( f.c_str(), size, faceIndex ) );
+     if( fnt ) {
+-        char *style = TTF_FontFaceStyleName( fnt.get() );
++        const char *style = TTF_FontFaceStyleName( fnt.get() );
+         if( style != nullptr ) {
+             int faces = TTF_FontFaces( fnt.get() );
+             for( int i = faces - 1; i >= 0; i-- ) {
+                 const TTF_Font_Ptr tf( TTF_OpenFontIndex( f.c_str(), size, i ) );
+-                char *ts = nullptr;
++                const char *ts = nullptr;
+                 if( tf ) {
+                     if( nullptr != ( ts = TTF_FontFaceStyleName( tf.get() ) ) ) {
+                         if( 0 == strcasecmp( ts, style ) && TTF_FontHeight( tf.get() ) <= size ) {