Import of pkgsrc-2015Q2

This commit is contained in:
2016-01-21 23:41:46 +01:00
committed by sambuc
parent 4af1cdf7a9
commit f641581404
15409 changed files with 267784 additions and 121624 deletions
+2 -3
View File
@@ -1,10 +1,9 @@
# $NetBSD: Makefile,v 1.72 2014/05/31 15:56:27 wiz Exp $
# $NetBSD: Makefile,v 1.75 2015/05/23 11:52:46 kefren Exp $
DISTNAME= libgdiplus-2.10.9
DISTNAME= libgdiplus-3.12
PKGREVISION= 1
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/
+2 -2
View File
@@ -1,4 +1,4 @@
# $NetBSD: buildlink3.mk,v 1.49 2014/05/31 15:56:27 wiz Exp $
# $NetBSD: buildlink3.mk,v 1.50 2015/04/25 14:23:15 tnn Exp $
BUILDLINK_TREE+= libgdiplus
@@ -6,7 +6,7 @@ BUILDLINK_TREE+= libgdiplus
LIBGDIPLUS_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.libgdiplus+= libgdiplus>=2.8.1
BUILDLINK_ABI_DEPENDS.libgdiplus+= libgdiplus>=2.10nb14
BUILDLINK_ABI_DEPENDS.libgdiplus+= libgdiplus>=2.10.9nb2
BUILDLINK_PKGSRCDIR.libgdiplus?= ../../graphics/libgdiplus
.include "../../devel/glib2/buildlink3.mk"
+5 -7
View File
@@ -1,8 +1,6 @@
$NetBSD: distinfo,v 1.36 2014/05/20 20:20:43 adam Exp $
$NetBSD: distinfo,v 1.38 2015/05/23 11:52:46 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) = 24e33c94595355fe5762b9488d10187541e97713
-165
View File
@@ -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;
}
@@ -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 <stdio.h>
#include <math.h>
#include <glib.h>
-#include <freetype/tttables.h>
+#include <ft2build.h>
+#include FT_TRUETYPE_TABLES_H
#include <pthread.h>
#include <unistd.h>
@@ -1,42 +1,44 @@
$NetBSD: patch-src_gifcodec.c,v 1.3 2014/05/20 20:20:43 adam 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 2011-12-02 17:23:12.000000000 +0000
+++ src/gifcodec.c
@@ -39,8 +39,12 @@ GUID gdip_gif_image_format_guid = {0xb96
--- src/gifcodec.c.orig 2015-01-05 12:27:06.000000000 +0200
+++ src/gifcodec.c 2015-05-23 14:47:51.000000000 +0300
@@ -107,7 +107,7 @@ gdip_gif_inputfunc (GifFileType *gif, Gi
*/
#include "gifcodec.h"
static int
-AddExtensionBlockMono(SavedImage *New, int Len, BYTE ExtData[])
+AddExtensionBlockMono(SavedImage *New, int ExtCode, int Len, BYTE ExtData[])
{
ExtensionBlock *ep;
-/* 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
@@ -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);
@@ -232,7 +236,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);
}
@@ -245,7 +249,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);
}
@@ -46,7 +48,7 @@ Fixes for giflib 5.x
}
break;
}
@@ -304,9 +310,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) {
@@ -58,7 +60,7 @@ Fixes for giflib 5.x
}
if (gif == NULL) {
@@ -581,7 +587,7 @@ gdip_load_gif_image (void *stream, GpIma
@@ -583,7 +586,7 @@ gdip_load_gif_image (void *stream, GpIma
}
FreeExtensionMono(&global_extensions);
@@ -67,7 +69,7 @@ Fixes for giflib 5.x
*image = result;
return Ok;
@@ -597,7 +603,7 @@ error:
@@ -599,7 +602,7 @@ error:
if (gif != NULL) {
FreeExtensionMono (&global_extensions);
@@ -76,7 +78,7 @@ Fixes for giflib 5.x
}
*image = NULL;
@@ -661,9 +667,9 @@ gdip_save_gif_image (void *stream, GpIma
@@ -663,9 +666,9 @@ gdip_save_gif_image (void *stream, GpIma
}
if (from_file) {
@@ -88,7 +90,7 @@ Fixes for giflib 5.x
}
if (!fp) {
@@ -702,7 +708,7 @@ gdip_save_gif_image (void *stream, GpIma
@@ -704,7 +707,7 @@ gdip_save_gif_image (void *stream, GpIma
goto error;
}
@@ -97,7 +99,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 +798,7 @@ gdip_save_gif_image (void *stream, GpIma
pixbuf = pixbuf_org;
} else {
cmap_size = 256;
@@ -106,7 +108,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 +829,13 @@ gdip_save_gif_image (void *stream, GpIma
v += 4;
}
}
@@ -122,7 +124,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 +853,10 @@ gdip_save_gif_image (void *stream, GpIma
Buffer[0] = 1;
Buffer[1] = ptr[0];
Buffer[2] = ptr[1];
@@ -135,7 +137,7 @@ Fixes for giflib 5.x
}
}
@@ -901,7 +909,7 @@ gdip_save_gif_image (void *stream, GpIma
@@ -903,7 +908,7 @@ gdip_save_gif_image (void *stream, GpIma
pixbuf += bitmap_data->width;
}
@@ -144,7 +146,7 @@ Fixes for giflib 5.x
if (red != NULL) {
GdipFree (red);
}
@@ -923,13 +931,13 @@ gdip_save_gif_image (void *stream, GpIma
@@ -925,13 +930,13 @@ gdip_save_gif_image (void *stream, GpIma
}
}