pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/cataclysm-dda cataclysm-dda-sdl: fix build with ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/607dba282937
branches:  trunk
changeset: 383820:607dba282937
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Tue Aug 23 10:41:34 2022 +0000

description:
cataclysm-dda-sdl: fix build with latest SDL2_ttf

diffstat:

 games/cataclysm-dda/distinfo                        |   3 ++-
 games/cataclysm-dda/patches/patch-src_sdl__font.cpp |  21 +++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletions(-)

diffs (40 lines):

diff -r ca9b34f3b29c -r 607dba282937 games/cataclysm-dda/distinfo
--- a/games/cataclysm-dda/distinfo      Tue Aug 23 10:38:55 2022 +0000
+++ b/games/cataclysm-dda/distinfo      Tue Aug 23 10:41:34 2022 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.8 2021/10/26 10:43:49 nia Exp $
+$NetBSD: distinfo,v 1.9 2022/08/23 10:41:34 wiz Exp $
 
 BLAKE2s (cataclysm-dda-0.F.2.tar.gz) = f0cc948342759629afbf6b61d11be871cc7145e6e4c831728de1e436d7e97091
 SHA512 (cataclysm-dda-0.F.2.tar.gz) = 31425be7381815462aff48c08c89f02734bb3caff70e151b1b9fe0f5fd2e1a9ae5dbcfab6910dd2ea7788cbecd21db4f89757c07d5fb72538c531b64e6f9bde3
 Size (cataclysm-dda-0.F.2.tar.gz) = 88597127 bytes
 SHA1 (patch-Makefile) = cee0c0e1a6293b5beafe06fe2282d469bcd995a2
 SHA1 (patch-lang_compile__mo.sh) = 1a2e65a5f5a5b8c4f56ceb9ddc8e3383856fac57
+SHA1 (patch-src_sdl__font.cpp) = aa4b19ae074b44dcf3081722ed7f311b1a12d873
 SHA1 (patch-src_translations.cpp) = 90d55c1b526bcf44c8b0c902ac2c4df5c87ba68f
 SHA1 (patch-src_translations.h) = 106413eefeaff7b99661f781e2fb4002a3eace52
diff -r ca9b34f3b29c -r 607dba282937 games/cataclysm-dda/patches/patch-src_sdl__font.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/cataclysm-dda/patches/patch-src_sdl__font.cpp       Tue Aug 23 10:41:34 2022 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_sdl__font.cpp,v 1.1 2022/08/23 10:41:34 wiz Exp $
+
+Fix build with SDL2_ttf-2.20.
+
+--- src/sdl_font.cpp.orig      2021-08-31 13:23:05.000000000 +0000
++++ src/sdl_font.cpp
+@@ -22,12 +22,12 @@ static int test_face_size( const std::st
+ {
+     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 ) {



Home | Main Index | Thread Index | Old Index