public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
@ 2016-06-24  8:16 Mike Frysinger
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2016-06-24  8:16 UTC (permalink / raw
  To: gentoo-commits

commit:     ede657b970d1deee8305dbefaf5651c37aea115c
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 24 08:15:56 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Jun 24 08:15:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ede657b9

media-libs/gd: add upstream fix for building under OS X #583584

 media-libs/gd/files/gd-2.2.2-osx-libtool.patch | 37 ++++++++++++++++++++++++++
 media-libs/gd/gd-2.2.2.ebuild                  |  4 +++
 2 files changed, 41 insertions(+)

diff --git a/media-libs/gd/files/gd-2.2.2-osx-libtool.patch b/media-libs/gd/files/gd-2.2.2-osx-libtool.patch
new file mode 100644
index 0000000..4d20f33
--- /dev/null
+++ b/media-libs/gd/files/gd-2.2.2-osx-libtool.patch
@@ -0,0 +1,37 @@
+https://bugs.gentoo.org/583584
+https://github.com/libgd/libgd/issues/241
+
+From dd6615fd138e53656a7883015d4a6b2d02292b26 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 21 May 2016 15:00:53 -0400
+Subject: [PATCH] libtool: rework revision to fix OS X breakage
+
+It seems the OS X linker restricts the revision field to 8 bits.
+Rework how we calculate that value and pack it in closer to fit.
+It might produce some collisions if we get to like 2.2.8, but oh
+well ... this field doesn't need to be super exact.
+
+Fixes #214 and fixes #241.
+---
+ configure.ac | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/configure
++++ b/configure
+@@ -2460,7 +2460,12 @@ AC_SUBST(GDLIB_VERSION)
+ # See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
+ 
+ GDLIB_LT_CURRENT=3
++# This is the version where the soname (current above) changes.  We use it
++# to reset the revision base back to zero.  It's a bit of a pain, but some
++# systems restrict the revision range below to [0..255] (like OS X).
++GDLIB_PREV_MAJOR=2
++GDLIB_PREV_MINOR=2
+-GDLIB_LT_REVISION=$(printf '%i%02i%02i' $GDLIB_MAJOR $GDLIB_MINOR $GDLIB_REVISION)
++GDLIB_LT_REVISION=$(( ((GDLIB_MAJOR - GDLIB_PREV_MAJOR) << 6) | ((GDLIB_MINOR - GDLIB_PREV_MINOR) << 3) | GDLIB_REVISION ))
+ GDLIB_LT_AGE=0
+ 
+ 
+-- 
+2.8.2
+

diff --git a/media-libs/gd/gd-2.2.2.ebuild b/media-libs/gd/gd-2.2.2.ebuild
index 9571241..e7f8742 100644
--- a/media-libs/gd/gd-2.2.2.ebuild
+++ b/media-libs/gd/gd-2.2.2.ebuild
@@ -30,6 +30,10 @@ DEPEND="${RDEPEND}
 
 S="${WORKDIR}/lib${P}"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-osx-libtool.patch #583584
+)
+
 src_prepare() {
 	default
 	elibtoolize  # for shared library on Solaris


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
@ 2016-07-22  6:05 Mike Frysinger
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2016-07-22  6:05 UTC (permalink / raw
  To: gentoo-commits

commit:     9670e5e0434f05a72dbc3d84b86f22dbcbcb1a03
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 22 05:52:53 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Jul 22 06:04:38 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9670e5e0

media-libs/gd: drop old <2.2.2 versions

 media-libs/gd/Manifest                      |   2 -
 media-libs/gd/files/gd-2.1.1-headers.patch  |  30 --
 media-libs/gd/files/gd-2.1.1-webp-pre.patch |  28 --
 media-libs/gd/files/gd-2.1.1-webp.patch     | 409 ----------------------------
 media-libs/gd/gd-2.1.1-r1.ebuild            |  64 -----
 media-libs/gd/gd-2.2.1.ebuild               |  61 -----
 6 files changed, 594 deletions(-)

diff --git a/media-libs/gd/Manifest b/media-libs/gd/Manifest
index 37ff16c..2944033 100644
--- a/media-libs/gd/Manifest
+++ b/media-libs/gd/Manifest
@@ -1,3 +1 @@
-DIST libgd-2.1.1.tar.xz 2039132 SHA256 9ada1ed45594abc998ebc942cef12b032fbad672e73efc22bc9ff54f5df2b285 SHA512 48f444402a4b89e412870f9091b92eb26136c5c0d795722262ad973c7d4103476204a2de36133a2634b8f410d6bccdcf60afb829a74ac2fddfb96aff2cd2567b WHIRLPOOL a38cf1f060db35d247b54038e731484e6230cd8a9da263a8c4823aaf6b3ce455c0747bbbde60f131d85a48340e39a5c8d6273fa51366cbe2436530520211a238
-DIST libgd-2.2.1.tar.xz 2117160 SHA256 708762ae483e5fe46b58659f622c3e8f820c7ce0b3ae4e10ad0fbf17d4c4b976 SHA512 c19fe86230198b5ba25d7bb275f93ad3332d039accf7149036f53fc333753bacd91a80b5dca576b241e9eb20e9a4028236a485ca0f9fb8581c2a552fe4fe2262 WHIRLPOOL 41f53e0d7dc6a629190019b76dc98e35b75b64a62feb5ddb5d4fedc37d2240f1a0460dd9127b247e0e8010fcec1e10d7d846ce8e7ea6fd238087bb30e5b6f08d
 DIST libgd-2.2.2.tar.xz 2105628 SHA256 489f756ce07f0c034b1a794f4d34fdb4d829256112cb3c36feb40bb56b79218c SHA512 65c2f22ff35b5d62889921d7963d9cf808700299aece9292716555ac544e8c52ca435d6c5f817610553162e249343868a9164bf0fef9d59b61cd8075334c7e8d WHIRLPOOL 862588677be868c56af7c312e4aa66a5e67f10ccbc3cc7209b0fd23bcc3aae594c1e092b4b08ca7f913b334be47a486e696bced69d3f461056649f9ea8cc130d

diff --git a/media-libs/gd/files/gd-2.1.1-headers.patch b/media-libs/gd/files/gd-2.1.1-headers.patch
deleted file mode 100644
index 089e52f..0000000
--- a/media-libs/gd/files/gd-2.1.1-headers.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 92f5a4b113deca14e80c218e6bcd06835c3e059f Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sat, 28 Feb 2015 17:17:52 -0500
-Subject: [PATCH] tests: fix header inclusion
-
-gdnametest uses string funcs, so pull in string.h.  It also can't pull
-in test_config.h directly as it breaks when building out of tree.  Use
-the -I paths to find it.
-
-URL: https://bugs.gentoo.org/540376
-
-diff --git a/tests/gdimagefile/gdnametest.c b/tests/gdimagefile/gdnametest.c
-index dd8f019..f2bb8a6 100644
---- a/tests/gdimagefile/gdnametest.c
-+++ b/tests/gdimagefile/gdnametest.c
-@@ -1,9 +1,10 @@
- #include <stdio.h>
- #include <stdlib.h>
-+#include <string.h>
- 
- #include "gd.h"
- #include "gdtest.h"
--#include "../test_config.h"
-+#include "test_config.h"
- 
- #define WIDTH 60
- #define HEIGHT 50
--- 
-2.3.1
-

diff --git a/media-libs/gd/files/gd-2.1.1-webp-pre.patch b/media-libs/gd/files/gd-2.1.1-webp-pre.patch
deleted file mode 100644
index 766a4cb..0000000
--- a/media-libs/gd/files/gd-2.1.1-webp-pre.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-https://bugs.gentoo.org/545956
-
-From c7e5dc617c7466c44935cdefbe7e79de319f98ca Mon Sep 17 00:00:00 2001
-From: Pierre Joye <pierre.php@gmail.com>
-Date: Sat, 17 Jan 2015 08:20:17 +0100
-Subject: [PATCH]  fix #111, invalid default quantization
-
----
- src/gd_webp.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/gd_webp.c b/src/gd_webp.c
-index fae3861..a3ae1ac 100644
---- a/src/gd_webp.c
-+++ b/src/gd_webp.c
-@@ -185,6 +185,9 @@ BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantiza
- 		gd_error("gd-webp error: cannot allocate Y buffer");
- 		return;
- 	}
-+	if (quantization == -1) {
-+		quantization = 80;
-+	}
- 	vp8_quality = mapQualityToVP8QP(quantization);
- 
- 	U = Y + width * height;
--- 
-2.3.5
-

diff --git a/media-libs/gd/files/gd-2.1.1-webp.patch b/media-libs/gd/files/gd-2.1.1-webp.patch
deleted file mode 100644
index 93d9155..0000000
--- a/media-libs/gd/files/gd-2.1.1-webp.patch
+++ /dev/null
@@ -1,409 +0,0 @@
-https://bugs.gentoo.org/545956
-
-From a79232c5fa692c3b6e3f5bc95ecfc455424c3f54 Mon Sep 17 00:00:00 2001
-From: Pierre Joye <pierre.php@gmail.com>
-Date: Tue, 20 Jan 2015 04:55:11 +0100
-Subject: [PATCH] fix #129, drop VPX usage in favor of libwebp
-
----
- configure.ac          |  80 +++++------------
- src/gd_webp.c         | 231 +++++++++++++++++++++-----------------------------
- tests/Makefile.am     |   2 +-
- tests/webp/bug00111.c |   2 +-
- 4 files changed, 122 insertions(+), 193 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1024a3a..8923186 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -317,63 +317,6 @@ if test "$with_xpm" != no; then
- fi
- AM_CONDITIONAL([HAVE_LIBXPM], test "$with_xpm" = yes)
- 
--dnl check for libvpx by default
--AC_ARG_WITH(vpx,dnl
--[  --with-vpx=DIR         where to find the vpx library])
--
--case $with_vpx in
--no) ;;
--yes|"")
--  PKG_CHECK_MODULES([LIBVPX], vpx, [with_vpx=yes],
--  [
--    PKG_CHECK_MODULES([LIBVPX], libvpx, [with_vpx=yes],
--    [
--      if test "$with_vpx" = yes; then
--        AC_MSG_ERROR([VPX support requested, but not found])
--      fi
--      with_vpx=no
--    ])
--  ])
--  ;;
--*)
--  save_LIBS="$LIBS"
--  save_CPPFLAGS="$CPPFLAGS"
--
--  if test -d "$with_vpx"; then
--    LIBVPX_CFLAGS="-I$with_vpx/include"
--    LIBVPX_LIBS="-L$with_vpx/lib -lvpx"
--  fi
--
--  CPPFLAGS="$CPPFLAGS $LIBVPX_CFLAGS"
--  LIBS="$LIBS $LIBVPX_LIBS"
--
--  AC_CHECK_LIB(vpx,vpx_codec_destroy,
--    [
--      if test -z "$LIBVPX_LIBS"; then
--        LIBVPX_LIBS="-lvpx"
--      fi
--      with_vpx=yes
--    ],[
--      if test "$with_vpx" != ""; then
--        AC_MSG_ERROR([vpx support requested, but not found])
--      else
--        with_vpx=no
--      fi
--    ])
--
--  CPPFLAGS="$save_CPPFLAGS"
--  LIBS="$save_LIBS"
--  ;;
--esac
--
--if test "$with_vpx" != no; then
--  CPPFLAGS="$CPPFLAGS $LIBVPX_CFLAGS"
--  LIBS="$LIBS $LIBVPX_LIBS"
--  FEATURES="GD_VPX $FEATURES"
--  AC_DEFINE(HAVE_LIBVPX, 1, [ Define if you have the VPX library. ])
--fi
--AM_CONDITIONAL([HAVE_LIBVPX], test "$with_vpx" = yes)
--
- dnl check for libtiff by default
- AC_ARG_WITH(tiff,dnl
- [  --with-tiff=DIR         where to find the TIFF library])
-@@ -437,6 +380,27 @@ if test "$mingw_cv_win32_host" = yes; then
- AC_DEFINE([BGDWIN32], [], [Define is you are building for Win32 API])
- fi
- 
-+
-+dnl check for libwebp by default
-+AC_ARG_WITH(webp,dnl
-+[  --with-webp=DIR         where to find the webp library],
-+  [if test -d "$withval"; then
-+     LDFLAGS="$LDFLAGS -L$withval/lib"
-+     CFLAGS="$CFLAGS -I$withval/include"
-+   fi],
-+  withval=yes)
-+
-+if test "$withval" != no; then
-+  AC_CHECK_LIB(webp,WebPGetInfo,
-+    [LIBS="-lwebp $LIBS" 
-+     FEATURES="GD_WEBP $FEATURES"
-+     AC_DEFINE(HAVE_LIBWEBP, 1, [ Define if you have the webp library. ])])
-+     with_webp=yes
-+else
-+  with_webp=no
-+fi
-+AM_CONDITIONAL([HAVE_LIBWEBP], test "$with_webp" = yes)
-+
- dnl report configuration
- AC_MSG_RESULT([
- ** Configuration summary for $PACKAGE $VERSION:
-@@ -444,7 +408,7 @@ AC_MSG_RESULT([
-    Support for Zlib:                 $with_zlib
-    Support for PNG library:          $with_png
-    Support for JPEG library:         $ac_cv_lib_jpeg_jpeg_set_defaults
--   Support for VPX library:          $with_vpx
-+   Support for WebP library:         $with_webp
-    Support for TIFF library:         $with_tiff
-    Support for Freetype 2.x library: $with_freetype
-    Support for Fontconfig library:   $with_fontconfig
-diff --git a/src/gd_webp.c b/src/gd_webp.c
-index a3ae1ac..c44bd80 100644
---- a/src/gd_webp.c
-+++ b/src/gd_webp.c
-@@ -2,33 +2,21 @@
- #include "config.h"
- #endif /* HAVE_CONFIG_H */
- 
-+
-+#ifdef HAVE_LIBWEBP
- #include <stdio.h>
- #include <math.h>
- #include <string.h>
- #include <stdlib.h>
- #include "gd.h"
- #include "gd_errors.h"
--
--#ifdef HAVE_LIBVPX
--#include "webpimg.h"
- #include "gdhelpers.h"
-+#include "webp/decode.h"
-+#include "webp/encode.h"
- 
--extern void gd_YUV420toRGBA(uint8* Y,
--				  uint8* U,
--				  uint8* V,
--				  gdImagePtr im);
--
--extern void gd_RGBAToYUV420(gdImagePtr im2,
--				  uint8* Y,
--				  uint8* U,
--				  uint8* V);
--
--const char * gdWebpGetVersionString()
--{
--	return "not defined";
--}
-+#define GD_WEBP_ALLOC_STEP (4*1024)
- 
--BGD_DECLARE(gdImagePtr) gdImageCreateFromWebp (FILE * inFile)
-+gdImagePtr gdImageCreateFromWebp (FILE * inFile)
- {
- 	gdImagePtr im;
- 	gdIOCtx *in = gdNewFileCtx(inFile);
-@@ -38,42 +26,16 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromWebp (FILE * inFile)
- 	return im;
- }
- 
--BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpPtr (int size, void *data)
-+gdImagePtr gdImageCreateFromWebpCtx (gdIOCtx * infile)
- {
--	int	width, height, ret;
-- 	unsigned char   *Y = NULL;
--	unsigned char   *U = NULL;
--	unsigned char   *V = NULL;
--	gdImagePtr im;
--
--	ret = WebPDecode(data, size, &Y, &U, &V, &width, &height);
--	if (ret != webp_success) {
--		if (Y) free(Y);
--		if (U) free(U);
--		if (V) free(V);
--		gd_error("WebP decode: fail to decode input data");
--		return NULL;
--	}
--	im = gdImageCreateTrueColor(width, height);
--	if (!im) {
--		return NULL;
--	}
--	gd_YUV420toRGBA(Y, U, V, im);
--	return im;
--}
--
--#define GD_WEBP_ALLOC_STEP (4*1024)
--
--BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpCtx (gdIOCtx * infile)
--{
--	int	width, height, ret;
--	unsigned char   *filedata = NULL;
-+	int    width, height;
-+	uint8_t   *filedata = NULL;
-+	uint8_t    *argb = NULL;
- 	unsigned char   *read, *temp;
--	unsigned char   *Y = NULL;
--	unsigned char   *U = NULL;
--	unsigned char   *V = NULL;
- 	size_t size = 0, n;
- 	gdImagePtr im;
-+	int x, y;
-+	uint8_t *p;
- 
- 	do {
- 		temp = gdRealloc(filedata, size+GD_WEBP_ALLOC_STEP);
-@@ -89,23 +51,97 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpCtx (gdIOCtx * infile)
- 		}
- 
- 		n = gdGetBuf(read, GD_WEBP_ALLOC_STEP, infile);
--		size += n;
--	} while (n>0);
-+		if (n>0 && n!=EOF) {
-+			size += n;
-+		}
-+	} while (n>0 && n!=EOF);
- 
--	ret = WebPDecode(filedata, size, &Y, &U, &V, &width, &height);
--	gdFree(filedata);
--	if (ret != webp_success) {
--		if (Y) free(Y);
--		if (U) free(U);
--		if (V) free(V);
--		gd_error("WebP decode: fail to decode input data");
-+	if (WebPGetInfo(filedata,size, &width, &height) == 0) {
-+		gd_error("gd-webp cannot get webp info");
- 		return NULL;
- 	}
-+
- 	im = gdImageCreateTrueColor(width, height);
--	gd_YUV420toRGBA(Y, U, V, im);
-+	if (!im) {
-+		return NULL;
-+	}
-+	argb = WebPDecodeARGB(filedata, size, &width, &height);
-+	if (!argb) {
-+		gd_error("gd-webp cannot allocate temporary buffer");
-+		gdFree(argb);
-+		return NULL;
-+	}
-+	for (y = 0, p = argb;  y < height; y++) {
-+		for (x = 0; x < width; x++) {
-+			register uint8_t a = gdAlphaMax - (*(p++) >> 1);
-+			register uint8_t r = *(p++);
-+			register uint8_t g = *(p++);
-+			register uint8_t b = *(p++);
-+			im->tpixels[y][x] = gdTrueColorAlpha(r, g, b, a);
-+		}
-+	}
-+	gdFree(filedata);
-+	free(argb);
-+	im->saveAlphaFlag = 1;
- 	return im;
- }
- 
-+void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
-+{
-+	uint8_t *argb;
-+	int x, y;
-+	uint8_t *p;
-+	uint8_t *out;
-+	size_t out_size;
-+
-+	if (im == NULL) {
-+		return;
-+	}
-+
-+	if (!gdImageTrueColor(im)) {
-+		gd_error("Paletter image not supported by webp");
-+		return;
-+	}
-+
-+	if (quantization == -1) {
-+		quantization = 80;
-+	}
-+
-+	argb = (uint8_t *)gdMalloc(gdImageSX(im) * 4 * gdImageSY(im));
-+	if (!argb) {
-+		return;
-+	}
-+	p = argb;
-+	for (y = 0; y < gdImageSY(im); y++) {
-+		for (x = 0; x < gdImageSX(im); x++) {
-+			register int c;
-+			register char a;
-+			c = im->tpixels[y][x];
-+			a = gdTrueColorGetAlpha(c);
-+			if (a == 127) {
-+				a = 0;
-+			} else {
-+				a = 255 - ((a << 1) + (a >> 6));
-+			}
-+			*(p++) = gdTrueColorGetRed(c);
-+			*(p++) = gdTrueColorGetGreen(c);
-+			*(p++) = gdTrueColorGetBlue(c); 
-+			*(p++) = a;
-+		}
-+	}
-+	out_size = WebPEncodeRGBA(argb, gdImageSX(im), gdImageSY(im), gdImageSX(im) * 4, quantization, &out);
-+	printf("outsize: %i\n", out_size);
-+	if (out_size == 0) {
-+		gd_error("gd-webp encoding failed");
-+		goto freeargb;
-+	}
-+	gdPutBuf(out, out_size, outfile);
-+	free(out);
-+
-+freeargb:
-+	gdFree(argb);
-+}
-+
- BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization)
- {
- 	gdIOCtx *out = gdNewFileCtx(outFile);
-@@ -116,7 +152,7 @@ BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization
- BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile)
- {
- 	gdIOCtx *out = gdNewFileCtx(outFile);
--  	gdImageWebpCtx(im, out, -1);
-+	gdImageWebpCtx(im, out, -1);
- 	out->gd_free(out);
- }
- 
-@@ -140,75 +176,4 @@ BGD_DECLARE(void *) gdImageWebpPtrEx (gdImagePtr im, int *size, int quantization
- 	out->gd_free(out);
- 	return rv;
- }
--
--/*
-- * Maps normalized QP (quality) to VP8 QP
-- */
--int mapQualityToVP8QP(int quality) {
--#define MIN_QUALITY 0
--#define MAX_QUALITY 100
--#define MIN_VP8QP 1
--#define MAX_VP8QP 63
--	const float scale = MAX_VP8QP - MIN_VP8QP;
--	const float vp8qp =
--	scale * (MAX_QUALITY - quality) / (MAX_QUALITY - MIN_QUALITY) + MIN_VP8QP;
--	if (quality < MIN_QUALITY || quality > MAX_QUALITY) {
--		gd_error("Wrong quality value %d.", quality);
--		return -1;
--	}
--
--	return (int)(vp8qp + 0.5);
--}
--
--/* This routine is based in part on code from Dale Lutz (Safe Software Inc.)
-- *  and in part on demo code from Chapter 15 of "PNG: The Definitive Guide"
-- *  (http://www.cdrom.com/pub/png/pngbook.html).
-- */
--BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
--{
--	int width = im->sx;
--	int height = im->sy;
--
--	int  yuv_width, yuv_height, yuv_nbytes, ret;
--	int vp8_quality;
--	unsigned char *Y = NULL,
--				  *U = NULL,
--				  *V = NULL;
--	unsigned char *filedata = NULL;
--
--	/* Conversion to Y,U,V buffer */
--	yuv_width = (width + 1) >> 1;
--	yuv_height = (height + 1) >> 1;
--	yuv_nbytes = width * height + 2 * yuv_width * yuv_height;
--
--	if ((Y = (unsigned char *)gdCalloc(yuv_nbytes, sizeof(unsigned char))) == NULL) {
--		gd_error("gd-webp error: cannot allocate Y buffer");
--		return;
--	}
--	if (quantization == -1) {
--		quantization = 80;
--	}
--	vp8_quality = mapQualityToVP8QP(quantization);
--
--	U = Y + width * height;
--	V = U + yuv_width * yuv_height;
--	gd_RGBAToYUV420(im, Y, U, V);
--
--	/* Encode Y,U,V and write data to file */
--	ret = WebPEncode(Y, U, V, width, height, width, yuv_width, yuv_height, yuv_width,
--					 vp8_quality, &filedata, &yuv_nbytes, NULL);
--	gdFree(Y);
--
--	if (ret != webp_success) {
--		if (filedata) {
--			free(filedata);
--		}
--		gd_error("gd-webp error: WebP Encoder failed");
--		return;
--	}
--
--	gdPutBuf (filedata, yuv_nbytes, outfile);
--	free(filedata);
--}
--
--#endif /* HAVE_LIBVPX */
-+#endif /* HAVE_LIBWEBP */
--- 
-2.3.5
-

diff --git a/media-libs/gd/gd-2.1.1-r1.ebuild b/media-libs/gd/gd-2.1.1-r1.ebuild
deleted file mode 100644
index 0890348..0000000
--- a/media-libs/gd/gd-2.1.1-r1.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-inherit libtool multilib-minimal eutils autotools
-
-DESCRIPTION="A graphics library for fast image creation"
-HOMEPAGE="http://libgd.org/ http://www.boutell.com/gd/"
-SRC_URI="https://bitbucket.org/libgd/gd-libgd/downloads/lib${P}.tar.xz"
-
-LICENSE="gd IJG HPND BSD"
-SLOT="2/3"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="fontconfig jpeg png static-libs tiff truetype webp xpm zlib"
-
-# fontconfig has prefixed font paths, details see bug #518970
-REQUIRED_USE="prefix? ( fontconfig )"
-
-RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
-	jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
-	png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
-	tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
-	truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
-	webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] )
-	xpm? ( >=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
-
-S="${WORKDIR}/lib${P}"
-
-src_prepare() {
-	epatch "${FILESDIR}/${P}-headers.patch" #540376
-	epatch "${FILESDIR}/${P}-webp-pre.patch" #545956
-	epatch "${FILESDIR}/${P}-webp.patch" #545956
-
-	#elibtoolize  # for shared library on Solaris
-	eautoreconf
-}
-
-multilib_src_configure() {
-	# we aren't actually {en,dis}abling X here ... the configure
-	# script uses it just to add explicit -I/-L paths which we
-	# don't care about on Gentoo systems.
-	ECONF_SOURCE=${S} \
-	econf \
-		--without-x \
-		$(use_enable static-libs static) \
-		$(use_with fontconfig) \
-		$(use_with png) \
-		$(use_with tiff) \
-		$(use_with truetype freetype) \
-		$(use_with jpeg) \
-		$(use_with webp) \
-		$(use_with xpm) \
-		$(use_with zlib)
-}
-
-multilib_src_install_all() {
-	dodoc NEWS README
-	prune_libtool_files
-}

diff --git a/media-libs/gd/gd-2.2.1.ebuild b/media-libs/gd/gd-2.2.1.ebuild
deleted file mode 100644
index 3f2208e..0000000
--- a/media-libs/gd/gd-2.2.1.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils libtool multilib-minimal
-
-DESCRIPTION="A graphics library for fast image creation"
-HOMEPAGE="http://libgd.org/ http://www.boutell.com/gd/"
-SRC_URI="https://github.com/libgd/libgd/releases/download/${P}/lib${P}.tar.xz"
-
-LICENSE="gd IJG HPND BSD"
-SLOT="2/3"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="fontconfig jpeg png static-libs tiff truetype webp xpm zlib"
-
-# fontconfig has prefixed font paths, details see bug #518970
-REQUIRED_USE="prefix? ( fontconfig )"
-
-RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
-	jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
-	png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
-	tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
-	truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
-	webp? ( media-libs/libwebp[${MULTILIB_USEDEP}] )
-	xpm? ( >=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
-
-S="${WORKDIR}/lib${P}"
-
-src_prepare() {
-	default
-	elibtoolize  # for shared library on Solaris
-}
-
-multilib_src_configure() {
-	# we aren't actually {en,dis}abling X here ... the configure
-	# script uses it just to add explicit -I/-L paths which we
-	# don't care about on Gentoo systems.
-	ECONF_SOURCE=${S} \
-	econf \
-		--disable-werror \
-		--without-x \
-		--without-liq \
-		$(use_enable static-libs static) \
-		$(use_with fontconfig) \
-		$(use_with png) \
-		$(use_with tiff) \
-		$(use_with truetype freetype) \
-		$(use_with jpeg) \
-		$(use_with webp) \
-		$(use_with xpm) \
-		$(use_with zlib)
-}
-
-multilib_src_install_all() {
-	#dodoc NEWS README
-	prune_libtool_files
-}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
@ 2018-09-14 19:16 Andreas Sturmlechner
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Sturmlechner @ 2018-09-14 19:16 UTC (permalink / raw
  To: gentoo-commits

commit:     04cf9aa3bf7e0746e85461c3c56d9f9a95ce6fba
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 14 19:11:20 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Sep 14 19:15:47 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04cf9aa3

media-libs/gd: Fix CVE-2018-1000222

Thanks-to: Eddie Chapman <maracay <AT> ehuk.net>
Bug: https://bugs.gentoo.org/664732
Package-Manager: Portage-2.3.49, Repoman-2.3.10

 .../gd/files/gd-2.2.5-CVE-2018-1000222.patch       | 73 ++++++++++++++++++++++
 media-libs/gd/gd-2.2.5-r1.ebuild                   | 64 +++++++++++++++++++
 2 files changed, 137 insertions(+)

diff --git a/media-libs/gd/files/gd-2.2.5-CVE-2018-1000222.patch b/media-libs/gd/files/gd-2.2.5-CVE-2018-1000222.patch
new file mode 100644
index 00000000000..80f9712bf8e
--- /dev/null
+++ b/media-libs/gd/files/gd-2.2.5-CVE-2018-1000222.patch
@@ -0,0 +1,73 @@
+From ac16bdf2d41724b5a65255d4c28fb0ec46bc42f5 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 14 Jul 2018 13:54:08 -0400
+Subject: [PATCH] bmp: check return value in gdImageBmpPtr
+
+Closes #447.
+---
+ src/gd_bmp.c | 17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/src/gd_bmp.c b/src/gd_bmp.c
+index bde0b9d3..78f40d9a 100644
+--- a/src/gd_bmp.c
++++ b/src/gd_bmp.c
+@@ -47,6 +47,8 @@ static int bmp_read_4bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp
+ static int bmp_read_8bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp_hdr_t *header);
+ static int bmp_read_rle(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info);
+ 
++static int _gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression);
++
+ #define BMP_DEBUG(s)
+ 
+ static int gdBMPPutWord(gdIOCtx *out, int w)
+@@ -87,8 +89,10 @@ BGD_DECLARE(void *) gdImageBmpPtr(gdImagePtr im, int *size, int compression)
+ 	void *rv;
+ 	gdIOCtx *out = gdNewDynamicCtx(2048, NULL);
+ 	if (out == NULL) return NULL;
+-	gdImageBmpCtx(im, out, compression);
+-	rv = gdDPExtractData(out, size);
++	if (!_gdImageBmpCtx(im, out, compression))
++		rv = gdDPExtractData(out, size);
++	else
++		rv = NULL;
+ 	out->gd_free(out);
+ 	return rv;
+ }
+@@ -141,6 +145,11 @@ BGD_DECLARE(void) gdImageBmp(gdImagePtr im, FILE *outFile, int compression)
+ 		compression - whether to apply RLE or not.
+ */
+ BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression)
++{
++	_gdImageBmpCtx(im, out, compression);
++}
++
++static int _gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression)
+ {
+ 	int bitmap_size = 0, info_size, total_size, padding;
+ 	int i, row, xpos, pixel;
+@@ -148,6 +157,7 @@ BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression)
+ 	unsigned char *uncompressed_row = NULL, *uncompressed_row_start = NULL;
+ 	FILE *tmpfile_for_compression = NULL;
+ 	gdIOCtxPtr out_original = NULL;
++	int ret = 1;
+ 
+ 	/* No compression if its true colour or we don't support seek */
+ 	if (im->trueColor) {
+@@ -325,6 +335,7 @@ BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression)
+ 		out_original = NULL;
+ 	}
+ 
++	ret = 0;
+ cleanup:
+ 	if (tmpfile_for_compression) {
+ #ifdef _WIN32
+@@ -338,7 +349,7 @@ BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression)
+ 	if (out_original) {
+ 		out_original->gd_free(out_original);
+ 	}
+-	return;
++	return ret;
+ }
+ 
+ static int compress_row(unsigned char *row, int length)

