summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2024-01-30 11:07:29 +0000
committerMarek Szuba <marecki@gentoo.org>2024-01-30 11:12:01 +0000
commit181aa56d715851ed0cd750a1c503ff26826766ca (patch)
treedb9cb71ffa3e073ec01b6a5fb649cfac600801d2 /media-gfx
parentlinux-mod-r1.eclass: warn if KV does not match virtual/dist-kernel (diff)
downloadgentoo-181aa56d715851ed0cd750a1c503ff26826766ca.tar.gz
gentoo-181aa56d715851ed0cd750a1c503ff26826766ca.tar.bz2
gentoo-181aa56d715851ed0cd750a1c503ff26826766ca.zip
media-gfx/pngcrush: only use PNG_IGNORE_ADLER32 if supported
Since libpng-1.6.41 support for PNG_IGNORE_ADLER32 is optional, disabled by default owing to its use of an undocumented zlib function, and not presently enabled in Gentoo. Funnily enough there are *two* places in pngcrush code where this option is used and one of them has already used an ifdef guard. Closes: https://bugs.gentoo.org/923023 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/pngcrush/files/pngcrush-1.8.13-adler32_check.patch13
-rw-r--r--media-gfx/pngcrush/pngcrush-1.8.13.ebuild6
2 files changed, 18 insertions, 1 deletions
diff --git a/media-gfx/pngcrush/files/pngcrush-1.8.13-adler32_check.patch b/media-gfx/pngcrush/files/pngcrush-1.8.13-adler32_check.patch
new file mode 100644
index 000000000000..60204718154f
--- /dev/null
+++ b/media-gfx/pngcrush/files/pngcrush-1.8.13-adler32_check.patch
@@ -0,0 +1,13 @@
+--- a/pngcrush.c
++++ b/pngcrush.c
+@@ -5520,8 +5520,10 @@
+ * they were already checked in the pngcrush_measure_idat
+ * function
+ */
++# ifdef PNG_IGNORE_ADLER32
+ png_set_option(read_ptr, PNG_IGNORE_ADLER32,
+ PNG_OPTION_ON);
++# endif
+ png_set_crc_action(read_ptr, PNG_CRC_QUIET_USE,
+ PNG_CRC_QUIET_USE);
+ }
diff --git a/media-gfx/pngcrush/pngcrush-1.8.13.ebuild b/media-gfx/pngcrush/pngcrush-1.8.13.ebuild
index 014de947ef4e..f6de7f55156d 100644
--- a/media-gfx/pngcrush/pngcrush-1.8.13.ebuild
+++ b/media-gfx/pngcrush/pngcrush-1.8.13.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -18,6 +18,10 @@ RDEPEND="media-libs/libpng:0=
DEPEND="${RDEPEND}"
BDEPEND="app-arch/xz-utils"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.8.13-adler32_check.patch
+)
+
DOCS=( ChangeLog.html )
S="${WORKDIR}"/${P}-nolib