diff options
-rw-r--r-- | games/etracer/Makefile | 7 | ||||
-rw-r--r-- | games/joequake/files/patch-image.c | 20 | ||||
-rw-r--r-- | games/kmquake2/Makefile | 3 | ||||
-rw-r--r-- | games/tenebrae/Makefile | 4 |
4 files changed, 28 insertions, 6 deletions
diff --git a/games/etracer/Makefile b/games/etracer/Makefile index 0395a712c227..336a664e427c 100644 --- a/games/etracer/Makefile +++ b/games/etracer/Makefile @@ -31,4 +31,11 @@ CONFIGURE_ARGS= --with-tcl="${TCL_LIBDIR}" \ --with-gl-libs="${LOCALBASE}/lib" \ --with-gl-inc="${LOCALBASE}/include" +post-patch: + ${REINPLACE_CMD} -e 's|libpng12|libpng14|g' \ + ${WRKSRC}/configure + ${REINPLACE_CMD} -e 's|int_p_NULL|NULL|g' \ + -e 's|png_infopp_NULL|NULL|g' \ + ${WRKSRC}/src/ppgltk/images/png_reader.cpp + .include <bsd.port.post.mk> diff --git a/games/joequake/files/patch-image.c b/games/joequake/files/patch-image.c index e5dce3ef01e5..ef4fede71ed2 100644 --- a/games/joequake/files/patch-image.c +++ b/games/joequake/files/patch-image.c @@ -1,5 +1,5 @@ ---- ./image.c.orig Sun Oct 16 22:47:00 2005 -+++ ./image.c Sat May 20 10:00:24 2006 +--- image.c.orig 2005-10-16 22:47:00.000000000 +0200 ++++ image.c 2010-03-30 11:54:39.000000000 +0200 @@ -422,6 +422,7 @@ buffer[i+2] = temp; } @@ -8,6 +8,15 @@ if (!COM_WriteFile(filename, buffer, size + 18)) retval = false; free (buffer); +@@ -533,7 +534,7 @@ + } + + if (colortype == PNG_COLOR_TYPE_GRAY && bitdepth < 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, pnginfo, PNG_INFO_tRNS)) + png_set_tRNS_to_alpha (png_ptr); @@ -585,17 +586,14 @@ Image_WritePNG ============= @@ -27,7 +36,7 @@ width_sign = (width < 0) ? -1 : 1; width = abs(width); -@@ -816,15 +814,12 @@ +@@ -816,16 +814,13 @@ Image_WriteJPEG ============= */ @@ -39,8 +48,9 @@ FILE *fout; struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; -- -- Q_snprintfz (name, MAX_OSPATH, "%s/%s", com_basedir, filename); +- Q_snprintfz (name, MAX_OSPATH, "%s/%s", com_basedir, filename); +- if (!(fout = fopen(name, "wb"))) { + COM_CreatePath (name); diff --git a/games/kmquake2/Makefile b/games/kmquake2/Makefile index b4ff0095efc1..5b6d1b93857b 100644 --- a/games/kmquake2/Makefile +++ b/games/kmquake2/Makefile @@ -139,8 +139,9 @@ PLIST_SUB+= SDL="@comment " .endif post-patch: -# Resolve name collision with jpeg-8 +# Resolve name collision with jpeg-8 and API png ${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \ + -e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' \ ${WRKSRC}/renderer/r_image.c .if defined(MOD_REQUESTED) @${FIND} ${WRKDIR}/${KMQ2_ADDONS:S/-1${EXTRACT_SUFX}//} \ diff --git a/games/tenebrae/Makefile b/games/tenebrae/Makefile index 609e74db8726..d1903111b600 100644 --- a/games/tenebrae/Makefile +++ b/games/tenebrae/Makefile @@ -38,6 +38,10 @@ MAKE_ENV= PTHREAD_LIBS="${PTHREAD_LIBS}" MAKE_ENV+= USE_ASM=1 .endif +post-patch: + ${REINPLACE_CMD} -e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' \ + ${WRKSRC}/gl_warp.c + pre-build: @cd ${BUILD_WRKSRC} && ${LN} -sf Makefile.i386linux Makefile |