diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-12-25 19:10:44 +0800 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-12-25 19:10:44 +0800 |
commit | a79e49e914a18fa85ece039e048b7147c9a5e0c3 (patch) | |
tree | 538e4833565dd4154000d615f0c3244a5ab5cbcd /games/fteqw | |
parent | e2e4878b5e7dbec6c5e808bd5cc74c0c470a9d7c (diff) | |
download | freebsd-ports-gnome-a79e49e914a18fa85ece039e048b7147c9a5e0c3.tar.gz freebsd-ports-gnome-a79e49e914a18fa85ece039e048b7147c9a5e0c3.tar.zst freebsd-ports-gnome-a79e49e914a18fa85ece039e048b7147c9a5e0c3.zip |
Properly support png 1.5
Diffstat (limited to 'games/fteqw')
-rw-r--r-- | games/fteqw/files/patch-client__image.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/games/fteqw/files/patch-client__image.c b/games/fteqw/files/patch-client__image.c index 60892907796a..eafe1844ad4f 100644 --- a/games/fteqw/files/patch-client__image.c +++ b/games/fteqw/files/patch-client__image.c @@ -1,15 +1,23 @@ ---- client/image.c.orig 2012-05-26 14:26:41.000000000 +0200 -+++ client/image.c 2012-05-26 14:27:18.000000000 +0200 -@@ -551,6 +551,8 @@ +--- client/image.c.orig 2014-12-25 11:05:11 UTC ++++ client/image.c +@@ -551,6 +551,7 @@ return NULL; #pragma comment(lib, "../libs/libpng.lib") #else #include <png.h> -+ #include <pngpriv.h> + #include <zlib.h> #endif #endif -@@ -610,7 +612,7 @@ +@@ -573,7 +574,7 @@ void PNGAPI png_default_read_data(png_st + + void VARGS readpngdata(png_structp png_ptr,png_bytep data,png_size_t len) + { +- pngreadinfo_t *ri = (pngreadinfo_t*)png_ptr->io_ptr; ++ pngreadinfo_t *ri = (pngreadinfo_t*)png_get_io_ptr(png_ptr); + if (ri->readposition+len > ri->filelen) + { + png_error(png_ptr, "unexpected eof"); +@@ -610,7 +611,7 @@ qbyte *ReadPNGFile(qbyte *buf, int lengt return (png_rgba = NULL); } @@ -18,7 +26,7 @@ { error: if (data) -@@ -636,7 +638,7 @@ +@@ -636,7 +637,7 @@ error: } if (colortype == PNG_COLOR_TYPE_GRAY && bitdepth < 8) @@ -27,7 +35,7 @@ if (png_get_valid( png, pnginfo, PNG_INFO_tRNS )) png_set_tRNS_to_alpha(png); -@@ -712,7 +714,7 @@ +@@ -712,7 +713,7 @@ int Image_WritePNG (char *filename, int return false; } @@ -36,7 +44,7 @@ png_destroy_write_struct(&png_ptr, &info_ptr); fclose(fp); return false; -@@ -879,7 +881,7 @@ +@@ -879,7 +880,7 @@ term_source (j_decompress_ptr cinfo) #define GLOBAL(x) x GLOBAL(void) @@ -45,7 +53,7 @@ { my_source_mgr *src; -@@ -945,7 +947,7 @@ +@@ -945,7 +946,7 @@ badjpeg: } jpeg_create_decompress(&cinfo); @@ -54,7 +62,7 @@ (void) jpeg_read_header(&cinfo, TRUE); -@@ -1041,7 +1043,7 @@ +@@ -1041,7 +1042,7 @@ METHODDEF(void) term_destination (j_comp dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; } @@ -63,7 +71,7 @@ { my_destination_mgr *dest; -@@ -1101,7 +1103,7 @@ +@@ -1101,7 +1102,7 @@ void screenshotJPEG(char *filename, int buffer = screendata; |