aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/gd
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2016-07-20 17:33:31 +0800
committerdinoex <dinoex@FreeBSD.org>2016-07-20 17:33:31 +0800
commit2afcd3b6ad5f06d3067961169a53647734b3e377 (patch)
treeee034c13633ca813e09b3fc925d53acc6b5eda76 /graphics/gd
parentb9a8546ed5203d05034058132b632e173b4856b1 (diff)
downloadfreebsd-ports-gnome-2afcd3b6ad5f06d3067961169a53647734b3e377.tar.gz
freebsd-ports-gnome-2afcd3b6ad5f06d3067961169a53647734b3e377.tar.zst
freebsd-ports-gnome-2afcd3b6ad5f06d3067961169a53647734b3e377.zip
- update libgd to 2.2.2
- new MASTER_SITES - add security patch PR: 210913 Submitted by: Piotr Kubaj MFH: 2016Q3 Security: CVE-2015-8874 Security: CVE-2016-3074 Security: http://www.openwall.com/lists/oss-security/2016/07/12/4
Diffstat (limited to 'graphics/gd')
-rw-r--r--graphics/gd/Makefile16
-rw-r--r--graphics/gd/distinfo6
-rw-r--r--graphics/gd/files/patch-configure11
-rw-r--r--graphics/gd/files/patch-gd_tga.c88
-rw-r--r--graphics/gd/files/patch-webpimg.c29
-rw-r--r--graphics/gd/pkg-plist4
6 files changed, 114 insertions, 40 deletions
diff --git a/graphics/gd/Makefile b/graphics/gd/Makefile
index ad6c1859b4d3..6322a70f77d9 100644
--- a/graphics/gd/Makefile
+++ b/graphics/gd/Makefile
@@ -2,28 +2,29 @@
# $FreeBSD$
PORTNAME= libgd
-PORTVERSION= 2.1.1
+PORTVERSION= 2.2.2
PORTREVISION?= 0
PORTEPOCH= 1
CATEGORIES+= graphics
-MASTER_SITES= https://bitbucket.org/libgd/gd-libgd/downloads/ \
- http://cdn.bitbucket.org/libgd/gd-libgd/downloads/
+MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/gd-${PORTVERSION}/
MAINTAINER?= dinoex@FreeBSD.org
COMMENT?= Graphics library for fast creation of images
+LICENSE= MIT
+
LIB_DEPENDS= libtiff.so:graphics/tiff \
libpng.so:graphics/png \
libfreetype.so:print/freetype2
CONFLICTS= bazaar-1.*
-USES= tar:xz pkgconfig pathfix libtool:keepla shebangfix jpeg iconv
+USES= tar:xz pkgconfig pathfix libtool:keepla shebangfix jpeg
SHEBANG_FILES= ${WRKSRC}/src/bdftogd
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
-OPTIONS_DEFINE= FONTCONFIG ICONV VPX XPM
+OPTIONS_DEFINE= FONTCONFIG ICONV VPX XPM WEBP
OPTIONS_DEFAULT=FONTCONFIG
NO_OPTIONS_SORT=yes
FONTCONFIG_LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig
@@ -35,6 +36,9 @@ VPX_CONFIGURE_OFF= --without-vpx
XPM_USE= xorg=xpm,x11
XPM_CONFIGURE_ON= --with-x
XPM_CONFIGURE_OFF= --with-xpm=no
+WEBP_LIB_DEPENDS= libwebp.so:graphics/webp
+WEBP_CONFIGURE_OFF= --without-webp
+WEBP_BROKEN= circular dependencies
.include <bsd.port.options.mk>
@@ -99,6 +103,6 @@ pre-build:
post-install:
${INSTALL_DATA} ${WRKSRC}/src/gdhelpers.h \
${STAGEDIR}${PREFIX}/include/
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libgd.so.5
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libgd.so.6.0.20202
.include <bsd.port.mk>
diff --git a/graphics/gd/distinfo b/graphics/gd/distinfo
index 5d5258b30890..d8f3527203a7 100644
--- a/graphics/gd/distinfo
+++ b/graphics/gd/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1468105350
-SHA256 (libgd-2.1.1.tar.xz) = 9ada1ed45594abc998ebc942cef12b032fbad672e73efc22bc9ff54f5df2b285
-SIZE (libgd-2.1.1.tar.xz) = 2039132
+TIMESTAMP = 1468106153
+SHA256 (libgd-2.2.2.tar.xz) = 489f756ce07f0c034b1a794f4d34fdb4d829256112cb3c36feb40bb56b79218c
+SIZE (libgd-2.2.2.tar.xz) = 2105628
diff --git a/graphics/gd/files/patch-configure b/graphics/gd/files/patch-configure
new file mode 100644
index 000000000000..2136100cb050
--- /dev/null
+++ b/graphics/gd/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.bak 2016-06-24 07:52:14.000000000 +0200
++++ configure 2016-07-10 01:24:57.924934000 +0200
+@@ -2463,7 +2463,7 @@
+ # Dynamic library version information
+ # See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
+
+-GDLIB_LT_CURRENT=3
++GDLIB_LT_CURRENT=6
+ GDLIB_LT_REVISION=$(printf '%i%02i%02i' $GDLIB_MAJOR $GDLIB_MINOR $GDLIB_REVISION)
+ GDLIB_LT_AGE=0
+
diff --git a/graphics/gd/files/patch-gd_tga.c b/graphics/gd/files/patch-gd_tga.c
new file mode 100644
index 000000000000..aacc04de8f0a
--- /dev/null
+++ b/graphics/gd/files/patch-gd_tga.c
@@ -0,0 +1,88 @@
+--- src/gd_tga.c.orig 2016-07-18 19:23:11 UTC
++++ src/gd_tga.c
+@@ -99,7 +99,7 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFro
+ if (tga->bits == TGA_BPP_24) {
+ *tpix = gdTrueColor(tga->bitmap[bitmap_caret + 2], tga->bitmap[bitmap_caret + 1], tga->bitmap[bitmap_caret]);
+ bitmap_caret += 3;
+- } else if (tga->bits == TGA_BPP_32 || tga->alphabits) {
++ } else if (tga->bits == TGA_BPP_32 && tga->alphabits) {
+ register int a = tga->bitmap[bitmap_caret + 3];
+
+ *tpix = gdTrueColorAlpha(tga->bitmap[bitmap_caret + 2], tga->bitmap[bitmap_caret + 1], tga->bitmap[bitmap_caret], gdAlphaMax - (a >> 1));
+@@ -159,16 +159,13 @@ int read_header_tga(gdIOCtx *ctx, oTga *
+ printf("wxh: %i %i\n", tga->width, tga->height);
+ #endif
+
+- switch(tga->bits) {
+- case 8:
+- case 16:
+- case 24:
+- case 32:
+- break;
+- default:
+- gd_error("bps %i not supported", tga->bits);
++ if (!((tga->bits == TGA_BPP_24 && tga->alphabits == 0)
++ || (tga->bits == TGA_BPP_32 && tga->alphabits == 8)))
++ {
++ gd_error_ex(GD_WARNING, "gd-tga: %u bits per pixel with %u alpha bits not supported\n",
++ tga->bits, tga->alphabits);
++
+ return -1;
+- break;
+ }
+
+ tga->ident = NULL;
+@@ -285,14 +285,23 @@ int read_image_tga( gdIOCtx *ctx, oTga *
+ buffer_caret = 0;
+
+ while( bitmap_caret < image_block_size ) {
+-
++
+ if ((decompression_buffer[buffer_caret] & TGA_RLE_FLAG) == TGA_RLE_FLAG) {
+ encoded_pixels = ( ( decompression_buffer[ buffer_caret ] & 127 ) + 1 );
+ buffer_caret++;
+
+- for (i = 0; i < encoded_pixels; i++) {
+- for (j = 0; j < pixel_block_size; j++, bitmap_caret++) {
+- tga->bitmap[ bitmap_caret ] = decompression_buffer[ buffer_caret + j ];
++ if (encoded_pixels != 0) {
++
++ if (!((buffer_caret + (encoded_pixels * pixel_block_size)) < image_block_size)) {
++ gdFree( decompression_buffer );
++ gdFree( conversion_buffer );
++ return -1;
++ }
++
++ for (i = 0; i < encoded_pixels; i++) {
++ for (j = 0; j < pixel_block_size; j++, bitmap_caret++) {
++ tga->bitmap[ bitmap_caret ] = decompression_buffer[ buffer_caret + j ];
++ }
+ }
+ }
+ buffer_caret += pixel_block_size;
+@@ -300,11 +309,20 @@ int read_image_tga( gdIOCtx *ctx, oTga *
+ encoded_pixels = decompression_buffer[ buffer_caret ] + 1;
+ buffer_caret++;
+
+- for (i = 0; i < encoded_pixels; i++) {
+- for( j = 0; j < pixel_block_size; j++, bitmap_caret++ ) {
+- tga->bitmap[ bitmap_caret ] = decompression_buffer[ buffer_caret + j ];
++ if (encoded_pixels != 0) {
++
++ if (!((buffer_caret + (encoded_pixels * pixel_block_size)) < image_block_size)) {
++ gdFree( decompression_buffer );
++ gdFree( conversion_buffer );
++ return -1;
++ }
++
++ for (i = 0; i < encoded_pixels; i++) {
++ for( j = 0; j < pixel_block_size; j++, bitmap_caret++ ) {
++ tga->bitmap[ bitmap_caret ] = decompression_buffer[ buffer_caret + j ];
++ }
++ buffer_caret += pixel_block_size;
+ }
+- buffer_caret += pixel_block_size;
+ }
+ }
+ }
+
diff --git a/graphics/gd/files/patch-webpimg.c b/graphics/gd/files/patch-webpimg.c
deleted file mode 100644
index 2b62d09f95e3..000000000000
--- a/graphics/gd/files/patch-webpimg.c
+++ /dev/null
@@ -1,29 +0,0 @@
-Adjust to libvpx 1.4.0 until the code is removed.
-
-https://chromium.googlesource.com/webm/libvpx/+/9cdaa3d%5E!/
-https://bitbucket.org/libgd/gd-libgd/commits/824a3aa
-
---- src/webpimg.c.orig 2013-06-25 09:58:23 UTC
-+++ src/webpimg.c
-@@ -711,14 +711,14 @@ static WebPResult VPXEncode(const uint8*
- codec_ctl(&enc, VP8E_SET_STATIC_THRESHOLD, 0);
- codec_ctl(&enc, VP8E_SET_TOKEN_PARTITIONS, 2);
-
-- vpx_img_wrap(&img, IMG_FMT_I420,
-+ vpx_img_wrap(&img, VPX_IMG_FMT_I420,
- y_width, y_height, 16, (uint8*)(Y));
-- img.planes[PLANE_Y] = (uint8*)(Y);
-- img.planes[PLANE_U] = (uint8*)(U);
-- img.planes[PLANE_V] = (uint8*)(V);
-- img.stride[PLANE_Y] = y_stride;
-- img.stride[PLANE_U] = uv_stride;
-- img.stride[PLANE_V] = uv_stride;
-+ img.planes[VPX_PLANE_Y] = (uint8*)(Y);
-+ img.planes[VPX_PLANE_U] = (uint8*)(U);
-+ img.planes[VPX_PLANE_V] = (uint8*)(V);
-+ img.stride[VPX_PLANE_Y] = y_stride;
-+ img.stride[VPX_PLANE_U] = uv_stride;
-+ img.stride[VPX_PLANE_V] = uv_stride;
-
- res = vpx_codec_encode(&enc, &img, 0, 1, 0, VPX_DL_BEST_QUALITY);
-
diff --git a/graphics/gd/pkg-plist b/graphics/gd/pkg-plist
index 6018d10e5c46..3481a12568e3 100644
--- a/graphics/gd/pkg-plist
+++ b/graphics/gd/pkg-plist
@@ -28,6 +28,6 @@ include/gdpp.h
lib/libgd.a
lib/libgd.la
lib/libgd.so
-lib/libgd.so.5
-lib/libgd.so.5.0.0
+lib/libgd.so.6
+lib/libgd.so.6.0.20202
libdata/pkgconfig/gdlib.pc