diff options
author | wiz <wiz@pkgsrc.org> | 2022-08-23 10:41:34 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2022-08-23 10:41:34 +0000 |
commit | 953fa9a782e8a85c052ef6af41a95128431ab36c (patch) | |
tree | edba2871b4d5d82cc1b0a3f373d8f79992303f48 /games | |
parent | 87e871e74ccb536f9968c4a456056af901563565 (diff) | |
download | pkgsrc-953fa9a782e8a85c052ef6af41a95128431ab36c.tar.gz |
cataclysm-dda-sdl: fix build with latest SDL2_ttf
Diffstat (limited to 'games')
-rw-r--r-- | games/cataclysm-dda/distinfo | 3 | ||||
-rw-r--r-- | games/cataclysm-dda/patches/patch-src_sdl__font.cpp | 21 |
2 files changed, 23 insertions, 1 deletions
diff --git a/games/cataclysm-dda/distinfo b/games/cataclysm-dda/distinfo index fa710f5190a..628fcea9565 100644 --- a/games/cataclysm-dda/distinfo +++ b/games/cataclysm-dda/distinfo @@ -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 --git a/games/cataclysm-dda/patches/patch-src_sdl__font.cpp b/games/cataclysm-dda/patches/patch-src_sdl__font.cpp new file mode 100644 index 00000000000..796af2a7267 --- /dev/null +++ b/games/cataclysm-dda/patches/patch-src_sdl__font.cpp @@ -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 ) { |