Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Mar 2024 22:06:58 GMT
From:      Emanuel Haupt <ehaupt@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 1f350d89aca7 - main - www/fgallery: Migrate to oxipng
Message-ID:  <202403202206.42KM6wLN097876@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by ehaupt:

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

commit 1f350d89aca79fc0ddac47301eb904a97aaa2037
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2024-03-20 22:05:18 +0000
Commit:     Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2024-03-20 22:06:48 +0000

    www/fgallery: Migrate to oxipng
    
    Replace pngcrush with oxipng as pngcrush no longer compiles and will be
    removed.
    
    Also switch to ImageMagick 7
    
    PR:             277761
---
 www/fgallery/Makefile             | 13 +++++++++----
 www/fgallery/files/patch-fgallery | 11 +++++++++++
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/www/fgallery/Makefile b/www/fgallery/Makefile
index e4c462781019..eef5145f794c 100644
--- a/www/fgallery/Makefile
+++ b/www/fgallery/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	fgallery
 PORTVERSION=	1.9.1
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	www graphics
 
 MAINTAINER=	ehaupt@FreeBSD.org
@@ -15,7 +15,7 @@ RUN_DEPENDS=	exiftool:graphics/p5-Image-ExifTool \
 		exiftran:graphics/exiftran \
 		p5-Cpanel-JSON-XS>=0:converters/p5-Cpanel-JSON-XS
 
-USES=		magick:6,run
+USES=		magick:7,run
 USE_GITHUB=	yes
 GH_ACCOUNT=	wavexx
 GH_TAGNAME=	45a8629
@@ -23,21 +23,26 @@ GH_TAGNAME=	45a8629
 NO_ARCH=	yes
 NO_BUILD=	yes
 
-OPTIONS_DEFINE=		7ZIP FACEDETECT JPEGOPTIM
-OPTIONS_DEFAULT=	7ZIP FACEDETECT JPEGOPTIM
+OPTIONS_DEFINE=		7ZIP FACEDETECT JPEGOPTIM OXIPNG
+OPTIONS_DEFAULT=	7ZIP FACEDETECT JPEGOPTIM OXIPNG
 
 7ZIP_DESC=		Use 7-Zip for better zip compression
 FACEDETECT_DESC=	Face detection for improved thumbnail centering
 JPEGOPTIM_DESC=		Use jpegoptim for JPEG size optimization
+OXIPNG_DESC=		Use oxipng for PNG size optimization
 
 7ZIP_RUN_DEPENDS=	7zz:archivers/7-zip
 7ZIP_RUN_DEPENDS_OFF=	zip:archivers/zip
 FACEDETECT_RUN_DEPENDS=	facedetect:graphics/facedetect
 JPEGOPTIM_RUN_DEPENDS=	jpegoptim:graphics/jpegoptim
+OXIPNG_RUN_DEPENDS=	oxipng:graphics/oxipng
 
 post-patch-7ZIP-on:
 	@${REINPLACE_CMD} -e 's|7za|7zz|g' ${WRKSRC}/${PORTNAME}
 
+post-patch-OXIPNG-on:
+	@${REINPLACE_CMD} -e 's|pngcrush|oxipng|g' ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.1
+
 do-install:
 .for d in album view
 	(cd ${WRKSRC} && \
diff --git a/www/fgallery/files/patch-fgallery b/www/fgallery/files/patch-fgallery
new file mode 100644
index 000000000000..a621910e33ce
--- /dev/null
+++ b/www/fgallery/files/patch-fgallery
@@ -0,0 +1,11 @@
+--- fgallery.orig	2024-03-17 13:48:32 UTC
++++ fgallery
+@@ -649,7 +649,7 @@ sub process_img
+     sys('jpegoptim', '-q', $fout);
+   } elsif($pngoptim && $props{FileType} eq "PNG")
+   {
+-    sys('pngcrush', '-q', $fout, $ftmp);
++    sys('pngcrush', '-q --out', $ftmp, $fout);
+     rename($ftmp, $fout);
+   }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403202206.42KM6wLN097876>