[gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
commit: 620a28b9417440d1e59ca93178063ba54fd2d55d Author: Michael Orlitzky gentoo org> AuthorDate: Mon Aug 21 20:22:53 2023 + Commit: Michael Orlitzky gentoo org> CommitDate: Mon Aug 21 20:44:37 2023 + 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 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 ..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 +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 ..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,
[gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
commit: 34371f4c666e0e5c3beabb8b4eccb52bf5e4d150 Author: Sam James gentoo org> AuthorDate: Sun Apr 17 18:26:55 2022 + Commit: Sam James gentoo org> CommitDate: Sun Apr 17 18:26:55 2022 + 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 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.. --- 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 -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
[gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/
commit: 6f62811e7f813c38a3e576f1ceee8f27a5f5da6a Author: Michael Mair-Keimberger gmail com> AuthorDate: Fri Jun 26 06:50:51 2020 + Commit: Aaron Bauman gentoo org> CommitDate: Sat Jun 27 20:49:26 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f62811e media-libs/gd: remove unused patches Package-Manager: Portage-2.3.101, Repoman-2.3.22 Signed-off-by: Michael Mair-Keimberger gmail.com> Closes: https://github.com/gentoo/gentoo/pull/16425 Signed-off-by: Aaron Bauman gentoo.org> .../gd/files/gd-2.2.5-CVE-2018-1000222.patch | 73 -- media-libs/gd/files/gd-2.2.5-CVE-2018-5711.patch | 124 - media-libs/gd/files/gd-2.2.5-CVE-2019-6977.patch | 28 --- media-libs/gd/files/gd-2.2.5-CVE-2019-6978.patch | 278 - media-libs/gd/files/gd-2.2.5-ossfuzz5700.patch | 103 5 files changed, 606 deletions(-) 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 deleted file mode 100644 index 80f9712bf8e..000 --- a/media-libs/gd/files/gd-2.2.5-CVE-2018-1000222.patch +++ /dev/null @@ -1,73 +0,0 @@ -From ac16bdf2d41724b5a65255d4c28fb0ec46bc42f5 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger -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/files/gd-2.2.5-CVE-2018-5711.patch b/media-libs/gd/files/gd-2.2.5-CVE-2018-5711.patch deleted file mode 100644 index 6d9de06998a..000 --- a/media-libs/gd/files/gd-2.2.5-CVE-2018-5711.patch +++ /dev/null @@ -1,124 +0,0 @@ -From a11f47475e6443b7f32d21f2271f28f417e2ac04 Mon Sep 17 00:00:00 2001 -From: "Christoph M. Becker" -Date: Wed, 29 Nov 2017 19:37:38 +0100 -Subject: [PATCH] Fix #420: Potential infinite loop in gdImageCreateFromGifCtx - -Due to a signedness confusion in `GetCode_` a corrupt GIF file can -trigger an infinite loop. Furthermore we make sure that a GIF without -any palette entries is treated as invalid *after* open palette entries -have been removed. - -CVE-2018-5711 - -See also https://bugs.php.net/bug.php?id=75571. - src/gd_gif_in.c | 12 ++-- - tests/gif/CMakeLists.txt| 1 + - tests/gif/Makemodule.am | 2 ++ - tests/gif/php_bug_75571.c | 28 - tests/gif/php_bug_75571.gif | Bin 0 -> 1731 bytes - 6 files changed, 38 insertions(+), 6 deletions(-) -
[gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
commit: 394bb39d8e64a4b5e16c32c5ce03aa28d6f713e2 Author: Sam James (sam_c) cmpct info> AuthorDate: Mon May 11 23:06:20 2020 + Commit: Thomas Deutschmann gentoo org> CommitDate: Tue May 12 22:29:59 2020 + 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 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) cmpct.info> Closes: https://github.com/gentoo/gentoo/pull/15754 Signed-off-by: Thomas Deutschmann 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 000..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 +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() {
[gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
commit: 69c5150b44714482be91bee9004afffef4200a91 Author: Sam James (sam_c) cmpct info> AuthorDate: Tue May 5 18:11:14 2020 + Commit: Thomas Deutschmann gentoo org> CommitDate: Sun May 10 22:35:49 2020 + 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) cmpct.info> Closes: https://github.com/gentoo/gentoo/pull/15657 Signed-off-by: Thomas Deutschmann 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 000..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 000..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 +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.0 - b/config/getlib.sh 2020-05-05 17:37:31.638896089 - +@@ -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
[gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
commit: 04cf9aa3bf7e0746e85461c3c56d9f9a95ce6fba Author: Andreas Sturmlechner gentoo org> AuthorDate: Fri Sep 14 19:11:20 2018 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Fri Sep 14 19:15:47 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04cf9aa3 media-libs/gd: Fix CVE-2018-1000222 Thanks-to: Eddie Chapman 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 000..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 +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 000..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}]
[gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
commit: 9670e5e0434f05a72dbc3d84b86f22dbcbcb1a03 Author: Mike Frysinger gentoo org> AuthorDate: Fri Jul 22 05:52:53 2016 + Commit: Mike Frysinger gentoo org> CommitDate: Fri Jul 22 06:04:38 2016 + 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 48f02a4b89e412870f9091b92eb26136c5c0d795722262ad973c7d4103476204a2de36133a2634b8f410d6bccdcf60afb829a74ac2fddfb96aff2cd2567b 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..000 --- 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-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 - #include -+#include - - #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..000 --- 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 -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..000 --- 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 -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
[gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
commit: ede657b970d1deee8305dbefaf5651c37aea115c Author: Mike Frysinger gentoo org> AuthorDate: Fri Jun 24 08:15:56 2016 + Commit: Mike Frysinger gentoo org> CommitDate: Fri Jun 24 08:15:56 2016 + 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 000..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+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