diff options
-rw-r--r-- | graphics/gd/Makefile | 3 | ||||
-rw-r--r-- | graphics/gd/distinfo | 4 | ||||
-rw-r--r-- | graphics/gd/files/patch-gd.h | 17 | ||||
-rw-r--r-- | graphics/gd/files/patch-gdft.c | 92 | ||||
-rw-r--r-- | graphics/gd/files/patch-index.html | 71 |
5 files changed, 9 insertions, 178 deletions
diff --git a/graphics/gd/Makefile b/graphics/gd/Makefile index b82d240556d9..18a91c45c54b 100644 --- a/graphics/gd/Makefile +++ b/graphics/gd/Makefile @@ -6,8 +6,7 @@ # PORTNAME= gd -PORTVERSION= 2.0.25 -PORTEPOCH= 1 +PORTVERSION= 2.0.28 CATEGORIES+= graphics MASTER_SITES= http://www.boutell.com/gd/http/ \ ${MASTER_SITE_RINGSERVER} diff --git a/graphics/gd/distinfo b/graphics/gd/distinfo index d482c990643d..00dd5999111d 100644 --- a/graphics/gd/distinfo +++ b/graphics/gd/distinfo @@ -1,2 +1,2 @@ -MD5 (gd-2.0.25.tar.gz) = 995823da0aba8ad594ca872110448dc7 -SIZE (gd-2.0.25.tar.gz) = 545183 +MD5 (gd-2.0.28.tar.gz) = 14bf0b840b309ae8a29934a7a0743fd3 +SIZE (gd-2.0.28.tar.gz) = 568797 diff --git a/graphics/gd/files/patch-gd.h b/graphics/gd/files/patch-gd.h index 0d28a17a9fdc..16f99ad84b74 100644 --- a/graphics/gd/files/patch-gd.h +++ b/graphics/gd/files/patch-gd.h @@ -1,19 +1,17 @@ ---- gd.h.orig Tue May 25 13:05:50 2004 -+++ gd.h Wed May 26 09:30:23 2004 -@@ -283,6 +283,12 @@ +--- gd.h.orig Sat Jul 17 20:02:38 2004 ++++ gd.h Wed Aug 25 13:38:59 2004 +@@ -278,6 +278,10 @@ /* Deprecated in favor of gdImageCreateFromPngCtx */ BGD_DECLARE(gdImagePtr) gdImageCreateFromPngSource (gdSourcePtr in); +#ifdef __FreeBSD__ -+BGD_DECLARE(gdImagePtr) gdImageCreateFromGif(FILE *fd); -+BGD_DECLARE(gdImagePtr) gdImageCreateFromGifCtx(gdIOCtxPtr in); +BGD_DECLARE(gdImagePtr) gdImageCreateFromGifSource(gdSourcePtr in); +#endif + BGD_DECLARE(gdImagePtr) gdImageCreateFromGd (FILE * in); BGD_DECLARE(gdImagePtr) gdImageCreateFromGdCtx (gdIOCtxPtr in); BGD_DECLARE(gdImagePtr) gdImageCreateFromGdPtr (int size, void *data); -@@ -411,6 +417,9 @@ +@@ -407,6 +411,9 @@ gdPoint, *gdPointPtr; BGD_DECLARE(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c); @@ -23,7 +21,7 @@ BGD_DECLARE(void) gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c); /* These functions still work with truecolor images, -@@ -512,6 +521,16 @@ +@@ -517,6 +524,16 @@ /* Best to free this memory with gdFree(), not free() */ BGD_DECLARE(void *) gdImageJpegPtr (gdImagePtr im, int *size, int quality); @@ -40,15 +38,12 @@ /* A custom data sink. For backwards compatibility. Use gdIOCtx instead. */ /* The sink function must return -1 on error, otherwise the number -@@ -525,6 +544,13 @@ +@@ -530,6 +547,10 @@ gdSink, *gdSinkPtr; BGD_DECLARE(void) gdImagePngToSink (gdImagePtr im, gdSinkPtr out); + +#ifdef __FreeBSD__ -+BGD_DECLARE(void) gdImageGif(gdImagePtr im, FILE *out); -+BGD_DECLARE(void *) gdImageGifPtr(gdImagePtr im, int *size); -+BGD_DECLARE(void) gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out); +BGD_DECLARE(void) gdImageGifToSink(gdImagePtr im, gdSinkPtr out); +#endif diff --git a/graphics/gd/files/patch-gdft.c b/graphics/gd/files/patch-gdft.c deleted file mode 100644 index cdee3d88935b..000000000000 --- a/graphics/gd/files/patch-gdft.c +++ /dev/null @@ -1,92 +0,0 @@ ---- gdft.c Thu Jan 16 13:29:32 2003 -+++ gdft.c Mon Mar 24 17:09:54 2003 -@@ -546,8 +546,8 @@ - a->tweencolor = gdTrueColorAlpha (gdTrueColorGetRed (fg), - gdTrueColorGetGreen (fg), - gdTrueColorGetBlue (fg), -- gdAlphaMax - -- (gdTrueColorGetAlpha (fg) * -+ gdAlphaMax - ((gdAlphaMax - -+ gdTrueColorGetAlpha (fg)) * - pixel / NUMCOLORS)); - } - else -@@ -680,10 +680,14 @@ - if (y >= im->sy || y < 0) - continue; - -- for (col = 0; col < bitmap.width; col++, pc++) -- { -- if (bitmap.pixel_mode == ft_pixel_mode_grays) -- { -+ for (col = 0; col < bitmap.width; col++, pc++) { -+ x = pen_x + col; -+ /* clip if out of bounds */ -+ if (x >= im->sx || x < 0) -+ continue; -+ -+ switch(bitmap.pixel_mode) { -+ case ft_pixel_mode_grays: - /* - * Round to NUMCOLORS levels of antialiasing for - * index color images since only 256 colors are -@@ -692,44 +696,38 @@ - tc_key.pixel = ((bitmap.buffer[pc] * NUMCOLORS) - + bitmap.num_grays / 2) - / (bitmap.num_grays - 1); -- } -- else if (bitmap.pixel_mode == ft_pixel_mode_mono) -- { -- tc_key.pixel = ((bitmap.buffer[pc / 8] -- << (pc % 8)) & 128) ? NUMCOLORS : 0; -+ break; -+ case ft_pixel_mode_mono: - /* 2.0.5: mode_mono fix from Giuliano Pochini */ - tc_key.pixel = - ((bitmap. - buffer[(col >> 3) + - pcr]) & (1 << (~col & 0x07))) ? NUMCOLORS : 0; -- } -- else -- { -+ break; -+ default: - return "Unsupported ft_pixel_mode"; -- } -+ } -+ - if (tc_key.pixel > 0) /* if not background */ - { -- x = pen_x + col; -- -- /* clip if out of bounds */ -- if (x >= im->sx || x < 0) -- continue; -- /* get pixel location in gd buffer */ -- pixel = &im->pixels[y][x]; -- if (tc_key.pixel == NUMCOLORS) -- { -+ if (im->trueColor) { -+ tc_elem = (tweencolor_t *)gdCacheGet(tc_cache, &tc_key); -+ gdImageSetPixel(im, x, y, tc_elem->tweencolor); -+ } else { -+ /* get pixel location in gd buffer */ -+ pixel = &im->pixels[y][x]; -+ if (tc_key.pixel == NUMCOLORS) - /* use fg color directly. gd 2.0.2: watch out for - negative indexes (thanks to David Marwood). */ - *pixel = (fg < 0) ? -fg : fg; -- } -- else -- { -+ else { - /* find antialised color */ - - tc_key.bgcolor = *pixel; - tc_elem = (tweencolor_t *) gdCacheGet (tc_cache, &tc_key); - *pixel = tc_elem->tweencolor; - } -+ } - } - } - } diff --git a/graphics/gd/files/patch-index.html b/graphics/gd/files/patch-index.html deleted file mode 100644 index da061462fe6c..000000000000 --- a/graphics/gd/files/patch-index.html +++ /dev/null @@ -1,71 +0,0 @@ ---- index.html Mon Nov 25 11:39:31 2002 -+++ index.html Wed Nov 27 12:47:38 2002 -@@ -35,4 +35,9 @@ - modern image formats such as PNG and JPEG as soon as possible. - -+<p>Note, that the FreeBSD port of gd2 includes support for GIF files -+ported from the earlier releases of gd. If the WITH_LZW was defined at -+build time, the software will also use LZW-compression when creating -+GIF files. -+ - <p> - gd 2.0.8 <strong>requires</strong> that the following libraries -@@ -116,4 +121,18 @@ - Portions relating to WBMP copyright 2000, 2001, 2002 Maurice Szmurlo and Johan Van - den Brande. -+ -+<p> -+GIF decompression code copyright 1990, 1991, 1993, by David Koblas -+(koblas@netcom.com). -+<p> -+Non-LZW-based GIF compression code copyright 1998, by Hutchison Avenue -+Software Corporation (<a href="http://www.hasc.com">http://www.hasc.com/</a>, -+info@hasc.com). -+<p> -+LZW-based GIF compression code David Rowley. -+Obtaining a license for the Unisys LZW compression patent is -+entirely between the user and Unisys. The authors of gd can provide -+NO assistance in this matter. -+ - <p> - <strong>Permission has been granted to copy, distribute and modify gd in any -@@ -192,5 +211,22 @@ - <li><a href="http://martin.gleeson.com/fly/">fly</a>, by Martin Gleeson - </ul> --<P> -+ -+<P><A NAME="gifpatch"><H3>What does the FreeBSD port add?</H3></A> -+ -+<p>This version reinstates GIF support. Specifically, the following -+functions are added: gdImageGif, gdImageGifPtr, gdImageGifCtx, -+gdImageGifToSink, gdImageCreateFromGif, gdImageCreateFromGifCtx, -+gdImageCreateFromGifSource. -+The can be used just like the corresponding functions for the other -+image formats. -+ -+<p>Other functions added, but not documented, are: gdImageLzw, -+gdImageLzwPtr, gdImageLzwCtx, gdImageBigGif, gdImageBigGifPtr, -+gdImageBigGifCtx. -+ -+<p>The <a href=#gdImageOpenPolygon>gdImageOpenPolygon</a> is added. -+This is basically the same as <a href=#gdImagePolygon>gdImagePolygon</A>, -+but it does not join the start and end points. It is required by GD.pm. -+ - <A NAME="whatsnew2.0.8"><H3>What's new in version 2.0.8?</H3></A> - <P> -@@ -1058,5 +1094,6 @@ - <DD> - Represents a point in the coordinate space of the image; used --by <A HREF="#gdImagePolygon">gdImagePolygon</A> and -+by <A HREF="#gdImagePolygon">gdImagePolygon</A>, -+<A HREF="#gdImageOpenPolygon">gdImageOpenPolygon</A>, and - <A HREF="#gdImageFilledPolygon">gdImageFilledPolygon</A>. - <PRE> -@@ -1068,5 +1105,6 @@ - <DD> - A pointer to a <A HREF="#gdPoint">gdPoint</A> structure; passed --as an argument to <A HREF="#gdImagePolygon">gdImagePolygon</A> -+as an argument to <A HREF="#gdImagePolygon">gdImagePolygon</A>, -+<A HREF="#gdImageOpenPolygon">gdImageOpenPolygon</A>, - and <A HREF="#gdImageFilledPolygon">gdImageFilledPolygon</A>. - </DL> |