From 87a86e9e0890979332283ef6d769c694ca2494f2 Mon Sep 17 00:00:00 2001 From: antoine Date: Wed, 24 Dec 2014 13:52:11 +0000 Subject: Properly support png 1.5 Obtained from: Archlinux --- games/motogt/Makefile | 1 - games/motogt/files/patch-src-MakeData.cpp | 34 +++++++++++++++++++++++++------ 2 files changed, 28 insertions(+), 7 deletions(-) (limited to 'games/motogt') diff --git a/games/motogt/Makefile b/games/motogt/Makefile index 479c061ea249..315e7becf1c5 100644 --- a/games/motogt/Makefile +++ b/games/motogt/Makefile @@ -25,7 +25,6 @@ USE_GL= gl BUILD_WRKSRC= ${WRKSRC}/src MAKEFILE= Makefile.lnx MAKE_JOBS_UNSAFE= yes -CFLAGS+= -I${LOCALBASE}/include/libpng15 SUB_FILES= motogt CXXFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib diff --git a/games/motogt/files/patch-src-MakeData.cpp b/games/motogt/files/patch-src-MakeData.cpp index 6f5cafff82cd..dc130a164795 100644 --- a/games/motogt/files/patch-src-MakeData.cpp +++ b/games/motogt/files/patch-src-MakeData.cpp @@ -1,16 +1,38 @@ ---- src/MakeData.cpp.orig 2011-01-10 18:40:30.000000000 +0100 -+++ src/MakeData.cpp 2012-05-03 20:21:33.000000000 +0200 -@@ -4,7 +4,9 @@ - #include +--- src/MakeData.cpp.orig 2011-01-10 17:40:30 UTC ++++ src/MakeData.cpp +@@ -5,6 +5,7 @@ #define PNG_DEBUG 3 #include -+#include #include +#include #include "global.h" #include "Config.h" #include "Confirm.h" -@@ -376,7 +378,12 @@ +@@ -109,10 +110,10 @@ struct PngFile { + + png_read_info(png_ptr, info_ptr); + +- width = info_ptr->width; +- height = info_ptr->height; +- color_type = info_ptr->color_type; +- bit_depth = info_ptr->bit_depth; ++ width = png_get_image_width(png_ptr, info_ptr); ++ height = png_get_image_height(png_ptr, info_ptr); ++ color_type = png_get_color_type(png_ptr, info_ptr); ++ bit_depth = png_get_bit_depth(png_ptr, info_ptr); + + number_of_passes = png_set_interlace_handling(png_ptr); + png_read_update_info(png_ptr, info_ptr); +@@ -125,7 +126,7 @@ struct PngFile { + + row_pointers = (png_bytep*) malloc(sizeof(png_bytep) * height); + for (int y=0; yrowbytes); ++ row_pointers[y] = (png_byte*) malloc(png_get_rowbytes(png_ptr,info_ptr)); + + png_read_image(png_ptr, row_pointers); + +@@ -376,7 +377,12 @@ struct PngFile { } fname[2]='0'+i; fname[1]='0'+j; -- cgit