git: e620341ed324 - main - www/piwigo: Respect defaults for ImageMagick.

From: Alexander Leidinger <netchild_at_FreeBSD.org>
Date: Wed, 08 Mar 2023 19:12:13 UTC
The branch main has been updated by netchild:

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

commit e620341ed324b82f483adeb371ef26e6a5d1ce8b
Author:     Krysztof Stryjek <kst@codenix.pl>
AuthorDate: 2023-03-08 19:09:37 +0000
Commit:     Alexander Leidinger <netchild@FreeBSD.org>
CommitDate: 2023-03-08 19:10:47 +0000

    www/piwigo: Respect defaults for ImageMagick.
---
 www/piwigo/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/www/piwigo/Makefile b/www/piwigo/Makefile
index c3b175a93c36..1fe8a1577e07 100644
--- a/www/piwigo/Makefile
+++ b/www/piwigo/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	piwigo
 DISTVERSION=	13.6.0
-PORTREVISION=	0
+PORTREVISION=	1
 PKGNAMESUFFIX=	${PHP_PKGNAMESUFFIX}
 CATEGORIES=	www
 MASTER_SITES=	https://piwigo.org/download/dlcounter.php?code=${PORTVERSION}&/
@@ -48,11 +48,17 @@ OPT_DESC=	Optional dependencies
 
 EXIFTOOL_RUN_DEPENDS=	exiftool:graphics/p5-Image-ExifTool
 FFMPEG_RUN_DEPENDS=	ffmpeg:multimedia/ffmpeg
-IMAGICK_RUN_DEPENDS=	${LOCALBASE}/lib/php/${PHP_EXT_DIR}/imagick.so:graphics/pecl-imagick@${PHP_FLAVOR}
+IMAGICK_RUN_DEPENDS=	${IMAGEMAGICK_DEPENDS}
 MEDIAINFO_RUN_DEPENDS=	mediainfo:multimedia/mediainfo
 
 .include <bsd.port.pre.mk>
 
+.if !empty(IMAGEMAGICK_DEFAULT:M6) || !empty(IMAGEMAGICK_DEFAULT:M6-*)
+IMAGEMAGICK_DEPENDS=	${PECL_PKGNAMEPREFIX}imagick>=2.2.2:graphics/pecl-imagick@${PHP_FLAVOR}
+.elif !empty(IMAGEMAGICK_DEFAULT:M7) || !empty(IMAGEMAGICK_DEFAULT:M7-*)
+IMAGEMAGICK_DEPENDS=	${PECL_PKGNAMEPREFIX}imagick-im7>=2.2.2:graphics/pecl-imagick-im7@${PHP_FLAVOR}
+.endif
+
 pre-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}/
 	@cd ${WRKSRC}/doc/ && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}/