diff options
author | Romain Tartière <romain@FreeBSD.org> | 2016-08-08 18:01:27 +0000 |
---|---|---|
committer | Romain Tartière <romain@FreeBSD.org> | 2016-08-08 18:01:27 +0000 |
commit | 3567abbe244276da19c461df7bb6f7b9418ec443 (patch) | |
tree | 9967ef6565c5dc5544b624eb1d553a87fecca654 /x11-toolkits | |
parent | 1e244848c825d5cdb40d2778593dcfc3cb4ac0ca (diff) | |
download | ports-3567abbe244276da19c461df7bb6f7b9418ec443.tar.gz ports-3567abbe244276da19c461df7bb6f7b9418ec443.zip |
Notes
Diffstat (limited to 'x11-toolkits')
-rw-r--r-- | x11-toolkits/libgdiplus/Makefile | 3 | ||||
-rw-r--r-- | x11-toolkits/libgdiplus/distinfo | 5 | ||||
-rw-r--r-- | x11-toolkits/libgdiplus/files/patch-src_gifcodec.c | 207 |
3 files changed, 4 insertions, 211 deletions
diff --git a/x11-toolkits/libgdiplus/Makefile b/x11-toolkits/libgdiplus/Makefile index d8b444d227e3..b0d87f738e54 100644 --- a/x11-toolkits/libgdiplus/Makefile +++ b/x11-toolkits/libgdiplus/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= libgdiplus -PORTVERSION= 3.12 -PORTREVISION= 1 +PORTVERSION= 4.2 CATEGORIES= x11-toolkits MASTER_SITES= http://download.mono-project.com/sources/${PORTNAME}/ diff --git a/x11-toolkits/libgdiplus/distinfo b/x11-toolkits/libgdiplus/distinfo index 3f80aa3bc20d..0a2f90187b82 100644 --- a/x11-toolkits/libgdiplus/distinfo +++ b/x11-toolkits/libgdiplus/distinfo @@ -1,2 +1,3 @@ -SHA256 (libgdiplus-3.12.tar.gz) = e61c4dc1bc2ba993e4f79029472efcf5760eb9e60eb20d9cd31f0ebe9113bfc9 -SIZE (libgdiplus-3.12.tar.gz) = 688120 +TIMESTAMP = 1470679254 +SHA256 (libgdiplus-4.2.tar.gz) = f332b9b8b44fd1c50b8d8d01a7296360b806c790b8297614739b3de1edbadfeb +SIZE (libgdiplus-4.2.tar.gz) = 687398 diff --git a/x11-toolkits/libgdiplus/files/patch-src_gifcodec.c b/x11-toolkits/libgdiplus/files/patch-src_gifcodec.c deleted file mode 100644 index fdaa7a88651f..000000000000 --- a/x11-toolkits/libgdiplus/files/patch-src_gifcodec.c +++ /dev/null @@ -1,207 +0,0 @@ ---- src/gifcodec.c.orig 2015-01-05 10:27:06 UTC -+++ src/gifcodec.c -@@ -40,9 +40,13 @@ GUID gdip_gif_image_format_guid = {0xb96 - #include "gifcodec.h" - - #ifdef EgifOpen --/* giflib declares this incorrectly as EgifOpen */ -+/* giflib declares this incorrectly as EgifOpen up to 4.1.2 -+ GIF_LIB_VERSION is defined up to 4.1.6, and prototype is changed in 5.0, -+ so it is safe to use it as check condition */ -+#ifdef GIF_LIB_VERSION - extern GifFileType *EGifOpen(void *userData, OutputFunc writeFunc); - #endif -+#endif - - /* Data structure used for callback */ - typedef struct -@@ -131,7 +135,11 @@ AddExtensionBlockMono(SavedImage *New, i - - if (ExtData) { - memcpy(ep->Bytes, ExtData, Len); -+#if GIFLIB_MAJOR >= 5 -+ ep->Function = New->ExtensionBlocks[New->ExtensionBlockCount++].Function; -+#else - ep->Function = New->Function; -+#endif - } - - return (GIF_OK); -@@ -234,7 +242,11 @@ DGifSlurpMono(GifFileType * GifFile, Sav - } - - case EXTENSION_RECORD_TYPE: { -+#if GIFLIB_MAJOR >= 5 -+ if (DGifGetExtension(GifFile, &temp_save.ExtensionBlocks[temp_save.ExtensionBlockCount].Function, &ExtData) == GIF_ERROR) { -+#else - if (DGifGetExtension(GifFile, &temp_save.Function, &ExtData) == GIF_ERROR) { -+#endif - return (GIF_ERROR); - } - -@@ -247,7 +259,9 @@ DGifSlurpMono(GifFileType * GifFile, Sav - if (DGifGetExtensionNext(GifFile, &ExtData) == GIF_ERROR) { - return (GIF_ERROR); - } -+#if GIFLIB_MAJOR < 5 - temp_save.Function = 0; -+#endif - } - break; - } -@@ -306,9 +320,17 @@ gdip_load_gif_image (void *stream, GpIma - loop_counter = FALSE; - - if (from_file) { -+#if GIFLIB_MAJOR >= 5 -+ gif = DGifOpen(stream, &gdip_gif_fileinputfunc, NULL); -+#else - gif = DGifOpen(stream, &gdip_gif_fileinputfunc); -+#endif - } else { -+#if GIFLIB_MAJOR >= 5 -+ gif = DGifOpen (stream, &gdip_gif_inputfunc, NULL); -+#else - gif = DGifOpen (stream, &gdip_gif_inputfunc); -+#endif - } - - if (gif == NULL) { -@@ -583,7 +605,11 @@ gdip_load_gif_image (void *stream, GpIma - } - - FreeExtensionMono(&global_extensions); -+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 -+ DGifCloseFile (gif, NULL); -+#else - DGifCloseFile (gif); -+#endif - - *image = result; - return Ok; -@@ -599,7 +625,11 @@ error: - - if (gif != NULL) { - FreeExtensionMono (&global_extensions); -+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 -+ DGifCloseFile (gif, NULL); -+#else - DGifCloseFile (gif); -+#endif - } - - *image = NULL; -@@ -663,9 +693,17 @@ gdip_save_gif_image (void *stream, GpIma - } - - if (from_file) { -+#if GIFLIB_MAJOR >= 5 -+ fp = EGifOpenFileName (stream, 0, NULL); -+#else - fp = EGifOpenFileName (stream, 0); -+#endif - } else { -+#if GIFLIB_MAJOR >= 5 -+ fp = EGifOpen (stream, gdip_gif_outputfunc, NULL); -+#else - fp = EGifOpen (stream, gdip_gif_outputfunc); -+#endif - } - - if (!fp) { -@@ -704,7 +742,11 @@ gdip_save_gif_image (void *stream, GpIma - goto error; - } - -+#if GIFLIB_MAJOR >= 5 -+ cmap = GifMakeMapObject(cmap_size, 0); -+#else - cmap = MakeMapObject(cmap_size, 0); -+#endif - - pixbuf = GdipAlloc(pixbuf_size); - if (pixbuf == NULL) { -@@ -795,7 +837,11 @@ gdip_save_gif_image (void *stream, GpIma - pixbuf = pixbuf_org; - } else { - cmap_size = 256; -+#if GIFLIB_MAJOR >= 5 -+ cmap = GifMakeMapObject (cmap_size, 0); -+#else - cmap = MakeMapObject (cmap_size, 0); -+#endif - - red = GdipAlloc(pixbuf_size); - green = GdipAlloc(pixbuf_size); -@@ -826,13 +872,21 @@ gdip_save_gif_image (void *stream, GpIma - v += 4; - } - } -+#if GIFLIB_MAJOR >= 5 -+ if (GifQuantizeBuffer(bitmap_data->width, bitmap_data->height, &cmap_size, -+#else - if (QuantizeBuffer(bitmap_data->width, bitmap_data->height, &cmap_size, -+#endif - red, green, blue, pixbuf, cmap->Colors) == GIF_ERROR) { - goto error; - } - } - -+#if GIFLIB_MAJOR >= 5 -+ cmap->BitsPerPixel = GifBitSize (cmap_size); -+#else - cmap->BitsPerPixel = BitSize (cmap_size); -+#endif - cmap->ColorCount = 1 << cmap->BitsPerPixel; - - if ((frame == 0) && (k == 0)) { -@@ -850,8 +904,15 @@ gdip_save_gif_image (void *stream, GpIma - Buffer[0] = 1; - Buffer[1] = ptr[0]; - Buffer[2] = ptr[1]; -+#if GIFLIB_MAJOR >= 5 -+ EGifPutExtensionLeader(fp, APPLICATION_EXT_FUNC_CODE); -+ EGifPutExtensionBlock(fp, 11, "NETSCAPE2.0"); -+ EGifPutExtensionBlock(fp, 3, Buffer); -+ EGifPutExtensionTrailer(fp); -+#else - EGifPutExtensionFirst(fp, APPLICATION_EXT_FUNC_CODE, 11, "NETSCAPE2.0"); - EGifPutExtensionLast(fp, APPLICATION_EXT_FUNC_CODE, 3, Buffer); -+#endif - } - } - -@@ -903,7 +964,11 @@ gdip_save_gif_image (void *stream, GpIma - pixbuf += bitmap_data->width; - } - -+#if GIFLIB_MAJOR >= 5 -+ GifFreeMapObject (cmap); -+#else - FreeMapObject (cmap); -+#endif - if (red != NULL) { - GdipFree (red); - } -@@ -925,13 +990,21 @@ gdip_save_gif_image (void *stream, GpIma - } - } - -+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 -+ EGifCloseFile (fp, NULL); -+#else - EGifCloseFile (fp); -+#endif - - return Ok; - - error: - if (cmap != NULL) { -+#if GIFLIB_MAJOR >= 5 -+ GifFreeMapObject (cmap); -+#else - FreeMapObject (cmap); -+#endif - } - - if (red != NULL) { |