diff --git a/media-libs/gd/gd-2.2.5-r1.ebuild b/media-libs/gd/gd-2.2.5-r1.ebuild
new file mode 100644
index 00000000000..79f1957b3f5
--- /dev/null
+++ b/media-libs/gd/gd-2.2.5-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit libtool ltprune multilib-minimal
+
+DESCRIPTION="A graphics library for fast image creation"
+HOMEPAGE="http://libgd.org/ http://www.boutell.com/gd/"
+SRC_URI="https://github.com/libgd/libgd/releases/download/${P}/lib${P}.tar.xz"
+
+LICENSE="gd IJG HPND BSD"
+SLOT="2/3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="fontconfig jpeg png static-libs tiff truetype webp xpm zlib"
+
+# fontconfig has prefixed font paths, details see bug #518970
+REQUIRED_USE="prefix? ( fontconfig )"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+	jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+	png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
+	tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
+	truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
+	webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] )
+	xpm? ( >=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
+	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+S="${WORKDIR}/lib${P}"
+
+PATCHES=( "${FILESDIR}/${P}-CVE-2018-1000222.patch" )
+
+src_prepare() {
+	default
+	elibtoolize  # for shared library on Solaris
+}
+
+multilib_src_configure() {
+	# we aren't actually {en,dis}abling X here ... the configure
+	# script uses it just to add explicit -I/-L paths which we
+	# don't care about on Gentoo systems.
+	local myeconfargs=(
+		--disable-werror
+		--without-x
+		--without-liq
+		$(use_enable static-libs static)
+		$(use_with fontconfig)
+		$(use_with png)
+		$(use_with tiff)
+		$(use_with truetype freetype)
+		$(use_with jpeg)
+		$(use_with webp)
+		$(use_with xpm)
+		$(use_with zlib)
+	)
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+	dodoc README.md
+	prune_libtool_files
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
@ 2020-05-10 22:41 Thomas Deutschmann
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Deutschmann @ 2020-05-10 22:41 UTC (permalink / raw
  To: gentoo-commits

commit:     69c5150b44714482be91bee9004afffef4200a91
Author:     Sam James (sam_c) <sam <AT> cmpct <DOT> info>
AuthorDate: Tue May  5 18:11:14 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun May 10 22:35:49 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69c5150b

media-libs/gd: Security bump to 2.3.0

Bug: https://bugs.gentoo.org/719464
Bug: https://bugs.gentoo.org/632076
Bug: https://bugs.gentoo.org/608730
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sam James (sam_c) <sam <AT> cmpct.info>
Closes: https://github.com/gentoo/gentoo/pull/15657
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 media-libs/gd/Manifest                             |  1 +
 .../gd/files/gd-2.3.0-disable-flaky-tests.patch    | 25 +++++++
 media-libs/gd/files/gd-2.3.0-getlib.patch          | 81 ++++++++++++++++++++++
 media-libs/gd/gd-2.3.0.ebuild                      | 80 +++++++++++++++++++++
 4 files changed, 187 insertions(+)

diff --git a/media-libs/gd/Manifest b/media-libs/gd/Manifest
index 986a6d40524..8c9c7e108d4 100644
--- a/media-libs/gd/Manifest
+++ b/media-libs/gd/Manifest
@@ -1,3 +1,4 @@
 DIST libgd-2.2.5-ossfuzz5700.dat 30 BLAKE2B 5ddd3d2be2adf05e1e2eb1852cc689be57d4d77c57b471e8b6021877f2fb137d15b4c73445fbb23a9ed585974a96dd154759a48712c1e7b5bdc5750d534aee4a SHA512 2394e92ff7a42c818e13a1ac9ad15bc81aa401adc917366ec8c440bb7f27a63777ab059aa03c501dafef0ac16b462dd23c7fb9f8086ce558203384a98a235fff
 DIST libgd-2.2.5-php_bug_75571.dat 1731 BLAKE2B 4b5d3f258b73e8089ede1b2c9f538855f410965a9e01e1f3f151ae52f072036172b184bd1a4d07b8355bb974bf088bebb0e812175a277bb67926274272bd80a0 SHA512 b3048640ce7828cca7901fadc989e867cfc6d31b44c0f5a1bda54d7428f317c8c8fc6403fef301e193869a95eb46eb7195d47710ec7f8c507ba049cb6cdcb281
 DIST libgd-2.2.5.tar.xz 2594092 BLAKE2B 222a7e012fbf9924ac391ee96c7cd3dec96afd78c6d43dfb680b33e7143e7df87fe6be75bbfe8fb93e916302d7daf08271214c84da28712e93a36465566cb2bd SHA512 e4598e17a277a75e02255402182cab139cb3f2cffcd68ec05cc10bbeaf6bc7aa39162c3445cd4a7efc1a26b72b9152bbedb187351e3ed099ea51767319997a6b
+DIST libgd-2.3.0.tar.xz 2539188 BLAKE2B a90f48be959d1bb6774ec44960e191b8be134ff3e74401eba4cbf9b165c72665f3dffe3beaaf92fa6069e0ef79533be5d57a5946a1839f55446072fa322ed808 SHA512 5b201d22560e147a3d5471010b898ad0268c3a2453b870d1267b6ba92e540cf9f75099336c1ab08217e41827ac86fe04525726bf29ad117e5dcbaef9a8d0622a

diff --git a/media-libs/gd/files/gd-2.3.0-disable-flaky-tests.patch b/media-libs/gd/files/gd-2.3.0-disable-flaky-tests.patch
new file mode 100644
index 00000000000..245b3aac443
--- /dev/null
+++ b/media-libs/gd/files/gd-2.3.0-disable-flaky-tests.patch
@@ -0,0 +1,25 @@
+diff --git a/tests/gdimagecopyresampled/Makemodule.am b/tests/gdimagecopyresampled/Makemodule.am
+index d42eab5..3644213 100644
+--- a/tests/gdimagecopyresampled/Makemodule.am
++++ b/tests/gdimagecopyresampled/Makemodule.am
+@@ -4,8 +4,7 @@ libgd_test_programs += \
+ if HAVE_LIBPNG
+ libgd_test_programs += \
+ 	gdimagecopyresampled/basic \
+-	gdimagecopyresampled/basic_alpha \
+-	gdimagecopyresampled/bug00201
++	gdimagecopyresampled/basic_alpha
+ endif
+ 
+ EXTRA_DIST += \
+diff --git a/tests/gdimagegrayscale/Makemodule.am b/tests/gdimagegrayscale/Makemodule.am
+index c6fec00..2d81a4a 100644
+--- a/tests/gdimagegrayscale/Makemodule.am
++++ b/tests/gdimagegrayscale/Makemodule.am
+@@ -1,6 +1,5 @@
+ if HAVE_LIBPNG
+ libgd_test_programs += \
+-	gdimagegrayscale/basic \
+ 	gdimagegrayscale/bug00386
+ endif
+ 

diff --git a/media-libs/gd/files/gd-2.3.0-getlib.patch b/media-libs/gd/files/gd-2.3.0-getlib.patch
new file mode 100644
index 00000000000..91884e93292
--- /dev/null
+++ b/media-libs/gd/files/gd-2.3.0-getlib.patch
@@ -0,0 +1,81 @@
+From 635dd9a3065ed88e1741e6b963044b80e913f96a Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 24 Mar 2020 08:01:01 +0100
+Subject: [PATCH] distribute getlib.sh
+
+---
+ config/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config/Makefile.am b/config/Makefile.am
+index 122287ee..6416dda4 100644
+--- a/config/Makefile.am
++++ b/config/Makefile.am
+@@ -1,5 +1,5 @@
+ ## Process this file with automake to produce Makefile.in -*-Makefile-*-
+-EXTRA_DIST = gdlib.pc.cmake gdlib.pc.in getver.pl
++EXTRA_DIST = gdlib.pc.cmake gdlib.pc.in getlib.sh getver.pl
+ 
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = gdlib.pc
+
+diff -ruN a/config/getlib.sh b/config/getlib.sh
+--- a/config/getlib.sh	1970-01-01 00:00:00.000000000 -0000
++++ b/config/getlib.sh	2020-05-05 17:37:31.638896089 -0000
+@@ -0,0 +1,43 @@
++#!/bin/sh
++
++GETVER="${0%/*}/getver.pl"
++GDLIB_MAJOR=$("${GETVER}" MAJOR)
++GDLIB_MINOR=$("${GETVER}" MINOR)
++GDLIB_REVISION=$("${GETVER}" RELEASE)
++
++# Dynamic library version information
++# See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
++
++GDLIB_LT_CURRENT=3
++# This is the version where the soname (current above) changes.  We use it
++# to reset the revision base back to zero.  It's a bit of a pain, but some
++# systems restrict the revision range below to [0..255] (like OS X).
++GDLIB_PREV_MAJOR=2
++GDLIB_PREV_MINOR=2
++# This isn't 100% correct, but it tends to be a close enough approximation
++# for how we manage the codebase.  It's rare to do a release that doesn't
++# modify the library since this project is centered around the library.
++GDLIB_LT_REVISION=$(( ((GDLIB_MAJOR - GDLIB_PREV_MAJOR) << 6) | ((GDLIB_MINOR - GDLIB_PREV_MINOR) << 3) | GDLIB_REVISION ))
++GDLIB_LT_AGE=0
++
++# The first three fields we feed into libtool and the OS target determines how
++# they get used.  The last two fields we feed into cmake.  We use the same rules
++# as Linux SONAME versioning in libtool, but cmake should handle it for us.
++case $1 in
++CURRENT)
++	printf '%s' "${GDLIB_LT_CURRENT}"
++	;;
++REVISION)
++	printf '%s' "${GDLIB_LT_REVISION}"
++	;;
++AGE)
++	printf '%s' "${GDLIB_LT_AGE}"
++	;;
++VERSION)
++	printf '%s' "$(( GDLIB_LT_CURRENT - GDLIB_LT_AGE )).${GDLIB_LT_AGE}.${GDLIB_LT_REVISION}"
++	;;
++SONAME)
++	printf '%s' "$(( GDLIB_LT_CURRENT - GDLIB_LT_AGE ))"
++	;;
++esac
++
+diff --git a/configure.ac b/configure.ac
+index 8996053..86d0bc9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,7 +20,7 @@ AC_CANONICAL_HOST
+ 
+ dnl Keep the libtool version details in an external script so cmake can
+ dnl access the values too.
+-define([lt_gv], [config/getlib.sh ]$1)
++define([lt_gv], [${SHELL} config/getlib.sh ]$1)
+ m4_define([gd_LT_CURRENT], esyscmd(lt_gv(CURRENT)))
+ m4_define([gd_LT_REVISION], esyscmd(lt_gv(REVISION)))
+ m4_define([gd_LT_AGE], esyscmd(lt_gv(AGE)))

