git: 76614e4b5529 - main - graphics/optipng: Update to 0.7.8

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Thu, 09 Nov 2023 21:43:52 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=76614e4b55292c4da8be42183c21f7197ace04c2

commit 76614e4b55292c4da8be42183c21f7197ace04c2
Author:     Thomas Hurst <tom@hur.st>
AuthorDate: 2023-11-09 20:24:26 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2023-11-09 21:43:31 +0000

    graphics/optipng: Update to 0.7.8
    
    - CVE fix is now upstreamed
    - Remove old compile fix related patches
    - Remove gmake dependency
    
    Changelog: https://optipng.sourceforge.net/history.txt
---
 graphics/optipng/Makefile                           |  8 +++-----
 graphics/optipng/distinfo                           |  6 +++---
 graphics/optipng/files/patch-src_gifread_gifread.c  | 14 --------------
 graphics/optipng/files/patch-src_pngxtern_pngxmem.c | 11 -----------
 4 files changed, 6 insertions(+), 33 deletions(-)

diff --git a/graphics/optipng/Makefile b/graphics/optipng/Makefile
index acbe6053199d..352873275a8f 100644
--- a/graphics/optipng/Makefile
+++ b/graphics/optipng/Makefile
@@ -1,8 +1,7 @@
 PORTNAME=	optipng
-DISTVERSION=	0.7.7
-PORTREVISION=	1
+DISTVERSION=	0.7.8
 CATEGORIES=	graphics
-MASTER_SITES=	SF/${PORTNAME}/OptiPNG/${PORTNAME}-${PORTVERSION}
+MASTER_SITES=	SF/${PORTNAME}/OptiPNG/${PORTNAME}-${DISTVERSION}
 
 MAINTAINER=	tom@hur.st
 COMMENT=	Optimizer for PNG files
@@ -13,7 +12,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
 LIB_DEPENDS=	libpng.so:graphics/png
 
-USES=		cpe gmake localbase:ldflags
+USES=		cpe localbase:ldflags
 CPE_VENDOR=	optipng_project
 
 HAS_CONFIGURE=	yes
@@ -30,7 +29,6 @@ OPTIONS_DEFINE=	DOCS
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/optipng/optipng ${STAGEDIR}${PREFIX}/bin/
 	${INSTALL_MAN} ${WRKSRC}/src/optipng/man/optipng.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/
-
 	${INSTALL} -d ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/doc/,} ${STAGEDIR}${DOCSDIR}/
 
diff --git a/graphics/optipng/distinfo b/graphics/optipng/distinfo
index f4199736a041..23b9bcb85bc9 100644
--- a/graphics/optipng/distinfo
+++ b/graphics/optipng/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1515280833
-SHA256 (optipng-0.7.7.tar.gz) = 4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452
-SIZE (optipng-0.7.7.tar.gz) = 2329555
+TIMESTAMP = 1699204767
+SHA256 (optipng-0.7.8.tar.gz) = 25a3bd68481f21502ccaa0f4c13f84dcf6b20338e4c4e8c51f2cefbd8513398c
+SIZE (optipng-0.7.8.tar.gz) = 3294014
diff --git a/graphics/optipng/files/patch-src_gifread_gifread.c b/graphics/optipng/files/patch-src_gifread_gifread.c
deleted file mode 100644
index bfc0112026c5..000000000000
--- a/graphics/optipng/files/patch-src_gifread_gifread.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/gifread/gifread.c.orig	2017-12-10 23:49:00 UTC
-+++ src/gifread/gifread.c
-@@ -363,6 +363,11 @@ static int LZWGetCode(int code_size, int init_flag, FI
-         lastbit = (2 + count) * 8;
-     }
- 
-+    if (code_size && (size_t)(curbit + code_size - 1) / 8 >= sizeof(buffer)) {
-+        GIFError("Malformed GIF (CVE-2023-43907)");
-+        return -1;
-+    }
-+
-     ret = 0;
-     for (i = curbit, j = 0; j < code_size; ++i, ++j)
-         ret |= ((buffer[i / 8] & (1 << (i % 8))) != 0) << j;
diff --git a/graphics/optipng/files/patch-src_pngxtern_pngxmem.c b/graphics/optipng/files/patch-src_pngxtern_pngxmem.c
deleted file mode 100644
index cdf321697a5e..000000000000
--- a/graphics/optipng/files/patch-src_pngxtern_pngxmem.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/pngxtern/pngxmem.c.orig	2018-01-06 23:22:33 UTC
-+++ src/pngxtern/pngxmem.c
-@@ -35,7 +35,7 @@ pngx_malloc_rows_extended(png_structp pn
-    row_size = png_get_rowbytes(png_ptr, info_ptr);
-    /* libpng sets row_size to 0 when the width is too large to process. */
-    if (row_size == 0 ||
--       (pngx_alloc_size_t)height > (pngx_alloc_size_t)(-1) / sizeof(png_bytep))
-+       (pngx_alloc_size_t)height > (pngx_alloc_size_t)(-1U) / sizeof(png_bytep))
-       png_error(png_ptr, "Can't handle exceedingly large image dimensions");
-    if (row_size < min_row_size)
-       row_size = min_row_size;