[97425] trunk/dports/graphics/magicpoint
jmr at macports.org
jmr at macports.org
Wed Sep 5 13:20:00 PDT 2012
Revision: 97425
https://trac.macports.org/changeset/97425
Author: jmr at macports.org
Date: 2012-09-05 13:19:58 -0700 (Wed, 05 Sep 2012)
Log Message:
-----------
magicpoint: fix build with giflib 4.2 (#34972) and libpng 1.5
Modified Paths:
--------------
trunk/dports/graphics/magicpoint/Portfile
trunk/dports/graphics/magicpoint/files/patch-image_png.c
Added Paths:
-----------
trunk/dports/graphics/magicpoint/files/patch-image_gif.c
Modified: trunk/dports/graphics/magicpoint/Portfile
===================================================================
--- trunk/dports/graphics/magicpoint/Portfile 2012-09-05 19:24:51 UTC (rev 97424)
+++ trunk/dports/graphics/magicpoint/Portfile 2012-09-05 20:19:58 UTC (rev 97425)
@@ -19,7 +19,7 @@
patchfiles patch-config.guess patch-image.h patch-new.c patch-parse.c \
patch-default.mgp patch-configure patch-freetype.patch \
- patch-image_png.c
+ patch-image_png.c patch-image_gif.c
depends_build port:pkgconfig \
port:imake
Added: trunk/dports/graphics/magicpoint/files/patch-image_gif.c
===================================================================
--- trunk/dports/graphics/magicpoint/files/patch-image_gif.c (rev 0)
+++ trunk/dports/graphics/magicpoint/files/patch-image_gif.c 2012-09-05 20:19:58 UTC (rev 97425)
@@ -0,0 +1,21 @@
+--- image/gif.c.orig 2000-03-07 17:59:56.000000000 +1100
++++ image/gif.c 2012-09-06 06:12:57.000000000 +1000
+@@ -32,6 +32,18 @@ static int InterlacedOffset[] = { 0, 4,
+ /* be read - offsets and jumps... */
+ static int InterlacedJumps[] = { 8, 8, 4, 2 };
+
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
++ ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4)
++void
++PrintGifError(void) {
++ char *Err = GifErrorString();
++ if (Err != NULL)
++ fprintf(stderr, "\nGIF-LIB error: %s.\n", Err);
++ else
++ fprintf(stderr, "\nGIF-LIB undefined error %d.\n", GifError());
++}
++#endif
++
+ Image *
+ gifLoad(fullname, name, verbose)
+ char *fullname, *name;
Modified: trunk/dports/graphics/magicpoint/files/patch-image_png.c
===================================================================
--- trunk/dports/graphics/magicpoint/files/patch-image_png.c 2012-09-05 19:24:51 UTC (rev 97424)
+++ trunk/dports/graphics/magicpoint/files/patch-image_png.c 2012-09-05 20:19:58 UTC (rev 97425)
@@ -1,5 +1,23 @@
--- image/png.c.orig 2001-04-11 18:37:00.000000000 +1000
-+++ image/png.c 2011-08-21 10:56:49.000000000 +1000
++++ image/png.c 2012-09-06 06:01:22.000000000 +1000
+@@ -44,7 +44,7 @@
+ #define PNG_CHECK_BYTES 4
+
+ int
+-pngIdent(char *fullname, char *name) {}
++pngIdent(char *fullname, char *name) {return 1;}
+
+ Image *
+ pngLoad(fullname, name, verbose)
+@@ -86,7 +86,7 @@ pngLoad(fullname, name, verbose)
+ return NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ fclose(fp);
+ return NULL;
@@ -134,7 +134,7 @@ pngLoad(fullname, name, verbose)
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120905/478f688f/attachment.html>
More information about the macports-changes
mailing list