diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2012-06-01 05:26:28 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2012-06-01 05:26:28 +0000 |
commit | 2b74a89bc8342f0b9b737c37d87737caf7b0ea1e (patch) | |
tree | c04604583d8be53b3ed7f10975be828c731f87cb /graphics/glpng | |
parent | 24315159daa0089f08acea4ba1b130fb6721ad5c (diff) | |
download | ports-2b74a89bc8342f0b9b737c37d87737caf7b0ea1e.tar.gz ports-2b74a89bc8342f0b9b737c37d87737caf7b0ea1e.zip |
- update png to 1.5.10
Notes
Notes:
svn path=/head/; revision=297915
Diffstat (limited to 'graphics/glpng')
-rw-r--r-- | graphics/glpng/Makefile | 9 | ||||
-rw-r--r-- | graphics/glpng/files/patch-glpng.c | 49 |
2 files changed, 51 insertions, 7 deletions
diff --git a/graphics/glpng/Makefile b/graphics/glpng/Makefile index 2de93e1a95d1..0cf952ac6980 100644 --- a/graphics/glpng/Makefile +++ b/graphics/glpng/Makefile @@ -7,7 +7,7 @@ PORTNAME= glpng PORTVERSION= 1.45 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= graphics MASTER_SITES= http://www.wyatt100.freeserve.co.uk/ \ http://mirror.amdmi3.ru/distfiles/ @@ -16,7 +16,7 @@ DISTNAME= glpng MAINTAINER= amdmi3@FreeBSD.org COMMENT= Library to easily load PNG files as an OpenGL textures -LIB_DEPENDS= png.6:${PORTSDIR}/graphics/png +LIB_DEPENDS= png15:${PORTSDIR}/graphics/png USE_GL= gl USE_ZIP= yes @@ -26,11 +26,6 @@ AR?= /usr/bin/ar WRKSRC= ${WRKDIR}/src -post-patch: - @${REINPLACE_CMD} -e 's|png/|libpng/|' \ - -e 's|!png_check_sig(header, 8)|png_sig_cmp(header, 0, 8)|' \ - ${WRKSRC}/glpng.c - do-build: ${CC} ${CFLAGS} -fPIC -I${LOCALBASE}/include -I${WRKDIR}/include -c -o ${WRKSRC}/libglpng.o ${WRKSRC}/glpng.c ${CC} ${CFLAGS} -fPIC -L${LOCALBASE}/lib -shared -lGL -lpng -lz -lm -o ${WRKSRC}/libglpng.so.1 ${WRKSRC}/libglpng.o diff --git a/graphics/glpng/files/patch-glpng.c b/graphics/glpng/files/patch-glpng.c new file mode 100644 index 000000000000..5a74cc264149 --- /dev/null +++ b/graphics/glpng/files/patch-glpng.c @@ -0,0 +1,49 @@ +--- glpng.c.orig 2000-07-10 21:27:10.000000000 +0200 ++++ glpng.c 2012-04-27 08:58:12.000000000 +0200 +@@ -25,11 +25,11 @@ + #include <windows.h> + #endif + ++#include "png.h" + #include <GL/glpng.h> + #include <GL/gl.h>
+ #include <stdlib.h> + #include <math.h> +-#include "png/png.h" +
+ /* Used to decide if GL/gl.h supports the paletted extension */
+ #ifdef GL_COLOR_INDEX1_EXT
+@@ -269,14 +269,14 @@ + if (pinfo == NULL) return 0; + + fread(header, 1, 8, fp); +- if (!png_check_sig(header, 8)) return 0; ++ if (png_sig_cmp(header, 0, 8)) return 0; + + png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + info = png_create_info_struct(png); + endinfo = png_create_info_struct(png); + + // DH: added following lines
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf(png)))
+ {
+ png_destroy_read_struct(&png, &info, &endinfo);
+ return 0;
+@@ -373,14 +373,14 @@ + png_uint_32 i; + + fread(header, 1, 8, fp); +- if (!png_check_sig(header, 8)) return 0; ++ if (png_sig_cmp(header, 0, 8)) return 0; + + png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + info = png_create_info_struct(png); + endinfo = png_create_info_struct(png); + + // DH: added following lines
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf(png)))
+ {
+ png_destroy_read_struct(&png, &info, &endinfo);
+ return 0;
|