games/openttd: Fix build.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
spaceman 2015-06-17 16:11:21 +07:00 committed by Willy Sudiarto Raharjo
parent 45e97bb0e4
commit e7edfef3e9
3 changed files with 17 additions and 4 deletions

View File

@ -25,5 +25,3 @@ open source data files will not be used by the script and OpenTTD. Or, the
user can keep OPENDATA=YES in which case the open source data files will be
included giving the user the ability to choose which data file set (original
Windows or open source data files) to use within the game options menu.
See the readme.txt or http://wiki.openttd.org for more information.

View File

@ -25,7 +25,7 @@
PRGNAM=openttd
VERSION=${VERSION:-1.4.4}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
OPENGFX=0.5.0
@ -85,7 +85,9 @@ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
patch -p0 < $CWD/openttd.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \

View File

@ -0,0 +1,13 @@
--- src/fontcache.cpp.orig 2015-01-31 17:48:10.000000000 +0100
+++ src/fontcache.cpp 2015-01-31 17:49:31.000000000 +0100
@@ -527,8 +527,8 @@
aa = (slot->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY);
/* Add 1 pixel for the shadow on the medium font. Our sprite must be at least 1x1 pixel */
- int width = max(1, slot->bitmap.width + (this->fs == FS_NORMAL));
- int height = max(1, slot->bitmap.rows + (this->fs == FS_NORMAL));
+ int width = max(1u, slot->bitmap.width + (this->fs == FS_NORMAL));
+ int height = max(1u, slot->bitmap.rows + (this->fs == FS_NORMAL));
/* Limit glyph size to prevent overflows later on. */
if (width > 256 || height > 256) usererror("Font glyph is too large");