diff options
Diffstat (limited to 'games/fteqw')
-rw-r--r-- | games/fteqw/Makefile | 10 | ||||
-rw-r--r-- | games/fteqw/files/patch-client__image.c | 74 |
2 files changed, 77 insertions, 7 deletions
diff --git a/games/fteqw/Makefile b/games/fteqw/Makefile index 222e9f726fcb..79b5a60ae791 100644 --- a/games/fteqw/Makefile +++ b/games/fteqw/Makefile @@ -7,7 +7,7 @@ PORTNAME= fteqw PORTVERSION= 3343 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= games MASTER_SITES= SF/${PORTNAME}/Source/${PORTVERSION} DISTNAME= ftesrc${PORTVERSION}-all @@ -42,8 +42,9 @@ FTE_TARGETS+= fteqw.sv .if !defined(WITHOUT_GL) || !defined(WITHOUT_SDL) LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg \ - png.6:${PORTSDIR}/graphics/png \ + png15:${PORTSDIR}/graphics/png \ vorbis.4:${PORTSDIR}/audio/libvorbis +CFLAGS+= -I${LOCALBASE}/include/libpng15 .endif .if !defined(WITHOUT_GL) @@ -71,11 +72,6 @@ post-patch: ${WRKSRC}/gl/gl_alias.c ${WRKSRC}/common/com_mesh.c @${REINPLACE_CMD} -e 's/__linux__/__unix__/' \ ${WRKSRC}/common/plugin.c ${WRKSRC}/server/svq3_game.c -# Resolve name collision with jpeg-8 and API png14 - ${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \ - -e 's|jpeg_mem_dest|local_jpeg_mem_dest|' \ - -e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' \ - ${WRKSRC}/client/image.c do-install: .for f in ${FTE_TARGETS} diff --git a/games/fteqw/files/patch-client__image.c b/games/fteqw/files/patch-client__image.c new file mode 100644 index 000000000000..60892907796a --- /dev/null +++ b/games/fteqw/files/patch-client__image.c @@ -0,0 +1,74 @@ +--- 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 @@ + #pragma comment(lib, "../libs/libpng.lib") + #else + #include <png.h> ++ #include <pngpriv.h> ++ #include <zlib.h> + #endif + #endif + +@@ -610,7 +612,7 @@ + return (png_rgba = NULL); + } + +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + { + error: + if (data) +@@ -636,7 +638,7 @@ + } + + if (colortype == PNG_COLOR_TYPE_GRAY && bitdepth < 8) +- png_set_gray_1_2_4_to_8(png); ++ png_set_expand_gray_1_2_4_to_8(png); + + if (png_get_valid( png, pnginfo, PNG_INFO_tRNS )) + png_set_tRNS_to_alpha(png); +@@ -712,7 +714,7 @@ + return false; + } + +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_write_struct(&png_ptr, &info_ptr); + fclose(fp); + return false; +@@ -879,7 +881,7 @@ + #define GLOBAL(x) x + + GLOBAL(void) +-jpeg_mem_src (j_decompress_ptr cinfo, qbyte * infile, int maxlen) ++local_jpeg_mem_src (j_decompress_ptr cinfo, qbyte * infile, int maxlen) + { + my_source_mgr *src; + +@@ -945,7 +947,7 @@ + } + jpeg_create_decompress(&cinfo); + +- jpeg_mem_src(&cinfo, infile, length); ++ local_jpeg_mem_src(&cinfo, infile, length); + + (void) jpeg_read_header(&cinfo, TRUE); + +@@ -1041,7 +1043,7 @@ + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; + } + +-void jpeg_mem_dest (j_compress_ptr cinfo, vfsfile_t *vfs) ++void local_jpeg_mem_dest (j_compress_ptr cinfo, vfsfile_t *vfs) + { + my_destination_mgr *dest; + +@@ -1101,7 +1103,7 @@ + + buffer = screendata; + +- jpeg_mem_dest(&cinfo, outfile); ++ local_jpeg_mem_dest(&cinfo, outfile); + cinfo.image_width = screenwidth; + cinfo.image_height = screenheight; + cinfo.input_components = 3; |