aboutsummaryrefslogtreecommitdiff
path: root/games/paintown
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2012-06-01 05:26:28 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2012-06-01 05:26:28 +0000
commit2b74a89bc8342f0b9b737c37d87737caf7b0ea1e (patch)
treec04604583d8be53b3ed7f10975be828c731f87cb /games/paintown
parent24315159daa0089f08acea4ba1b130fb6721ad5c (diff)
downloadports-2b74a89bc8342f0b9b737c37d87737caf7b0ea1e.tar.gz
ports-2b74a89bc8342f0b9b737c37d87737caf7b0ea1e.zip
Notes
Diffstat (limited to 'games/paintown')
-rw-r--r--games/paintown/Makefile4
-rw-r--r--games/paintown/files/patch-IMG_png.c35
-rw-r--r--games/paintown/files/patch-IMG_savepng.c28
3 files changed, 65 insertions, 2 deletions
diff --git a/games/paintown/Makefile b/games/paintown/Makefile
index 470a764d6404..bb351fe9d295 100644
--- a/games/paintown/Makefile
+++ b/games/paintown/Makefile
@@ -7,7 +7,7 @@
PORTNAME= paintown
PORTVERSION= 3.5.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= games
MASTER_SITES= SF
@@ -18,7 +18,7 @@ LICENSE= BSD
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS+= alleg.42:${PORTSDIR}/devel/allegro \
- png.6:${PORTSDIR}/graphics/png \
+ png15:${PORTSDIR}/graphics/png \
freetype:${PORTSDIR}/print/freetype2
USE_SCONS= yes
diff --git a/games/paintown/files/patch-IMG_png.c b/games/paintown/files/patch-IMG_png.c
new file mode 100644
index 000000000000..fce0773fe601
--- /dev/null
+++ b/games/paintown/files/patch-IMG_png.c
@@ -0,0 +1,35 @@
+--- src/util/sdl/image/IMG_png.c.orig 2012-04-29 06:46:37.000000000 +0200
++++ src/util/sdl/image/IMG_png.c 2012-04-30 06:37:36.000000000 +0200
+@@ -70,6 +70,7 @@
+ #define MACOS
+ #endif
+ #include <png.h>
++#include <pngpriv.h>
+
+
+ static struct {
+@@ -288,7 +289,7 @@
+ }
+
+ /* Load a PNG type image from an SDL datasource */
+-static void png_read_data(png_structp ctx, png_bytep area, png_size_t size)
++static void local_png_read_data(png_structp ctx, png_bytep area, png_size_t size)
+ {
+ SDL_RWops *src;
+
+@@ -347,13 +348,13 @@
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in png_create_read_struct() earlier.
+ */
+- if ( setjmp(png_ptr->jmpbuf) ) {
++ if ( setjmp(png_jmpbuf(png_ptr)) ) {
+ error = "Error reading the PNG file.";
+ goto done;
+ }
+
+ /* Set up the input control */
+- lib.png_set_read_fn(png_ptr, src, png_read_data);
++ lib.png_set_read_fn(png_ptr, src, local_png_read_data);
+
+ /* Read PNG header info */
+ lib.png_read_info(png_ptr, info_ptr);
diff --git a/games/paintown/files/patch-IMG_savepng.c b/games/paintown/files/patch-IMG_savepng.c
new file mode 100644
index 000000000000..b16cb6c054f0
--- /dev/null
+++ b/games/paintown/files/patch-IMG_savepng.c
@@ -0,0 +1,28 @@
+--- src/util/sdl/image/IMG_savepng.c.orig 2012-04-29 06:46:37.000000000 +0200
++++ src/util/sdl/image/IMG_savepng.c 2012-05-01 10:22:57.000000000 +0200
+@@ -33,6 +33,7 @@
+ #include <SDL/SDL_byteorder.h>
+ #endif
+ #include <png.h>
++#include <zlib.h>
+ #include "IMG_savepng.h"
+
+ int IMG_SavePNG(const char *file, SDL_Surface *surf,int compression){
+@@ -50,7 +52,7 @@
+ return ret;
+ }
+
+-static void png_write_data(png_structp png_ptr,png_bytep data, png_size_t length){
++static void local_png_write_data(png_structp png_ptr,png_bytep data, png_size_t length){
+ SDL_RWops *rp = (SDL_RWops*) png_get_io_ptr(png_ptr);
+ SDL_RWwrite(rp,data,1,length);
+ }
+@@ -89,7 +90,7 @@
+ goto savedone;
+ }
+ /* setup custom writer functions */
+- png_set_write_fn(png_ptr,(voidp)src,png_write_data,NULL);
++ png_set_write_fn(png_ptr,(voidp)src,local_png_write_data,NULL);
+
+ if (setjmp(png_jmpbuf(png_ptr))){
+ SDL_SetError("Unknown error writing PNG");