FreeBSD Bugzilla – Attachment 212466 Details for
Bug 239614
x11-toolkits/libgdiplus: Update to 6.0.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Update to 6.0.4, take maintainership
libgdiplus_6.0.4.diff (text/plain), 16.13 KB, created by
Phillip R. Jaenke
on 2020-03-17 18:51:00 UTC
(
hide
)
Description:
Update to 6.0.4, take maintainership
Filename:
MIME Type:
Creator:
Phillip R. Jaenke
Created:
2020-03-17 18:51:00 UTC
Size:
16.13 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 528590) >+++ Makefile (working copy) >@@ -1,48 +1,48 @@ > # Created by: Tom McLaughlin <tmclaugh@sdf.lonestar.org> > # $FreeBSD$ > > PORTNAME= libgdiplus >-PORTVERSION= 5.6 >-PORTREVISION= 2 >+PORTVERSION= 6.0.4 > CATEGORIES= x11-toolkits > MASTER_SITES= http://download.mono-project.com/sources/${PORTNAME}/ > >-MAINTAINER= mono@FreeBSD.org >+MAINTAINER= prj@rootwyrm.com > COMMENT= GDI+ API for System.Windows.Forms in Mono > > LICENSE= GPLv3 > LICENSE_FILE= ${WRKSRC}/COPYING > > LIB_DEPENDS= libtiff.so:graphics/tiff \ > libgif.so:graphics/giflib \ > libpng.so:graphics/png \ > libcairo.so:graphics/cairo \ >+ libpango-1.0.so:x11-toolkits/pango \ > libfreetype.so:print/freetype2 \ > libexif.so:graphics/libexif \ > libfontconfig.so:x11-fonts/fontconfig > > GNU_CONFIGURE= yes > USES= cpe gettext-runtime gmake gnome jpeg libtool:keepla pathfix \ > pkgconfig >-USE_GNOME= glib20 >+USE_GNOME= cairo glib20 pango > USE_LDCONFIG= yes > CPPFLAGS+= -I${LOCALBASE}/include > LDFLAGS+= -L${LOCALBASE}/lib > INSTALL_TARGET= install-strip > CPE_VENDOR= mono-project > > OPTIONS_DEFINE= X11 > OPTIONS_DEFAULT=X11 > > X11_USES= xorg > X11_USE= XORG=x11,xrender > X11_CONFIGURE_OFF= --without-x11 > > PLIST_FILES= lib/libgdiplus.a \ > lib/libgdiplus.la \ > lib/libgdiplus.so \ > lib/libgdiplus.so.0 \ > lib/libgdiplus.so.0.0.0 \ > libdata/pkgconfig/libgdiplus.pc > > .include <bsd.port.mk> >Index: distinfo >=================================================================== >--- distinfo (revision 528590) >+++ distinfo (working copy) >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1534789592 >-SHA256 (libgdiplus-5.6.tar.gz) = e1f2c0443af8d37b1a2971feb8826c82e932cff36dab814b94fce22f4d3dc53a >-SIZE (libgdiplus-5.6.tar.gz) = 731564 >+TIMESTAMP = 1584469047 >+SHA256 (libgdiplus-6.0.4.tar.gz) = b75c38c9765d5b3e2fb3da4435f169c732983878c0f94b8bf9012137022abf29 >+SIZE (libgdiplus-6.0.4.tar.gz) = 1390998 >Index: files/patch-configure >=================================================================== >--- files/patch-configure (revision 528590) >+++ files/patch-configure (nonexistent) >@@ -1,11 +0,0 @@ >---- configure.orig 2018-03-28 19:28:08 UTC >-+++ configure >-@@ -14133,7 +14133,7 @@ fi >- >- >- # Add xrender here so that we don't fail to find glib if we won't have xrender.pc >--if test "x$no_x" != "xyes" && "x$x11_available" = "xyes"; then >-+if test "x$no_x" != "xyes" && test "x$x11_available" = "xyes"; then >- GDIPLUS_LIBS="$GDIPLUS_LIBS `$PKG_CONFIG --libs xrender `" >- GDIPLUS_CFLAGS="$GDIPLUS_CFLAGS `$PKG_CONFIG --cflags xrender `" >- fi > >Property changes on: files/patch-configure >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-src_gifcodec.c >=================================================================== >--- files/patch-src_gifcodec.c (revision 528590) >+++ files/patch-src_gifcodec.c (nonexistent) >@@ -1,307 +0,0 @@ >---- src/gifcodec.c.orig 2018-03-28 19:27:53 UTC >-+++ src/gifcodec.c >-@@ -39,6 +39,292 @@ GUID gdip_gif_image_format_guid = {0xb96 >- >- #include "gifcodec.h" >- >-+#define COLOR_ARRAY_SIZE 32768 >-+#define BITS_PER_PRIM_COLOR 5 >-+#define MAX_PRIM_COLOR 0x1f >-+ >-+static int SortRGBAxis; >-+ >-+typedef struct QuantizedColorType { >-+ GifByteType RGB[3]; >-+ GifByteType NewColorIndex; >-+ long Count; >-+ struct QuantizedColorType *Pnext; >-+} QuantizedColorType; >-+ >-+typedef struct NewColorMapType { >-+ GifByteType RGBMin[3], RGBWidth[3]; >-+ unsigned int NumEntries; /* # of QuantizedColorType in linked list below */ >-+ unsigned long Count; /* Total number of pixels in all the entries */ >-+ QuantizedColorType *QuantizedColors; >-+} NewColorMapType; >-+ >-+ >-+/**************************************************************************** >-+ * Routine called by qsort to compare two entries. >-+ ****************************************************************************/ >-+static int >-+SortCmpRtn(const void *Entry1, >-+ const void *Entry2) { >-+ >-+ return (*((QuantizedColorType **) Entry1))->RGB[SortRGBAxis] - >-+ (*((QuantizedColorType **) Entry2))->RGB[SortRGBAxis]; >-+} >-+ >-+/****************************************************************************** >-+ * Routine to subdivide the RGB space recursively using median cut in each >-+ * axes alternatingly until ColorMapSize different cubes exists. >-+ * The biggest cube in one dimension is subdivide unless it has only one entry. >-+ * Returns GIF_ERROR if failed, otherwise GIF_OK. >-+ ******************************************************************************/ >-+static int >-+SubdivColorMap(NewColorMapType * NewColorSubdiv, >-+ unsigned int ColorMapSize, >-+ unsigned int *NewColorMapSize) { >-+ >-+ int MaxSize; >-+ unsigned int i, j, Index = 0, NumEntries, MinColor, MaxColor; >-+ long Sum, Count; >-+ QuantizedColorType *QuantizedColor, **SortArray; >-+ >-+ while (ColorMapSize > *NewColorMapSize) { >-+ /* Find candidate for subdivision: */ >-+ MaxSize = -1; >-+ for (i = 0; i < *NewColorMapSize; i++) { >-+ for (j = 0; j < 3; j++) { >-+ if ((((int)NewColorSubdiv[i].RGBWidth[j]) > MaxSize) && >-+ (NewColorSubdiv[i].NumEntries > 1)) { >-+ MaxSize = NewColorSubdiv[i].RGBWidth[j]; >-+ Index = i; >-+ SortRGBAxis = j; >-+ } >-+ } >-+ } >-+ >-+ if (MaxSize == -1) >-+ return GIF_OK; >-+ >-+ /* Split the entry Index into two along the axis SortRGBAxis: */ >-+ >-+ /* Sort all elements in that entry along the given axis and split at >-+ * the median. */ >-+ SortArray = (QuantizedColorType **)malloc( >-+ sizeof(QuantizedColorType *) * >-+ NewColorSubdiv[Index].NumEntries); >-+ if (SortArray == NULL) >-+ return GIF_ERROR; >-+ for (j = 0, QuantizedColor = NewColorSubdiv[Index].QuantizedColors; >-+ j < NewColorSubdiv[Index].NumEntries && QuantizedColor != NULL; >-+ j++, QuantizedColor = QuantizedColor->Pnext) >-+ SortArray[j] = QuantizedColor; >-+ >-+ qsort(SortArray, NewColorSubdiv[Index].NumEntries, >-+ sizeof(QuantizedColorType *), SortCmpRtn); >-+ >-+ /* Relink the sorted list into one: */ >-+ for (j = 0; j < NewColorSubdiv[Index].NumEntries - 1; j++) >-+ SortArray[j]->Pnext = SortArray[j + 1]; >-+ SortArray[NewColorSubdiv[Index].NumEntries - 1]->Pnext = NULL; >-+ NewColorSubdiv[Index].QuantizedColors = QuantizedColor = SortArray[0]; >-+ free((char *)SortArray); >-+ >-+ /* Now simply add the Counts until we have half of the Count: */ >-+ Sum = NewColorSubdiv[Index].Count / 2 - QuantizedColor->Count; >-+ NumEntries = 1; >-+ Count = QuantizedColor->Count; >-+ while (QuantizedColor->Pnext != NULL && >-+ (Sum -= QuantizedColor->Pnext->Count) >= 0 && >-+ QuantizedColor->Pnext->Pnext != NULL) { >-+ QuantizedColor = QuantizedColor->Pnext; >-+ NumEntries++; >-+ Count += QuantizedColor->Count; >-+ } >-+ /* Save the values of the last color of the first half, and first >-+ * of the second half so we can update the Bounding Boxes later. >-+ * Also as the colors are quantized and the BBoxes are full 0..255, >-+ * they need to be rescaled. >-+ */ >-+ MaxColor = QuantizedColor->RGB[SortRGBAxis]; /* Max. of first half */ >-+ /* coverity[var_deref_op] */ >-+ MinColor = QuantizedColor->Pnext->RGB[SortRGBAxis]; /* of second */ >-+ MaxColor <<= (8 - BITS_PER_PRIM_COLOR); >-+ MinColor <<= (8 - BITS_PER_PRIM_COLOR); >-+ >-+ /* Partition right here: */ >-+ NewColorSubdiv[*NewColorMapSize].QuantizedColors = >-+ QuantizedColor->Pnext; >-+ QuantizedColor->Pnext = NULL; >-+ NewColorSubdiv[*NewColorMapSize].Count = Count; >-+ NewColorSubdiv[Index].Count -= Count; >-+ NewColorSubdiv[*NewColorMapSize].NumEntries = >-+ NewColorSubdiv[Index].NumEntries - NumEntries; >-+ NewColorSubdiv[Index].NumEntries = NumEntries; >-+ for (j = 0; j < 3; j++) { >-+ NewColorSubdiv[*NewColorMapSize].RGBMin[j] = >-+ NewColorSubdiv[Index].RGBMin[j]; >-+ NewColorSubdiv[*NewColorMapSize].RGBWidth[j] = >-+ NewColorSubdiv[Index].RGBWidth[j]; >-+ } >-+ NewColorSubdiv[*NewColorMapSize].RGBWidth[SortRGBAxis] = >-+ NewColorSubdiv[*NewColorMapSize].RGBMin[SortRGBAxis] + >-+ NewColorSubdiv[*NewColorMapSize].RGBWidth[SortRGBAxis] - MinColor; >-+ NewColorSubdiv[*NewColorMapSize].RGBMin[SortRGBAxis] = MinColor; >-+ >-+ NewColorSubdiv[Index].RGBWidth[SortRGBAxis] = >-+ MaxColor - NewColorSubdiv[Index].RGBMin[SortRGBAxis]; >-+ >-+ (*NewColorMapSize)++; >-+ } >-+ >-+ return GIF_OK; >-+} >-+ >-+/****************************************************************************** >-+ * Quantize high resolution image into lower one. Input image consists of a >-+ * 2D array for each of the RGB colors with size Width by Height. There is no >-+ * Color map for the input. Output is a quantized image with 2D array of >-+ * indexes into the output color map. >-+ * Note input image can be 24 bits at the most (8 for red/green/blue) and >-+ * the output has 256 colors at the most (256 entries in the color map.). >-+ * ColorMapSize specifies size of color map up to 256 and will be updated to >-+ * real size before returning. >-+ * Also non of the parameter are allocated by this routine. >-+ * This function returns GIF_OK if succesfull, GIF_ERROR otherwise. >-+ ******************************************************************************/ >-+static int >-+QuantizeBuffer(unsigned int Width, >-+ unsigned int Height, >-+ int *ColorMapSize, >-+ GifByteType * RedInput, >-+ GifByteType * GreenInput, >-+ GifByteType * BlueInput, >-+ GifByteType * OutputBuffer, >-+ GifColorType * OutputColorMap) { >-+ >-+ unsigned int Index, NumOfEntries; >-+ int i, j, MaxRGBError[3]; >-+ unsigned int NewColorMapSize; >-+ long Red, Green, Blue; >-+ NewColorMapType NewColorSubdiv[256]; >-+ QuantizedColorType *ColorArrayEntries, *QuantizedColor; >-+ >-+ ColorArrayEntries = (QuantizedColorType *)malloc( >-+ sizeof(QuantizedColorType) * COLOR_ARRAY_SIZE); >-+ if (ColorArrayEntries == NULL) { >-+ return GIF_ERROR; >-+ } >-+ >-+ for (i = 0; i < COLOR_ARRAY_SIZE; i++) { >-+ ColorArrayEntries[i].RGB[0] = i >> (2 * BITS_PER_PRIM_COLOR); >-+ ColorArrayEntries[i].RGB[1] = (i >> BITS_PER_PRIM_COLOR) & >-+ MAX_PRIM_COLOR; >-+ ColorArrayEntries[i].RGB[2] = i & MAX_PRIM_COLOR; >-+ ColorArrayEntries[i].Count = 0; >-+ } >-+ >-+ /* Sample the colors and their distribution: */ >-+ for (i = 0; i < (int)(Width * Height); i++) { >-+ Index = ((RedInput[i] >> (8 - BITS_PER_PRIM_COLOR)) << >-+ (2 * BITS_PER_PRIM_COLOR)) + >-+ ((GreenInput[i] >> (8 - BITS_PER_PRIM_COLOR)) << >-+ BITS_PER_PRIM_COLOR) + >-+ (BlueInput[i] >> (8 - BITS_PER_PRIM_COLOR)); >-+ ColorArrayEntries[Index].Count++; >-+ } >-+ >-+ /* Put all the colors in the first entry of the color map, and call the >-+ * recursive subdivision process. */ >-+ for (i = 0; i < 256; i++) { >-+ NewColorSubdiv[i].QuantizedColors = NULL; >-+ NewColorSubdiv[i].Count = NewColorSubdiv[i].NumEntries = 0; >-+ for (j = 0; j < 3; j++) { >-+ NewColorSubdiv[i].RGBMin[j] = 0; >-+ NewColorSubdiv[i].RGBWidth[j] = 255; >-+ } >-+ } >-+ >-+ /* Find the non empty entries in the color table and chain them: */ >-+ for (i = 0; i < COLOR_ARRAY_SIZE; i++) >-+ if (ColorArrayEntries[i].Count > 0) >-+ break; >-+ QuantizedColor = NewColorSubdiv[0].QuantizedColors = &ColorArrayEntries[i]; >-+ NumOfEntries = 1; >-+ while (++i < COLOR_ARRAY_SIZE) >-+ if (ColorArrayEntries[i].Count > 0) { >-+ QuantizedColor->Pnext = &ColorArrayEntries[i]; >-+ QuantizedColor = &ColorArrayEntries[i]; >-+ NumOfEntries++; >-+ } >-+ QuantizedColor->Pnext = NULL; >-+ >-+ NewColorSubdiv[0].NumEntries = NumOfEntries; /* Different sampled colors */ >-+ NewColorSubdiv[0].Count = ((long)Width) * Height; /* Pixels */ >-+ NewColorMapSize = 1; >-+ if (SubdivColorMap(NewColorSubdiv, *ColorMapSize, &NewColorMapSize) != >-+ GIF_OK) { >-+ free((char *)ColorArrayEntries); >-+ return GIF_ERROR; >-+ } >-+ if (NewColorMapSize < *ColorMapSize) { >-+ /* And clear rest of color map: */ >-+ for (i = NewColorMapSize; i < *ColorMapSize; i++) >-+ OutputColorMap[i].Red = OutputColorMap[i].Green = >-+ OutputColorMap[i].Blue = 0; >-+ } >-+ >-+ /* Average the colors in each entry to be the color to be used in the >-+ * output color map, and plug it into the output color map itself. */ >-+ for (i = 0; i < NewColorMapSize; i++) { >-+ if ((j = NewColorSubdiv[i].NumEntries) > 0) { >-+ QuantizedColor = NewColorSubdiv[i].QuantizedColors; >-+ Red = Green = Blue = 0; >-+ while (QuantizedColor) { >-+ QuantizedColor->NewColorIndex = i; >-+ Red += QuantizedColor->RGB[0]; >-+ Green += QuantizedColor->RGB[1]; >-+ Blue += QuantizedColor->RGB[2]; >-+ QuantizedColor = QuantizedColor->Pnext; >-+ } >-+ OutputColorMap[i].Red = (Red << (8 - BITS_PER_PRIM_COLOR)) / j; >-+ OutputColorMap[i].Green = (Green << (8 - BITS_PER_PRIM_COLOR)) / j; >-+ OutputColorMap[i].Blue = (Blue << (8 - BITS_PER_PRIM_COLOR)) / j; >-+ } else >-+ fprintf(stderr, >-+ "\n%s: Null entry in quantized color map - that's weird.\n", >-+ "libgdiplus"); >-+ } >-+ >-+ /* Finally scan the input buffer again and put the mapped index in the >-+ * output buffer. */ >-+ MaxRGBError[0] = MaxRGBError[1] = MaxRGBError[2] = 0; >-+ for (i = 0; i < (int)(Width * Height); i++) { >-+ Index = ((RedInput[i] >> (8 - BITS_PER_PRIM_COLOR)) << >-+ (2 * BITS_PER_PRIM_COLOR)) + >-+ ((GreenInput[i] >> (8 - BITS_PER_PRIM_COLOR)) << >-+ BITS_PER_PRIM_COLOR) + >-+ (BlueInput[i] >> (8 - BITS_PER_PRIM_COLOR)); >-+ Index = ColorArrayEntries[Index].NewColorIndex; >-+ OutputBuffer[i] = Index; >-+ if (MaxRGBError[0] < ABS(OutputColorMap[Index].Red - RedInput[i])) >-+ MaxRGBError[0] = ABS(OutputColorMap[Index].Red - RedInput[i]); >-+ if (MaxRGBError[1] < ABS(OutputColorMap[Index].Green - GreenInput[i])) >-+ MaxRGBError[1] = ABS(OutputColorMap[Index].Green - GreenInput[i]); >-+ if (MaxRGBError[2] < ABS(OutputColorMap[Index].Blue - BlueInput[i])) >-+ MaxRGBError[2] = ABS(OutputColorMap[Index].Blue - BlueInput[i]); >-+ } >-+ >-+#ifdef DEBUG >-+ fprintf(stderr, >-+ "Quantization L(0) errors: Red = %d, Green = %d, Blue = %d.\n", >-+ MaxRGBError[0], MaxRGBError[1], MaxRGBError[2]); >-+#endif /* DEBUG */ >-+ >-+ free((char *)ColorArrayEntries); >-+ >-+ *ColorMapSize = NewColorMapSize; >-+ >-+ return GIF_OK; >-+} >- >- /* Data structure used for callback */ >- typedef struct >-@@ -852,11 +1138,7 @@ gdip_save_gif_image (void *stream, GpIma >- } >- } >- if ( >--#if GIFLIB_MAJOR >= 5 >-- GifQuantizeBuffer( >--#else >- QuantizeBuffer( >--#endif >- bitmap_data->width, bitmap_data->height, &cmap_size, >- red, green, blue, pixbuf, cmap->Colors) == GIF_ERROR) { >- goto error; > >Property changes on: files/patch-src_gifcodec.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 239614
:
206237
| 212466