From 1b03f50abaf79a170602cb9ca205cd1b7bef7200 Mon Sep 17 00:00:00 2001 From: kefren Date: Sat, 23 May 2015 06:36:18 +0000 Subject: Update gdiplus to 3.12 - latest on mono-project site, probably released as part of mono-3.12. No other information available from master site. --- graphics/libgdiplus/Makefile | 6 +- graphics/libgdiplus/distinfo | 12 +- graphics/libgdiplus/patches/patch-aa | 165 --------------------- .../libgdiplus/patches/patch-src_gdiplus-private.h | 16 -- graphics/libgdiplus/patches/patch-src_gifcodec.c | 46 ++---- 5 files changed, 23 insertions(+), 222 deletions(-) delete mode 100644 graphics/libgdiplus/patches/patch-aa delete mode 100644 graphics/libgdiplus/patches/patch-src_gdiplus-private.h (limited to 'graphics') diff --git a/graphics/libgdiplus/Makefile b/graphics/libgdiplus/Makefile index c858d6498be..5281eeaf2d8 100644 --- a/graphics/libgdiplus/Makefile +++ b/graphics/libgdiplus/Makefile @@ -1,10 +1,8 @@ -# $NetBSD: Makefile,v 1.73 2015/04/25 14:23:15 tnn Exp $ +# $NetBSD: Makefile,v 1.74 2015/05/23 06:36:18 kefren Exp $ -DISTNAME= libgdiplus-2.10.9 -PKGREVISION= 2 +DISTNAME= libgdiplus-3.12 CATEGORIES= graphics MASTER_SITES= http://download.mono-project.com/sources/libgdiplus/ -EXTRACT_SUFX= .tar.bz2 MAINTAINER= kefren@NetBSD.org HOMEPAGE= http://www.mono-project.com/ diff --git a/graphics/libgdiplus/distinfo b/graphics/libgdiplus/distinfo index aea1c32e896..12d95ad3ad8 100644 --- a/graphics/libgdiplus/distinfo +++ b/graphics/libgdiplus/distinfo @@ -1,8 +1,6 @@ -$NetBSD: distinfo,v 1.36 2014/05/20 20:20:43 adam Exp $ +$NetBSD: distinfo,v 1.37 2015/05/23 06:36:18 kefren Exp $ -SHA1 (libgdiplus-2.10.9.tar.bz2) = 5e127b818d9af032928c7f7cfba812c1231a8478 -RMD160 (libgdiplus-2.10.9.tar.bz2) = a4cbc7d3eaa518a2186b3f8e98fc485c7da4d30b -Size (libgdiplus-2.10.9.tar.bz2) = 2074317 bytes -SHA1 (patch-aa) = 7c57287b22f92e0ac4692c5ee075d5ae0ac6d966 -SHA1 (patch-src_gdiplus-private.h) = d51ecacdeea19105c510459cdff698453583b3d3 -SHA1 (patch-src_gifcodec.c) = 4d9fbf4703369f366028aac864250ed79faeb130 +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 diff --git a/graphics/libgdiplus/patches/patch-aa b/graphics/libgdiplus/patches/patch-aa deleted file mode 100644 index c0b663b728f..00000000000 --- a/graphics/libgdiplus/patches/patch-aa +++ /dev/null @@ -1,165 +0,0 @@ -$NetBSD: patch-aa,v 1.9 2011/01/24 13:52:15 wiz Exp $ - -Fix build with png-1.5. -https://bugzilla.novell.com/show_bug.cgi?id=666583 - ---- src/pngcodec.c.orig 2010-11-03 16:52:54.000000000 +0000 -+++ src/pngcodec.c -@@ -116,10 +116,15 @@ gdip_load_png_properties (png_structp pn - bitmap_data->dpi_horz = png_get_x_pixels_per_inch(png_ptr, info_ptr); - bitmap_data->dpi_vert = png_get_y_pixels_per_inch(png_ptr, info_ptr); - #elif defined(PNG_pHYs_SUPPORTED) -- if ((info_ptr->valid & PNG_INFO_pHYs) && (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)) { -- bitmap_data->image_flags |= ImageFlagsHasRealDPI; -- bitmap_data->dpi_horz = info_ptr->x_pixels_per_unit * 0.0254; -- bitmap_data->dpi_vert = info_ptr->y_pixels_per_unit * 0.0254; -+ if (png_get_valid (png_ptr, info_ptr, PNG_INFO_pHYs)) { -+ png_uint_32 res_x, res_y; -+ int unit_type; -+ png_get_pHYs (png_ptr, info_ptr, &res_x, &res_y, &unit_type); -+ if (unit_type == PNG_RESOLUTION_METER) { -+ bitmap_data->image_flags |= ImageFlagsHasRealDPI; -+ bitmap_data->dpi_horz = res_x * 0.0254; -+ bitmap_data->dpi_vert = res_y * 0.0254; -+ } - } - #endif - /* default to screen resolution (if nothing was provided or available) */ -@@ -130,7 +135,7 @@ gdip_load_png_properties (png_structp pn - #if defined(PNG_iCCP_SUPPORTED) - { - png_charp name; -- png_charp profile; -+ png_bytep profile; - png_uint_32 proflen; - int compression_type; - -@@ -292,6 +297,11 @@ gdip_load_png_image_from_file_or_stream - ImageFlags colourspace_flag; - int i; - int j; -+ png_colorp png_palette; -+ int png_num_palette; -+ png_bytep trans_alpha; -+ int num_trans; -+ png_color_16p trans_color; - - width = png_get_image_width (png_ptr, info_ptr); - height = png_get_image_height (png_ptr, info_ptr); -@@ -309,6 +319,8 @@ gdip_load_png_image_from_file_or_stream - } - - /* Copy palette. */ -+ png_get_PLTE (png_ptr, info_ptr, &png_palette, &png_num_palette); -+ - num_colours = 1 << bit_depth; - - if (png_get_color_type (png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY) { -@@ -321,8 +333,8 @@ gdip_load_png_image_from_file_or_stream - colourspace_flag = ImageFlagsColorSpaceRGB; - - palette_entries = num_colours; -- if (palette_entries > info_ptr->num_palette) { -- palette_entries = info_ptr->num_palette; -+ if (palette_entries > png_num_palette) { -+ palette_entries = png_num_palette; - } - - palette = GdipAlloc (sizeof(ColorPalette) + (num_colours - 1) * sizeof(ARGB)); -@@ -331,29 +343,30 @@ gdip_load_png_image_from_file_or_stream - - for (i=0; i < palette_entries; i++) { - set_pixel_bgra (&palette->Entries[i], 0, -- info_ptr->palette[i].blue, -- info_ptr->palette[i].green, -- info_ptr->palette[i].red, -+ png_palette[i].blue, -+ png_palette[i].green, -+ png_palette[i].red, - 0xFF); /* alpha */ - } - } - -+ png_get_tRNS (png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color); - /* Make sure transparency is respected. */ -- if (info_ptr->num_trans > 0) { -+ if (num_trans > 0) { - palette->Flags |= PaletteFlagsHasAlpha; - colourspace_flag |= ImageFlagsHasAlpha; - -- if (info_ptr->num_trans > info_ptr->num_palette) { -- info_ptr->num_trans = info_ptr->num_palette; -+ if (num_trans > png_num_palette) { -+ num_trans = png_num_palette; - } - -- for (i=0; i < info_ptr->num_trans; i++) { -+ for (i=0; i < num_trans; i++) { - set_pixel_bgra(&palette->Entries[i], 0, -- info_ptr->palette[i].blue, -- info_ptr->palette[i].green, -- info_ptr->palette[i].red, -+ png_palette[i].blue, -+ png_palette[i].green, -+ png_palette[i].red, - #if PNG_LIBPNG_VER > 10399 -- info_ptr->trans_alpha [i]); /* alpha */ -+ trans_alpha [i]); /* alpha */ - #else - info_ptr->trans[i]); /* alpha */ - #endif -@@ -398,6 +411,8 @@ gdip_load_png_image_from_file_or_stream - BYTE bit_depth; - int stride; - int interlace; -+ png_colorp png_palette; -+ int png_num_palette; - png_bytep *row_pointers; - BYTE *rawptr; - int i, j; -@@ -490,32 +505,33 @@ gdip_load_png_image_from_file_or_stream - png_byte palette = 0; - png_byte pix = *rowp++; - -+ png_get_PLTE (png_ptr, info_ptr, &png_palette, &png_num_palette); - palette = (pix >> 6) & 0x03; - set_pixel_bgra (rawptr, 0, -- info_ptr->palette[palette].blue, -- info_ptr->palette[palette].green, -- info_ptr->palette[palette].red, -+ png_palette[palette].blue, -+ png_palette[palette].green, -+ png_palette[palette].red, - 0xFF); /* alpha */ - - palette = (pix >> 4) & 0x03; - set_pixel_bgra (rawptr, 4, -- info_ptr->palette[palette].blue, -- info_ptr->palette[palette].green, -- info_ptr->palette[palette].red, -+ png_palette[palette].blue, -+ png_palette[palette].green, -+ png_palette[palette].red, - 0xFF); /* alpha */ - - palette = (pix >> 2) & 0x03; - set_pixel_bgra (rawptr, 8, -- info_ptr->palette[palette].blue, -- info_ptr->palette[palette].green, -- info_ptr->palette[palette].red, -+ png_palette[palette].blue, -+ png_palette[palette].green, -+ png_palette[palette].red, - 0xFF); /* alpha */ - - palette = pix & 0x03; - set_pixel_bgra (rawptr, 12, -- info_ptr->palette[palette].blue, -- info_ptr->palette[palette].green, -- info_ptr->palette[palette].red, -+ png_palette[palette].blue, -+ png_palette[palette].green, -+ png_palette[palette].red, - 0xFF); /* alpha */ - rawptr += 16; - } diff --git a/graphics/libgdiplus/patches/patch-src_gdiplus-private.h b/graphics/libgdiplus/patches/patch-src_gdiplus-private.h deleted file mode 100644 index 8efb91d2214..00000000000 --- a/graphics/libgdiplus/patches/patch-src_gdiplus-private.h +++ /dev/null @@ -1,16 +0,0 @@ -$NetBSD: patch-src_gdiplus-private.h,v 1.1 2013/12/13 20:50:05 markd Exp $ - -Build with freetype 2.5.x - ---- src/gdiplus-private.h.orig 2011-01-13 22:28:19.000000000 +0000 -+++ src/gdiplus-private.h -@@ -30,7 +30,8 @@ - #include - #include - #include --#include -+#include -+#include FT_TRUETYPE_TABLES_H - #include - #include - diff --git a/graphics/libgdiplus/patches/patch-src_gifcodec.c b/graphics/libgdiplus/patches/patch-src_gifcodec.c index 21641f6ffa3..3d9e105ca04 100644 --- a/graphics/libgdiplus/patches/patch-src_gifcodec.c +++ b/graphics/libgdiplus/patches/patch-src_gifcodec.c @@ -1,24 +1,10 @@ -$NetBSD: patch-src_gifcodec.c,v 1.3 2014/05/20 20:20:43 adam Exp $ +$NetBSD: patch-src_gifcodec.c,v 1.4 2015/05/23 06:36:18 kefren Exp $ Fixes for giflib 5.x ---- src/gifcodec.c.orig 2011-12-02 17:23:12.000000000 +0000 -+++ src/gifcodec.c -@@ -39,8 +39,12 @@ GUID gdip_gif_image_format_guid = {0xb96 - - #include "gifcodec.h" - --/* 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 - - /* Data structure used for callback */ - typedef struct -@@ -129,7 +133,7 @@ AddExtensionBlockMono(SavedImage *New, i +--- src/gifcodec.c.orig 2015-01-05 12:27:06.000000000 +0200 ++++ src/gifcodec.c 2015-05-21 19:23:31.000000000 +0300 +@@ -131,7 +131,7 @@ AddExtensionBlockMono(SavedImage *New, i if (ExtData) { memcpy(ep->Bytes, ExtData, Len); @@ -27,7 +13,7 @@ Fixes for giflib 5.x } return (GIF_OK); -@@ -232,7 +236,7 @@ DGifSlurpMono(GifFileType * GifFile, Sav +@@ -234,7 +234,7 @@ DGifSlurpMono(GifFileType * GifFile, Sav } case EXTENSION_RECORD_TYPE: { @@ -36,7 +22,7 @@ Fixes for giflib 5.x return (GIF_ERROR); } -@@ -245,7 +249,9 @@ DGifSlurpMono(GifFileType * GifFile, Sav +@@ -247,7 +247,9 @@ DGifSlurpMono(GifFileType * GifFile, Sav if (DGifGetExtensionNext(GifFile, &ExtData) == GIF_ERROR) { return (GIF_ERROR); } @@ -46,7 +32,7 @@ Fixes for giflib 5.x } break; } -@@ -304,9 +310,9 @@ gdip_load_gif_image (void *stream, GpIma +@@ -306,9 +308,9 @@ gdip_load_gif_image (void *stream, GpIma loop_counter = FALSE; if (from_file) { @@ -58,7 +44,7 @@ Fixes for giflib 5.x } if (gif == NULL) { -@@ -581,7 +587,7 @@ gdip_load_gif_image (void *stream, GpIma +@@ -583,7 +585,7 @@ gdip_load_gif_image (void *stream, GpIma } FreeExtensionMono(&global_extensions); @@ -67,7 +53,7 @@ Fixes for giflib 5.x *image = result; return Ok; -@@ -597,7 +603,7 @@ error: +@@ -599,7 +601,7 @@ error: if (gif != NULL) { FreeExtensionMono (&global_extensions); @@ -76,7 +62,7 @@ Fixes for giflib 5.x } *image = NULL; -@@ -661,9 +667,9 @@ gdip_save_gif_image (void *stream, GpIma +@@ -663,9 +665,9 @@ gdip_save_gif_image (void *stream, GpIma } if (from_file) { @@ -88,7 +74,7 @@ Fixes for giflib 5.x } if (!fp) { -@@ -702,7 +708,7 @@ gdip_save_gif_image (void *stream, GpIma +@@ -704,7 +706,7 @@ gdip_save_gif_image (void *stream, GpIma goto error; } @@ -97,7 +83,7 @@ Fixes for giflib 5.x pixbuf = GdipAlloc(pixbuf_size); if (pixbuf == NULL) { -@@ -793,7 +799,7 @@ gdip_save_gif_image (void *stream, GpIma +@@ -795,7 +797,7 @@ gdip_save_gif_image (void *stream, GpIma pixbuf = pixbuf_org; } else { cmap_size = 256; @@ -106,7 +92,7 @@ Fixes for giflib 5.x red = GdipAlloc(pixbuf_size); green = GdipAlloc(pixbuf_size); -@@ -824,13 +830,13 @@ gdip_save_gif_image (void *stream, GpIma +@@ -826,13 +828,13 @@ gdip_save_gif_image (void *stream, GpIma v += 4; } } @@ -122,7 +108,7 @@ Fixes for giflib 5.x cmap->ColorCount = 1 << cmap->BitsPerPixel; if ((frame == 0) && (k == 0)) { -@@ -848,8 +854,10 @@ gdip_save_gif_image (void *stream, GpIma +@@ -850,8 +852,10 @@ gdip_save_gif_image (void *stream, GpIma Buffer[0] = 1; Buffer[1] = ptr[0]; Buffer[2] = ptr[1]; @@ -135,7 +121,7 @@ Fixes for giflib 5.x } } -@@ -901,7 +909,7 @@ gdip_save_gif_image (void *stream, GpIma +@@ -903,7 +907,7 @@ gdip_save_gif_image (void *stream, GpIma pixbuf += bitmap_data->width; } @@ -144,7 +130,7 @@ Fixes for giflib 5.x if (red != NULL) { GdipFree (red); } -@@ -923,13 +931,13 @@ gdip_save_gif_image (void *stream, GpIma +@@ -925,13 +929,13 @@ gdip_save_gif_image (void *stream, GpIma } } -- cgit v1.2.3