summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-03-10 18:37:23 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-03-10 18:37:23 +0000
commit1abb4122729f4c5b92b1b549d7f858c353eb93a9 (patch)
treea885b67e3a2800d77a5cdd11facf2fff8cd3cf32 /games-strategy/ufo-ai/files
parentSet PYTHON_DEPEND. (diff)
downloadgentoo-2-1abb4122729f4c5b92b1b549d7f858c353eb93a9.tar.gz
gentoo-2-1abb4122729f4c5b92b1b549d7f858c353eb93a9.tar.bz2
gentoo-2-1abb4122729f4c5b92b1b549d7f858c353eb93a9.zip
Fix building with libpng14 wrt #308863 by Locke Shinseiko.
(Portage version: 2.2_rc66/cvs/Linux x86_64)
Diffstat (limited to 'games-strategy/ufo-ai/files')
-rw-r--r--games-strategy/ufo-ai/files/ufo-ai-2.2.1-libpng14.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/games-strategy/ufo-ai/files/ufo-ai-2.2.1-libpng14.patch b/games-strategy/ufo-ai/files/ufo-ai-2.2.1-libpng14.patch
new file mode 100644
index 000000000000..d4c4eb01199e
--- /dev/null
+++ b/games-strategy/ufo-ai/files/ufo-ai-2.2.1-libpng14.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/308863
+
+--- src/renderer/r_image.c
++++ src/renderer/r_image.c
+@@ -207,7 +207,7 @@ static int R_LoadPNG (const char *name,
+ return 0;
+
+ /* Parse the PNG file */
+- if ((png_check_sig(PngFileBuffer.buffer, 8)) == 0) {
++ if ((png_sig_cmp(PngFileBuffer.buffer, 0, 8)) == 0) {
+ Com_Printf("LoadPNG: Not a PNG file: %s\n", name);
+ FS_FreeFile(PngFileBuffer.buffer);
+ return 0;
+@@ -254,7 +254,7 @@ static int R_LoadPNG (const char *name,
+ png_set_palette_to_rgb(png_ptr);
+ /* convert 1-2-4 bits grayscale images to 8 bits grayscale */
+ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
+ png_set_tRNS_to_alpha(png_ptr);
+