diff --git a/media-libs/gd/gd-2.3.0.ebuild b/media-libs/gd/gd-2.3.0.ebuild
new file mode 100644
index 00000000000..d9d3160c5c5
--- /dev/null
+++ b/media-libs/gd/gd-2.3.0.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools flag-o-matic multilib-minimal
+
+DESCRIPTION="Graphics library for fast image creation"
+HOMEPAGE="https://libgd.org/ https://www.boutell.com/gd/"
+SRC_URI="https://github.com/libgd/libgd/releases/download/${P}/lib${P}.tar.xz"
+
+LICENSE="gd IJG HPND BSD"
+SLOT="2/3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="cpu_flags_x86_sse fontconfig jpeg png static-libs test tiff truetype webp xpm zlib"
+RESTRICT="!test? ( test )"
+
+# fontconfig has prefixed font paths, details see bug #518970
+REQUIRED_USE="prefix? ( fontconfig )"
+
+RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+	jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+	png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
+	tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
+	truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
+	webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] )
+	xpm? ( >=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
+	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+S="${WORKDIR}/lib${P}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.3.0-disable-flaky-tests.patch"
+	"${FILESDIR}/${PN}-2.3.0-getlib.patch"
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+multilib_src_configure() {
+	# bug 603360, https://github.com/libgd/libgd/blob/fd06f7f83c5e78bf5b7f5397746b4e5ee4366250/docs/README.TESTING#L65
+	if use cpu_flags_x86_sse ; then
+		append-cflags -msse -mfpmath=sse
+	else
+		append-cflags -ffloat-store
+	fi
+
+	# bug 632076, https://github.com/libgd/libgd/issues/278
+	if use arm64 || use ppc64 || use s390 ; then
+		append-cflags -ffp-contract=off
+	fi
+
+	# we aren't actually {en,dis}abling X here ... the configure
+	# script uses it just to add explicit -I/-L paths which we
+	# don't care about on Gentoo systems.
+	local myeconfargs=(
+		--disable-werror
+		--without-x
+		--without-liq
+		$(use_enable static-libs static)
+		$(use_with fontconfig)
+		$(use_with png)
+		$(use_with tiff)
+		$(use_with truetype freetype)
+		$(use_with jpeg)
+		$(use_with webp)
+		$(use_with xpm)
+		$(use_with zlib)
+	)
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+	dodoc README.md
+	find "${ED}" -name '*.la' -delete || die
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
@ 2020-05-12 22:30 Thomas Deutschmann
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Deutschmann @ 2020-05-12 22:30 UTC (permalink / raw
  To: gentoo-commits

commit:     394bb39d8e64a4b5e16c32c5ce03aa28d6f713e2
Author:     Sam James (sam_c) <sam <AT> cmpct <DOT> info>
AuthorDate: Mon May 11 23:06:20 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue May 12 22:29:59 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=394bb39d

media-libs/gd: Add upstream patch for 2 tests

Fixes gdimagestring16 and gdimagestringup16 tests.

Thanks-to: ernsteiswuerfel <erhard_f <AT> mailbox.org>
Closes: https://bugs.gentoo.org/722448
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sam James (sam_c) <sam <AT> cmpct.info>
Closes: https://github.com/gentoo/gentoo/pull/15754
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../gd/files/gd-2.3.0-fix-tests-bug722448.patch    | 62 ++++++++++++++++++++++
 media-libs/gd/gd-2.3.0.ebuild                      |  1 +
 2 files changed, 63 insertions(+)

diff --git a/media-libs/gd/files/gd-2.3.0-fix-tests-bug722448.patch b/media-libs/gd/files/gd-2.3.0-fix-tests-bug722448.patch
new file mode 100644
index 00000000000..eef62fca676
--- /dev/null
+++ b/media-libs/gd/files/gd-2.3.0-fix-tests-bug722448.patch
@@ -0,0 +1,62 @@
+From ec0b4397698bd358557d33641aac4beb1912f43b Mon Sep 17 00:00:00 2001
+From: wilson chen <willson.chenwx@gmail.com>
+Date: Wed, 15 Apr 2020 00:25:01 +0800
+Subject: [PATCH] Improve test cases for gdImageString16 and gdImageStringUp16
+ (#625)
+
+Fixed #623. wchar_t is 32 bits on 64-bits AIX, which will result in test case failure.
+So we replace wchar_t with unsigned short array.
+---
+ tests/gdimagestring16/gdimagestring16.c     | 6 ++----
+ tests/gdimagestringup16/gdimagestringup16.c | 6 ++----
+ 2 files changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/tests/gdimagestring16/gdimagestring16.c b/tests/gdimagestring16/gdimagestring16.c
+index 57eae978..0ca06680 100644
+--- a/tests/gdimagestring16/gdimagestring16.c
++++ b/tests/gdimagestring16/gdimagestring16.c
+@@ -9,9 +9,7 @@ int main()
+ {
+ 	/* Declare the image */
+ 	gdImagePtr im = NULL;
+-	wchar_t *wchr = L"H";
+-	unsigned short *sptr;
+-	sptr = (unsigned short *)wchr;
++	unsigned short s[2] = {'H', 0};
+ 	int foreground;
+ 	int errorcode = 0;
+ 	gdFontPtr fontptr = gdFontGetLarge();
+@@ -20,7 +18,7 @@ int main()
+ 	gdImageColorAllocate(im, 255, 255, 255);
+ 	foreground = gdImageColorAllocate(im, 22, 4, 238);
+ 
+-	gdImageString16(im, fontptr, 2, 2, sptr, foreground);
++	gdImageString16(im, fontptr, 2, 2, s, foreground);
+ 
+ 	if (!gdAssertImageEqualsToFile("gdimagestring16/gdimagestring16_exp.png", im))
+ 		errorcode = 1;
+diff --git a/tests/gdimagestringup16/gdimagestringup16.c b/tests/gdimagestringup16/gdimagestringup16.c
+index c843abec..c24639fd 100644
+--- a/tests/gdimagestringup16/gdimagestringup16.c
++++ b/tests/gdimagestringup16/gdimagestringup16.c
+@@ -9,9 +9,7 @@ int main()
+ {
+ 	/* Declare the image */
+ 	gdImagePtr im = NULL;
+-	wchar_t *wchr = L"H";
+-	unsigned short *sptr;
+-	sptr = (unsigned short *)wchr;
++	unsigned short s[2] = {'H', 0};
+ 	int foreground;
+ 	int errorcode = 0;
+ 	gdFontPtr fontptr = gdFontGetLarge();
+@@ -20,7 +18,7 @@ int main()
+ 	gdImageColorAllocate(im, 255, 255, 255);
+ 	foreground = gdImageColorAllocate(im, 22, 4, 238);
+ 
+-	gdImageStringUp16(im, fontptr, 2, 18, sptr, foreground);
++	gdImageStringUp16(im, fontptr, 2, 18, s, foreground);
+ 
+ 	if (!gdAssertImageEqualsToFile("gdimagestringup16/gdimagestringup16_exp.png", im))
+ 		errorcode = 1;
+

diff --git a/media-libs/gd/gd-2.3.0.ebuild b/media-libs/gd/gd-2.3.0.ebuild
index d9d3160c5c5..fe6404cb6d5 100644
--- a/media-libs/gd/gd-2.3.0.ebuild
+++ b/media-libs/gd/gd-2.3.0.ebuild
@@ -34,6 +34,7 @@ S="${WORKDIR}/lib${P}"
 PATCHES=(
 	"${FILESDIR}/${PN}-2.3.0-disable-flaky-tests.patch"
 	"${FILESDIR}/${PN}-2.3.0-getlib.patch"
+	"${FILESDIR}/${P}-fix-tests-bug722448.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
@ 2022-04-17 18:32 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2022-04-17 18:32 UTC (permalink / raw
  To: gentoo-commits

commit:     34371f4c666e0e5c3beabb8b4eccb52bf5e4d150
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 18:26:55 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 18:26:55 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34371f4c

media-libs/gd: drop 2.3.0, 2.3.1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/gd/Manifest                             |  2 -
 .../gd/files/gd-2.3.0-fix-tests-bug722448.patch    | 62 ----------------
 media-libs/gd/files/gd-2.3.0-getlib.patch          | 81 ---------------------
 media-libs/gd/gd-2.3.0.ebuild                      | 83 ----------------------
 media-libs/gd/gd-2.3.1.ebuild                      | 81 ---------------------
 5 files changed, 309 deletions(-)

diff --git a/media-libs/gd/Manifest b/media-libs/gd/Manifest
index 6ff83934a003..8c8491500522 100644
--- a/media-libs/gd/Manifest
+++ b/media-libs/gd/Manifest
@@ -1,4 +1,2 @@
-DIST libgd-2.3.0.tar.xz 2539188 BLAKE2B a90f48be959d1bb6774ec44960e191b8be134ff3e74401eba4cbf9b165c72665f3dffe3beaaf92fa6069e0ef79533be5d57a5946a1839f55446072fa322ed808 SHA512 5b201d22560e147a3d5471010b898ad0268c3a2453b870d1267b6ba92e540cf9f75099336c1ab08217e41827ac86fe04525726bf29ad117e5dcbaef9a8d0622a
-DIST libgd-2.3.1.tar.xz 2632076 BLAKE2B 22457c4a2fc493872ccbc8a2c45283e785ab200ca671c48f00f3f22a037fac3b97afb35534f5ec7288714a16dfaa59ed53acbbd39c3e7f89f16cdec72ef1bed1 SHA512 0b96406a1d62129d7d63f78fc4558062c223a3bfbf9719be86362fd922b72b5dac294524dd1b0a996a4a7a709ee9d2dfc790ee32564add70adad41d044a0ed80
 DIST libgd-2.3.2.tar.xz 2821096 BLAKE2B a126fbac1c20113fe8f27187e70b1b81712212b7da01c9a0b3e5e38fb4d4356b7992a0cfd7db55a2f94877f6ecf82d775c39977a523db1f948cf215c6c0d7672 SHA512 a31c6dbb64e7b725b63f3b400f7bebc289e2d776bdca0595af23006841660dc93a56c2247b98f8a584438a826f9e9ff0bea17d0b3900e48e281580b1308794d2
 DIST libgd-2.3.3.tar.xz 2809056 BLAKE2B bde7a3218e5b07758b0beb96a654a44a97ba79abfe1ebe115ffd44aa34301be8e76f33840824362826dbfe93b16a4c4403b00b34aa631a0b18398cd46a09889d SHA512 aa49d4381d604a4360d556419d603df2ffd689a6dcc10f8e5e1d158ddaa3ab89912f6077ca77da4e370055074007971cf6d356ec9bf26dcf39bcff3208bc7e6c

diff --git a/media-libs/gd/files/gd-2.3.0-fix-tests-bug722448.patch b/media-libs/gd/files/gd-2.3.0-fix-tests-bug722448.patch
deleted file mode 100644
index eef62fca676b..000000000000
--- a/media-libs/gd/files/gd-2.3.0-fix-tests-bug722448.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From ec0b4397698bd358557d33641aac4beb1912f43b Mon Sep 17 00:00:00 2001
-From: wilson chen <willson.chenwx@gmail.com>
-Date: Wed, 15 Apr 2020 00:25:01 +0800
-Subject: [PATCH] Improve test cases for gdImageString16 and gdImageStringUp16
- (#625)
-
-Fixed #623. wchar_t is 32 bits on 64-bits AIX, which will result in test case failure.
-So we replace wchar_t with unsigned short array.
----
- tests/gdimagestring16/gdimagestring16.c     | 6 ++----
- tests/gdimagestringup16/gdimagestringup16.c | 6 ++----
- 2 files changed, 4 insertions(+), 8 deletions(-)
-
-diff --git a/tests/gdimagestring16/gdimagestring16.c b/tests/gdimagestring16/gdimagestring16.c
-index 57eae978..0ca06680 100644
---- a/tests/gdimagestring16/gdimagestring16.c
-+++ b/tests/gdimagestring16/gdimagestring16.c
-@@ -9,9 +9,7 @@ int main()
- {
- 	/* Declare the image */
- 	gdImagePtr im = NULL;
--	wchar_t *wchr = L"H";
--	unsigned short *sptr;
--	sptr = (unsigned short *)wchr;
-+	unsigned short s[2] = {'H', 0};
- 	int foreground;
- 	int errorcode = 0;
- 	gdFontPtr fontptr = gdFontGetLarge();
-@@ -20,7 +18,7 @@ int main()
- 	gdImageColorAllocate(im, 255, 255, 255);
- 	foreground = gdImageColorAllocate(im, 22, 4, 238);
- 
--	gdImageString16(im, fontptr, 2, 2, sptr, foreground);
-+	gdImageString16(im, fontptr, 2, 2, s, foreground);
- 
- 	if (!gdAssertImageEqualsToFile("gdimagestring16/gdimagestring16_exp.png", im))
- 		errorcode = 1;
-diff --git a/tests/gdimagestringup16/gdimagestringup16.c b/tests/gdimagestringup16/gdimagestringup16.c
-index c843abec..c24639fd 100644
---- a/tests/gdimagestringup16/gdimagestringup16.c
-+++ b/tests/gdimagestringup16/gdimagestringup16.c
-@@ -9,9 +9,7 @@ int main()
- {
- 	/* Declare the image */
- 	gdImagePtr im = NULL;
--	wchar_t *wchr = L"H";
--	unsigned short *sptr;
--	sptr = (unsigned short *)wchr;
-+	unsigned short s[2] = {'H', 0};
- 	int foreground;
- 	int errorcode = 0;
- 	gdFontPtr fontptr = gdFontGetLarge();
-@@ -20,7 +18,7 @@ int main()
- 	gdImageColorAllocate(im, 255, 255, 255);
- 	foreground = gdImageColorAllocate(im, 22, 4, 238);
- 
--	gdImageStringUp16(im, fontptr, 2, 18, sptr, foreground);
-+	gdImageStringUp16(im, fontptr, 2, 18, s, foreground);
- 
- 	if (!gdAssertImageEqualsToFile("gdimagestringup16/gdimagestringup16_exp.png", im))
- 		errorcode = 1;
-

diff --git a/media-libs/gd/files/gd-2.3.0-getlib.patch b/media-libs/gd/files/gd-2.3.0-getlib.patch
deleted file mode 100644
index 91884e93292d..000000000000
--- a/media-libs/gd/files/gd-2.3.0-getlib.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 635dd9a3065ed88e1741e6b963044b80e913f96a Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 24 Mar 2020 08:01:01 +0100
-Subject: [PATCH] distribute getlib.sh
-
----
- config/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/config/Makefile.am b/config/Makefile.am
-index 122287ee..6416dda4 100644
---- a/config/Makefile.am
-+++ b/config/Makefile.am
-@@ -1,5 +1,5 @@
- ## Process this file with automake to produce Makefile.in -*-Makefile-*-
--EXTRA_DIST = gdlib.pc.cmake gdlib.pc.in getver.pl
-+EXTRA_DIST = gdlib.pc.cmake gdlib.pc.in getlib.sh getver.pl
- 
- pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = gdlib.pc
-
-diff -ruN a/config/getlib.sh b/config/getlib.sh
---- a/config/getlib.sh	1970-01-01 00:00:00.000000000 -0000
-+++ b/config/getlib.sh	2020-05-05 17:37:31.638896089 -0000
-@@ -0,0 +1,43 @@
-+#!/bin/sh
-+
-+GETVER="${0%/*}/getver.pl"
-+GDLIB_MAJOR=$("${GETVER}" MAJOR)
-+GDLIB_MINOR=$("${GETVER}" MINOR)
-+GDLIB_REVISION=$("${GETVER}" RELEASE)
-+
-+# Dynamic library version information
-+# See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
-+
-+GDLIB_LT_CURRENT=3
-+# This is the version where the soname (current above) changes.  We use it
-+# to reset the revision base back to zero.  It's a bit of a pain, but some
-+# systems restrict the revision range below to [0..255] (like OS X).
-+GDLIB_PREV_MAJOR=2
-+GDLIB_PREV_MINOR=2
-+# This isn't 100% correct, but it tends to be a close enough approximation
-+# for how we manage the codebase.  It's rare to do a release that doesn't
-+# modify the library since this project is centered around the library.
-+GDLIB_LT_REVISION=$(( ((GDLIB_MAJOR - GDLIB_PREV_MAJOR) << 6) | ((GDLIB_MINOR - GDLIB_PREV_MINOR) << 3) | GDLIB_REVISION ))
-+GDLIB_LT_AGE=0
-+
-+# The first three fields we feed into libtool and the OS target determines how
-+# they get used.  The last two fields we feed into cmake.  We use the same rules
-+# as Linux SONAME versioning in libtool, but cmake should handle it for us.
-+case $1 in
-+CURRENT)
-+	printf '%s' "${GDLIB_LT_CURRENT}"
-+	;;
-+REVISION)
-+	printf '%s' "${GDLIB_LT_REVISION}"
-+	;;
-+AGE)
-+	printf '%s' "${GDLIB_LT_AGE}"
-+	;;
-+VERSION)
-+	printf '%s' "$(( GDLIB_LT_CURRENT - GDLIB_LT_AGE )).${GDLIB_LT_AGE}.${GDLIB_LT_REVISION}"
-+	;;
-+SONAME)
-+	printf '%s' "$(( GDLIB_LT_CURRENT - GDLIB_LT_AGE ))"
-+	;;
-+esac
-+
-diff --git a/configure.ac b/configure.ac
-index 8996053..86d0bc9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -20,7 +20,7 @@ AC_CANONICAL_HOST
- 
- dnl Keep the libtool version details in an external script so cmake can
- dnl access the values too.
--define([lt_gv], [config/getlib.sh ]$1)
-+define([lt_gv], [${SHELL} config/getlib.sh ]$1)
- m4_define([gd_LT_CURRENT], esyscmd(lt_gv(CURRENT)))
- m4_define([gd_LT_REVISION], esyscmd(lt_gv(REVISION)))
- m4_define([gd_LT_AGE], esyscmd(lt_gv(AGE)))

diff --git a/media-libs/gd/gd-2.3.0.ebuild b/media-libs/gd/gd-2.3.0.ebuild
deleted file mode 100644
index 2bbd3e5bb1d8..000000000000
--- a/media-libs/gd/gd-2.3.0.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit autotools flag-o-matic multilib-minimal
-
-DESCRIPTION="Graphics library for fast image creation"
-HOMEPAGE="https://libgd.org/ https://www.boutell.com/gd/"
-SRC_URI="https://github.com/libgd/libgd/releases/download/${P}/lib${P}.tar.xz"
-S="${WORKDIR}/lib${P}"
-
-LICENSE="gd IJG HPND BSD"
-SLOT="2/3"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="cpu_flags_x86_sse fontconfig +jpeg +png static-libs test tiff truetype webp xpm zlib"
-RESTRICT="!test? ( test )"
-
-# fontconfig has prefixed font paths, details see bug #518970
-REQUIRED_USE="
-	prefix? ( fontconfig )
-	test? ( png )
-"
-
-BDEPEND="virtual/pkgconfig"
-RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
-	jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
-	png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
-	tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
-	truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
-	webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] )
-	xpm? ( >=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-2.3.0-disable-flaky-tests.patch"
-	"${FILESDIR}/${PN}-2.3.0-getlib.patch"
-	"${FILESDIR}/${P}-fix-tests-bug722448.patch"
-)
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-multilib_src_configure() {
-	# bug 603360, https://github.com/libgd/libgd/blob/fd06f7f83c5e78bf5b7f5397746b4e5ee4366250/docs/README.TESTING#L65
-	if use cpu_flags_x86_sse ; then
-		append-cflags -msse -mfpmath=sse
-	else
-		append-cflags -ffloat-store
-	fi
-
-	# bug 632076, https://github.com/libgd/libgd/issues/278
-	if use arm64 || use ppc64 || use s390 ; then
-		append-cflags -ffp-contract=off
-	fi
-
-	# we aren't actually {en,dis}abling X here ... the configure
-	# script uses it just to add explicit -I/-L paths which we
-	# don't care about on Gentoo systems.
-	local myeconfargs=(
-		--disable-werror
-		--without-x
-		--without-liq
-		$(use_enable static-libs static)
-		$(use_with fontconfig)
-		$(use_with png)
-		$(use_with tiff)
-		$(use_with truetype freetype)
-		$(use_with jpeg)
-		$(use_with webp)
-		$(use_with xpm)
-		$(use_with zlib)
-	)
-	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install_all() {
-	dodoc README.md
-	find "${ED}" -name '*.la' -delete || die
-}

diff --git a/media-libs/gd/gd-2.3.1.ebuild b/media-libs/gd/gd-2.3.1.ebuild
deleted file mode 100644
index 99fe254589bc..000000000000
--- a/media-libs/gd/gd-2.3.1.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools flag-o-matic multilib-minimal
-
-DESCRIPTION="Graphics library for fast image creation"
-HOMEPAGE="https://libgd.org/ https://www.boutell.com/gd/"
-SRC_URI="https://github.com/libgd/libgd/releases/download/${P}/lib${P}.tar.xz"
-S="${WORKDIR}/lib${P}"
-
-LICENSE="gd IJG HPND BSD"
-SLOT="2/3"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="cpu_flags_x86_sse fontconfig +jpeg +png static-libs test tiff truetype webp xpm zlib"
-RESTRICT="!test? ( test )"
-
-# fontconfig has prefixed font paths, details see bug #518970
-REQUIRED_USE="
-	prefix? ( fontconfig )
-	test? ( png )
-"
-
-BDEPEND="virtual/pkgconfig"
-RDEPEND="fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
-	jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
-	png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
-	tiff? ( media-libs/tiff:0[${MULTILIB_USEDEP}] )
-	truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
-	webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] )
-	xpm? ( >=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}] >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-2.3.0-disable-flaky-tests.patch"
-)
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-multilib_src_configure() {
-	# bug 603360, https://github.com/libgd/libgd/blob/fd06f7f83c5e78bf5b7f5397746b4e5ee4366250/docs/README.TESTING#L65
-	if use cpu_flags_x86_sse ; then
-		append-cflags -msse -mfpmath=sse
-	else
-		append-cflags -ffloat-store
-	fi
-
-	# bug 632076, https://github.com/libgd/libgd/issues/278
-	if use arm64 || use ppc64 || use s390 ; then
-		append-cflags -ffp-contract=off
-	fi
-
-	# we aren't actually {en,dis}abling X here ... the configure
-	# script uses it just to add explicit -I/-L paths which we
-	# don't care about on Gentoo systems.
-	local myeconfargs=(
-		--disable-werror
-		--without-x
-		--without-liq
-		$(use_enable static-libs static)
-		$(use_with fontconfig)
-		$(use_with png)
-		$(use_with tiff)
-		$(use_with truetype freetype)
-		$(use_with jpeg)
-		$(use_with webp)
-		$(use_with xpm)
-		$(use_with zlib)
-	)
-	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install_all() {
-	dodoc README.md
-	find "${ED}" -name '*.la' -delete || die
-}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
@ 2023-08-21 20:46 Michael Orlitzky
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Orlitzky @ 2023-08-21 20:46 UTC (permalink / raw
  To: gentoo-commits

commit:     620a28b9417440d1e59ca93178063ba54fd2d55d
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 21 20:22:53 2023 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Mon Aug 21 20:44:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=620a28b9

media-libs/gd: backport GD_BICUBIC fix, update EAPI 7 -> 8

The GD_BICUBIC interpolation methods were accidentally removed
upstream. They have since been added back, but not in a release.
We backport the upstream patch for the issue because dev-lang/php
exposes and tests these methods.

Closes: https://bugs.gentoo.org/912772
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 media-libs/gd/files/gd-2.3.3-GD_BICUBIC.patch | 31 +++++++++
 media-libs/gd/gd-2.3.3-r4.ebuild              | 96 +++++++++++++++++++++++++++
 2 files changed, 127 insertions(+)

diff --git a/media-libs/gd/files/gd-2.3.3-GD_BICUBIC.patch b/media-libs/gd/files/gd-2.3.3-GD_BICUBIC.patch
new file mode 100644
index 000000000000..e89df284df9c
--- /dev/null
+++ b/media-libs/gd/files/gd-2.3.3-GD_BICUBIC.patch
@@ -0,0 +1,31 @@
+From a5f5698a6832fc1f8179a9257f0b91c9a8ef496b Mon Sep 17 00:00:00 2001
+From: Cyprien Nicolas <cyprien@octopuce.fr>
+Date: Thu, 27 Oct 2022 14:36:33 +0200
+Subject: [PATCH] Fix #847: enable back GD_BICUBIC* interpolation methods
+
+(cherry picked from commit 39abd7238cea2ba8baa4bcac1d6fc01c6cb8afab)
+---
+ src/gd_interpolation.c                               |  5 +++++
+ tests/gdimagesetinterpolationmethod/.gitignore       |  1 +
+ tests/gdimagesetinterpolationmethod/CMakeLists.txt   |  1 +
+ tests/gdimagesetinterpolationmethod/Makemodule.am    |  3 ++-
+ .../gdimagesetinterpolationmethod/github_bug_00847.c | 12 ++++++++++++
+ 5 files changed, 21 insertions(+), 1 deletion(-)
+ create mode 100644 tests/gdimagesetinterpolationmethod/github_bug_00847.c
+
+diff --git a/src/gd_interpolation.c b/src/gd_interpolation.c
+index 1f625dd22..cf77da7c8 100644
+--- a/src/gd_interpolation.c
++++ b/src/gd_interpolation.c
+@@ -2257,6 +2257,11 @@ BGD_DECLARE(int) gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMet
+ 		case GD_BESSEL:
+ 			im->interpolation = filter_bessel;
+ 			break;
++		case GD_BICUBIC_FIXED:
++		case GD_BICUBIC:
++			/* no interpolation as gdImageScale calls a dedicated function */
++			im->interpolation = NULL;
++			break;
+ 		case GD_BLACKMAN:
+ 			im->interpolation = filter_blackman;
+ 			break;

diff --git a/media-libs/gd/gd-2.3.3-r4.ebuild b/media-libs/gd/gd-2.3.3-r4.ebuild
new file mode 100644
index 000000000000..e6ad85f655c5
--- /dev/null
+++ b/media-libs/gd/gd-2.3.3-r4.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic multilib-minimal
+
+DESCRIPTION="Graphics library for fast image creation"
+HOMEPAGE="https://libgd.org/ https://www.boutell.com/gd/"
+SRC_URI="https://github.com/libgd/libgd/releases/download/${P}/lib${P}.tar.xz"
+S="${WORKDIR}/lib${P}"
+
+LICENSE="gd IJG HPND BSD"
+SLOT="2/3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="avif cpu_flags_x86_sse fontconfig +jpeg heif +png static-libs test tiff truetype webp xpm zlib"
+RESTRICT="!test? ( test )"
+
+# fontconfig has prefixed font paths, details see bug #518970
+REQUIRED_USE="
+	prefix? ( fontconfig )
+	test? ( png )
+"
+
+BDEPEND="virtual/pkgconfig"
+RDEPEND="
+	avif? ( media-libs/libavif:=[${MULTILIB_USEDEP}] )
+	fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
+	jpeg? ( media-libs/libjpeg-turbo[${MULTILIB_USEDEP}] )
+	heif? ( media-libs/libheif:=[${MULTILIB_USEDEP}] )
+	png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
+	tiff? ( media-libs/tiff:=[${MULTILIB_USEDEP}] )
+	truetype? ( >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}] )
+	webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] )
+	xpm? (
+		>=x11-libs/libXpm-3.5.10-r1[${MULTILIB_USEDEP}]
+		>=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
+	)
+	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.3.0-disable-flaky-tests.patch"
+	"${FILESDIR}/${P}-GD_BICUBIC.patch"
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+multilib_src_configure() {
+	# bug 603360, https://github.com/libgd/libgd/blob/fd06f7f83c5e78bf5b7f5397746b4e5ee4366250/docs/README.TESTING#L65
+	if use cpu_flags_x86_sse ; then
+		append-cflags -msse -mfpmath=sse
+	else
+		append-cflags -ffloat-store
+	fi
+
+	# bug 632076, https://github.com/libgd/libgd/issues/278
+	if use arm64 || use ppc64 || use s390 ; then
+		append-cflags -ffp-contract=off
+	fi
+
+	# we aren't actually {en,dis}abling X here ... the configure
+	# script uses it just to add explicit -I/-L paths which we
+	# don't care about on Gentoo systems.
+	local myeconfargs=(
+		--disable-werror
+		--without-x
+		--without-liq
+		$(use_enable static-libs static)
+		$(use_with avif)
+		$(use_with fontconfig)
+		$(use_with png)
+		$(use_with tiff)
+		$(use_with truetype freetype)
+		$(use_with heif)
+		$(use_with jpeg)
+		$(use_with webp)
+		$(use_with xpm)
+		$(use_with zlib)
+	)
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+	# See https://github.com/libgd/libgd/issues/763 (although it still passed without it here?)
+	TMPDIR="${T}" default
+}
+
+multilib_src_install_all() {
+	dodoc README.md
+	find "${ED}" -name '*.la' -delete || die
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-08-21 20:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-24  8:16 [gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/ Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2016-07-22  6:05 Mike Frysinger
2018-09-14 19:16 Andreas Sturmlechner
2020-05-10 22:41 Thomas Deutschmann
2020-05-12 22:30 Thomas Deutschmann
2022-04-17 18:32 Sam James
2023-08-21 20:46 Michael Orlitzky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox