git: 9f4f89ec9470 - main - graphics/png: Update to 1.6.38

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Sun, 16 Oct 2022 21:23:40 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9f4f89ec947067351dee8e6887d268e92ec0f317

commit 9f4f89ec947067351dee8e6887d268e92ec0f317
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2022-10-16 19:42:23 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2022-10-16 21:21:17 +0000

    graphics/png: Update to 1.6.38
    
    - Switch to CMake
    - Switch apng repo to https://sourceforge.net/projects/libpng-apng
    
    Changelog: https://github.com/glennrp/libpng/blob/v1.6.38/CHANGES
    
    PR:             266599
    Approved by:    desktop (arrowd)
    Exp-run by:     antoine
---
 graphics/png/Makefile              | 27 ++++++++++++---------------
 graphics/png/distinfo              | 10 +++++-----
 graphics/png/files/patch-configure | 11 -----------
 graphics/png/pkg-plist             | 10 ++++++----
 4 files changed, 23 insertions(+), 35 deletions(-)

diff --git a/graphics/png/Makefile b/graphics/png/Makefile
index 9a088e442f44..566dd86d9111 100644
--- a/graphics/png/Makefile
+++ b/graphics/png/Makefile
@@ -1,11 +1,9 @@
 PORTNAME=	png
-PORTVERSION=	1.6.37
-PORTREVISION=	1
+DISTVERSION=	1.6.38
 CATEGORIES=	graphics
-MASTER_SITES=	SF/lib${PORTNAME}/lib${PORTNAME}16/${PORTVERSION} \
-		ftp://ftp.simplesystems.org/pub/lib${PORTNAME}/${PORTNAME}/src/lib${PORTNAME}16/
-PATCH_SITES=	SF/apng/lib${PORTNAME}/lib${PORTNAME}16/
-DISTNAME=	lib${PORTNAME}-${PORTVERSION}
+MASTER_SITES=	SF/lib${PORTNAME}/lib${PORTNAME}16/${DISTVERSION}/
+PATCH_SITES=	SF/lib${PORTNAME}-apng/lib${PORTNAME}16/${DISTVERSION}/
+DISTNAME=	lib${PORTNAME}-${DISTVERSION}
 
 MAINTAINER=	desktop@FreeBSD.org
 COMMENT=	Library for manipulating PNG images
@@ -17,23 +15,22 @@ LICENSE_NAME=	libpng License
 LICENSE_FILE=	${WRKSRC}/LICENSE
 LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 
-USE_CSTD=	gnu89
-USES=		cpe libtool tar:xz
+USES=		cmake:testing cpe pathfix tar:xz
 CPE_PRODUCT=	libpng
-GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--with-pkgconfigdir=${PREFIX}/libdata/pkgconfig
-INSTALL_TARGET=	install-strip
-TEST_TARGET=	check-TESTS
 USE_LDCONFIG=	yes
 
+CMAKE_OFF=	PNG_TESTS
+CMAKE_TESTING_ON=	PNG_TESTS
+
 OPTIONS_DEFINE=	APNG SIMD
 OPTIONS_DEFAULT=APNG
 OPTIONS_DEFAULT_aarch64=	SIMD
 OPTIONS_DEFAULT_amd64=	SIMD
 OPTIONS_DEFAULT_powerpc64le=	SIMD
+
 APNG_DESC=Enable Animated PNG support
-SIMD_CONFIGURE_OFF=	--enable-hardware-optimizations=no
-SIMD_CONFIGURE_ON=	--enable-hardware-optimizations=yes
+
+SIMD_CMAKE_BOOL=	PNG_HARDWARE_OPTIMIZATIONS
 
 .include <bsd.port.options.mk>
 
@@ -43,7 +40,7 @@ CFLAGS+=	-maltivec -mvsx
 .endif
 
 .if ${PORT_OPTIONS:MAPNG} || make(makesum)
-PATCHFILES=	${DISTNAME}-apng.patch.gz
+PATCHFILES=	${DISTNAME}-apng.patch.gz:-p1
 .endif
 
 .include <bsd.port.mk>
diff --git a/graphics/png/distinfo b/graphics/png/distinfo
index 6bd81a53e9d1..b0b61065fd10 100644
--- a/graphics/png/distinfo
+++ b/graphics/png/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1556098534
-SHA256 (libpng-1.6.37.tar.xz) = 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
-SIZE (libpng-1.6.37.tar.xz) = 1012272
-SHA256 (libpng-1.6.37-apng.patch.gz) = 10d9e0cb60e2b387a79b355eb7527c0bee2ed8cbd12cf04417cabc4d6976683c
-SIZE (libpng-1.6.37-apng.patch.gz) = 10334
+TIMESTAMP = 1664110848
+SHA256 (libpng-1.6.38.tar.xz) = b3683e8b8111ebf6f1ac004ebb6b0c975cd310ec469d98364388e9cedbfa68be
+SIZE (libpng-1.6.38.tar.xz) = 1023168
+SHA256 (libpng-1.6.38-apng.patch.gz) = 8c0363977c44ee1c7d5d42cc02d82b83eeb2d49ec4f7c2f4d475a80c8311989f
+SIZE (libpng-1.6.38-apng.patch.gz) = 10766
diff --git a/graphics/png/files/patch-configure b/graphics/png/files/patch-configure
deleted file mode 100644
index 0bf0bec66031..000000000000
--- a/graphics/png/files/patch-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig	2021-01-21 14:33:24 UTC
-+++ configure
-@@ -13533,7 +13533,7 @@ $as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h
- $as_echo "#define PNG_MIPS_MSA_OPT 0" >>confdefs.h
- 
-               ;;
--            i?86|x86_64)
-+            i?86|x86_64|amd64)
-               enable_intel_sse=yes
- 
- $as_echo "#define PNG_INTEL_SSE_OPT 1" >>confdefs.h
diff --git a/graphics/png/pkg-plist b/graphics/png/pkg-plist
index 23fc99d4174f..bd0e2fdd43ab 100644
--- a/graphics/png/pkg-plist
+++ b/graphics/png/pkg-plist
@@ -10,12 +10,14 @@ include/pngconf.h
 include/pnglibconf.h
 lib/libpng.a
 lib/libpng.so
+lib/libpng/libpng16-%%CMAKE_BUILD_TYPE%%.cmake
+lib/libpng/libpng16.cmake
 lib/libpng16.a
 lib/libpng16.so
 lib/libpng16.so.16
-lib/libpng16.so.16.37.0
+lib/libpng16.so.16.38.0
 libdata/pkgconfig/libpng.pc
 libdata/pkgconfig/libpng16.pc
-man/man3/libpng.3.gz
-man/man3/libpngpf.3.gz
-man/man5/png.5.gz
+share/man/man3/libpng.3.gz
+share/man/man3/libpngpf.3.gz
+share/man/man5/png.5.gz