diff options
author | kefren <kefren@pkgsrc.org> | 2015-05-23 11:52:46 +0000 |
---|---|---|
committer | kefren <kefren@pkgsrc.org> | 2015-05-23 11:52:46 +0000 |
commit | 3357af8fcdc7d934992cb74b4d769e08beff9bd4 (patch) | |
tree | 6e130224663c48420bd9c98e4af73d570e609013 | |
parent | d5de2810d0231c055e4707ea2b45faab61a13442 (diff) | |
download | pkgsrc-3357af8fcdc7d934992cb74b4d769e08beff9bd4.tar.gz |
Add gif patch from PR/48074
PKGREVISION++
-rw-r--r-- | graphics/libgdiplus/Makefile | 3 | ||||
-rw-r--r-- | graphics/libgdiplus/distinfo | 4 | ||||
-rw-r--r-- | graphics/libgdiplus/patches/patch-src_gifcodec.c | 50 |
3 files changed, 37 insertions, 20 deletions
diff --git a/graphics/libgdiplus/Makefile b/graphics/libgdiplus/Makefile index 5281eeaf2d8..5782903a979 100644 --- a/graphics/libgdiplus/Makefile +++ b/graphics/libgdiplus/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.74 2015/05/23 06:36:18 kefren Exp $ +# $NetBSD: Makefile,v 1.75 2015/05/23 11:52:46 kefren Exp $ DISTNAME= libgdiplus-3.12 +PKGREVISION= 1 CATEGORIES= graphics MASTER_SITES= http://download.mono-project.com/sources/libgdiplus/ diff --git a/graphics/libgdiplus/distinfo b/graphics/libgdiplus/distinfo index 12d95ad3ad8..b4390b16615 100644 --- a/graphics/libgdiplus/distinfo +++ b/graphics/libgdiplus/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.37 2015/05/23 06:36:18 kefren Exp $ +$NetBSD: distinfo,v 1.38 2015/05/23 11:52:46 kefren Exp $ SHA1 (libgdiplus-3.12.tar.gz) = 7f7d2b82c0d755bb854fd76d0d62120cdde35d8c RMD160 (libgdiplus-3.12.tar.gz) = 23837bce58c2f6082b1455edebad5b7a0c95e842 Size (libgdiplus-3.12.tar.gz) = 688120 bytes -SHA1 (patch-src_gifcodec.c) = cd64434f11c7fe575e0e2ae7377cef127e115aa5 +SHA1 (patch-src_gifcodec.c) = 24e33c94595355fe5762b9488d10187541e97713 diff --git a/graphics/libgdiplus/patches/patch-src_gifcodec.c b/graphics/libgdiplus/patches/patch-src_gifcodec.c index 3d9e105ca04..58121f442ab 100644 --- a/graphics/libgdiplus/patches/patch-src_gifcodec.c +++ b/graphics/libgdiplus/patches/patch-src_gifcodec.c @@ -1,28 +1,44 @@ -$NetBSD: patch-src_gifcodec.c,v 1.4 2015/05/23 06:36:18 kefren Exp $ +$NetBSD: patch-src_gifcodec.c,v 1.5 2015/05/23 11:52:46 kefren Exp $ -Fixes for giflib 5.x +Fixes for giflib 5 --- src/gifcodec.c.orig 2015-01-05 12:27:06.000000000 +0200 -+++ src/gifcodec.c 2015-05-21 19:23:31.000000000 +0300 ++++ src/gifcodec.c 2015-05-23 14:47:51.000000000 +0300 +@@ -107,7 +107,7 @@ gdip_gif_inputfunc (GifFileType *gif, Gi + */ + + static int +-AddExtensionBlockMono(SavedImage *New, int Len, BYTE ExtData[]) ++AddExtensionBlockMono(SavedImage *New, int ExtCode, int Len, BYTE ExtData[]) + { + ExtensionBlock *ep; + @@ -131,7 +131,7 @@ AddExtensionBlockMono(SavedImage *New, i if (ExtData) { memcpy(ep->Bytes, ExtData, Len); - ep->Function = New->Function; -+ ep->Function = New->ExtensionBlocks[New->ExtensionBlockCount++].Function; ++ ep->Function = ExtCode; } return (GIF_OK); -@@ -234,7 +234,7 @@ DGifSlurpMono(GifFileType * GifFile, Sav +@@ -234,20 +234,23 @@ DGifSlurpMono(GifFileType * GifFile, Sav } case EXTENSION_RECORD_TYPE: { - if (DGifGetExtension(GifFile, &temp_save.Function, &ExtData) == GIF_ERROR) { -+ if (DGifGetExtension(GifFile, &temp_save.ExtensionBlocks[temp_save.ExtensionBlockCount].Function, &ExtData) == GIF_ERROR) { ++ int ExtCode; ++ if (DGifGetExtension(GifFile, &ExtCode, &ExtData) == GIF_ERROR) { return (GIF_ERROR); } -@@ -247,7 +247,9 @@ DGifSlurpMono(GifFileType * GifFile, Sav + while (ExtData != NULL) { + /* Create an extension block with our data */ +- if (AddExtensionBlockMono(&temp_save, ExtData[0], &ExtData[1]) == GIF_ERROR) { ++ if (AddExtensionBlockMono(&temp_save, ExtCode, ExtData[0], &ExtData[1]) == GIF_ERROR) { + return (GIF_ERROR); + } + if (DGifGetExtensionNext(GifFile, &ExtData) == GIF_ERROR) { return (GIF_ERROR); } @@ -32,7 +48,7 @@ Fixes for giflib 5.x } break; } -@@ -306,9 +308,9 @@ gdip_load_gif_image (void *stream, GpIma +@@ -306,9 +309,9 @@ gdip_load_gif_image (void *stream, GpIma loop_counter = FALSE; if (from_file) { @@ -44,7 +60,7 @@ Fixes for giflib 5.x } if (gif == NULL) { -@@ -583,7 +585,7 @@ gdip_load_gif_image (void *stream, GpIma +@@ -583,7 +586,7 @@ gdip_load_gif_image (void *stream, GpIma } FreeExtensionMono(&global_extensions); @@ -53,7 +69,7 @@ Fixes for giflib 5.x *image = result; return Ok; -@@ -599,7 +601,7 @@ error: +@@ -599,7 +602,7 @@ error: if (gif != NULL) { FreeExtensionMono (&global_extensions); @@ -62,7 +78,7 @@ Fixes for giflib 5.x } *image = NULL; -@@ -663,9 +665,9 @@ gdip_save_gif_image (void *stream, GpIma +@@ -663,9 +666,9 @@ gdip_save_gif_image (void *stream, GpIma } if (from_file) { @@ -74,7 +90,7 @@ Fixes for giflib 5.x } if (!fp) { -@@ -704,7 +706,7 @@ gdip_save_gif_image (void *stream, GpIma +@@ -704,7 +707,7 @@ gdip_save_gif_image (void *stream, GpIma goto error; } @@ -83,7 +99,7 @@ Fixes for giflib 5.x pixbuf = GdipAlloc(pixbuf_size); if (pixbuf == NULL) { -@@ -795,7 +797,7 @@ gdip_save_gif_image (void *stream, GpIma +@@ -795,7 +798,7 @@ gdip_save_gif_image (void *stream, GpIma pixbuf = pixbuf_org; } else { cmap_size = 256; @@ -92,7 +108,7 @@ Fixes for giflib 5.x red = GdipAlloc(pixbuf_size); green = GdipAlloc(pixbuf_size); -@@ -826,13 +828,13 @@ gdip_save_gif_image (void *stream, GpIma +@@ -826,13 +829,13 @@ gdip_save_gif_image (void *stream, GpIma v += 4; } } @@ -108,7 +124,7 @@ Fixes for giflib 5.x cmap->ColorCount = 1 << cmap->BitsPerPixel; if ((frame == 0) && (k == 0)) { -@@ -850,8 +852,10 @@ gdip_save_gif_image (void *stream, GpIma +@@ -850,8 +853,10 @@ gdip_save_gif_image (void *stream, GpIma Buffer[0] = 1; Buffer[1] = ptr[0]; Buffer[2] = ptr[1]; @@ -121,7 +137,7 @@ Fixes for giflib 5.x } } -@@ -903,7 +907,7 @@ gdip_save_gif_image (void *stream, GpIma +@@ -903,7 +908,7 @@ gdip_save_gif_image (void *stream, GpIma pixbuf += bitmap_data->width; } @@ -130,7 +146,7 @@ Fixes for giflib 5.x if (red != NULL) { GdipFree (red); } -@@ -925,13 +929,13 @@ gdip_save_gif_image (void *stream, GpIma +@@ -925,13 +930,13 @@ gdip_save_gif_image (void *stream, GpIma } } |