git: 8b299dec6794 - main - www/angie-module-image-filter: Angie image-filter dynamic module

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Wed, 09 Aug 2023 13:04:35 UTC
The branch main has been updated by fuz:

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

commit 8b299dec679441240f27cff3577a8a5b60fc6c9a
Author:     Oleg A. Mamontov <oleg@mamontov.net>
AuthorDate: 2023-08-07 18:30:02 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-08-09 13:01:16 +0000

    www/angie-module-image-filter: Angie image-filter dynamic module
    
    Module is a filter that transforms images in JPEG, GIF, PNG, and WebP formats.
    
    PR:             272999
---
 www/Makefile                                       |  1 +
 www/angie-module-image-filter/Makefile             | 24 ++++++++++++++++++++++
 www/angie-module-image-filter/files/pkg-message.in | 15 ++++++++++++++
 www/angie-module-image-filter/pkg-descr            |  3 +++
 www/angie-module-image-filter/pkg-plist            |  2 ++
 5 files changed, 45 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index 4c19a0c69e7b..07be8a226767 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -31,6 +31,7 @@
     SUBDIR += angie-module-brotli
     SUBDIR += angie-module-cache-purge
     SUBDIR += angie-module-geoip2
+    SUBDIR += angie-module-image-filter
     SUBDIR += anyremote2html
     SUBDIR += apache-mode.el
     SUBDIR += apache24
diff --git a/www/angie-module-image-filter/Makefile b/www/angie-module-image-filter/Makefile
new file mode 100644
index 000000000000..7e8444efad30
--- /dev/null
+++ b/www/angie-module-image-filter/Makefile
@@ -0,0 +1,24 @@
+PORTNAME=	angie-module-image-filter
+
+COMMENT=	Angie image-filter dynamic module
+
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libgd.so:graphics/gd
+
+CONFIGURE_ADD=	--with-http_image_filter_module=dynamic
+
+MASTERDIR=	${.CURDIR}/../../www/angie
+
+do-install:
+	${MKDIR} ${STAGEDIR}${MODDIR}
+
+	${INSTALL_LIB} ${WRKSRC}/objs/ngx_http_image_filter_module.so \
+	    ${STAGEDIR}${MODDIR}
+
+do-install-DEBUG-on:
+	${INSTALL} ${COPY} -m ${_SHAREMODE} \
+	    ${WRKSRC_DEBUG}/objs/ngx_http_image_filter_module.so \
+	    ${STAGEDIR}${MODDIR}/ngx_http_image_filter_module-debug.so
+
+.include "${MASTERDIR}/Makefile"
diff --git a/www/angie-module-image-filter/files/pkg-message.in b/www/angie-module-image-filter/files/pkg-message.in
new file mode 100644
index 000000000000..dcd7615b258d
--- /dev/null
+++ b/www/angie-module-image-filter/files/pkg-message.in
@@ -0,0 +1,15 @@
+[
+{ type: install
+  message: <<EOM
+
+The image-filter dynamic module for Angie has been installed.
+To enable this module, add the following to %%PREFIX%%/etc/angie/angie.conf
+and reload angie:
+
+    load_module modules/ngx_http_image_filter_module.so;
+
+Please refer to the modules documentation for further details:
+https://angie.software/en/http_image_filter/
+EOM
+}
+]
diff --git a/www/angie-module-image-filter/pkg-descr b/www/angie-module-image-filter/pkg-descr
new file mode 100644
index 000000000000..750738941d1b
--- /dev/null
+++ b/www/angie-module-image-filter/pkg-descr
@@ -0,0 +1,3 @@
+Module is a filter that transforms images in JPEG, GIF, PNG, and WebP formats.
+Transformation capabilities include crop, resize, rotate, and others. Several
+resulting image options are configurable.
diff --git a/www/angie-module-image-filter/pkg-plist b/www/angie-module-image-filter/pkg-plist
new file mode 100644
index 000000000000..8bee9ea158f0
--- /dev/null
+++ b/www/angie-module-image-filter/pkg-plist
@@ -0,0 +1,2 @@
+%%MODDIR%%/ngx_http_image_filter_module.so
+%%DEBUG%%%%MODDIR%%/ngx_http_image_filter_module-debug.so