diff options
author | Antoine Brodin <antoine@FreeBSD.org> | 2014-12-24 13:52:11 +0000 |
---|---|---|
committer | Antoine Brodin <antoine@FreeBSD.org> | 2014-12-24 13:52:11 +0000 |
commit | a858a7266f0fbc8068836f0f6ad10c10ec06ca59 (patch) | |
tree | c91cccf47f7229dde3d562644e5e31051d72e48e /games/motogt | |
parent | 15924ebac89ca61fc48abc4fde550f475e6d54bf (diff) | |
download | ports-a858a7266f0fbc8068836f0f6ad10c10ec06ca59.tar.gz ports-a858a7266f0fbc8068836f0f6ad10c10ec06ca59.zip |
Notes
Diffstat (limited to 'games/motogt')
-rw-r--r-- | games/motogt/Makefile | 1 | ||||
-rw-r--r-- | games/motogt/files/patch-src-MakeData.cpp | 34 |
2 files changed, 28 insertions, 7 deletions
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 <cstdio> +--- src/MakeData.cpp.orig 2011-01-10 17:40:30 UTC ++++ src/MakeData.cpp +@@ -5,6 +5,7 @@ #define PNG_DEBUG 3 #include <png.h> -+#include <pngpriv.h> #include <fstream> +#include <sys/stat.h> #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; y<height; y++) +- row_pointers[y] = (png_byte*) malloc(info_ptr->rowbytes); ++ 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; |