openttd: update from 1.4.4 to 1.5.1

authored by Nixpkgs Monitor and committed by moritz.vongoewels.de c25027f2 ab8561e3

+2 -39
+2 -8
pkgs/games/openttd/default.nix
··· 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "openttd-${version}"; 5 - version = "1.4.4"; 5 + version = "1.5.1"; 6 6 7 7 src = fetchurl { 8 8 url = "http://binaries.openttd.org/releases/${version}/${name}-source.tar.xz"; 9 - sha256 = "1xykqb5bx2dzffxhvm4cbn1nf72f7zcdz8hy25i5wky4hfw31x3h"; 9 + sha256 = "0jcg8b0jbiw5kg7rqqw74hdh675r08pgm95grk9ch4z2gpjpd3n9"; 10 10 }; 11 11 12 12 buildInputs = [ SDL libpng pkgconfig xz zlib freetype fontconfig ]; ··· 15 15 configureFlags = [ 16 16 "--with-zlib=${zlib}/lib/libz.a" 17 17 "--without-liblzo2" 18 - ]; 19 - 20 - # NOTE: Remove this patch in 1.4.5 or greater 21 - patches = [ 22 - # Adapted from svn r27079 23 - ./fix-freetype-1.4.4.patch 24 18 ]; 25 19 26 20 makeFlags = "INSTALL_PERSONAL_DIR=";
-31
pkgs/games/openttd/fix-freetype-1.4.4.patch
··· 1 - diff --git a/src/fontcache.cpp b/src/fontcache.cpp 2 - =================================================================== 3 - --- a/src/fontcache.cpp 4 - +++ b/src/fontcache.cpp 5 - @@ -537,6 +537,6 @@ 6 - 7 - /* Add 1 pixel for the shadow on the medium font. Our sprite must be at least 1x1 pixel */ 8 - - int width = max(1, slot->bitmap.width + (this->fs == FS_NORMAL)); 9 - - int height = max(1, slot->bitmap.rows + (this->fs == FS_NORMAL)); 10 - + unsigned int width = max(1U, (unsigned int)slot->bitmap.width + (this->fs == FS_NORMAL)); 11 - + unsigned int height = max(1U, (unsigned int)slot->bitmap.rows + (this->fs == FS_NORMAL)); 12 - 13 - /* Limit glyph size to prevent overflows later on. */ 14 - @@ -554,6 +554,6 @@ 15 - /* Draw shadow for medium size */ 16 - if (this->fs == FS_NORMAL && !aa) { 17 - - for (int y = 0; y < slot->bitmap.rows; y++) { 18 - - for (int x = 0; x < slot->bitmap.width; x++) { 19 - + for (unsigned int y = 0; y < (unsigned int)slot->bitmap.rows; y++) { 20 - + for (unsigned int x = 0; x < (unsigned int)slot->bitmap.width; x++) { 21 - if (aa ? (slot->bitmap.buffer[x + y * slot->bitmap.pitch] > 0) : HasBit(slot->bitmap.buffer[(x / 8) + y * slot->bitmap.pitch], 7 - (x % 8))) { 22 - sprite.data[1 + x + (1 + y) * sprite.width].m = SHADOW_COLOUR; 23 - @@ -564,6 +564,6 @@ 24 - } 25 - 26 - - for (int y = 0; y < slot->bitmap.rows; y++) { 27 - - for (int x = 0; x < slot->bitmap.width; x++) { 28 - + for (unsigned int y = 0; y < (unsigned int)slot->bitmap.rows; y++) { 29 - + for (unsigned int x = 0; x < (unsigned int)slot->bitmap.width; x++) { 30 - if (aa ? (slot->bitmap.buffer[x + y * slot->bitmap.pitch] > 0) : HasBit(slot->bitmap.buffer[(x / 8) + y * slot->bitmap.pitch], 7 - (x % 8))) { 31 - sprite.data[x + y * sprite.width].m = FACE_COLOUR;